Skip to content

Commit

Permalink
dual stack cluster works
Browse files Browse the repository at this point in the history
  • Loading branch information
karampok committed May 15, 2024
1 parent 6c47d0a commit c87dae2
Show file tree
Hide file tree
Showing 25 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/fetch-ai-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions config/frr-one/frr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions infra/deploy-ocp.sh
Original file line number Diff line number Diff line change
@@ -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}"

Expand All @@ -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}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions pkg/gather.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 5 additions & 1 deletion topo.clab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ 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
- ip route add default via 10.10.20.254
- 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
Expand All @@ -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
Expand Down

0 comments on commit c87dae2

Please sign in to comment.