| calvinosanch | bfb7790 | 2019-07-31 13:31:16 +0000 | [diff] [blame] | 1 | ## |
| 2 | # Copyright 2019 ETSI |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | # not use this file except in compliance with the License. You may obtain |
| 6 | # 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, WITHOUT |
| 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | # License for the specific language governing permissions and limitations |
| 14 | # under the License. |
| 15 | ## |
| 16 | |
| 17 | ######################################################################## |
| 18 | |
| madavi | 2f3a6c3 | 2019-12-02 16:45:19 +0530 | [diff] [blame] | 19 | FROM ubuntu:18.04 |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 20 | |
| 21 | MAINTAINER Gennadiy Dubina <gennadiy.dubina@dataat.com>; Alfonso Tierno <alfonso.tiernosepulveda@telefoncia.com> |
| 22 | |
| tierno | c2e3579 | 2019-11-23 17:14:57 +0000 | [diff] [blame] | 23 | RUN apt-get update && apt-get -y install curl software-properties-common git tox python3-pip \ |
| tierno | c76fa28 | 2020-03-11 14:35:26 +0000 | [diff] [blame] | 24 | && python3 -m pip install --upgrade pip && python3 -m pip install pyangbind networking-l2gw |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 25 | |
| 26 | ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian |
| beierlm | a4a37f7 | 2020-06-26 12:55:01 -0400 | [diff] [blame^] | 27 | ARG RELEASE=ReleaseEIGHT-daily |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 28 | ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg |
| 29 | ARG REPOSITORY=testing |
| 30 | |
| 31 | RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add - |
| tierno | c2e3579 | 2019-11-23 17:14:57 +0000 | [diff] [blame] | 32 | RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} RO IM common openvim" && apt-get update |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 33 | |
| Mike Marchetti | 13d76c8 | 2018-09-19 15:00:36 -0400 | [diff] [blame] | 34 | ARG RO_VERSION |
| 35 | ARG IM_VERSION |
| 36 | |
| tierno | f96a8d6 | 2020-06-10 13:49:57 +0000 | [diff] [blame] | 37 | RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3-osm-im${IM_VERSION} \ |
| 38 | python3-osm-ro-plugin${RO_VERSION} \ |
| 39 | python3-osm-ro${RO_VERSION} python3-osm-roclient${RO_VERSION} \ |
| 40 | python3-osm-rosdn-arista-cloudvision${RO_VERSION} python3-osm-rosdn-dpb${RO_VERSION} \ |
| 41 | python3-osm-rosdn-dynpac${RO_VERSION} python3-osm-rosdn-floodlightof${RO_VERSION} \ |
| 42 | python3-osm-rosdn-ietfl2vpn${RO_VERSION} python3-osm-rosdn-juniper-contrail${RO_VERSION} \ |
| 43 | python3-osm-rosdn-odlof${RO_VERSION} python3-osm-rosdn-onos-vpls${RO_VERSION} \ |
| 44 | python3-osm-rosdn-onosof${RO_VERSION} \ |
| 45 | python3-osm-rovim-aws${RO_VERSION} python3-osm-rovim-azure${RO_VERSION} \ |
| 46 | python3-osm-rovim-fos${RO_VERSION} python3-osm-rovim-opennebula${RO_VERSION} \ |
| 47 | python3-osm-rovim-openstack${RO_VERSION} python3-osm-rovim-openvim${RO_VERSION} \ |
| 48 | python3-osm-rovim-vmware${RO_VERSION} |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 49 | |
| tierno | 1b866c0 | 2020-07-10 15:55:25 +0000 | [diff] [blame] | 50 | # ensure right version is installed as pyhton3-ccryptography install an old version |
| 51 | RUN python3 -m pip install --upgrade "cryptography>=2.5" |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 52 | |
| garciadeblas | e3697a1 | 2018-12-10 15:49:27 +0100 | [diff] [blame] | 53 | VOLUME /var/log/osm |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 54 | |
| 55 | EXPOSE 9090 |
| 56 | |
| 57 | # Two mysql databases are needed (DB and DB_OVIM). Can be hosted on same or separated containers |
| 58 | # These ENV must be provided |
| 59 | ENV RO_DB_HOST="" |
| 60 | ENV RO_DB_OVIM_HOST="" |
| 61 | # if empty RO_DB_HOST is assumed |
| 62 | |
| 63 | # These ENV should be provided first time for creating database. It will create and init only if empty! |
| 64 | ENV RO_DB_ROOT_PASSWORD="" |
| 65 | ENV RO_DB_OVIM_ROOT_PASSWORD="" |
| 66 | # if empty RO_DB_ROOT_PASSWORD is assumed |
| 67 | |
| 68 | # These ENV can be provided, but default values are ok |
| 69 | ENV RO_DB_USER=mano |
| 70 | ENV RO_DB_OVIM_USER=mano |
| 71 | ENV RO_DB_PASSWORD=manopw |
| 72 | ENV RO_DB_OVIM_PASSWORD=manopw |
| 73 | ENV RO_DB_PORT=3306 |
| 74 | ENV RO_DB_OVIM_PORT=3306 |
| 75 | ENV RO_DB_NAME=mano_db |
| 76 | ENV RO_DB_OVIM_NAME=mano_vim_db |
| tierno | c2e3579 | 2019-11-23 17:14:57 +0000 | [diff] [blame] | 77 | ENV OPENMANO_TENANT=osm |
| Mike Marchetti | 182bd73 | 2018-09-05 09:52:42 -0400 | [diff] [blame] | 78 | |
| tierno | 551c894 | 2019-02-07 14:42:14 +0100 | [diff] [blame] | 79 | HEALTHCHECK --start-period=130s --interval=10s --timeout=5s --retries=12 \ |
| Mike Marchetti | 851aac2 | 2018-09-20 10:18:01 -0400 | [diff] [blame] | 80 | CMD curl --silent --fail localhost:9090/openmano/tenants || exit 1 |
| tierno | 1ab62ca | 2019-06-19 15:30:16 +0000 | [diff] [blame] | 81 | CMD /usr/bin/RO-start.sh |
| 82 | |