############################################################################ # Copyright 2021 ETSI # # 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:20.04 as INSTALL WORKDIR /build RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \ DEBIAN_FRONTEND=noninteractive apt-get --yes install \ gcc python3 python3-dev python3-venv python3-pip \ python3-setuptools curl git genisoimage netbase && \ python3 -m pip install -U pip build COPY . /build RUN git clone https://osm.etsi.org/gerrit/osm/common.git RUN python3 -m pip install -r requirements.txt \ -r common/requirements.txt RUN python3 -m build /build/common && \ python3 -m pip install /build/common/dist/*.whl RUN python3 -m build /build/RO-plugin && \ python3 -m pip install /build/RO-plugin/dist/*.whl RUN python3 -m build /build/NG-RO && \ python3 -m pip install /build/NG-RO/dist/*.whl RUN python3 -m build /build/RO-VIM-vmware && \ python3 -m pip install /build/RO-VIM-vmware/dist/*.whl RUN python3 -m build /build/RO-VIM-openstack && \ python3 -m pip install /build/RO-VIM-openstack/dist/*.whl RUN python3 -m build /build/RO-VIM-openvim && \ python3 -m pip install /build/RO-VIM-openvim/dist/*.whl RUN python3 -m build /build/RO-VIM-aws && \ python3 -m pip install /build/RO-VIM-aws/dist/*.whl RUN python3 -m build /build/RO-VIM-azure && \ python3 -m pip install /build/RO-VIM-azure/dist/*.whl RUN python3 -m build /build/RO-SDN-dynpac && \ python3 -m pip install /build/RO-SDN-dynpac/dist/*.whl RUN python3 -m build /build/RO-SDN-ietfl2vpn && \ python3 -m pip install /build/RO-SDN-ietfl2vpn/dist/*.whl RUN python3 -m build /build/RO-SDN-onos_vpls && \ python3 -m pip install /build/RO-SDN-onos_vpls/dist/*.whl RUN python3 -m build /build/RO-SDN-onos_openflow && \ python3 -m pip install /build/RO-SDN-onos_openflow/dist/*.whl RUN python3 -m build /build/RO-SDN-odl_openflow && \ python3 -m pip install /build/RO-SDN-odl_openflow/dist/*.whl RUN python3 -m build /build/RO-SDN-floodlight_openflow && \ python3 -m pip install /build/RO-SDN-floodlight_openflow/dist/*.whl RUN python3 -m build /build/RO-SDN-arista_cloudvision && \ python3 -m pip install /build/RO-SDN-arista_cloudvision/dist/*.whl RUN python3 -m build /build/RO-SDN-juniper_contrail && \ python3 -m pip install /build/RO-SDN-juniper_contrail/dist/*.whl RUN python3 -m build /build/RO-VIM-gcp && \ python3 -m pip install /build/RO-VIM-gcp/dist/*.whl FROM ubuntu:20.04 RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \ DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-minimal COPY --from=INSTALL /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages COPY --from=INSTALL /usr/local/lib/python3.8/dist-packages /usr/local/lib/python3.8/dist-packages COPY --from=INSTALL /usr/bin/genisoimage /usr/bin/genisoimage COPY --from=INSTALL /etc/protocols /etc/protocols 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 ENV RO_DB_HOST="" ENV RO_DB_OVIM_HOST="" # if empty RO_DB_HOST is assumed # These ENV should be provided first time for creating database. It will create and init only if empty! ENV RO_DB_ROOT_PASSWORD="" ENV RO_DB_OVIM_ROOT_PASSWORD="" # if empty RO_DB_ROOT_PASSWORD is assumed # These ENV can be provided, but default values are ok ENV RO_DB_USER=mano ENV RO_DB_OVIM_USER=mano ENV RO_DB_PASSWORD=manopw ENV RO_DB_OVIM_PASSWORD=manopw ENV RO_DB_PORT=3306 ENV RO_DB_OVIM_PORT=3306 ENV RO_DB_NAME=mano_db ENV RO_DB_OVIM_NAME=mano_vim_db ENV OPENMANO_TENANT=osm # database ENV OSMRO_DATABASE_DRIVER mongo ENV OSMRO_DATABASE_URI mongodb://mongo:27017 # ENV OSMRO_DATABASE_COMMONKEY xxx # ENV OSMRO_DATABASE_USER xxx # ENV OSMRO_DATABASE_PASSWORD xxx # message ENV OSMRO_MESSAGE_DRIVER kafka ENV OSMRO_MESSAGE_HOST kafka ENV OSMRO_MESSAGE_PORT 9092 # logs ENV OSMRO_LOG_LEVEL INFO CMD ["python3", "-u", "-m", "osm_ng_ro.ro_main"]