blob: b99a0909c92b5606ef598a1fe70864c5a202d128 [file] [log] [blame]
tierno7d782ef2019-10-04 12:56:31 +00001##
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11# implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14##
15
16FROM ubuntu:18.04
17
18LABEL authors="Alfonso Tierno"
19
20RUN apt-get update && apt-get install -y git python3 python3-pip \
21 && python3 -m pip install --upgrade pip \
lloretgalleg17587e32019-11-25 14:31:18 +010022 && DEBIAN_FRONTEND=noninteractive apt-get -y install libssl-dev libmysqlclient-dev mysql-client \
tierno7d782ef2019-10-04 12:56:31 +000023 && DEBIAN_FRONTEND=noninteractive python3 -m pip install -U networking-l2gw \
24 && DEBIAN_FRONTEND=noninteractive python3 -m pip install -U progressbar pyvmomi pyvcloud==19.1.1 \
25 && DEBIAN_FRONTEND=noninteractive apt-get -y install genisoimage
26
27# This is not needed, because package dependency will install anyway.
28# But done here in order to harry up image generation using cache
tierno7d782ef2019-10-04 12:56:31 +000029RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3-neutronclient python3-openstackclient \
baldoni07df0d22020-06-12 15:24:24 +020030 python3-requests python3-netaddr python3-argcomplete curl \
31 && DEBIAN_FRONTEND=noninteractive curl -Lo /tmp/libzenohc.so https://github.com/eclipse-fog05/fog05/releases/download/v0.1.0/libzenohc.so \
32 && mv /tmp/libzenohc.so /usr/local/lib/libzenohc.so \
tiernoed502b12020-04-01 17:08:43 +000033 && DEBIAN_FRONTEND=noninteractive python3 -m pip install -U jsonrpclib-pelix cvprac \
baldoni07df0d22020-06-12 15:24:24 +020034 "osm-im @ git+https://osm.etsi.org/gerrit/osm/IM.git#egg=osm-im" "azure==4.0.0" boto \
tierno1ec592d2020-06-16 15:29:47 +000035 pyone "oca @ git+https://github.com/python-oca/python-oca#egg=oca" \
baldoni07df0d22020-06-12 15:24:24 +020036 pyangbind sphinx zenoh==0.3.0 yaks==0.3.0.post1 fog05-sdk==0.2.0 fog05==0.2.0
37
38
tierno7d782ef2019-10-04 12:56:31 +000039# DEBIAN_FRONTEND=noninteractive apt-get -y install python-openstacksdk python-openstackclient && \
40# TODO py3 DEBIAN_FRONTEND=noninteractive add-apt-repository -y cloud-archive:rocky && apt-get update && apt-get install -y python3-networking-l2gw \
41
42# DEBIAN_FRONTEND=noninteractive apt-get -y install python-cffi libssl-dev libffi-dev python-mysqldb && \
tierno7d782ef2019-10-04 12:56:31 +000043# && DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common && \
44# DEBIAN_FRONTEND=noninteractive apt-get -y install wget tox && \
tierno7d782ef2019-10-04 12:56:31 +000045
46COPY . /root/RO
47
48RUN /root/RO/RO/osm_ro/scripts/install-osm-im.sh --develop && \
tierno7d782ef2019-10-04 12:56:31 +000049 mkdir -p /var/log/osm && \
tierno72774862020-05-04 11:44:15 +000050 python3 -m pip install -e /root/RO/RO-plugin && \
tierno7d782ef2019-10-04 12:56:31 +000051 python3 -m pip install -e /root/RO/RO && \
52 python3 -m pip install -e /root/RO/RO-client && \
tierno70eeb182020-10-19 16:38:00 +000053 python3 -m pip install -e /root/RO/NG-RO && \
tierno7d782ef2019-10-04 12:56:31 +000054 python3 -m pip install -e /root/RO/RO-VIM-vmware && \
55 python3 -m pip install -e /root/RO/RO-VIM-openstack && \
56 python3 -m pip install -e /root/RO/RO-VIM-openvim && \
57 python3 -m pip install -e /root/RO/RO-VIM-aws && \
lloretgalleg17587e32019-11-25 14:31:18 +010058 python3 -m pip install -e /root/RO/RO-VIM-azure && \
tierno7d782ef2019-10-04 12:56:31 +000059 python3 -m pip install -e /root/RO/RO-VIM-fos && \
tiernoed3e4d42019-10-21 15:31:27 +000060 python3 -m pip install -e /root/RO/RO-SDN-dynpac && \
tierno667d1582019-12-20 12:16:46 +000061 python3 -m pip install -e /root/RO/RO-SDN-ietfl2vpn && \
Benjamin Diaz949e0532019-12-09 20:12:42 -030062 python3 -m pip install -e /root/RO/RO-SDN-onos_vpls && \
tierno4126d052019-12-11 15:30:44 +000063 python3 -m pip install -e /root/RO/RO-SDN-onos_openflow && \
tiernoce1c9c82020-03-04 20:09:42 +000064 python3 -m pip install -e /root/RO/RO-SDN-odl_openflow && \
tierno4126d052019-12-11 15:30:44 +000065 python3 -m pip install -e /root/RO/RO-SDN-floodlight_openflow && \
tierno667d1582019-12-20 12:16:46 +000066 python3 -m pip install -e /root/RO/RO-SDN-arista_cloudvision && \
garciadeblasf4f95e12020-04-17 05:55:46 +000067 python3 -m pip install -e /root/RO/RO-SDN-juniper_contrail && \
tierno7d782ef2019-10-04 12:56:31 +000068 rm -rf /root/.cache && \
69 apt-get clean && \
70 rm -rf /var/lib/apt/lists/*
71
tierno7d782ef2019-10-04 12:56:31 +000072EXPOSE 9090
73
tierno70eeb182020-10-19 16:38:00 +000074ENV OSMRO_NG True
tierno7d782ef2019-10-04 12:56:31 +000075
tierno70eeb182020-10-19 16:38:00 +000076# database
77ENV OSMRO_DATABASE_DRIVER mongo
78ENV OSMRO_DATABASE_URI mongodb://mongo:27017
79# ENV OSMRO_DATABASE_COMMONKEY xxx
80# ENV OSMRO_DATABASE_USER xxx
81# ENV OSMRO_DATABASE_PASSWORD xxx
tierno7d782ef2019-10-04 12:56:31 +000082
tierno70eeb182020-10-19 16:38:00 +000083# message
84ENV OSMRO_MESSAGE_DRIVER kafka
85ENV OSMRO_MESSAGE_HOST kafka
86ENV OSMRO_MESSAGE_PORT 9092
87
88# logs
89ENV OSMRO_LOG_LEVEL DEBUG
90
91CMD python3 -m osm_ng_ro.ro_main
tierno7d782ef2019-10-04 12:56:31 +000092
93# HEALTHCHECK --start-period=30s --interval=10s --timeout=5s --retries=12 \
tierno70eeb182020-10-19 16:38:00 +000094# CMD curl --silent --fail http://localhost:9090/ro || exit 1
95