| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 1 | # Copyright 2018 Whitestack, LLC |
| 2 | # ************************************************************* |
| 3 | |
| 4 | # This file is part of OSM Monitoring module |
| 5 | # All Rights Reserved to Whitestack, LLC |
| 6 | |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 8 | # not use this file except in compliance with the License. You may obtain |
| 9 | # a copy of the License at |
| 10 | |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 15 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 16 | # License for the specific language governing permissions and limitations |
| 17 | # under the License. |
| 18 | |
| 19 | # For those usages not covered by the Apache License, Version 2.0 please |
| 20 | # contact: bdiaz@whitestack.com or glavado@whitestack.com |
| 21 | ## |
| 22 | |
| 23 | FROM ubuntu:16.04 |
| 24 | |
| 25 | LABEL authors="Guillermo Calvino" |
| 26 | |
| 27 | RUN apt-get update && apt-get -y install curl software-properties-common |
| 28 | |
| Mike Marchetti | 13d76c8 | 2018-09-19 15:00:36 -0400 | [diff] [blame] | 29 | RUN apt-get --yes update \ |
| 30 | && apt-get --yes install git python python-pip python3 python3-pip libmysqlclient-dev libssl-dev libffi-dev \ |
| tierno | 41d235f | 2018-10-24 11:01:39 +0200 | [diff] [blame] | 31 | && pip3 install pip==9.0.3 |
| Mike Marchetti | 13d76c8 | 2018-09-19 15:00:36 -0400 | [diff] [blame] | 32 | |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 33 | ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian |
| 34 | ARG RELEASE=ReleaseFOUR-daily |
| 35 | ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg |
| 36 | ARG REPOSITORY=testing |
| 37 | |
| 38 | RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add - |
| Benjamin Diaz | 6c8cb57 | 2018-11-20 09:19:27 -0300 | [diff] [blame^] | 39 | RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} MON N2VC common" && apt update |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 40 | |
| Mike Marchetti | 13d76c8 | 2018-09-19 15:00:36 -0400 | [diff] [blame] | 41 | ARG MON_VERSION |
| 42 | ARG COMMON_VERSION |
| Benjamin Diaz | 6c8cb57 | 2018-11-20 09:19:27 -0300 | [diff] [blame^] | 43 | ARG N2VC_VERSION |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 44 | |
| Benjamin Diaz | 6c8cb57 | 2018-11-20 09:19:27 -0300 | [diff] [blame^] | 45 | RUN apt-get --yes update && apt-get -y install python3-osm-common${COMMON_VERSION} python3-osm-mon${MON_VERSION} python3-n2vc${N2VC_VERSION} |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 46 | |
| 47 | COPY scripts/ scripts/ |
| 48 | |
| Benjamin Diaz | 034df70 | 2018-10-08 17:16:47 -0300 | [diff] [blame] | 49 | ENV BROKER_URI kafka:9092 |
| Juan | cc084d7 | 2018-11-16 11:08:07 -0300 | [diff] [blame] | 50 | ENV MONGO_URI mongodb://mongo:27017 |
| Benjamin Diaz | 034df70 | 2018-10-08 17:16:47 -0300 | [diff] [blame] | 51 | ENV DATABASE sqlite:///mon_sqlite.db |
| 52 | ENV OS_NOTIFIER_URI localhost:8662 |
| 53 | ENV OS_DEFAULT_GRANULARITY 300 |
| 54 | ENV REQUEST_TIMEOUT 10 |
| Benjamin Diaz | 6a23987 | 2018-11-15 10:31:08 -0300 | [diff] [blame] | 55 | ENV OSMMON_LOG_LEVEL INFO |
| 56 | ENV OSMMON_KAFKA_LOG_LEVEL INFO |
| 57 | ENV OSMMON_VCA_HOST localhost |
| 58 | ENV OSMMON_VCA_SECRET secret |
| 59 | ENV OSMMON_VCA_USER admin |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 60 | |
| Benjamin Diaz | 6a23987 | 2018-11-15 10:31:08 -0300 | [diff] [blame] | 61 | EXPOSE 8662 8000 |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 62 | |
| 63 | CMD /bin/bash scripts/runInstall.sh |