Skip to content

Commit

Permalink
Revert BYOR part of openshift#2353
Browse files Browse the repository at this point in the history
The change should first land in the installer, see 
openshift/installer#861
  • Loading branch information
vrutkovs committed Dec 12, 2018
1 parent c1d8708 commit 5f396ad
Showing 1 changed file with 20 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 5f396ad

Please sign in to comment.