diff --git a/ci-operator/config/openshift/installer/openshift-installer-master.yaml b/ci-operator/config/openshift/installer/openshift-installer-master.yaml index cd038b1700f0d..e57631d196703 100644 --- a/ci-operator/config/openshift/installer/openshift-installer-master.yaml +++ b/ci-operator/config/openshift/installer/openshift-installer-master.yaml @@ -106,8 +106,8 @@ images: as: - registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.8 to: libvirt-installer -- dockerfile_path: images/installer/Dockerfile.upi.ci - from: rhel-7 +- dockerfile_path: images/installer/Dockerfile.upi.ci.rhel8 + from: base inputs: ocp_4.8_cli: as: diff --git a/ci-operator/step-registry/upi/conf/gcp/upi-conf-gcp-commands.sh b/ci-operator/step-registry/upi/conf/gcp/upi-conf-gcp-commands.sh index 360feaddcae6b..de60fbe8fd4c5 100755 --- a/ci-operator/step-registry/upi/conf/gcp/upi-conf-gcp-commands.sh +++ b/ci-operator/step-registry/upi/conf/gcp/upi-conf-gcp-commands.sh @@ -37,20 +37,8 @@ if [[ -s "${SHARED_DIR}/xpn.json" ]]; then HOST_PROJECT_COMPUTE_SUBNET_NAME="$(basename "${HOST_PROJECT_COMPUTE_SUBNET}")" fi -if ! pip -V; then - echo "pip is not installed: installing" - if python -c "import sys; assert(sys.version_info >= (3,0))"; then - python -m ensurepip --user || easy_install --user 'pip' - else - echo "python < 3, installing pip<21" - python -m ensurepip --user || easy_install --user 'pip<21' - fi -fi export PATH="${HOME}/.local/bin:${PATH}" -echo "Installing python modules: yaml" -python -c "import yaml" || pip install --user pyyaml - ### Empty the compute pool (optional) echo "Emptying the compute pool..." python -c ' diff --git a/ci-operator/step-registry/upi/install/gcp/upi-install-gcp-commands.sh b/ci-operator/step-registry/upi/install/gcp/upi-install-gcp-commands.sh index 0e94d24bacf67..a490dcde43a8e 100755 --- a/ci-operator/step-registry/upi/install/gcp/upi-install-gcp-commands.sh +++ b/ci-operator/step-registry/upi/install/gcp/upi-install-gcp-commands.sh @@ -301,9 +301,22 @@ gcloud iam service-accounts keys create service-account-key.json "--iam-account= ## Create the cluster image. echo "$(date -u --rfc-3339=seconds) - Creating the cluster image..." -IMAGE_SOURCE="$(jq -r .gcp.url /var/lib/openshift-install/rhcos.json)" -gcloud compute images create "${INFRA_ID}-rhcos-image" --source-uri="${IMAGE_SOURCE}" -CLUSTER_IMAGE="$(gcloud compute images describe "${INFRA_ID}-rhcos-image" --format json | jq -r .selfLink)" +imagename="${INFRA_ID}-rhcos-image" +# https://github.com/openshift/installer/blob/master/docs/user/overview.md#coreos-bootimages +# This code needs to handle pre-4.8 installers though too. +if openshift-install coreos print-stream-json 2>/tmp/err.txt >coreos.json; then + jq '.architectures.'"$(uname -m)"'.images.gcp' < coreos.json > gcp.json + source_image="$(jq -r .name < gcp.json)" + source_project="$(jq -r .project < gcp.json)" + rm -f coreos.json gcp.json + echo "Creating image from ${source_image} in ${source_project}" + gcloud compute images create "${imagename}" --source-image="${source_image}" --source-image-project="${source_project}" +else + IMAGE_SOURCE="$(jq -r .gcp.url /var/lib/openshift-install/rhcos.json)" + gcloud compute images create "${imagename}" --source-uri="${IMAGE_SOURCE}" +fi +CLUSTER_IMAGE="$(gcloud compute images describe "${imagename}" --format json | jq -r .selfLink)" +echo "Using CLUSTER_IMAGE=${CLUSTER_IMAGE}" ## Upload the bootstrap.ign to a new bucket echo "$(date -u --rfc-3339=seconds) - Uploading the bootstrap.ign to a new bucket..." diff --git a/ci-operator/templates/openshift/endurance/endurance-test.yaml b/ci-operator/templates/openshift/endurance/endurance-test.yaml index 1b69f90663f53..aa38286878c23 100644 --- a/ci-operator/templates/openshift/endurance/endurance-test.yaml +++ b/ci-operator/templates/openshift/endurance/endurance-test.yaml @@ -269,8 +269,6 @@ objects: if [[ "${CLUSTER_TYPE}" = "aws" ]]; then # FIXME: get epel-release or otherwise add awscli to our teardown image export PATH="${HOME}/.local/bin:${PATH}" - easy_install --user 'pip<21' # our Python 2.7.5 is even too old for ensurepip - pip install --user awscli export AWS_DEFAULT_REGION="$(python -c 'import json; data = json.load(open("${ARTIFACT_DIR}/installer/metadata.json")); print(data["aws"]["region"])')" echo "gathering node console output from ${AWS_DEFAULT_REGION}" fi diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml index 03c2e86fea229..67224d560b8a2 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml @@ -1023,8 +1023,6 @@ objects: if [[ "${CLUSTER_TYPE}" == "aws" ]]; then # FIXME: get epel-release or otherwise add awscli to our teardown image export PATH="${HOME}/.local/bin:${PATH}" - easy_install --user 'pip<21' # our Python 2.7.5 is even too old for ensurepip - pip install --user awscli export AWS_DEFAULT_REGION="$(python -c 'import json; data = json.load(open("${ARTIFACT_DIR}/installer/metadata.json")); print(data["aws"]["region"])')" echo "gathering node console output from ${AWS_DEFAULT_REGION}" fi diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml index 34985a8155810..c1788cb8cf494 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml @@ -827,8 +827,6 @@ objects: if [[ "${CLUSTER_TYPE}" == "aws" ]]; then # FIXME: get epel-release or otherwise add awscli to our teardown image export PATH="${HOME}/.local/bin:${PATH}" - easy_install --user 'pip<21' # our Python 2.7.5 is even too old for ensurepip - pip install --user awscli export AWS_DEFAULT_REGION="$(python -c 'import json; data = json.load(open("${ARTIFACT_DIR}/installer/metadata.json")); print(data["aws"]["region"])')" echo "gathering node console output from ${AWS_DEFAULT_REGION}" fi diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml index 9791dcd19dec2..739bca0832cac 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml @@ -1309,8 +1309,6 @@ objects: # FIXME: get epel-release or otherwise add awscli to our UPI image export PATH="${HOME}/.local/bin:${PATH}" - easy_install --user 'pip<21' # our Python 2.7.5 is even too old for ensurepip - pip install --user awscli export AWS_DEFAULT_REGION="${AWS_REGION}" # CLI prefers the former @@ -1585,11 +1583,6 @@ objects: gcloud auth activate-service-account --key-file="${GOOGLE_CLOUD_KEYFILE_JSON}" gcloud config set project openshift-gce-devel-ci - # Install pyopenssl - export PATH=${HOME}/.local/bin:${PATH} - easy_install --user 'pip<21' - pip install --user pyopenssl - export BASE_DOMAIN_ZONE_NAME=$(gcloud dns managed-zones list --filter "DNS_NAME=${base_domain}." --format json | jq -r .[0].name) export NETWORK_CIDR='10.0.0.0/16' export MASTER_SUBNET_CIDR='10.0.0.0/19'