Adding a Dockerfile for ONOS.
This dockerfile preinstalls the following applications:
- olt
- aaa
- config
And it provides a default configuration for the olt and aaa
applications locates in docker/config/netcfg.json.
Change-Id: I788dd08fa7e8a1dc776b3e741d17d200c6badb68
diff --git a/docker/Dockerfile.onos b/docker/Dockerfile.onos
new file mode 100644
index 0000000..22245ac
--- /dev/null
+++ b/docker/Dockerfile.onos
@@ -0,0 +1,31 @@
+FROM onosproject/onos:1.8
+
+MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
+MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
+MAINTAINER Nathan Knuth <nathan.knuth@tibitcom.com>
+
+ENV ONOS_APP=/root/onos/apps ONOS=/root/onos KARAF_SYS=/root/onos/apache-karaf-3.0.5/system/org VERSION=1.1-SNAPSHOT
+
+RUN apt-get update && apt-get install -y git maven unzip && git clone http://gerrit.opencord.org/olt && \
+ git clone http://gerrit.opencord.org/aaa && \
+ git clone http://gerrit.opencord.org/config
+
+RUN cd $ONOS/olt && mvn clean install
+RUN mkdir $ONOS_APP/org.onosproject.olt && cd $ONOS_APP/org.onosproject.olt &&\
+ cp $ONOS/olt/app/target/*.oar org.onosproject.olt.oar && unzip *.oar && touch active &&\
+ cd $KARAF_SYS && mkdir -p opencord/olt-api/$VERSION && mkdir -p opencord/olt-app/$VERSION &&\
+ unzip -d . -j $ONOS/olt/app/target/*.oar && mv olt-api-$VERSION.jar opencord/olt-api/$VERSION &&\
+ mv olt-app-$VERSION.jar opencord/olt-app/$VERSION && mv olt-app-$VERSION-features.xml opencord/olt-app/$VERSION
+RUN cd $ONOS/config && mvn clean install
+RUN mkdir $ONOS_APP/org.opencord.cord-config && cd $ONOS_APP/org.opencord.cord-config &&\
+ cp $ONOS/config/target/*.oar org.opencord.config.oar && unzip *.oar && touch active &&\
+ cd $KARAF_SYS && mkdir -p opencord/cord-config/$VERSION && cd opencord/cord-config/$VERSION &&\
+ unzip -d . -j $ONOS/config/target/*.oar
+
+RUN cd $ONOS/aaa && mvn clean install
+RUN mkdir $ONOS_APP/org.opencord.aaa && cd $ONOS_APP/org.opencord.aaa &&\
+ cp $ONOS/aaa/target/*.oar org.opencord.aaa.oar && unzip *.oar && touch active &&\
+ cd $KARAF_SYS && mkdir -p opencord/aaa/$VERSION && cd opencord/aaa/$VERSION &&\
+ unzip -d . -j $ONOS/aaa/target/*.oar
+
+COPY config/netcfg.json $KARAF_ROOT/../config/network-cfg.json
diff --git a/docker/config/netcfg.json b/docker/config/netcfg.json
new file mode 100644
index 0000000..f7d9d2a
--- /dev/null
+++ b/docker/config/netcfg.json
@@ -0,0 +1,22 @@
+{
+ "apps" : {
+ "org.onosproject.aaa" : {
+ "AAA" : {
+ "radiusIp": "10.128.0.231",
+ "radiusServerPort": "1812",
+ "radiusSecret": "howdoyouturnthison"
+ }
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "basic" : {
+ "driver" : "pmc-olt"
+ },
+ "accessDevice": {
+ "uplink": "129",
+ "vlan": "1000"
+ }
+ }
+ }
+}
diff --git a/voltha/adapters/simulated_olt/simulated_olt.py b/voltha/adapters/simulated_olt/simulated_olt.py
index 0c9227e..4da18ef 100644
--- a/voltha/adapters/simulated_olt/simulated_olt.py
+++ b/voltha/adapters/simulated_olt/simulated_olt.py
@@ -191,7 +191,7 @@
id='simulated1',
datapath_id=1,
desc=ofp_desc(
- mfr_desc='cord porject',
+ mfr_desc='cord project',
hw_desc='simualted pon',
sw_desc='simualted pon',
serial_num=uuid4().hex,
@@ -275,6 +275,7 @@
# then shortly after we create the logical device with one port
# that will correspond to the NNI port
yield asleep(0.05)
+ logical_device_id = uuid4().hex[:12]
ld = LogicalDevice(
# not setting id and datapth_id will let the adapter agent pick id
desc=ofp_desc(