1 # Copyright 2018 Whitestack, LLC
2 # *************************************************************
4 # This file is part of OSM Monitoring module
5 # All Rights Reserved to Whitestack, LLC
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
11 # http://www.apache.org/licenses/LICENSE-2.0
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
19 # For those usages not covered by the Apache License, Version 2.0 please
20 # contact: bdiaz@whitestack.com or glavado@whitestack.com
25 LABEL authors="Guillermo Calvino"
28 && apt-get -y install curl \
29 software-properties-common \
40 && rm -rf /var/lib/apt/lists/* \
41 && pip3 install pip==9.0.3
43 RUN pip3 install 'macaroonbakery>=1.1,<2.0' 'pyRFC3339>=1.0,<2.0' \
44 'pyyaml>=3.0,<4.0' 'theblues>=0.3.8,<1.0' 'websockets>=4.0,<5.0' \
47 ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
48 ARG RELEASE=ReleaseFOUR-daily
49 ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
50 ARG REPOSITORY=testing
56 RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add - \
57 && add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} MON N2VC common" \
59 && apt-get -y install python3-osm-common${COMMON_VERSION} \
60 python3-osm-mon${MON_VERSION} \
61 python3-n2vc${N2VC_VERSION}
62 COPY scripts/ scripts/
64 ENV OSMMON_MESSAGE_DRIVER kafka
65 ENV OSMMON_MESSAGE_HOST kafka
66 ENV OSMMON_MESSAGE_PORT 9092
68 ENV OSMMON_DATABASE_DRIVER mongo
69 ENV OSMMON_DATABASE_URI mongodb://mongo:27017
71 ENV OSMMON_SQL_DATABASE_URI sqlite:///mon_sqlite.db
72 ENV OSMMON_OPENSTACK_DEFAULT_GRANULARITY 300
73 ENV OSMMON_GLOBAL_REQUEST_TIMEOUT 10
74 ENV OSMMON_GLOBAL_LOGLEVEL INFO
75 ENV OSMMON_VCA_HOST localhost
76 ENV OSMMON_VCA_SECRET secret
77 ENV OSMMON_VCA_USER admin
78 ENV OSMMON_DATABASE_COMMONKEY changeme
79 ENV OSMMON_COLLECTOR_INTERVAL 30
80 ENV OSMMON_EVALUATOR_INTERVAL 30
81 ENV OSMMON_PROMETHEUS_URL http://prometheus:9090
85 HEALTHCHECK --interval=5s --timeout=2s --retries=12 \
86 CMD osm-mon-healthcheck || exit 1
88 CMD /bin/bash scripts/start.sh