Commit 030f7275 authored by Luhan Wang's avatar Luhan Wang

test

parent 4fa4140d
...@@ -9,4 +9,4 @@ git clone --branch master http://luhan:wangarafat@git.opensource5g.org/openxg/op ...@@ -9,4 +9,4 @@ git clone --branch master http://luhan:wangarafat@git.opensource5g.org/openxg/op
echo "successfully cloned project" echo "successfully cloned project"
cd openxg-5gcs-release cd openxg-5gcs-release
sudo ./scripts/install.sh -I sudo ./scripts/install.sh -I
sudo docker network create docker-openxg --subnet=172.11.200.0/24 -o com.docker.network.bridge.name=docker-openxg #sudo docker network create docker-openxg --subnet=172.11.200.0/24 -o com.docker.network.bridge.name=docker-openxg
\ No newline at end of file \ No newline at end of file
cd openxg-5gcs-release/docker-compose cd openxg-5gcs-release/docker-compose
sudo docker-compose -f docker-mysql.yml up -d sudo docker-compose -f docker-mysql.yml up -d
sudo docker-compose -f docker-3-network-element.yml up -d sudo docker-compose -f docker-3-local.yml up -d
\ No newline at end of file \ No newline at end of file
#!/bin/bash
cd openxg-5gcs-release/ci-scripts
sudo docker pull hogostan/ueransim:1.0
sudo docker run -d -ti -v /home/ubuntu/openxg-5gcs-release/ci-scripts/etc:/etc/openxg/ --privileged=true --net=docker-openxg --name=openxg-ueransim --ip=172.11.200.2 hogostan/ueransim:1.0 /UERANSIM/build/nr-gnb -c /etc/openxg/gnb.yaml
echo "started gNB"
sleep 1
sudo docker exec -ti -d openxg-ueransim /UERANSIM/build/nr-ue -c /etc/openxg/ue.yaml
echo "started UE"
sleep 5
line=`sudo docker exec -ti openxg-ueransim ping www.baidu.com -c 1 -s 1 -W 1 -I uesimtun0| grep "0% packet loss" | wc -l`
if [ $line == "1" ];then
echo "successfully ping"
else
echo "cannot ping"
exit 1 ## cannot ping, through an error
fi
\ No newline at end of file
#!/bin/bash #!/bin/bash
#!/bin/bash
ALL_VMS=$(sudo uvt-kvm list) ALL_VMS=$(sudo uvt-kvm list)
VM_NAME="vmtest" VM_NAME="vmtest"
CURRENT_PATH=`pwd` CURRENT_PATH=`pwd`
...@@ -11,19 +10,4 @@ if [ "$result" == "" ];then ...@@ -11,19 +10,4 @@ if [ "$result" == "" ];then
fi fi
VM_IP=`sudo uvt-kvm ip ${VM_NAME}` VM_IP=`sudo uvt-kvm ip ${VM_NAME}`
COMMAND="cd openxg-5gcs-release/ci-scripts;\ ssh -T -o StrictHostKeyChecking=no ubuntu@${VM_IP} < ./ci-scripts/verify-in-vm.sh
sudo docker pull hogostan/ueransim;\ \ No newline at end of file
sudo docker run -d -ti -v /home/ubuntu/openxg-5gcs-release/ci-scripts/etc:/etc/openxg/ --privileged=true --net=docker-openxg --name=openxg-ueransim --ip=172.11.200.2 hogostan/ueransim:1.0 /UERANSIM/build/nr-gnb -c /etc/openxg/gnb.yaml ;\
sleep 1;\
sudo docker exec -ti openxg-ueransim /UERANSIM/build/nr-ue -c /etc/openxg/ue.yaml;\
sleep 5;\
line=sudo docker exec -ti openxg-ueransim ping www.baidu.com -c 1 -s 1 -W 1 -I uerantun0| grep \"0% packet loss\" | wc -l ; \
if [ $line == \"1\" ];then
echo \"successfully ping\"
else
echo \"cannot ping\"
exit 1 ## VM doesn't exist
fi
"
ssh -T -o StrictHostKeyChecking=no ubuntu@${VM_IP} $COMMAND
\ No newline at end of file
version: '3.3'
services:
amf:
image: openxgmaster/amf:v1.0
container_name: amf
restart: always
logging:
driver: "json-file"
options:
max-size: "100m"
networks:
openxg:
aliases:
- web_amf
ipv4_address: 172.11.200.14
# ports:
#- "8282:8282"
# - "38412:38412/sctp"
command:
- /bin/bash
- -c
- |
cd /opt/5gc/amf/
./start.sh --no-ausf
volumes:
- ../etc/amf.conf:/opt/5gc/amf/external.conf
smf:
image: openxgmaster/smf:v1.0
container_name: smf
restart: always
logging:
driver: "json-file"
options:
max-size: "100m"
networks:
openxg:
aliases:
- web_smf
ipv4_address: 172.11.200.15
# ports:
# - "8889:8889"
# - "8805:8805/udp"
volumes:
- ../etc/smf.conf:/opt/5gc/smf/external.conf
spgwu:
image: openxgmaster/spgwu:v1.0
container_name: spgwu
depends_on:
- smf
restart: always
privileged: true
logging:
driver: "json-file"
options:
max-size: "100m"
networks:
openxg:
aliases:
- spgwu
ipv4_address: 172.11.200.25
# ports:
#- "2152:2152/udp"
#- "8805:8805"
volumes:
- ../etc/spgw_u.conf:/opt/5gc/spgw-u-tiny/external.conf
networks:
openxg:
external:
name: docker-openxg
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment