diff --git a/bin/fetch-ai-binary.sh b/bin/fetch-ai-binary.sh index abfa02b..445ddd1 100755 --- a/bin/fetch-ai-binary.sh +++ b/bin/fetch-ai-binary.sh @@ -2,7 +2,7 @@ set -euoE pipefail PULL_SECRET=${PULL_SECRET:-.pull-secret.json} -OCP_RELEASE=${1:-"quay.io/openshift-release-dev/ocp-release:4.15.3-x86_64"} +OCP_RELEASE=${1:-"quay.io/openshift-release-dev/ocp-release:4.16.0-rc.1-x86_64"} # registry.ci.openshift.org/ocp/release@sha256:56fa5020a0bd9e31547ee5de38d3e6065d6df9aa7df21422c9335d634ef5edf5 # 1. official repo diff --git a/config/frr-one/frr.conf b/config/frr-one/frr.conf index 235608e..6fcc07d 100644 --- a/config/frr-one/frr.conf +++ b/config/frr-one/frr.conf @@ -28,6 +28,10 @@ interface eth0 exit interface eth1.blue ip address 10.10.10.1/24 + ipv6 address 2600:52:52:52::1/64 + ipv6 nd ra-interval 60 + ipv6 nd ra-lifetime 360 + no ipv6 nd suppress-ra exit ! interface eth1.green diff --git a/infra/deploy-ocp.sh b/infra/deploy-ocp.sh index 18a338c..d1aaeef 100755 --- a/infra/deploy-ocp.sh +++ b/infra/deploy-ocp.sh @@ -1,14 +1,18 @@ #! /usr/bin/env bash set -euoE pipefail +PULL_SECRET=${PULL_SECRET:-.pull-secret.json} + +OCP_RELEASE=${1:-"quay.io/openshift-release-dev/ocp-release:4.16.0-rc.1-x86_64"} +oc adm release extract --registry-config "${PULL_SECRET}" \ + --command=openshift-install --to "/usr/local/bin/" "$OCP_RELEASE" openshift-install version name=${1:-mno} #mno,sno,5gc folder=${folder:-"/share/${name}"} cp -r "${name}"-template "${folder}" -PULL_SECRET=$(jq '.' -c "${PULL_SECRET_PATH:-.pull-secret.json}") #one liner -sed -i "s/PULLSECRET/$PULL_SECRET/g" "${folder}"/install-config.yaml +sed -i "s/PULLSECRET/$(jq '.' -c "$PULL_SECRET")/g" "${folder}"/install-config.yaml openshift-install agent create image --log-level info --dir "${folder}" @@ -17,10 +21,10 @@ for node in $(cat "${folder}"/bmc-hosts); do power_off "$node" media_eject "$node" - media_insert "$node" "${HTTP_SERVER:-http://10.10.20.200:9000}"/"${name}"/agent.x86_64.iso + media_insert "$node" "${HTTP_SERVER:-http://192.168.100.200:9000}"/"${name}"/agent.x86_64.iso boot_once "$node" power_on "$node" done mkdir -p ~/.kube && cp "${folder}"/auth/kubeconfig ~/.kube/config -#openshift-install agent wait-for install-complete --log-level info --dir /share/${name} +openshift-install agent wait-for install-complete --log-level info --dir /share/${name} diff --git a/mno-template/agent-config.yaml b/infra/mno-template/agent-config.yaml similarity index 100% rename from mno-template/agent-config.yaml rename to infra/mno-template/agent-config.yaml diff --git a/mno-template/bmc-hosts b/infra/mno-template/bmc-hosts similarity index 100% rename from mno-template/bmc-hosts rename to infra/mno-template/bmc-hosts diff --git a/mno-template/day1/00-metallb-instance.yaml b/infra/mno-template/day1/00-metallb-instance.yaml similarity index 100% rename from mno-template/day1/00-metallb-instance.yaml rename to infra/mno-template/day1/00-metallb-instance.yaml diff --git a/mno-template/day1/00-nmstate-instance.yaml b/infra/mno-template/day1/00-nmstate-instance.yaml similarity index 100% rename from mno-template/day1/00-nmstate-instance.yaml rename to infra/mno-template/day1/00-nmstate-instance.yaml diff --git a/mno-template/day1/99-metallb-operator.yaml b/infra/mno-template/day1/99-metallb-operator.yaml similarity index 100% rename from mno-template/day1/99-metallb-operator.yaml rename to infra/mno-template/day1/99-metallb-operator.yaml diff --git a/mno-template/day1/image-registry-patch.yaml b/infra/mno-template/day1/image-registry-patch.yaml similarity index 100% rename from mno-template/day1/image-registry-patch.yaml rename to infra/mno-template/day1/image-registry-patch.yaml diff --git a/mno-template/day1/ingress-node-firewall.yaml b/infra/mno-template/day1/ingress-node-firewall.yaml similarity index 100% rename from mno-template/day1/ingress-node-firewall.yaml rename to infra/mno-template/day1/ingress-node-firewall.yaml diff --git a/mno-template/day1/kustomization.yaml b/infra/mno-template/day1/kustomization.yaml similarity index 100% rename from mno-template/day1/kustomization.yaml rename to infra/mno-template/day1/kustomization.yaml diff --git a/mno-template/day1/metallb-green.yaml b/infra/mno-template/day1/metallb-green.yaml similarity index 100% rename from mno-template/day1/metallb-green.yaml rename to infra/mno-template/day1/metallb-green.yaml diff --git a/mno-template/day1/metallb-red.yaml b/infra/mno-template/day1/metallb-red.yaml similarity index 100% rename from mno-template/day1/metallb-red.yaml rename to infra/mno-template/day1/metallb-red.yaml diff --git a/mno-template/day1/network-operator-patch.yaml b/infra/mno-template/day1/network-operator-patch.yaml similarity index 100% rename from mno-template/day1/network-operator-patch.yaml rename to infra/mno-template/day1/network-operator-patch.yaml diff --git a/mno-template/day1/operatorhub-patch.yaml b/infra/mno-template/day1/operatorhub-patch.yaml similarity index 100% rename from mno-template/day1/operatorhub-patch.yaml rename to infra/mno-template/day1/operatorhub-patch.yaml diff --git a/mno-template/install-config.yaml b/infra/mno-template/install-config.yaml similarity index 100% rename from mno-template/install-config.yaml rename to infra/mno-template/install-config.yaml diff --git a/mno-template/openshift/00-autologin.yaml b/infra/mno-template/openshift/00-autologin.yaml similarity index 100% rename from mno-template/openshift/00-autologin.yaml rename to infra/mno-template/openshift/00-autologin.yaml diff --git a/mno-template/openshift/00-debug-networkmanager.yaml b/infra/mno-template/openshift/00-debug-networkmanager.yaml similarity index 100% rename from mno-template/openshift/00-debug-networkmanager.yaml rename to infra/mno-template/openshift/00-debug-networkmanager.yaml diff --git a/mno-template/openshift/50-restricted-forwarding-control.yaml b/infra/mno-template/openshift/50-restricted-forwarding-control.yaml similarity index 100% rename from mno-template/openshift/50-restricted-forwarding-control.yaml rename to infra/mno-template/openshift/50-restricted-forwarding-control.yaml diff --git a/mno-template/openshift/50-restricted-forwarding.yaml b/infra/mno-template/openshift/50-restricted-forwarding.yaml similarity index 100% rename from mno-template/openshift/50-restricted-forwarding.yaml rename to infra/mno-template/openshift/50-restricted-forwarding.yaml diff --git a/mno-template/openshift/60-registry-pvc.yaml b/infra/mno-template/openshift/60-registry-pvc.yaml similarity index 100% rename from mno-template/openshift/60-registry-pvc.yaml rename to infra/mno-template/openshift/60-registry-pvc.yaml diff --git a/redfish-actions/hpe.sh b/infra/redfish-actions/hpe.sh similarity index 100% rename from redfish-actions/hpe.sh rename to infra/redfish-actions/hpe.sh diff --git a/redfish-actions/sushy.sh b/infra/redfish-actions/sushy.sh similarity index 100% rename from redfish-actions/sushy.sh rename to infra/redfish-actions/sushy.sh diff --git a/pkg/gather.go b/pkg/gather.go index 8d57739..acd3081 100644 --- a/pkg/gather.go +++ b/pkg/gather.go @@ -21,6 +21,7 @@ func SetupInfra() *Run { c := "containerlab deploy" r.Step(S("Containerlab"), S(c)) cleanup = append(cleanup, "containerlab destroy") + cleanup = append(cleanup, "rm -rf clab-vlab/") vbmh := `kcli create plan -f vbmh-kcli-plan.yaml vbmh` r.Step(S("Create baremetal with kcli"), S(vbmh)) diff --git a/topo.clab.yml b/topo.clab.yml index 1a0dd89..b74dd2f 100644 --- a/topo.clab.yml +++ b/topo.clab.yml @@ -57,7 +57,7 @@ topology: echo "while true;do curl -sf http://6.6.6.1:5555/hostname --connect-timeout 1 -o /dev/null || date +%s.%3N ;done" > run dns: kind: linux - image: quay.io/karampok/tools:dnsmasq + image: quay.io/openshift/origin-coredns:latest network-mode: none exec: - ip addr add 10.10.20.10/24 dev eth1 @@ -65,6 +65,7 @@ topology: - ip route add 10.10.10.0/24 via 10.10.20.1 binds: - config/coredns:/etc/coredns + entrypoint: /usr/bin/coredns -conf /etc/coredns/Corefile sushy: kind: linux image: quay.io/karampok/sushy-emulator:latest @@ -83,6 +84,9 @@ topology: - ip addr add 10.10.20.200/24 dev eth1 - ip addr add 192.168.100.200/24 dev bmc - ip route add 10.10.10.0/24 via 10.10.20.1 + - sysctl -w "net.ipv4.ip_forward=1" + - iptables -t nat -A PREROUTING -p udp --dport 51820 -j DNAT --to 10.10.20.200 + - echo "nameserver 10.10.20.10" > /etc/resolv.conf # - ip route add default via 10.10.20.254 binds: - infra/:/workdir