Step: upi-conf-ibmz-eco

This step creates the files necessary to deploy an IBM Z UPI cluster. It creates a terraform.tfvars file that is used to generate install yaml and ignition files

Container image used for this step: openshift/centos:7

openshift/centos:7 resolves to an image imported from the specified imagestream tag on the build farm (documentation).

Environment

In addition to the default environment, the step exposes the following:

Variable Name Type Variable Content
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE Dependency[?] Pull specification for release:latest image
RELEASE_IMAGE_LATEST Dependency[?] Pull specification for release:latest image
OS_CLOUD Parameter[?] (default: rhcert)
OPENSTACK_COMPUTE_FLAVOR Parameter[?] (default: medium)
CLUSTER_DOMAIN Parameter[?]
OCP_VERSION Parameter[?]

Source Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash

set -o nounset
set -o errexit
set -o pipefail

trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM

if [[ -z "$RELEASE_IMAGE_LATEST" ]]; then
  echo "RELEASE_IMAGE_LATEST is an empty string, exiting"
  exit 1
fi
if [[ -z "${OPENSTACK_COMPUTE_FLAVOR}" ]]; then
  echo "Compute flavor isn't specified. Using 'medium' by default."
  export OPENSTACK_COMPUTE_FLAVOR="medium"
fi
if [[ -z "${OS_CLOUD}" ]]; then
  echo "OpenStack cloud isn't specified. Using 'openstack' by default."
  export OS_CLOUD="rhcert"
fi
if [[ -z "${CLUSTER_DOMAIN}" ]]; then
  echo "Cluster's base domain must be specified in CLUSTER_DOMAIN."
  exit 1
fi
if [[ -z "${OCP_VERSION}" ]]; then
  echo "OpenShift target version isn't specified. Using '4.6' by default."
  export OCP_VERSION="4.6"
fi

export HOME=/tmp

pull_secret_in=/etc/pull-secret/.dockerconfigjson
pull_secret_out=${SHARED_DIR}/pull-secret
tfvars_out=${SHARED_DIR}/terraform.tfvars
echo "${NAMESPACE}-${JOB_NAME_HASH}" > "${SHARED_DIR}"/clustername.txt
cluster_name=$(<"${SHARED_DIR}"/clustername.txt)
echo "Configuring deployment of OpenShift ${OCP_VERSION} under the name ${cluster_name}"
dns_key=$(</var/run/secrets/ibmz-eco/dns-key)

export OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=${RELEASE_IMAGE_LATEST}
image_override_version=$(oc adm release info "${RELEASE_IMAGE_LATEST}" --output=jsonpath="{.metadata.version}")
# Ensure ignition assets are configured with the correct invoker to track CI jobs.
export OPENSHIFT_INSTALL_INVOKER=openshift-internal-ci/${JOB_NAME_SAFE}/${BUILD_ID}

# Retrieve pull-secret
echo "$(date -u --rfc-3339=seconds) - Retrieving pull-secret..."
cp ${pull_secret_in} ${pull_secret_out}
# Create terraform.tfvars
echo "$(date -u --rfc-3339=seconds) - Creating terraform variables file..."
cat > "${tfvars_out}" <<-EOF
cluster_id = "${cluster_name}"
cloud_domain = "${CLUSTER_DOMAIN}"
openshift_version = "${OCP_VERSION}"
image_override = "quay.io/openshift-release-dev/ocp-release:${image_override_version}-s390x"
worker_count = "2"
openstack_master_flavor_name = "large"
openstack_worker_flavor_name = "${OPENSTACK_COMPUTE_FLAVOR}"
openstack_bastion_flavor_name = "medium"
openstack_bastion_image_name = "Fedora-33"
openstack_credentials_cloud = "${OS_CLOUD}"
openshift_pull_secret_filepath = "./ocp_clusters/${cluster_name}/pull-secret"
proxy_enabled = "true"
project_dns_ip = "204.90.115.172"
project_dns_key = "${dns_key}"
EOF

Properties

Property Value Description
Termination grace period[?] 10m0s Period of time until SIGKILL signal is sent to the test pod (after SIGTERM signal is sent).
Resource requests (cpu) 10m Used in .resources.requests of the pod running this step.
Resource requests (memory) 100Mi Used in .resources.requests of the pod running this step.
Inject oc CLI[?] latest The oc CLI sourced from the specified release is injected into this step's' image.

GitHub Link:

https://github.com/openshift/release/blob/master/ci-operator/step-registry/upi/conf/ibmz-eco/upi-conf-ibmz-eco-ref.yaml

Owners:

Approvers:

Source code for this page located on GitHub