#CMD /opt/o-du-l2/bin/odu/odu
#cleanup netconf folder and install libraries
-RUN cd build/scripts && /bin/bash install_lib.sh -c
+RUN cd build/scripts && /bin/bash install_lib_O1.sh -c
# Install the data models based on the ODU yang model
RUN /usr/local/bin/sysrepoctl -i build/yang/o-ran-sc-odu-alarm-v1.yang
$(L_OPTS) -L$(LIB_ROOT)/cu_stub -L$(ROOT_DIR)/libs/cu_stub
$(Q)cp -f ./obj/cu_stub/cu_stub ./bin/cu_stub
$(Q)cp -rf ./bin/cu_stub $(ROOT_DIR)/bin/
- $(Q)cp -f ../scripts/cu_script.sh $(ROOT_DIR)/bin/cu_stub
+ $(Q)cp -f ../scripts/start_cu_stub_logging.sh $(ROOT_DIR)/bin/cu_stub
$(Q)echo -e "***** CU STUB BUILD COMPLETE *****"
ric:
$(L_OPTS) -L$(LIB_ROOT)/ric_stub -L$(ROOT_DIR)/libs/ric_stub
$(Q)cp -f ./obj/ric_stub/ric_stub ./bin/ric_stub
$(Q)cp -rf ./bin/ric_stub $(ROOT_DIR)/bin/
+ $(Q)cp -f ../scripts/start_ric_stub_logging.sh $(ROOT_DIR)/bin/ric_stub
$(Q)echo -e "***** RIC STUB BUILD COMPLETE *****"
copy_build: link_du
$(Q)cp -f ./obj/odu/odu ./bin/odu
$(Q)cp -rf ./bin/odu $(ROOT_DIR)/bin/
- $(Q)cp -f ../scripts/odu_script.sh $(ROOT_DIR)/bin/odu
+ $(Q)cp -f ../scripts/start_du_logging.sh $(ROOT_DIR)/bin/odu
$(Q)cp -rf ../config/ $(ROOT_DIR)/bin/odu
$(Q)cp -f ./lib/odu/*.a $(ROOT_DIR)/libs/
$(Q)echo -e "***** BUILD COMPLETE *****"
odu: prepare_dirs copy_build
-
cu_stub: prepare_cu_dirs cu link_cu
ric_stub: prepare_ric_dirs ric link_ric
--- /dev/null
+################################################################################
+# Copyright (c) [2020] [Radisys] #
+# #
+# 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. #
+################################################################################
+# This script is used to clean-up the system environment
+#!/bin/bash
+
+echo "***** Environment Clean-up Start *****"
+
+if [ -f /etc/os-release ]; then
+ . /etc/os-release
+ OS=$ID
+fi
+
+echo "===> Uninstalling GCC"
+if [ $OS == "ubuntu" ] ; then
+ sudo apt-get remove -y build-essential
+else
+ sudo yum groups mark remove -y "Development Tools"
+fi
+
+echo ""
+echo "===> Uninstalling LKSCTP"
+if [ $OS == "ubuntu" ] ; then
+ sudo apt-get remove -y libsctp-dev
+else
+ sudo yum remove -y lksctp-tools-devel
+fi
+
+echo ""
+echo "===> Uninstalling PCAP"
+if [ $OS == "ubuntu" ] ; then
+ sudo apt-get remove -y libpcap-dev
+else
+ sudo yum remove -y libpcap-devel
+fi
+
+echo ""
+echo "===> Uninstalling XTERM"
+if [ $OS == "ubuntu" ] ; then
+ sudo apt-get remove -y xterm
+else
+ sudo yum remove -y xterm
+fi
+
+echo ""
+echo "***** Environment Clean-up Complete *****"
+
+################################################################################
+# End of file #
+################################################################################
+
#show help for user to provide valid input
show_help(){
echo "use -c option for cleanup"
- echo "ex : $./install_lib.sh -c"
+ echo "ex : $./install_lib_O1.sh -c"
exit
}
--- /dev/null
+################################################################################
+# Copyright (c) [2020] [Radisys] #
+# #
+# 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. #
+################################################################################
+# This script is used to setup environment for execution of ODU-High
+#!/bin/bash
+
+echo "***** Installation Start *****"
+
+if [ -f /etc/os-release ]; then
+ . /etc/os-release
+ OS=$ID
+fi
+
+echo "===> Installing GCC"
+if [ $OS == "ubuntu" ] ; then
+ sudo apt-get install -y build-essential
+else
+ sudo yum groups mark install -y “Development Tools”
+fi
+echo""
+
+echo "===> Installing LKSCTP"
+if [ $OS == "ubuntu" ] ; then
+ sudo apt-get install -y libsctp-dev
+else
+ sudo yum install -y lksctp-tools-devel
+fi
+echo ""
+
+echo "===> Installing PCAP"
+if [ $OS == "ubuntu" ] ; then
+ sudo apt-get install -y libpcap-dev
+else
+ sudo yum install -y libpcap-devel
+fi
+echo ""
+
+echo "===> Installing XTERM"
+if [ $OS == "ubuntu" ] ; then
+ sudo apt-get install -y xterm
+else
+ sudo yum install -y xterm
+fi
+echo ""
+
+echo "***** Installation Complete *****"
+
+################################################################################
+# End of file #
+################################################################################
--- /dev/null
+################################################################################
+# Copyright (c) [2020] [Radisys] #
+# #
+# 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. #
+################################################################################
+# This is the main script that in turn triggers sub-scripts to install, compile
+# and execute ODU-High modules
+#!/bin/bash
+
+# Installing dependencies for ODU-High
+./install_odu_dependency.sh
+
+# Compiling and executing ODU-High binaries
+./start_gnb.sh
+
+################################################################################
+# End of file #
+################################################################################
################################################################################
-# Copyright (c) [2017-2019] [Radisys]
-# #
+# Copyright (c) [2017-2019] [Radisys] #
# #
-# 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
-# #
+# 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
-# #
+# 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.
-# #
+# 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. #
################################################################################
-
+# This script is used to log CU Stub
#!/bin/sh
ROOT_DIR=$PWD
################################################################################
-# Copyright (c) [2017-2019] [Radisys]
-# #
+# Copyright (c) [2017-2019] [Radisys] #
# #
-# 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
-# #
+# 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
-# #
+# 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.
-# #
+# 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. #
################################################################################
-
+# This script is used to log ODU-High
#!/bin/sh
ROOT_DIR=$PWD
--- /dev/null
+################################################################################
+# Copyright (c) [2020] [Radisys] #
+# #
+# 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. #
+################################################################################
+# This script is used to build and execute ODU-High and test stubs
+#!/bin/bash
+
+CURRENT_DIR=$PWD
+ROOT_DIR=$CURRENT_DIR/../../
+
+echo ""
+cd $ROOT_DIR/build/odu
+make clean_all
+echo "***** Building O-DU Binary *****"
+make odu MACHINE=BIT64 MODE=FDD
+echo ""
+echo "***** Building CU Stub Binary *****"
+make cu_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
+echo ""
+echo "***** Building RIC Stub Binary *****"
+make ric_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
+
+echo ""
+echo "***** Assigning IP addresses *****"
+INTERFACE=$(ip route | grep default | sed -e "s/^.*dev.//" -e "s/.proto.*//")
+INTERFACE="$(echo -e "${INTERFACE}" | tr -d '[:space:]')"
+ifconfig $INTERFACE:ODU "192.168.130.81"
+ifconfig $INTERFACE:CU_STUB "192.168.130.82"
+ifconfig $INTERFACE:RIC_STUB "192.168.130.80"
+
+xterm -hold -e "cd $ROOT_DIR/bin/cu_stub; chmod 777 *; ./start_cu_stub_logging.sh && ./cu_stub" &
+sleep 2
+xterm -hold -e "cd $ROOT_DIR/bin/ric_stub; chmod 777 *; ./start_ric_stub_logging.sh && ./ric_stub" &
+sleep 2
+xterm -hold -e "cd $ROOT_DIR/bin/odu; chmod 777 *; ./start_du_logging.sh && ./odu" &
+
+################################################################################
+# End of file #
+################################################################################
--- /dev/null
+################################################################################
+# Copyright (c) [2017-2019] [Radisys] #
+# #
+# 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. #
+################################################################################
+# This script is used to log RIC stub
+#!/bin/sh
+
+ROOT_DIR=$PWD
+d=`date +%Y_%m_%d_%I_%M_%S`
+
+touch $ROOT_DIR/"log_ric_stub_$d.txt"
+chmod -c 777 $ROOT_DIR/"log_ric_stub_$d.txt"
+touch /etc/rsyslog.d/rsyslog_loginauth.conf
+cp /dev/null /etc/rsyslog.d/rsyslog_loginauth.conf
+echo "if \$programname == \"RIC_STUB\" then" >> \
+/etc/rsyslog.d/rsyslog_loginauth.conf
+echo "$ROOT_DIR/../ric_stub/log_ric_stub_$d.txt" >> \
+/etc/rsyslog.d/rsyslog_loginauth.conf
+systemctl restart rsyslog
+
+
+#**********************************************************************
+# End of file
+#**********************************************************************
cat /home/netconf/.ssh/id_dsa.pub > /home/netconf/.ssh/authorized_keys
Install netconf packages.
$cd l2/build/scripts
- $chmod +x install_lib.sh
- $ ./install_lib.sh -c
+ $chmod +x install_lib_O1.sh
+ $ ./install_lib_O1.sh -c
2. Start Netopeer2-server:
$cd l2/build/scripts
- Ubuntu :
| cd <O-DU High Directory>/l2/build/scripts
- | sudo ./install_lib.sh -c
+ | sudo ./install_lib_O1.sh -c
- Start Netopeer2-server: