CI: Update RTD configuration file
[sim/o1-interface.git] / ntsimulator / deploy / smo-nts-ng-topology-server / local.Dockerfile
1 #
2 # Copyright 2020 highstreet technologies GmbH and others
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain 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,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 ################
17 #### DEVICE ####
18 ################
19
20 FROM o-ran-sc/nts-ng-base:latest
21 LABEL maintainer="alexandru.stancu@highstreet-technologies.com / adrian.lita@highstreet-technologies.com"
22
23 RUN apt-get update && apt-get install -y --no-install-recommends \
24     # Opendaylight download
25     wget \
26     # Java 11
27     default-jdk \
28     python3 \
29     && rm -rf /var/lib/apt/lists/* && \
30     mkdir /opt/opendaylight
31
32 WORKDIR /opt
33
34 ARG ODL_VERSION=15.1.0
35
36 RUN wget --no-check-certificate https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/opendaylight/$ODL_VERSION/opendaylight-$ODL_VERSION.tar.gz
37
38 RUN tar -xvzf opendaylight-${ODL_VERSION}.tar.gz -C opendaylight --strip-components 1 && \
39     rm -rf opendaylight-${ODL_VERSION}.tar.gz
40
41 # ntsim-ng configuration and deployment
42 COPY ./yang /opt/dev/deploy/yang
43 COPY ./data /opt/dev/deploy/data
44 COPY ./config.json /opt/dev/ntsim-ng/config/config.json
45 COPY ./org.apache.karaf.features.cfg /opt/opendaylight/etc/org.apache.karaf.features.cfg
46
47 # ntsim-ng init docker
48 RUN /opt/dev/ntsim-ng/ntsim-ng --container-init -w /opt/dev/ntsim-ng
49
50 COPY ./callhomeConfig.py /opt/dev/workspace/callhomeConfig.py
51
52 # add exposed ports
53 EXPOSE 8181
54
55 ENV NTS_FUNCTION_TYPE=NTS_FUNCTION_TYPE_TOPOLOGY_SERVER
56 ENV NTS_NF_STANDALONE_START_FEATURES="datastore-populate netconf-call-home"
57 ENV SDN_CONTROLLER_IP="127.0.0.1"
58 ENV SDN_CONTROLLER_PROTOCOL="http"
59 ENV SDN_CONTROLLER_PORT="8181"
60 ENV SDN_CONTROLLER_CALLHOME_IP="127.0.0.1"
61 ENV SDN_CONTROLLER_CALLHOME_PORT="6666"
62 ENV SDN_CONTROLLER_USERNAME="admin"
63 ENV SDN_CONTROLLER_PASSWORD="admin"
64 ENV ODL_HOME=/opt/opendaylight
65
66 # run
67 WORKDIR /opt/dev/workspace
68 CMD ["/opt/dev/ntsim-ng/ntsim-ng", "-w/opt/dev/ntsim-ng", "--supervisor"]