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
8 # http://www.apache.org/licenses/LICENSE-2.0
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
17 ########################################################################
21 MAINTAINER Gennadiy Dubina <gennadiy.dubina@dataat.com>; Alfonso Tierno <alfonso.tiernosepulveda@telefoncia.com>
23 RUN apt-get update && apt-get -y install curl software-properties-common git tox python3-pip \
24 && python3 -m pip install --upgrade pip && python3 -m pip install pyangbind
26 ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
27 ARG RELEASE=ReleaseFOUR-daily
28 ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
29 ARG REPOSITORY=testing
31 RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
32 RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} RO IM common openvim" && apt-get update
37 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3-osm-ro${RO_VERSION} python3-osm-im${IM_VERSION} \
38 python3-osm-roclient${RO_VERSION} \
39 python3-osm-rosdn-tapi${RO_VERSION} python3-osm-rosdn-dynpac${RO_VERSION} python3-osm-rosdn-onosof${RO_VERSION} \
40 python3-osm-rovim-vmware${RO_VERSION} python3-osm-rovim-openstack${RO_VERSION} \
41 python3-osm-rovim-openvim${RO_VERSION} python3-osm-rovim-azure${RO_VERSION} \
42 python3-osm-rovim-aws${RO_VERSION} python3-osm-rovim-fos${RO_VERSION} python3-osm-rovim-opennebula${RO_VERSION}
43 # python3-osm-rosdn-floodlightof python3-osm-rosdn-odlof
50 # Two mysql databases are needed (DB and DB_OVIM). Can be hosted on same or separated containers
51 # These ENV must be provided
53 ENV RO_DB_OVIM_HOST=""
54 # if empty RO_DB_HOST is assumed
56 # These ENV should be provided first time for creating database. It will create and init only if empty!
57 ENV RO_DB_ROOT_PASSWORD=""
58 ENV RO_DB_OVIM_ROOT_PASSWORD=""
59 # if empty RO_DB_ROOT_PASSWORD is assumed
61 # These ENV can be provided, but default values are ok
63 ENV RO_DB_OVIM_USER=mano
64 ENV RO_DB_PASSWORD=manopw
65 ENV RO_DB_OVIM_PASSWORD=manopw
67 ENV RO_DB_OVIM_PORT=3306
68 ENV RO_DB_NAME=mano_db
69 ENV RO_DB_OVIM_NAME=mano_vim_db
70 ENV OPENMANO_TENANT=osm
72 HEALTHCHECK --start-period=130s --interval=10s --timeout=5s --retries=12 \
73 CMD curl --silent --fail localhost:9090/openmano/tenants || exit 1
74 CMD /usr/bin/RO-start.sh