Merge "Adds yaml support in policy module"
[osm/MON.git] / docker / Dockerfile
index e6adb49..e93bce5 100644 (file)
@@ -1,42 +1,35 @@
-# Copyright 2017 Intel Research and Development Ireland Limited
-# *************************************************************
+# Dockerfile to launch MON module in a docker
+# Kafka bus must be launched in a different container
 
-# This file is part of OSM Monitoring module
-# All Rights Reserved to Intel Corporation
+FROM ubuntu:16.04
 
-# 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
-# a copy of the License at
+LABEL authors="Guillermo Calvino"
 
-#         http://www.apache.org/licenses/LICENSE-2.0
+# These ENV must be provided
+# ENV BROKER_URI=kafka:9092
+# ENV OS_AUTH_URL=http://IP-ADDR:PORT/
+# ENV OS_PASSWORD=****
+# ENV OS_TENANT_NAME=****
+# ENV OS_USERNAME=****
+# ENV OS_IDENTITY_API_VERSION=v2 or 3
 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
+ENV BROKER_URI=""
+ENV OS_AUTH_URL=""
+ENV OS_PASSWORD=""
+ENV OS_TENANT_NAME=""
+ENV OS_USERNAME=""
+ENV OS_IDENTITY_API_VERSION=""
 
-# For those usages not covered by the Apache License, Version 2.0 please
-# contact: prithiv.mohan@intel.com or adrian.hoban@intel.com
+EXPOSE 8662
 
-#__author__ = "Prithiv Mohan"
-#__date__   = "25/Sep/2017"
+RUN apt-get --yes update \
+ && apt-get --yes install software-properties-common python-software-properties \
+ && apt-get --yes update \
+ && apt-get --yes install git python python-pip sudo libmysqlclient-dev libxext-dev libxrender-dev libxtst-dev \
+ && cd /root/ \
+ && git clone https://osm.etsi.org/gerrit/osm/MON MON \
+ && pip install pip==9.0.3 \
+ && pip install -r /root/MON/requirements.txt \
+ && pip install /root/MON
 
-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
+CMD /bin/bash /root/MON/docker/scripts/runInstall.sh