X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=functions.sh;h=fd19c46f691339d7d7c58429b7633a237dd9b7a7;hb=41dc0ffba7c09220626c8397589871063495c0f2;hp=aa9bf68fa07cb265ca10a86e821899c3306f8c78;hpb=1fa1c47f4878370418cb3ad627c7704fbe4b9534;p=kuberef.git diff --git a/functions.sh b/functions.sh index aa9bf68..fd19c46 100755 --- a/functions.sh +++ b/functions.sh @@ -133,19 +133,18 @@ EOF # Setup networking on provisioned hosts (Adapt setup_network.sh according to your network setup) setup_network() { -# Set Upper limit of number nodes in RI2 cluster (starting from 0) -NODE_MAX_ID=$(($(yq r "$CURRENTPATH"/hw_config/"$VENDOR"/idf.yaml --length idf.kubespray.hostnames)-1)) - -for idx in $(seq 0 "$NODE_MAX_ID") -do - NODE_IP=$(get_host_pxe_ip "nodes[${idx}]") -# SSH to jumphost - # shellcheck disable=SC2087 - ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF + # Set Upper limit of number nodes in RI2 cluster (starting from 0) + NODE_MAX_ID=$(($(yq r "$CURRENTPATH"/hw_config/"$VENDOR"/idf.yaml --length idf.kubespray.hostnames)-1)) + + for idx in $(seq 0 "$NODE_MAX_ID"); do + NODE_IP=$(get_host_pxe_ip "nodes[${idx}]") + # SSH to jumphost + # shellcheck disable=SC2087 + ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF ssh -o StrictHostKeyChecking=no root@${NODE_IP} \ 'bash -s' < ${PROJECT_ROOT}/${VENDOR}/setup_network.sh EOF -done + done } # k8s Provisioning (currently BMRA)