| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 1 | ## |
| 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 | |
| 16 | FROM ubuntu:18.04 |
| 17 | |
| 18 | LABEL authors="Alfonso Tierno" |
| 19 | |
| 20 | RUN apt-get update && apt-get install -y git python3 python3-pip \ |
| 21 | && python3 -m pip install --upgrade pip \ |
| lloretgalleg | 17587e3 | 2019-11-25 14:31:18 +0100 | [diff] [blame] | 22 | && DEBIAN_FRONTEND=noninteractive apt-get -y install libssl-dev libmysqlclient-dev mysql-client \ |
| sousaedu | 3f8f2f4 | 2021-02-09 15:30:01 +0100 | [diff] [blame^] | 23 | build-essential libffi-dev cargo \ |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 24 | && DEBIAN_FRONTEND=noninteractive python3 -m pip install -U networking-l2gw \ |
| 25 | && DEBIAN_FRONTEND=noninteractive python3 -m pip install -U progressbar pyvmomi pyvcloud==19.1.1 \ |
| 26 | && DEBIAN_FRONTEND=noninteractive apt-get -y install genisoimage |
| 27 | |
| 28 | # This is not needed, because package dependency will install anyway. |
| 29 | # But done here in order to harry up image generation using cache |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 30 | RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3-neutronclient python3-openstackclient \ |
| baldoni | 07df0d2 | 2020-06-12 15:24:24 +0200 | [diff] [blame] | 31 | python3-requests python3-netaddr python3-argcomplete curl \ |
| 32 | && DEBIAN_FRONTEND=noninteractive curl -Lo /tmp/libzenohc.so https://github.com/eclipse-fog05/fog05/releases/download/v0.1.0/libzenohc.so \ |
| 33 | && mv /tmp/libzenohc.so /usr/local/lib/libzenohc.so \ |
| tierno | fb13d2e | 2020-11-26 15:55:20 +0000 | [diff] [blame] | 34 | && DEBIAN_FRONTEND=noninteractive python3 -m pip install -U jsonrpclib-pelix cvprac "azure==4.0.0" boto \ |
| tierno | 1ec592d | 2020-06-16 15:29:47 +0000 | [diff] [blame] | 35 | pyone "oca @ git+https://github.com/python-oca/python-oca#egg=oca" \ |
| sousaedu | 3f8f2f4 | 2021-02-09 15:30:01 +0100 | [diff] [blame^] | 36 | pyangbind sphinx zenoh==0.3.0 yaks==0.3.0.post1 fog05-sdk==0.2.0 fog05==0.2.0 "cryptography>=2.5" |
| baldoni | 07df0d2 | 2020-06-12 15:24:24 +0200 | [diff] [blame] | 37 | |
| 38 | |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 39 | # 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 && \ |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 43 | # && DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common && \ |
| 44 | # DEBIAN_FRONTEND=noninteractive apt-get -y install wget tox && \ |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 45 | |
| 46 | COPY . /root/RO |
| 47 | |
| tierno | 2e8c738 | 2020-12-09 18:19:34 +0000 | [diff] [blame] | 48 | RUN python3 -m pip install -e /root/RO/RO-plugin && \ |
| tierno | 70eeb18 | 2020-10-19 16:38:00 +0000 | [diff] [blame] | 49 | python3 -m pip install -e /root/RO/NG-RO && \ |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 50 | python3 -m pip install -e /root/RO/RO-VIM-vmware && \ |
| 51 | python3 -m pip install -e /root/RO/RO-VIM-openstack && \ |
| 52 | python3 -m pip install -e /root/RO/RO-VIM-openvim && \ |
| 53 | python3 -m pip install -e /root/RO/RO-VIM-aws && \ |
| lloretgalleg | 17587e3 | 2019-11-25 14:31:18 +0100 | [diff] [blame] | 54 | python3 -m pip install -e /root/RO/RO-VIM-azure && \ |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 55 | python3 -m pip install -e /root/RO/RO-VIM-fos && \ |
| tierno | ed3e4d4 | 2019-10-21 15:31:27 +0000 | [diff] [blame] | 56 | python3 -m pip install -e /root/RO/RO-SDN-dynpac && \ |
| tierno | 667d158 | 2019-12-20 12:16:46 +0000 | [diff] [blame] | 57 | python3 -m pip install -e /root/RO/RO-SDN-ietfl2vpn && \ |
| Benjamin Diaz | 949e053 | 2019-12-09 20:12:42 -0300 | [diff] [blame] | 58 | python3 -m pip install -e /root/RO/RO-SDN-onos_vpls && \ |
| tierno | 4126d05 | 2019-12-11 15:30:44 +0000 | [diff] [blame] | 59 | python3 -m pip install -e /root/RO/RO-SDN-onos_openflow && \ |
| tierno | ce1c9c8 | 2020-03-04 20:09:42 +0000 | [diff] [blame] | 60 | python3 -m pip install -e /root/RO/RO-SDN-odl_openflow && \ |
| tierno | 4126d05 | 2019-12-11 15:30:44 +0000 | [diff] [blame] | 61 | python3 -m pip install -e /root/RO/RO-SDN-floodlight_openflow && \ |
| tierno | 667d158 | 2019-12-20 12:16:46 +0000 | [diff] [blame] | 62 | python3 -m pip install -e /root/RO/RO-SDN-arista_cloudvision && \ |
| garciadeblas | f4f95e1 | 2020-04-17 05:55:46 +0000 | [diff] [blame] | 63 | python3 -m pip install -e /root/RO/RO-SDN-juniper_contrail && \ |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 64 | rm -rf /root/.cache && \ |
| 65 | apt-get clean && \ |
| 66 | rm -rf /var/lib/apt/lists/* |
| 67 | |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 68 | EXPOSE 9090 |
| 69 | |
| tierno | 70eeb18 | 2020-10-19 16:38:00 +0000 | [diff] [blame] | 70 | ENV OSMRO_NG True |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 71 | |
| tierno | 70eeb18 | 2020-10-19 16:38:00 +0000 | [diff] [blame] | 72 | # database |
| 73 | ENV OSMRO_DATABASE_DRIVER mongo |
| 74 | ENV OSMRO_DATABASE_URI mongodb://mongo:27017 |
| 75 | # ENV OSMRO_DATABASE_COMMONKEY xxx |
| 76 | # ENV OSMRO_DATABASE_USER xxx |
| 77 | # ENV OSMRO_DATABASE_PASSWORD xxx |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 78 | |
| tierno | 70eeb18 | 2020-10-19 16:38:00 +0000 | [diff] [blame] | 79 | # message |
| 80 | ENV OSMRO_MESSAGE_DRIVER kafka |
| 81 | ENV OSMRO_MESSAGE_HOST kafka |
| 82 | ENV OSMRO_MESSAGE_PORT 9092 |
| 83 | |
| 84 | # logs |
| 85 | ENV OSMRO_LOG_LEVEL DEBUG |
| 86 | |
| sousaedu | 3f8f2f4 | 2021-02-09 15:30:01 +0100 | [diff] [blame^] | 87 | CMD ["python3", "-u", "-m", "osm_ng_ro.ro_main"] |
| tierno | 7d782ef | 2019-10-04 12:56:31 +0000 | [diff] [blame] | 88 | |
| 89 | # HEALTHCHECK --start-period=30s --interval=10s --timeout=5s --retries=12 \ |
| tierno | 70eeb18 | 2020-10-19 16:38:00 +0000 | [diff] [blame] | 90 | # CMD curl --silent --fail http://localhost:9090/ro || exit 1 |
| 91 | |