blob: de840dfb4a1ffa3ae6fe4d9af7fa9d0c8481c57c [file] [log] [blame]
Srikanth Vavilapalli31713602017-03-03 00:50:18 +00001FROM ubuntu:14.04.5
2LABEL maintainer "Open Networking Lab"
3
4# Install.
5RUN \
6 sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
7 apt-get update && \
8 apt-get -y upgrade && \
9 apt-get install -y curl git python-dev python-pip
10
11RUN pip install msgpack-python
12RUN pip install oslo.utils
13RUN pip install oslo.config
14RUN pip install netifaces
15RUN pip install Babel
16RUN pip install Flask
17RUN pip install kafka-python
18RUN pip install wrapt
19
20#Clone cord monitoring repository
21RUN git clone https://github.com/opencord/monitoring.git /opt/cord/monitoring/
22
23WORKDIR /opt/cord/monitoring/xos/synchronizer/ceilometer/ceilometer_pub_sub/
24RUN chmod +x sub_main.py
25
26RUN echo "#!/bin/sh" > deploy-cord-publish-subscribe
27RUN echo "if [ ! -z \"\$KAFKA_URL\" ]; then sed -r -i \"s,^(target) = (.*),target = \$KAFKA_URL,g\" pub_sub.conf; fi" >> deploy-cord-publish-subscribe
28RUN echo "python sub_main.py" >> deploy-cord-publish-subscribe
29RUN chmod +x deploy-cord-publish-subscribe
30
31CMD ["./deploy-cord-publish-subscribe"]