blob: 1dff02d13e847c842d15f625ad89b3e918c273b8 [file] [log] [blame]
calvinosanch29be7ef2019-07-24 10:45:04 +00001##
2# Copyright {yyyy} {name of copyright owner}
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
19from ubuntu:18.04
Gennadiy Dubina311ea742017-04-03 20:46:16 +030020
garciadeblas0cb7df32018-02-07 03:22:37 +010021LABEL authors="Gennadiy Dubina, Alfonso Tierno, Gerardo Garcia"
Gennadiy Dubina311ea742017-04-03 20:46:16 +030022
garciadeblas0cb7df32018-02-07 03:22:37 +010023RUN apt-get update && \
24 DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common && \
calvinosanch29be7ef2019-07-24 10:45:04 +000025 DEBIAN_FRONTEND=noninteractive apt-get update && \
tierno92021022018-09-12 16:29:23 +020026 DEBIAN_FRONTEND=noninteractive apt-get -y install git python python-pip && \
garciadeblas0cb7df32018-02-07 03:22:37 +010027 DEBIAN_FRONTEND=noninteractive apt-get -y install wget tox && \
tierno92021022018-09-12 16:29:23 +020028 DEBIAN_FRONTEND=noninteractive pip2 install pip==9.0.3 && \
29 DEBIAN_FRONTEND=noninteractive pip2 install -U progressbar pyvmomi pyvcloud==19.1.1 && \
tiernoc26cf292019-05-14 11:22:45 +000030 DEBIAN_FRONTEND=noninteractive pip2 install -U fog05rest && \
tierno8dc9c8b2019-04-30 12:20:38 +000031 DEBIAN_FRONTEND=noninteractive pip2 install -U azure && \
tiernoc26cf292019-05-14 11:22:45 +000032 DEBIAN_FRONTEND=noninteractive apt-get -y install python-requests && \
garciadeblasebd66722019-01-31 16:01:31 +000033 DEBIAN_FRONTEND=noninteractive apt-get -y install python-novaclient python-keystoneclient python-glanceclient python-cinderclient python-neutronclient python-networking-l2gw && \
tierno92021022018-09-12 16:29:23 +020034 DEBIAN_FRONTEND=noninteractive apt-get -y install python-cffi libmysqlclient-dev libssl-dev libffi-dev python-mysqldb && \
35 DEBIAN_FRONTEND=noninteractive apt-get -y install python-openstacksdk python-openstackclient && \
Anderson Bravalheric5293de2018-11-28 17:21:26 +000036 DEBIAN_FRONTEND=noninteractive apt-get -y install python-networkx && \
Ananda Baitharu319c26f2019-03-05 17:34:31 +000037 DEBIAN_FRONTEND=noninteractive apt-get -y install genisoimage && \
tierno92021022018-09-12 16:29:23 +020038 DEBIAN_FRONTEND=noninteractive pip2 install untangle && \
jomacarpe20c13232019-06-12 21:20:51 +000039 DEBIAN_FRONTEND=noninteractive pip2 install pyone && \
tierno92021022018-09-12 16:29:23 +020040 DEBIAN_FRONTEND=noninteractive pip2 install -e git+https://github.com/python-oca/python-oca#egg=oca && \
Eduardo Sousaab24d8b2018-10-17 17:10:04 +010041 DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client
42
43COPY . /root/RO
44
45RUN /root/RO/scripts/install-osm-im.sh --develop && \
tierno92021022018-09-12 16:29:23 +020046 /root/RO/scripts/install-lib-osm-openvim.sh --develop && \
47 make -C /root/RO prepare && \
48 mkdir -p /var/log/osm && \
49 pip2 install -e /root/RO/build && \
garciadeblas0cb7df32018-02-07 03:22:37 +010050 rm -rf /root/.cache && \
51 apt-get clean && \
tierno92021022018-09-12 16:29:23 +020052 rm -rf /var/lib/apt/lists/*
garciadeblas0cb7df32018-02-07 03:22:37 +010053
54VOLUME /var/log/osm
tiernod4d5e252018-01-23 17:07:46 +010055
Gennadiy Dubina311ea742017-04-03 20:46:16 +030056EXPOSE 9090
57
tiernod4d5e252018-01-23 17:07:46 +010058# Two mysql databases are needed (DB and DB_OVIM). Can be hosted on same or separated containers
59# These ENV must be provided
garciadeblas0cb7df32018-02-07 03:22:37 +010060# RO_DB_HOST: host of the main
61# RO_DB_OVIM_HOST: ... if empty RO_DB_HOST is assumed
62# RO_DB_ROOT_PASSWORD: this has to be provided first time for creating database. It will create and init only if empty!
63# RO_DB_OVIM_ROOT_PASSWORD: ... if empty RO_DB_ROOT_PASSWORD is assumed
64# RO_DB_USER: default value 'mano'
65# RO_DB_OVIM_USER: default value 'mano'
66# RO_DB_PASSWORD: default value 'manopw'
67# RO_DB_OVIM_PASSWORD: default value 'manopw'
68# RO_DB_PORT: default value '3306'
69# RO_DB_OVIM_PORT: default value '3306'
70# RO_DB_NAME: default value 'mano_db'
71# RO_DB_OVIM_NAME: default value 'mano_vim_db'
tierno307a1ca2018-10-25 14:27:36 +020072# RO_LOG_FILE: default log to stderr if not defined
Gennadiy Dubina311ea742017-04-03 20:46:16 +030073
garciadeblas0cb7df32018-02-07 03:22:37 +010074ENV RO_DB_HOST="" \
75 RO_DB_OVIM_HOST="" \
76 RO_DB_ROOT_PASSWORD="" \
77 RO_DB_OVIM_ROOT_PASSWORD="" \
78 RO_DB_USER=mano \
79 RO_DB_OVIM_USER=mano \
80 RO_DB_PASSWORD=manopw \
81 RO_DB_OVIM_PASSWORD=manopw \
82 RO_DB_PORT=3306 \
83 RO_DB_OVIM_PORT=3306 \
84 RO_DB_NAME=mano_db \
tiernob8569aa2018-08-24 11:34:54 +020085 RO_DB_OVIM_NAME=mano_vim_db \
tierno307a1ca2018-10-25 14:27:36 +020086 OPENMANO_TENANT=osm \
87 RO_LOG_LEVEL=DEBUG
tiernod4d5e252018-01-23 17:07:46 +010088
tierno12690ed2018-09-14 21:16:19 +000089CMD RO-start.sh
tierno2cff3462018-12-04 14:05:26 +000090
91# HEALTHCHECK --start-period=30s --interval=10s --timeout=5s --retries=12 \
92# CMD curl --silent --fail localhost:9090/openmano/tenants || exit 1