diff --git a/ci-operator/step-registry/ipi/conf/vsphere/dns/ipi-conf-vsphere-dns-commands.sh b/ci-operator/step-registry/ipi/conf/vsphere/dns/ipi-conf-vsphere-dns-commands.sh index 970e35680888f..30cf178dfca81 100644 --- a/ci-operator/step-registry/ipi/conf/vsphere/dns/ipi-conf-vsphere-dns-commands.sh +++ b/ci-operator/step-registry/ipi/conf/vsphere/dns/ipi-conf-vsphere-dns-commands.sh @@ -13,6 +13,26 @@ cluster_domain="${cluster_name}.${base_domain}" export AWS_SHARED_CREDENTIALS_FILE=${CLUSTER_PROFILE_DIR}/.awscred export AWS_MAX_ATTEMPTS=7 export AWS_RETRY_MODE=adaptive +export HOME=/tmp + +if ! command -v aws &> /dev/null +then + + echo "$(date -u --rfc-3339=seconds) - Install AWS cli..." + python_version=$(python -c 'import sys;print(sys.version_info.major)') + export PATH="${HOME}/.local/bin:${PATH}" + if [[ $python_version -eq 2 ]] + then + easy_install --user pip # our Python 2.7.5 is even too old for ensurepip + pip install --user awscli + elif [[ $python_version -eq 3 ]] + then + pip3 install --user awscli + else + echo "$(date -u --rfc-3339=seconds) - No pip available exiting..." + exit 1 + fi +fi # Load array created in setup-vips: # 0: API diff --git a/ci-operator/step-registry/ipi/conf/vsphere/dns/ipi-conf-vsphere-dns-ref.yaml b/ci-operator/step-registry/ipi/conf/vsphere/dns/ipi-conf-vsphere-dns-ref.yaml index d5aa09b601365..2f2b3a401c84d 100644 --- a/ci-operator/step-registry/ipi/conf/vsphere/dns/ipi-conf-vsphere-dns-ref.yaml +++ b/ci-operator/step-registry/ipi/conf/vsphere/dns/ipi-conf-vsphere-dns-ref.yaml @@ -1,6 +1,6 @@ ref: as: ipi-conf-vsphere-dns - from: upi-installer + from: tools commands: ipi-conf-vsphere-dns-commands.sh resources: requests: diff --git a/ci-operator/step-registry/ipi/conf/vsphere/ipi-conf-vsphere-ref.yaml b/ci-operator/step-registry/ipi/conf/vsphere/ipi-conf-vsphere-ref.yaml index 87cb7497d69e9..0d7a3e71eb63c 100644 --- a/ci-operator/step-registry/ipi/conf/vsphere/ipi-conf-vsphere-ref.yaml +++ b/ci-operator/step-registry/ipi/conf/vsphere/ipi-conf-vsphere-ref.yaml @@ -1,6 +1,6 @@ ref: as: ipi-conf-vsphere - from: base + from: tools commands: ipi-conf-vsphere-commands.sh resources: requests: diff --git a/ci-operator/step-registry/ipi/conf/vsphere/vips/ipi-conf-vsphere-vips-ref.yaml b/ci-operator/step-registry/ipi/conf/vsphere/vips/ipi-conf-vsphere-vips-ref.yaml index d431e7ef29612..94936275ac168 100644 --- a/ci-operator/step-registry/ipi/conf/vsphere/vips/ipi-conf-vsphere-vips-ref.yaml +++ b/ci-operator/step-registry/ipi/conf/vsphere/vips/ipi-conf-vsphere-vips-ref.yaml @@ -1,6 +1,6 @@ ref: as: ipi-conf-vsphere-vips - from: upi-installer + from: tools commands: ipi-conf-vsphere-vips-commands.sh resources: requests: diff --git a/ci-operator/step-registry/ipi/deprovision/vsphere/dns/ipi-deprovision-vsphere-dns-commands.sh b/ci-operator/step-registry/ipi/deprovision/vsphere/dns/ipi-deprovision-vsphere-dns-commands.sh index 3c96a12201c11..47a2b0ad60482 100755 --- a/ci-operator/step-registry/ipi/deprovision/vsphere/dns/ipi-deprovision-vsphere-dns-commands.sh +++ b/ci-operator/step-registry/ipi/deprovision/vsphere/dns/ipi-deprovision-vsphere-dns-commands.sh @@ -7,6 +7,26 @@ set -o pipefail export AWS_SHARED_CREDENTIALS_FILE=${CLUSTER_PROFILE_DIR}/.awscred export AWS_MAX_ATTEMPTS=7 export AWS_RETRY_MODE=adaptive +export HOME=/tmp + +if ! command -v aws &> /dev/null +then + + echo "$(date -u --rfc-3339=seconds) - Install AWS cli..." + python_version=$(python -c 'import sys;print(sys.version_info.major)') + export PATH="${HOME}/.local/bin:${PATH}" + if [[ $python_version -eq 2 ]] + then + easy_install --user pip # our Python 2.7.5 is even too old for ensurepip + pip install --user awscli + elif [[ $python_version -eq 3 ]] + then + pip3 install --user awscli + else + echo "$(date -u --rfc-3339=seconds) - No pip available exiting..." + exit 1 + fi +fi HOSTED_ZONE_ID="$(cat "${SHARED_DIR}/hosted-zone.txt")" diff --git a/ci-operator/step-registry/ipi/deprovision/vsphere/dns/ipi-deprovision-vsphere-dns-ref.yaml b/ci-operator/step-registry/ipi/deprovision/vsphere/dns/ipi-deprovision-vsphere-dns-ref.yaml index e65ef6bf9010b..1a107ef68d269 100644 --- a/ci-operator/step-registry/ipi/deprovision/vsphere/dns/ipi-deprovision-vsphere-dns-ref.yaml +++ b/ci-operator/step-registry/ipi/deprovision/vsphere/dns/ipi-deprovision-vsphere-dns-ref.yaml @@ -1,6 +1,6 @@ ref: as: ipi-deprovision-vsphere-dns - from: upi-installer + from: tools commands: ipi-deprovision-vsphere-dns-commands.sh resources: requests: diff --git a/ci-operator/step-registry/ipi/deprovision/vsphere/ipi-deprovision-vsphere-ref.yaml b/ci-operator/step-registry/ipi/deprovision/vsphere/ipi-deprovision-vsphere-ref.yaml index f7e70a34de395..b0689001f96f0 100644 --- a/ci-operator/step-registry/ipi/deprovision/vsphere/ipi-deprovision-vsphere-ref.yaml +++ b/ci-operator/step-registry/ipi/deprovision/vsphere/ipi-deprovision-vsphere-ref.yaml @@ -1,6 +1,6 @@ ref: as: ipi-deprovision-vsphere - from: upi-installer + from: installer commands: ipi-deprovision-vsphere-commands.sh resources: requests: diff --git a/ci-operator/step-registry/ipi/deprovision/vsphere/vips/ipi-deprovision-vsphere-vips-ref.yaml b/ci-operator/step-registry/ipi/deprovision/vsphere/vips/ipi-deprovision-vsphere-vips-ref.yaml index ac2595e8e2b80..c48b5de4550b0 100644 --- a/ci-operator/step-registry/ipi/deprovision/vsphere/vips/ipi-deprovision-vsphere-vips-ref.yaml +++ b/ci-operator/step-registry/ipi/deprovision/vsphere/vips/ipi-deprovision-vsphere-vips-ref.yaml @@ -1,6 +1,6 @@ ref: as: ipi-deprovision-vsphere-vips - from: upi-installer + from: tools commands: ipi-deprovision-vsphere-vips-commands.sh resources: requests: diff --git a/ci-operator/step-registry/ipi/install/vsphere/ipi-install-vsphere-ref.yaml b/ci-operator/step-registry/ipi/install/vsphere/ipi-install-vsphere-ref.yaml index f52189076b436..f39989c5d077d 100644 --- a/ci-operator/step-registry/ipi/install/vsphere/ipi-install-vsphere-ref.yaml +++ b/ci-operator/step-registry/ipi/install/vsphere/ipi-install-vsphere-ref.yaml @@ -1,6 +1,6 @@ ref: as: ipi-install-vsphere - from: upi-installer + from: installer commands: ipi-install-vsphere-commands.sh resources: requests: