blob: 6fb35cc1edb886487401851da31a1286d3f0e515 [file] [log] [blame]
Mike Marchetti182bd732018-09-05 09:52:42 -04001# 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
23FROM ubuntu:16.04
24
25LABEL authors="Guillermo Calvino"
26
27RUN apt-get update && apt-get -y install curl software-properties-common
28
Mike Marchetti13d76c82018-09-19 15:00:36 -040029RUN apt-get --yes update \
30 && apt-get --yes install git python python-pip python3 python3-pip libmysqlclient-dev libssl-dev libffi-dev \
tierno41d235f2018-10-24 11:01:39 +020031 && pip3 install pip==9.0.3
Mike Marchetti13d76c82018-09-19 15:00:36 -040032
Benjamin Diaz14017e52018-11-20 12:35:06 -030033RUN pip3 install 'macaroonbakery>=1.1,<2.0' 'pyRFC3339>=1.0,<2.0' \
34 'pyyaml>=3.0,<4.0' 'theblues>=0.3.8,<1.0' 'websockets>=4.0,<5.0' \
35 'paramiko' # PyNaCl
36
Mike Marchetti182bd732018-09-05 09:52:42 -040037ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
38ARG RELEASE=ReleaseFOUR-daily
39ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
40ARG REPOSITORY=testing
41
42RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
Benjamin Diaz6c8cb572018-11-20 09:19:27 -030043RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} MON N2VC common" && apt update
Mike Marchetti182bd732018-09-05 09:52:42 -040044
Mike Marchetti13d76c82018-09-19 15:00:36 -040045ARG MON_VERSION
46ARG COMMON_VERSION
Benjamin Diaz6c8cb572018-11-20 09:19:27 -030047ARG N2VC_VERSION
Mike Marchetti182bd732018-09-05 09:52:42 -040048
Benjamin Diaz6c8cb572018-11-20 09:19:27 -030049RUN apt-get --yes update && apt-get -y install python3-osm-common${COMMON_VERSION} python3-osm-mon${MON_VERSION} python3-n2vc${N2VC_VERSION}
Mike Marchetti182bd732018-09-05 09:52:42 -040050
51COPY scripts/ scripts/
52
Benjamin Diaz034df702018-10-08 17:16:47 -030053ENV BROKER_URI kafka:9092
Juancc084d72018-11-16 11:08:07 -030054ENV MONGO_URI mongodb://mongo:27017
Benjamin Diaz034df702018-10-08 17:16:47 -030055ENV DATABASE sqlite:///mon_sqlite.db
56ENV OS_NOTIFIER_URI localhost:8662
57ENV OS_DEFAULT_GRANULARITY 300
58ENV REQUEST_TIMEOUT 10
Benjamin Diaz6a239872018-11-15 10:31:08 -030059ENV OSMMON_LOG_LEVEL INFO
60ENV OSMMON_KAFKA_LOG_LEVEL INFO
61ENV OSMMON_VCA_HOST localhost
62ENV OSMMON_VCA_SECRET secret
63ENV OSMMON_VCA_USER admin
Mike Marchetti182bd732018-09-05 09:52:42 -040064
Benjamin Diaz03ceed32018-11-21 18:10:05 -030065EXPOSE 8000
66
67HEALTHCHECK --interval=5s --timeout=2s --retries=12 \
68 CMD osm-mon-healthcheck || exit 1
Mike Marchetti182bd732018-09-05 09:52:42 -040069
70CMD /bin/bash scripts/runInstall.sh