X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=docker%2FDockerfile;h=e9d355de1c104887267be45e9478d6246885f373;hb=4b9f79e2820a011f6ebbba7fb92cdc120b364650;hp=e6adb491fa4f17ce3715fc75952eca89d60d2dd1;hpb=cbf9f4bcfccd322c5ff60166f889fc7afa269186;p=osm%2FMON.git diff --git a/docker/Dockerfile b/docker/Dockerfile index e6adb49..e9d355d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,8 @@ -# Copyright 2017 Intel Research and Development Ireland Limited +# Copyright 2018 Whitestack, LLC # ************************************************************* # This file is part of OSM Monitoring module -# All Rights Reserved to Intel Corporation +# All Rights Reserved to Whitestack, LLC # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain @@ -17,26 +17,50 @@ # under the License. # For those usages not covered by the Apache License, Version 2.0 please -# contact: prithiv.mohan@intel.com or adrian.hoban@intel.com - -#__author__ = "Prithiv Mohan" -#__date__ = "25/Sep/2017" - -FROM ubuntu:16.04 -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get --yes install git tox make python-all python-pip debhelper && \ - DEBIAN_FRONTEND=noninteractive apt-get --yes install wget python-dev python-software-properties python-stdeb&& \ - DEBIAN_FRONTEND=noninteractive pip install -U pip && \ - DEBIAN_FRONTENT=noninteractive pip install -U requests logutils jsonschema lxml && \ - DEBIAN_FRONTEND=noninteractive pip install -U setuptools setuptools-version-command stdeb jsmin && \ - DEBIAN_FRONTEND=noninteractive pip install -U six pyvcloud bottle cherrypy pyopenssl && \ - DEBIAN_FRONTEND=noninteractive apt-get --yes install default-jre libmysqlclient-dev && \ - DEBIAN_FRONTEND=noninteractive apt-get --yes install libmysqlclient-dev libxml2 && \ - DEBIAN_FRONTEND=noninteractive pip install -U MySQL-python \ - python-openstackclient \ - python-keystoneclient \ - aodhclient \ - gnocchiclient \ - boto==2.48 \ - python-cloudwatchlogs-logging \ - py-cloudwatch +# contact: bdiaz@whitestack.com or glavado@whitestack.com +## + +FROM ubuntu:20.04 + +LABEL authors="Benjamín Díaz" + +RUN apt-get --yes update \ + && apt-get --yes install git python3 python3-pip libssl-dev libffi-dev \ + && python3 -m pip install -U pip + +COPY requirements.txt /mon/requirements.txt + +RUN pip3 install -r /mon/requirements.txt + +COPY . /mon + +RUN pip3 install /mon + +ENV OSMMON_MESSAGE_DRIVER kafka +ENV OSMMON_MESSAGE_HOST kafka +ENV OSMMON_MESSAGE_PORT 9092 + +ENV OSMMON_DATABASE_DRIVER mongo +ENV OSMMON_DATABASE_URI mongodb://mongo:27017 + +ENV OSMMON_SQL_DATABASE_URI sqlite:///mon_sqlite.db +ENV OSMMON_GLOBAL_REQUEST_TIMEOUT 10 +ENV OSMMON_GLOBAL_LOGLEVEL INFO +ENV OSMMON_VCA_HOST localhost +ENV OSMMON_VCA_SECRET secret +ENV OSMMON_VCA_USER admin +ENV OSMMON_VCA_CACERT cacert +ENV OSMMON_DATABASE_COMMONKEY changeme +ENV OSMMON_COLLECTOR_INTERVAL 30 +ENV OSMMON_EVALUATOR_INTERVAL 30 +ENV OSMMON_PROMETHEUS_URL http://prometheus:9090 +ENV OSMMON_GRAFANA_URL http://grafana:3000 +ENV OSMMON_GRAFANA_USER admin +ENV OSMMON_GRAFANA_PASSWORD admin + +EXPOSE 8000 + +HEALTHCHECK --interval=5s --timeout=2s --retries=12 \ + CMD osm-mon-healthcheck || exit 1 + +CMD /bin/bash mon/docker/scripts/start.sh