8 if [ $cpdp == "cplane" ]; then
10 echo "Illegal parameters for cplane"
14 NF_0=(mongodb nrf udr udm ausf nssf pcf)
15 NF_1=(nrf udr udm ausf pcf)
16 cPlaneIP=$(hostname -I | cut -f 1 -d " ")
17 elif [ $cpdp == "dplane" ]; then
19 echo "Illegal parameters for dplane"
20 echo "$0 dplane <cplane_node_IP>"
25 dPlaneIP=$(hostname -I | cut -f 1 -d " ")
28 echo "Unknown Option $cpdp"
29 echo "Allowed options are: cplane dplane"
33 function check_status_exit {
35 echo "failed to install $2 in $1 namespace"
39 for i in $(seq 1 $titr); do
41 kubectl get pods -n $1 | grep $2 | grep unning
43 echo "$2 running in $1 namespace"
46 if [ $i -eq $titr ]; then
47 echo "$2 NF failed to run in the $1 namespace"
53 for f5gnf in ${NF_0[@]}; do
55 mongodb) echo "Installing mongodb"
56 helm install --namespace ${NS[0]} --set service.type=NodePort --set service.nodePort=32023 free5g-mongodb-${NS[0]} ./f5gc-mongodb/
57 check_status_exit ${NS[0]} mongodb
59 nrf) echo "Installing nrf in ${NS[0]} namespace"
60 helm install --namespace ${NS[0]} --set service.type=NodePort --set configuration.sbi.registerIPv4=${cPlaneIP} --set image.repository=registry.fi.intel.com/palaniap/free5gc-nrf --set image.tag=3.0.5 free5g-nrf-${NS[0]} f5gc-nrf/
61 check_status_exit ${NS[0]} nrf
63 udr) echo "Installing udr in ${NS[0]} namespace"
64 helm install --namespace ${NS[0]} --set service.type=NodePort --set configuration.sbi.registerIPv4=${cPlaneIP} --set image.repository=registry.fi.intel.com/palaniap/free5gc-udr --set image.tag=3.0.5 free5g-udr-${NS[0]} f5gc-udr/
65 check_status_exit ${NS[0]} udr
67 udm) echo "Installing udm in ${NS[0]} namespace"
68 helm install --namespace ${NS[0]} --set service.type=NodePort --set configuration.sbi.registerIPv4=${cPlaneIP} --set image.repository=registry.fi.intel.com/palaniap/free5gc-udm --set image.tag=3.0.5 free5g-udm-${NS[0]} f5gc-udm/
69 check_status_exit ${NS[0]} udm
71 ausf) echo "Installing ausf in ${NS[0]} namespace"
72 helm install --namespace ${NS[0]} --set service.type=NodePort --set configuration.sbi.registerIPv4=${cPlaneIP} --set image.repository=registry.fi.intel.com/palaniap/free5gc-ausf --set image.tag=3.0.5 free5g-ausf-${NS[0]} f5gc-ausf/
73 check_status_exit ${NS[0]} ausf
75 nssf) echo "Installing nssf in ${NS[0]} namespace"
76 helm install --namespace ${NS[0]} --set service.type=NodePort --set configuration.sbi.registerIPv4=${cPlaneIP} --set nssaiNrfUri1=http://${cPlaneIP}:32510 --set nssaiNrfUri2=http://${cPlaneIP}:32510 --set nssaiNrfUri3=http://${cPlaneIP}:32510 --set nssaiNrfUri4=http://${cPlaneIP}:32510 --set nssaiNrfUri5=http://${cPlaneIP}:32511 --set nssaiNrfUri6=http://${cPlaneIP}:32511 --set nssaiNrfUri7=http://${cPlaneIP}:32510 --set nssaiNrfUri8=http://${cPlaneIP}:32510 --set image.repository=registry.fi.intel.com/palaniap/free5gc-nssf --set image.tag=3.0.5 free5g-nssf-${NS[0]} f5gc-nssf/
77 check_status_exit ${NS[0]} nssf
79 pcf) echo "Installing pcf in ${NS[0]} namespace"
80 helm install --namespace ${NS[0]} --set service.type=NodePort --set configuration.sbi.registerIPv4=${cPlaneIP} --set image.repository=registry.fi.intel.com/palaniap/free5gc-pcf --set image.tag=3.0.5 free5g-pcf-${NS[0]} f5gc-pcf/
81 check_status_exit ${NS[0]} pcf
83 amf) echo "Installing amf in ${NS[0]} namespace"
84 helm install --namespace ${NS[0]} --set service.type=NodePort --set configuration.sbi.registerIPv4=${dPlaneIP} --set configuration.nrfUri=http://${cPlaneIP}:32510 --set configuration.mongodb.url=http://${cPlaneIP}:32017 --set image.repository=registry.fi.intel.com/palaniap/free5gc-amf --set image.tag=3.0.5 free5g-amf-${NS[0]} ./f5gc-amf/
85 check_status_exit ${NS[0]} amf
87 upf) echo "Installing upf in ${NS[0]} namespace"
88 helm install --namespace ${NS[0]} --set image.repository=registry.fi.intel.com/palaniap/free5gc-upf --set image.tag=3.0.5 free5g-upf-${NS[0]} ./f5gc-upf/
89 check_status_exit ${NS[0]} upf
91 smf) echo "Installing smf in ${NS[0]} namespace"
92 helm install --namespace ${NS[0]} --set service.type=NodePort --set configuration.sbi.registerIPv4=${dPlaneIP} --set configuration.nrfUri=http://${cPlaneIP}:32510 --set configuration.mongodb.url=http://${cPlaneIP}:32017 --set image.repository=registry.fi.intel.com/palaniap/free5gc-smf --set image.tag=3.0.5 free5g-smf-${NS[0]} f5gc-smf/
93 check_status_exit ${NS[0]} smf
98 # prioslice namespace *******************
100 for f5gnf in ${NF_1[@]}; do
102 nrf) echo "Installing nrf in ${NS[1]} namespace"
103 helm install --namespace ${NS[1]} --set service.type=NodePort --set service.port=32511 --set service.nodePort=32511 --set configuration.sbi.registerIPv4=${cPlaneIP} --set configuration.MongoDBUrl=mongodb://f5gc-mongodb.default:27017 --set image.repository=registry.fi.intel.com/palaniap/free5gc-nrf --set image.tag=3.0.5 free5g-nrf-${NS[1]} f5gc-nrf/
104 check_status_exit ${NS[1]} nrf
106 udr) echo "Installing udr in ${NS[1]} namespace"
107 helm install --namespace ${NS[1]} --set service.type=NodePort --set service.port=32505 --set service.nodePort=32505 --set configuration.sbi.registerIPv4=${cPlaneIP} --set configuration.nrfUri=http://f5gc-nrf:32511 --set configuration.mongodb.url=mongodb://f5gc-mongodb.default:27017 --set image.repository=registry.fi.intel.com/palaniap/free5gc-udr --set image.tag=3.0.5 free5g-udr-${NS[1]} f5gc-udr/
108 check_status_exit ${NS[1]} udr
110 udm) echo "Installing udm in ${NS[1]} namespace"
111 helm install --namespace ${NS[1]} --set service.type=NodePort --set service.port=32502 --set service.nodePort=32502 --set configuration.sbi.registerIPv4=${cPlaneIP} --set configuration.nrfUri=http://f5gc-nrf:32511 --set configuration.mongodb.url=mongodb://f5gc-mongodb.default:27017 --set image.repository=registry.fi.intel.com/palaniap/free5gc-udm --set image.tag=3.0.5 free5g-udm-${NS[1]} f5gc-udm/
112 check_status_exit ${NS[1]} udm
114 ausf) echo "Installing ausf in ${NS[1]} namespace"
115 helm install --namespace ${NS[1]} --set service.type=NodePort --set service.port=32508 --set service.nodePort=32508 --set configuration.sbi.registerIPv4=${cPlaneIP} --set configuration.nrfUri=http://f5gc-nrf:32511 --set configuration.mongodb.url=mongodb://f5gc-mongodb.default:27017 --set image.repository=registry.fi.intel.com/palaniap/free5gc-ausf --set image.tag=3.0.5 free5g-ausf-${NS[1]} f5gc-ausf/
116 check_status_exit ${NS[1]} ausf
118 pcf) echo "Installing pcf in ${NS[1]} namespace"
119 helm install --namespace ${NS[1]} --set service.type=NodePort --set service.port=32590 --set service.nodePort=32590 --set configuration.sbi.registerIPv4=${cPlaneIP} --set configuration.nrfUri=http://f5gc-nrf:32511 --set configuration.mongodb.url=mongodb://f5gc-mongodb.default:27017 --set image.repository=registry.fi.intel.com/palaniap/free5gc-pcf --set image.tag=3.0.5 free5g-pcf-${NS[1]} f5gc-pcf/
120 check_status_exit ${NS[1]} pcf
122 upf) echo "Installing amf in ${NS[1]} namespace"
123 helm install --namespace ${NS[1]} -f f5gc-upf/values-prio.yaml --set image.repository=registry.fi.intel.com/palaniap/free5gc-upf --set image.tag=3.0.5 free5g-upf-${NS[1]} ./f5gc-upf/
124 check_status_exit ${NS[1]} upf
127 smf) echo "Installing smf in ${NS[1]} namespace"
128 helm install --namespace ${NS[1]} -f f5gc-smf/values-prio.yaml --set service.type=NodePort --set service.port=32505 --set service.nodePort=32505 --set configuration.sbi.registerIPv4=${dPlaneIP} --set configuration.nrfUri=http://${cPlaneIP}:32511 --set configuration.mongodb.url=http://${cPlaneIP}:32017 --set image.repository=registry.fi.intel.com/palaniap/free5gc-smf --set image.tag=3.0.5 free5g-smf-${NS[1]} f5gc-smf/
129 check_status_exit ${NS[1]} smf
134 kubectl get pods -o wide -n ${NS[0]}
136 kubectl get pods -o wide -n ${NS[1]}