Adds support for Juju metrics in collector
[osm/MON.git] / docker / Dockerfile
index e6adb49..be93541 100644 (file)
@@ -1,8 +1,8 @@
-# Copyright 2017 Intel Research and Development Ireland Limited
+# Copyright 2018 Whitestack, LLC
 # *************************************************************
 
 # This file is part of OSM Monitoring module
-# All Rights Reserved to Intel Corporation
+# All Rights Reserved to Whitestack, LLC
 
 # Licensed under the Apache License, Version 2.0 (the "License"); you may
 # not use this file except in compliance with the License. You may obtain
 # under the License.
 
 # For those usages not covered by the Apache License, Version 2.0 please
-# contact: prithiv.mohan@intel.com or adrian.hoban@intel.com
-
-#__author__ = "Prithiv Mohan"
-#__date__   = "25/Sep/2017"
+# contact: bdiaz@whitestack.com or glavado@whitestack.com
+##
 
 FROM ubuntu:16.04
-RUN  apt-get update && \
-  DEBIAN_FRONTEND=noninteractive apt-get --yes install git tox make python-all python-pip debhelper && \
-  DEBIAN_FRONTEND=noninteractive apt-get --yes install wget python-dev python-software-properties python-stdeb&& \
-  DEBIAN_FRONTEND=noninteractive pip install -U pip && \
-  DEBIAN_FRONTENT=noninteractive pip install -U requests logutils jsonschema lxml && \
-  DEBIAN_FRONTEND=noninteractive pip install -U setuptools setuptools-version-command stdeb jsmin && \
-  DEBIAN_FRONTEND=noninteractive pip install -U six pyvcloud bottle cherrypy pyopenssl && \
-  DEBIAN_FRONTEND=noninteractive apt-get --yes install default-jre libmysqlclient-dev && \
-  DEBIAN_FRONTEND=noninteractive apt-get --yes install libmysqlclient-dev libxml2 && \
-  DEBIAN_FRONTEND=noninteractive pip install -U MySQL-python \
-                                                python-openstackclient \
-                                                python-keystoneclient \
-                                                aodhclient \
-                                                gnocchiclient \
-                                                boto==2.48 \
-                                                python-cloudwatchlogs-logging \
-                                                py-cloudwatch
+
+LABEL authors="Benjamín Díaz"
+
+RUN apt-get --yes update \
+ && apt-get --yes install git python3 python3-pip libmysqlclient-dev libssl-dev libffi-dev \
+ && pip3 install pip==9.0.3
+
+COPY requirements.txt /mon/requirements.txt
+
+RUN pip3 install -r /mon/requirements.txt
+
+COPY . /mon
+
+RUN pip3 install /mon
+
+ENV BROKER_URI kafka:9092
+ENV MONGO_URI mongo:27017
+ENV DATABASE sqlite:///mon_sqlite.db
+ENV OS_NOTIFIER_URI localhost:8662
+ENV OS_DEFAULT_GRANULARITY 300
+ENV REQUEST_TIMEOUT 10
+ENV OSMMON_LOG_LEVEL INFO
+ENV OSMMON_KAFKA_LOG_LEVEL INFO
+ENV OSMMON_VCA_HOST localhost
+ENV OSMMON_VCA_SECRET secret
+
+EXPOSE 8662 8000
+
+CMD /bin/bash mon/docker/scripts/runInstall.sh