blob: 14e62bb4c4fd2d0a9bc4aa34c1233fdeb9cf0750 [file] [log] [blame]
Matteo Scandoloeb0d11c2017-08-08 13:05:26 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Srikanth Vavilapalli31713602017-03-03 00:50:18 +000017FROM ubuntu:14.04.5
18LABEL maintainer "Open Networking Lab"
19
20# Install.
21RUN \
22 sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
23 apt-get update && \
24 apt-get -y upgrade && \
25 apt-get install -y curl git python-dev python-pip
26
27RUN pip install msgpack-python
28RUN pip install oslo.utils
29RUN pip install oslo.config
30RUN pip install netifaces
31RUN pip install Babel
32RUN pip install Flask
33RUN pip install kafka-python
34RUN pip install wrapt
35
36#Clone cord monitoring repository
37RUN git clone https://github.com/opencord/monitoring.git /opt/cord/monitoring/
38
39WORKDIR /opt/cord/monitoring/xos/synchronizer/ceilometer/ceilometer_pub_sub/
40RUN chmod +x sub_main.py
41
42RUN echo "#!/bin/sh" > deploy-cord-publish-subscribe
43RUN echo "if [ ! -z \"\$KAFKA_URL\" ]; then sed -r -i \"s,^(target) = (.*),target = \$KAFKA_URL,g\" pub_sub.conf; fi" >> deploy-cord-publish-subscribe
44RUN echo "python sub_main.py" >> deploy-cord-publish-subscribe
45RUN chmod +x deploy-cord-publish-subscribe
46
47CMD ["./deploy-cord-publish-subscribe"]