Srikanth Vavilapalli | 3171360 | 2017-03-03 00:50:18 +0000 | [diff] [blame^] | 1 | FROM ubuntu:14.04.5 |
| 2 | LABEL maintainer "Open Networking Lab" |
| 3 | |
| 4 | # Install. |
| 5 | RUN \ |
| 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 | |
| 11 | RUN pip install msgpack-python |
| 12 | RUN pip install oslo.utils |
| 13 | RUN pip install oslo.config |
| 14 | RUN pip install netifaces |
| 15 | RUN pip install Babel |
| 16 | RUN pip install Flask |
| 17 | RUN pip install kafka-python |
| 18 | RUN pip install wrapt |
| 19 | |
| 20 | #Clone cord monitoring repository |
| 21 | RUN git clone https://github.com/opencord/monitoring.git /opt/cord/monitoring/ |
| 22 | |
| 23 | WORKDIR /opt/cord/monitoring/xos/synchronizer/ceilometer/ceilometer_pub_sub/ |
| 24 | RUN chmod +x sub_main.py |
| 25 | |
| 26 | RUN echo "#!/bin/sh" > deploy-cord-publish-subscribe |
| 27 | RUN echo "if [ ! -z \"\$KAFKA_URL\" ]; then sed -r -i \"s,^(target) = (.*),target = \$KAFKA_URL,g\" pub_sub.conf; fi" >> deploy-cord-publish-subscribe |
| 28 | RUN echo "python sub_main.py" >> deploy-cord-publish-subscribe |
| 29 | RUN chmod +x deploy-cord-publish-subscribe |
| 30 | |
| 31 | CMD ["./deploy-cord-publish-subscribe"] |