blob: d9aea655e11a11f2800518e80f6e2b0a43d7dec8 [file] [log] [blame]
sousaedu2cf9ebb2021-04-08 11:53:34 +02001############################################################################
2# Copyright 2021 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
17FROM ubuntu:18.04 as INSTALL
18
19WORKDIR /build
20
21RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
22 DEBIAN_FRONTEND=noninteractive apt-get --yes install \
23 gcc python3 python3-dev python3-venv python3-pip \
24 python3-setuptools curl git genisoimage netbase && \
25 python3 -m pip install -U pip build
26
27COPY . /build
28
29RUN git clone https://osm.etsi.org/gerrit/osm/common.git
30
31RUN python3 -m pip install -r requirements.txt \
32 -r common/requirements.txt
33
34RUN python3 -m build /build/common && \
35 python3 -m pip install /build/common/dist/*.whl
36
37RUN python3 -m build /build/RO-plugin && \
38 python3 -m pip install /build/RO-plugin/dist/*.whl
39
40RUN python3 -m build /build/NG-RO && \
41 python3 -m pip install /build/NG-RO/dist/*.whl
42
43RUN python3 -m build /build/RO-VIM-vmware && \
44 python3 -m pip install /build/RO-VIM-vmware/dist/*.whl
45
46RUN python3 -m build /build/RO-VIM-openstack && \
47 python3 -m pip install /build/RO-VIM-openstack/dist/*.whl
48
49RUN python3 -m build /build/RO-VIM-openvim && \
50 python3 -m pip install /build/RO-VIM-openvim/dist/*.whl
51
52RUN python3 -m build /build/RO-VIM-aws && \
53 python3 -m pip install /build/RO-VIM-aws/dist/*.whl
54
55RUN python3 -m build /build/RO-VIM-azure && \
56 python3 -m pip install /build/RO-VIM-azure/dist/*.whl
57
58RUN python3 -m build /build/RO-VIM-fos && \
59 python3 -m pip install /build/RO-VIM-fos/dist/*.whl
60
61RUN python3 -m build /build/RO-SDN-dynpac && \
62 python3 -m pip install /build/RO-SDN-dynpac/dist/*.whl
63
64RUN python3 -m build /build/RO-SDN-ietfl2vpn && \
65 python3 -m pip install /build/RO-SDN-ietfl2vpn/dist/*.whl
66
67RUN python3 -m build /build/RO-SDN-onos_vpls && \
68 python3 -m pip install /build/RO-SDN-onos_vpls/dist/*.whl
69
70RUN python3 -m build /build/RO-SDN-onos_openflow && \
71 python3 -m pip install /build/RO-SDN-onos_openflow/dist/*.whl
72
73RUN python3 -m build /build/RO-SDN-odl_openflow && \
74 python3 -m pip install /build/RO-SDN-odl_openflow/dist/*.whl
75
76RUN python3 -m build /build/RO-SDN-floodlight_openflow && \
77 python3 -m pip install /build/RO-SDN-floodlight_openflow/dist/*.whl
78
79RUN python3 -m build /build/RO-SDN-arista_cloudvision && \
80 python3 -m pip install /build/RO-SDN-arista_cloudvision/dist/*.whl
81
82RUN python3 -m build /build/RO-SDN-juniper_contrail && \
83 python3 -m pip install /build/RO-SDN-juniper_contrail/dist/*.whl
84
gallardo34aa3a92021-10-08 11:50:00 +000085RUN python3 -m build /build/RO-VIM-gcp && \
86 python3 -m pip install /build/RO-VIM-gcp/dist/*.whl
87
sousaedu2cf9ebb2021-04-08 11:53:34 +020088FROM ubuntu:18.04
89
90RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
91 DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-minimal
92
93COPY --from=INSTALL /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages
94COPY --from=INSTALL /usr/local/lib/python3.6/dist-packages /usr/local/lib/python3.6/dist-packages
95COPY --from=INSTALL /usr/bin/genisoimage /usr/bin/genisoimage
96COPY --from=INSTALL /etc/protocols /etc/protocols
97
98VOLUME /var/log/osm
99
100EXPOSE 9090
101
102# Two mysql databases are needed (DB and DB_OVIM). Can be hosted on same or separated containers
103# These ENV must be provided
104ENV RO_DB_HOST=""
105ENV RO_DB_OVIM_HOST=""
106 # if empty RO_DB_HOST is assumed
107
108# These ENV should be provided first time for creating database. It will create and init only if empty!
109ENV RO_DB_ROOT_PASSWORD=""
110ENV RO_DB_OVIM_ROOT_PASSWORD=""
111 # if empty RO_DB_ROOT_PASSWORD is assumed
112
113# These ENV can be provided, but default values are ok
114ENV RO_DB_USER=mano
115ENV RO_DB_OVIM_USER=mano
116ENV RO_DB_PASSWORD=manopw
117ENV RO_DB_OVIM_PASSWORD=manopw
118ENV RO_DB_PORT=3306
119ENV RO_DB_OVIM_PORT=3306
120ENV RO_DB_NAME=mano_db
121ENV RO_DB_OVIM_NAME=mano_vim_db
122ENV OPENMANO_TENANT=osm
123
124# database
125ENV OSMRO_DATABASE_DRIVER mongo
126ENV OSMRO_DATABASE_URI mongodb://mongo:27017
127# ENV OSMRO_DATABASE_COMMONKEY xxx
128# ENV OSMRO_DATABASE_USER xxx
129# ENV OSMRO_DATABASE_PASSWORD xxx
130
131# message
132ENV OSMRO_MESSAGE_DRIVER kafka
133ENV OSMRO_MESSAGE_HOST kafka
134ENV OSMRO_MESSAGE_PORT 9092
135
136# logs
137ENV OSMRO_LOG_LEVEL INFO
138
139CMD ["python3", "-u", "-m", "osm_ng_ro.ro_main"]