diff --git a/manifests/function/airshipctl-base-catalogues/versions-airshipctl.yaml b/manifests/function/airshipctl-base-catalogues/versions-airshipctl.yaml index a98678a08..fe14e6c7d 100644 --- a/manifests/function/airshipctl-base-catalogues/versions-airshipctl.yaml +++ b/manifests/function/airshipctl-base-catalogues/versions-airshipctl.yaml @@ -81,6 +81,7 @@ images: baremetal_operator: ironic: # ironic Deployment init_bootstrap: centos + init_images: quay.io/airshipit/ipa:latest dnsmasq: quay.io/metal3-io/ironic:capm3-v0.4.0 httpd: quay.io/metal3-io/ironic:capm3-v0.4.0 ironic: quay.io/metal3-io/ironic:capm3-v0.4.0 diff --git a/manifests/function/baremetal-operator/entrypoint/init-images b/manifests/function/baremetal-operator/entrypoint/init-images index 09151eae9..f050ca866 100644 --- a/manifests/function/baremetal-operator/entrypoint/init-images +++ b/manifests/function/baremetal-operator/entrypoint/init-images @@ -2,5 +2,6 @@ set -xe #Copy files to shared mount +mkdir -p /shared/html/images/ cp -f /ipa-ubuntu-master* /shared/html/images/ chmod 777 -R /shared/html/images/ diff --git a/manifests/function/baremetal-operator/replacements/versions.yaml b/manifests/function/baremetal-operator/replacements/versions.yaml index 397ee1680..58fd855e9 100644 --- a/manifests/function/baremetal-operator/replacements/versions.yaml +++ b/manifests/function/baremetal-operator/replacements/versions.yaml @@ -19,6 +19,15 @@ replacements: kind: Deployment name: ironic fieldrefs: ["{.spec.template.spec.initContainers[?(.name == 'init-bootstrap')].image}"] +- source: + objref: + name: versions-airshipctl + fieldref: "{.images.baremetal_operator.ironic.init_images}" + target: + objref: + kind: Deployment + name: ironic + fieldrefs: ["{.spec.template.spec.initContainers[?(.name == 'init-images')].image}"] - source: objref: name: versions-airshipctl diff --git a/manifests/function/hostgenerator-m3/hosttemplate.yaml b/manifests/function/hostgenerator-m3/hosttemplate.yaml index c4f87b81e..5a51853e9 100644 --- a/manifests/function/hostgenerator-m3/hosttemplate.yaml +++ b/manifests/function/hostgenerator-m3/hosttemplate.yaml @@ -53,6 +53,7 @@ template: | bmc: address: {{ $host.bmcAddress }} credentialsName: {{ $hostName }}-bmc-secret + disableCertificateVerification: {{ $host.disableCertificateVerification }} firmware: {{ toYaml $hardwareProfile.firmware | indent 4 }} {{- /* If no raid is defined for a host, simply skip. There is no default setting for raid */ -}} diff --git a/manifests/site/test-site/target/catalogues/hosts.yaml b/manifests/site/test-site/target/catalogues/hosts.yaml index abbf90e45..fa7052389 100644 --- a/manifests/site/test-site/target/catalogues/hosts.yaml +++ b/manifests/site/test-site/target/catalogues/hosts.yaml @@ -15,6 +15,7 @@ hosts: bmcAddress: redfish+http://10.23.25.1:8000/redfish/v1/Systems/air-target-1 bmcUsername: root bmcPassword: r00tme + disableCertificateVerification: false ipAddresses: oam-ipv4: 10.23.25.102 pxe-ipv4: 10.23.24.102 @@ -28,6 +29,7 @@ hosts: bmcAddress: redfish+http://10.23.25.2:8000/redfish/v1/Systems/air-target-2 bmcUsername: username bmcPassword: password + disableCertificateVerification: false ipAddresses: oam-ipv4: 10.23.25.101 pxe-ipv4: 10.23.24.101 @@ -41,6 +43,7 @@ hosts: bmcAddress: redfish+http://10.23.25.1:8000/redfish/v1/Systems/air-worker-1 bmcUsername: username bmcPassword: password + disableCertificateVerification: false ipAddresses: oam-ipv4: 10.23.25.103 pxe-ipv4: 10.23.24.103 diff --git a/tools/deployment/21_systemwide_executable.sh b/tools/deployment/21_systemwide_executable.sh index 6aef31821..4f06534c7 100755 --- a/tools/deployment/21_systemwide_executable.sh +++ b/tools/deployment/21_systemwide_executable.sh @@ -18,6 +18,7 @@ export USE_PROXY=${USE_PROXY:-"false"} export HTTPS_PROXY=${HTTPS_PROXY:-${https_proxy}} export HTTP_PROXY=${HTTP_PROXY:-${http_proxy}} export NO_PROXY=${NO_PROXY:-${no_proxy}} +export PROXY=${PROXY:-${http_proxy}} echo "Build airshipctl docker images" make images diff --git a/tools/deployment/33_cluster_move_target_node.sh b/tools/deployment/33_cluster_move_target_node.sh index f7f4a2239..4f8a9a189 100755 --- a/tools/deployment/33_cluster_move_target_node.sh +++ b/tools/deployment/33_cluster_move_target_node.sh @@ -19,12 +19,14 @@ export TIMEOUT=${TIMEOUT:-3600} export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"} export KUBECONFIG_EPHEMERAL_CONTEXT=${KUBECONFIG_EPHEMERAL_CONTEXT:-"ephemeral-cluster"} export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"} +export TARGET_NODE=${TARGET_NODE:-"node01"} +export CLUSTER_NAMESPACE=${CLUSTER_NAMESPACE:-"default"} echo "Check Cluster Status" -kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_EPHEMERAL_CONTEXT get cluster target-cluster -o json | jq '.status.controlPlaneReady' +kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_EPHEMERAL_CONTEXT -n $CLUSTER_NAMESPACE get cluster target-cluster -o json | jq '.status.controlPlaneReady' echo "Annotate BMH for target node" -kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_EPHEMERAL_CONTEXT annotate bmh node01 baremetalhost.metal3.io/paused=true +kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_EPHEMERAL_CONTEXT -n $CLUSTER_NAMESPACE annotate bmh $TARGET_NODE baremetalhost.metal3.io/paused=true echo "Move Cluster Object to Target Cluster" airshipctl phase run clusterctl-move @@ -37,11 +39,11 @@ kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get pods - end=$(($(date +%s) + $TIMEOUT)) echo "Waiting $TIMEOUT seconds for crds to be created." while true; do - if (kubectl --request-timeout 20s --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get cluster target-cluster -o json | jq '.status.controlPlaneReady' | grep -q true) ; then + if (kubectl --request-timeout 20s --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT -n $CLUSTER_NAMESPACE get cluster target-cluster -o json | jq '.status.controlPlaneReady' | grep -q true) ; then echo -e "\nGet CRD status" - kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get bmh - kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get machines - kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get clusters + kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT -n $CLUSTER_NAMESPACE get bmh + kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT -n $CLUSTER_NAMESPACE get machines + kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT -n $CLUSTER_NAMESPACE get clusters break else now=$(date +%s)