Skip to content

Commit

Permalink
Merge pull request #126 from kevydotvinu/rhcos-network
Browse files Browse the repository at this point in the history
Improve rhcos.sh and vm.sh
  • Loading branch information
k37y authored May 7, 2024
2 parents 081bdf0 + b657711 commit 529d7da
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ignition/00-core.bu
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,7 @@ storage:
.PHONY: rhcos

rhcos: ssh-pullsecret
@${HOME}/openshift-network-playground/rhcos.sh ${BUTANE}
@${HOME}/openshift-network-playground/rhcos.sh ${BUTANE} ${NETWORK}

.PHONY: fedora

Expand Down Expand Up @@ -3082,6 +3082,8 @@ storage:
set -eou pipefail

BUTANE=$(readlink -f ${1})
BRIDGE=${2}
NETWORK=$(echo ${BRIDGE} | tr "," "\n" | while read bridge; do echo --network bridge=${bridge}; done)
IGNITION_NAME=$(basename -- ${BUTANE})
IGNITION_NAME=${IGNITION_NAME%.*}
RELEASE=$(grep 4[.][0-9] ${BUTANE} | awk '{print $2}')
Expand Down Expand Up @@ -3130,7 +3132,8 @@ storage:
--vcpus 2 \
--ram 2048 \
--os-variant fedora-coreos-stable \
--import --network bridge=baremetal \
--import \
${NETWORK} \
--qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=${DIRECTORY}/${IGNITION_NAME}.ign" \
--disk ${DISK} \
--graphics spice,listen=${HOST_IP} \
Expand Down Expand Up @@ -3198,7 +3201,7 @@ storage:
ONP_DIR=/home/onp/openshift-network-playground

VM_NAME=${6}
IMAGE_NAME=$(basename -- ${IMAGE})
IMAGE_NAME=$(basename -- ${IMAGE%%\?*})
EXTENSION=${IMAGE_NAME##*.}
DISK=${DIRECTORY}/${VM_NAME}.${EXTENSION}

Expand Down

0 comments on commit 529d7da

Please sign in to comment.