| ## |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| # implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| ## |
| |
| FROM ubuntu:18.04 |
| |
| LABEL authors="Alfonso Tierno" |
| |
| RUN apt-get update && apt-get install -y git python3 python3-pip \ |
| && python3 -m pip install --upgrade pip \ |
| && DEBIAN_FRONTEND=noninteractive apt-get -y install libssl-dev libmysqlclient-dev mysql-client \ |
| && DEBIAN_FRONTEND=noninteractive python3 -m pip install -U networking-l2gw \ |
| && DEBIAN_FRONTEND=noninteractive python3 -m pip install -U progressbar pyvmomi pyvcloud==19.1.1 \ |
| && DEBIAN_FRONTEND=noninteractive apt-get -y install genisoimage |
| |
| # This is not needed, because package dependency will install anyway. |
| # But done here in order to harry up image generation using cache |
| RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3-neutronclient python3-openstackclient \ |
| python3-requests python3-netaddr python3-argcomplete \ |
| && DEBIAN_FRONTEND=noninteractive python3 -m pip install -U jsonrpclib-pelix cvprac \ |
| "osm-im @ git+https://osm.etsi.org/gerrit/osm/IM.git#egg=osm-im" azure boto "fog05rest>=0.0.4" \ |
| untangle pyone "oca @ git+https://github.com/python-oca/python-oca#egg=oca" |
| |
| # DEBIAN_FRONTEND=noninteractive apt-get -y install python-openstacksdk python-openstackclient && \ |
| # TODO py3 DEBIAN_FRONTEND=noninteractive add-apt-repository -y cloud-archive:rocky && apt-get update && apt-get install -y python3-networking-l2gw \ |
| |
| # DEBIAN_FRONTEND=noninteractive apt-get -y install python-cffi libssl-dev libffi-dev python-mysqldb && \ |
| # && DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common && \ |
| # DEBIAN_FRONTEND=noninteractive apt-get -y install wget tox && \ |
| |
| COPY . /root/RO |
| |
| RUN /root/RO/RO/osm_ro/scripts/install-osm-im.sh --develop && \ |
| mkdir -p /var/log/osm && \ |
| python3 -m pip install -e /root/RO/RO && \ |
| python3 -m pip install -e /root/RO/RO-client && \ |
| python3 -m pip install -e /root/RO/RO-VIM-vmware && \ |
| python3 -m pip install -e /root/RO/RO-VIM-openstack && \ |
| python3 -m pip install -e /root/RO/RO-VIM-openvim && \ |
| python3 -m pip install -e /root/RO/RO-VIM-aws && \ |
| python3 -m pip install -e /root/RO/RO-VIM-azure && \ |
| python3 -m pip install -e /root/RO/RO-VIM-fos && \ |
| python3 -m pip install -e /root/RO/RO-SDN-dynpac && \ |
| python3 -m pip install -e /root/RO/RO-SDN-tapi && \ |
| python3 -m pip install -e /root/RO/RO-SDN-onos_vpls && \ |
| python3 -m pip install -e /root/RO/RO-SDN-onos_openflow && \ |
| python3 -m pip install -e /root/RO/RO-SDN-odl_openflow && \ |
| python3 -m pip install -e /root/RO/RO-SDN-floodlight_openflow && \ |
| python3 -m pip install -e /root/RO/RO-SDN-arista && \ |
| rm -rf /root/.cache && \ |
| apt-get clean && \ |
| rm -rf /var/lib/apt/lists/* |
| |
| VOLUME /var/log/osm |
| |
| EXPOSE 9090 |
| |
| # Two mysql databases are needed (DB and DB_OVIM). Can be hosted on same or separated containers |
| # These ENV must be provided |
| # RO_DB_HOST: host of the main |
| # RO_DB_OVIM_HOST: ... if empty RO_DB_HOST is assumed |
| # RO_DB_ROOT_PASSWORD: this has to be provided first time for creating database. It will create and init only if empty! |
| # RO_DB_OVIM_ROOT_PASSWORD: ... if empty RO_DB_ROOT_PASSWORD is assumed |
| # RO_DB_USER: default value 'mano' |
| # RO_DB_OVIM_USER: default value 'mano' |
| # RO_DB_PASSWORD: default value 'manopw' |
| # RO_DB_OVIM_PASSWORD: default value 'manopw' |
| # RO_DB_PORT: default value '3306' |
| # RO_DB_OVIM_PORT: default value '3306' |
| # RO_DB_NAME: default value 'mano_db' |
| # RO_DB_OVIM_NAME: default value 'mano_vim_db' |
| # RO_LOG_FILE: default log to stderr if not defined |
| |
| ENV RO_DB_HOST="" \ |
| RO_DB_OVIM_HOST="" \ |
| RO_DB_ROOT_PASSWORD="" \ |
| RO_DB_OVIM_ROOT_PASSWORD="" \ |
| RO_DB_USER=mano \ |
| RO_DB_OVIM_USER=mano \ |
| RO_DB_PASSWORD=manopw \ |
| RO_DB_OVIM_PASSWORD=manopw \ |
| RO_DB_PORT=3306 \ |
| RO_DB_OVIM_PORT=3306 \ |
| RO_DB_NAME=mano_db \ |
| RO_DB_OVIM_NAME=mano_vim_db \ |
| OPENMANO_TENANT=osm \ |
| RO_LOG_LEVEL=DEBUG |
| |
| CMD RO-start.sh |
| |
| # HEALTHCHECK --start-period=30s --interval=10s --timeout=5s --retries=12 \ |
| # CMD curl --silent --fail localhost:9090/openmano/tenants || exit 1 |