From 5f396ad963e0c8344c5cdf4b65934142c7fc806c Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Wed, 12 Dec 2018 13:04:35 +0100 Subject: [PATCH] Revert BYOR part of #2353 The change should first land in the installer, see https://github.com/openshift/installer/pull/861 --- .../cluster-launch-e2e-40.yaml | 86 +++++-------------- 1 file changed, 20 insertions(+), 66 deletions(-) diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-40.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-40.yaml index 44e55872340e..75f6d9501708 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-40.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-40.yaml @@ -251,80 +251,34 @@ objects: trap 'rc=$?; if test "${rc}" -eq 0; then touch /tmp/config-success; else touch /tmp/exit; fi; exit "${rc}"' EXIT trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN}; fi' TERM + if [[ ${TYPE} == 'gcp' ]]; then + export OPENSHIFT_INSTALL_PLATFORM=libvirt + export OPENSHIFT_INSTALL_BASE_DOMAIN=origin-ci-int-gce.dev.rhcloud.com + export OPENSHIFT_INSTALL_LIBVIRT_URI="qemu+tcp://192.168.122.1/system" + export OPENSHIFT_INSTALL_LIBVIRT_IMAGE="file:///unused" + fi + if [[ ${TYPE} == 'aws' ]]; then + export OPENSHIFT_INSTALL_PLATFORM="aws" + export OPENSHIFT_INSTALL_BASE_DOMAIN="test.ose" + export AWS_SHARED_CREDENTIALS_FILE="/etc/openshift-installer/.awscred" + export OPENSHIFT_INSTALL_AWS_REGION="us-east-1" + fi mkdir /tmp/artifacts/installer && /bin/openshift-install version >/tmp/artifacts/installer/version - export CLUSTER_ID=$(uuidgen --random) + export _CI_ONLY_STAY_AWAY_OPENSHIFT_INSTALL_AWS_USER_TAGS="{\"expirationDate\": \"$(date -d '4 hours' --iso=minutes --utc)\"}" + /bin/openshift-install --dir=/tmp/artifacts/installer --log-level=debug create install-config - if [[ "${CLUSTER_TYPE}" == "gcp" ]]; then - cat > /tmp/artifacts/installer/install-config.yml << EOF - baseDomain: origin-ci-int-gce.dev.rhcloud.com - clusterID: ${CLUSTER_ID} - machines: - - name: master - replicas: ${MASTERS} - - name: worker - replicas: ${WORKERS} - metadata: - name: ${CLUSTER_NAME} - networking: - clusterNetworks: - - cidr: 10.128.0.0/14 - hostSubnetLength: 9 - serviceCIDR: 172.30.0.0/16 - type: OpenshiftSDN - platform: - libvirt: - URI: qemu+tcp://192.168.122.1/system - defaultMachinePlatform: - image: file:///unused - masterIPs: null - network: - if: tt0 - ipRange: 192.168.126.0/24 - pullSecret: | - ${PULL_SECRET} - sshKey: | - ${SSH_PUB_KEY} - EOF - elif [[ "${CLUSTER_TYPE}" == "aws" ]]; then - export AWS_SHARED_CREDENTIALS_FILE="/etc/openshift-installer/.awscred" - export EXPIRATION_DATE=$(date -d '4 hours' --iso=minutes --utc) - cat > /tmp/artifacts/installer/install-config.yml << EOF - baseDomain: test.ose - clusterID: ${CLUSTER_ID} - machines: - - name: master - replicas: ${MASTERS} - - name: worker - replicas: ${WORKERS} - metadata: - name: ${CLUSTER_NAME} - networking: - clusterNetworks: - - cidr: 10.128.0.0/14 - hostSubnetLength: 9 - serviceCIDR: 172.30.0.0/16 - type: OpenshiftSDN - platform: - aws: - region: us-east-1 - vpcCIDRBlock: 10.0.0.0/16 - userTags: - expirationDate: ${EXPIRATION_DATE} - pullSecret: | - ${PULL_SECRET} - sshKey: | - ${SSH_PUB_KEY} - EOF - else - echo "Unsupported cluster type '${CLUSTER_NAME}'" - exit 1 - fi + # Update install configs to set desired number of masters and workers + sed -i "/master/{n;s/1/${MASTERS}/}" /tmp/artifacts/installer/.openshift_install_state.json + sed -i "/worker/{n;s/1/${WORKERS}/}" /tmp/artifacts/installer/.openshift_install_state.json + sed -i "/master/{n;n;s/1/${MASTERS}/}" /tmp/artifacts/installer/install-config.yml + sed -i "/worker/{n;n;s/1/${WORKERS}/}" /tmp/artifacts/installer/install-config.yml /bin/openshift-install --dir=/tmp/artifacts/installer --log-level=debug create ignition-configs & wait "$!" + # Runs an install - name: setup image: ${IMAGE_ANSIBLE}