From: gcalvino Date: Mon, 2 Apr 2018 10:46:28 +0000 (+0200) Subject: MON installation with Dockers X-Git-Tag: v4.0.0~21 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=ef4db8d50ca45cc1d4cb9b2c78c39c9a992df588;p=osm%2FMON.git MON installation with Dockers Signed-off-by: gcalvino Change-Id: I9ebc5a1b604d8fae2258c5c9ad75d44c5b1b23c6 --- diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..1963ede --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,35 @@ +# Dockerfile to launch MON module in a docker +# Kafka bus must be launched in a different container + +FROM ubuntu:16.04 + +LABEL authors="Guillermo Calvino" + +# 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 + +ENV BROKER_URI="" +ENV OS_AUTH_URL="" +ENV OS_PASSWORD="" +ENV OS_TENANT_NAME="" +ENV OS_USERNAME="" +ENV OS_IDENTITY_API_VERSION="" + +EXPOSE 8662 + +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 /root/MON \ + && pip install --upgrade pip \ + && pip install -r /root/MON/requirements.txt + +CMD /bin/bash /root/MON/docker/scripts/runInstall.sh \ No newline at end of file diff --git a/docker/scripts/runInstall.sh b/docker/scripts/runInstall.sh new file mode 100755 index 0000000..a17865b --- /dev/null +++ b/docker/scripts/runInstall.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +/bin/bash /root/MON/osm_mon/plugins/vRealiseOps/vROPs_Webservice/install.sh +nohup python /root/MON/osm_mon/plugins/OpenStack/Aodh/notifier.py & +python /root/MON/osm_mon/core/message_bus/common_consumer.py + diff --git a/requirements.txt b/requirements.txt index bad8167..e4872a4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,6 @@ # For those usages not covered by the Apache License, Version 2.0 please # contact: prithiv.mohan@intel.com or adrian.hoban@intel.com -peewee stdeb MySQL-python kafka