Merge "Remove redundant script"
diff --git a/comac-in-a-box/Makefile b/comac-in-a-box/Makefile
index b3060ba..c7c48c4 100644
--- a/comac-in-a-box/Makefile
+++ b/comac-in-a-box/Makefile
@@ -29,7 +29,7 @@
os_vendor := $(shell lsb_release -i -s)
os_release := $(shell lsb_release -r -s)
-ciab: $(M)/system-check $(M)/omec $(M)/oaisim
+ciab: $(M)/system-check $(M)/omec $(M)/oaisim $(M)/comac-platform
.PHONY: ciab test reset-test clean
@@ -149,10 +149,9 @@
sudo ovs-vsctl --may-exist add-port br-s1u-net s1u-enb -- set Interface s1u-enb type=internal
sudo ip addr add 119.0.0.4/24 dev s1u-enb || true
sudo ip link set s1u-enb up
- kubectl apply -f $(RESOURCEDIR)/sgi-net.yaml
kubectl apply -f $(RESOURCEDIR)/router.yaml
- kubectl wait pod --for=condition=Ready -l app=router --timeout=60s
- kubectl exec router ip route add 16.0.0.0/8 via 13.1.1.3
+ kubectl wait pod -n default --for=condition=Ready -l app=router --timeout=60s
+ kubectl -n default exec router ip route add 16.0.0.0/8 via 13.1.1.3
kubectl delete net-attach-def sgi-net
touch $@
@@ -160,9 +159,9 @@
cd $(WORKSPACE)/cord/helm-charts/omec; \
helm dep up omec-data-plane && \
helm dep up omec-control-plane && \
- helm upgrade --install $(HELM_GLOBAL_ARGS) omec-data-plane omec-data-plane -f $(CIABVALUES) && \
- helm upgrade --install $(HELM_GLOBAL_ARGS) omec-control-plane omec-control-plane -f $(CIABVALUES)
- $(WORKSPACE)/cord/helm-charts/scripts/wait_for_pods.sh default
+ helm upgrade --install $(HELM_GLOBAL_ARGS) --namespace omec omec-data-plane omec-data-plane -f $(CIABVALUES) && \
+ helm upgrade --install $(HELM_GLOBAL_ARGS) --namespace omec omec-control-plane omec-control-plane -f $(CIABVALUES)
+ $(WORKSPACE)/cord/helm-charts/scripts/wait_for_pods.sh omec
touch $@
# UE images includes kernel module, ue_ip.ko
@@ -183,9 +182,9 @@
sudo ip addr add 127.0.0.2/8 dev lo || true
$(eval mme_iface=$(shell ip -4 route list default | awk -F 'dev' '{ print $$2; exit }' | awk '{ print $$1 }'))
cd $(WORKSPACE)/cord/helm-charts; \
- helm upgrade --install $(HELM_GLOBAL_ARGS) oaisim oaisim -f $(CIABVALUES) \
+ helm upgrade --install $(HELM_GLOBAL_ARGS) --namespace omec oaisim oaisim -f $(CIABVALUES) \
--set config.enb.networks.s1_mme.interface=$(mme_iface)
- $(WORKSPACE)/cord/helm-charts/scripts/wait_for_pods.sh default
+ $(WORKSPACE)/cord/helm-charts/scripts/wait_for_pods.sh omec
@timeout 60s bash -c \
"until ip addr show oip1 | grep -q inet; \
do \
@@ -209,8 +208,8 @@
clean: reset-test
helm delete --purge $(shell helm ls -q) || true
- kubectl delete po router
- kubectl delete net-attach-def sgi-net
+ kubectl delete po router || true
+ kubectl delete net-attach-def sgi-net || true
sudo ovs-vsctl del-br br-s1u-net || true
sudo ovs-vsctl del-br br-sgi-net || true
sudo apt remove --purge openvswitch-switch -y
diff --git a/comac-in-a-box/resources/router.yaml b/comac-in-a-box/resources/router.yaml
index 67aedae..2307a48 100644
--- a/comac-in-a-box/resources/router.yaml
+++ b/comac-in-a-box/resources/router.yaml
@@ -13,6 +13,18 @@
# limitations under the License.
---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+ name: sgi-net
+spec:
+ config: '{
+ "type": "simpleovs",
+ "ipam": {
+ "type": "static"
+ }
+ }'
+---
apiVersion: v1
kind: Pod
metadata:
diff --git a/comac-in-a-box/resources/sgi-net.yaml b/comac-in-a-box/resources/sgi-net.yaml
deleted file mode 100644
index 75aa95e..0000000
--- a/comac-in-a-box/resources/sgi-net.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 2019-present Open Networking Foundation
-#
-# 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.
-
----
-apiVersion: "k8s.cni.cncf.io/v1"
-kind: NetworkAttachmentDefinition
-metadata:
- name: sgi-net
-spec:
- config: '{
- "type": "simpleovs",
- "ipam": {
- "type": "static"
- }
- }'