updated Dockerfile for O1 Module [Issue-Id: ODUHIGH-257] 45/5245/1
authorHariomGupta <hariom.g@hcl.com>
Mon, 7 Dec 2020 07:56:56 +0000 (13:26 +0530)
committerHariomGupta <hariom.g@hcl.com>
Mon, 7 Dec 2020 07:56:56 +0000 (13:26 +0530)
Signed-off-by: HariomGupta <hariom.g@hcl.com>
Change-Id: I82599f74bd71374d51596741806b6aaa2f9a6b11

Dockerfile
build/o1/install_lib.sh [changed mode: 0644->0755]

index 2010fae..ddb9446 100644 (file)
@@ -1,5 +1,19 @@
 FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubuntu18-c-go:9-u18.04 as ubuntu
 
+# ======================================================================
+# add netconf user
+RUN \
+      adduser --system netconf && \
+      echo "netconf:netconf" | chpasswd
+
+# generate ssh keys for netconf user
+RUN \
+      mkdir -p /home/netconf/.ssh && \
+      ssh-keygen -A && \
+      ssh-keygen -t dsa -P '' -f /home/netconf/.ssh/id_dsa && \
+      cat /home/netconf/.ssh/id_dsa.pub > /home/netconf/.ssh/authorized_keys
+
+
 ADD . /opt/o-du-l2
 WORKDIR /opt/o-du-l2
 
@@ -8,3 +22,11 @@ RUN apt-get update && apt-get install -y libpcap-dev
 RUN cd build/odu && make clean_odu odu MACHINE=BIT64 MODE=FDD
 
 #CMD /opt/o-du-l2/bin/odu/odu
+
+#cleanup netconf folder and install libraries
+RUN cd build/o1  && rm -rf netconf && /bin/bash install_lib.sh -c
+
+RUN cd build/o1  && make o1 MACHINE=BIT64
+
+# Install the data models based on the ODU yang model
+RUN /usr/local/bin/sysrepoctl -i build/o1/yang/o-ran-sc-odu-alarm-v1.yang
old mode 100644 (file)
new mode 100755 (executable)
index f807ba3..46efb3e
@@ -187,7 +187,7 @@ acknowledge() {
 #show help for user to provide valid input
 show_help(){
    echo "use -c option for cleanup"
-   echo "ex : $./install_netconf.sh -c"
+   echo "ex : $./install_lib.sh -c"
    exit
 }