Step: openstack-conf-createfips

Creates two floating IPs in OPENSTACK_EXTERNAL_NETWORK with the description set to "${SHARED_DIR/CLUSTER_NAME".api-fip and "${SHARED_DIR/CLUSTER_NAME".ingress-fip. Writes IP and UID of created FIPs to $SHARED_DIR for later reference.

Container image used for this step: openstack-installer

openstack-installer resolves to an image built or imported by the ci-operator configuration (documentation).

Environment

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

Variable Name Type Variable Content
OS_CLOUD Parameter[?] Name of cloud to use from ${SHARED_DIR}/clouds.yaml file (default: openstack)
CONFIG_TYPE Parameter[?] The type of config for the environment to deploy. * 'minimal' - Configure the install-config with the minimal options to make it work on our tests, which requires the usage of floating IPs. This config type doesn't require a proxy server to be deployed. * 'byon' - Configure the install-config to use a pre-created network (BYON) so it wouln't require the usage of floating IPs. This config type will require a proxy server to be deployed. * 'proxy' - Configure the install-config to use a pre-created restricted network (BYON) and a Cluster Proxy.
OPENSTACK_EXTERNAL_NETWORK Parameter[?] Name of the OpenStack public-facing network. Defaults to the value in "${SHARED_DIR}/OPENSTACK_EXTERNAL_NETWORK"

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
#!/usr/bin/env bash

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

if [[ "${CONFIG_TYPE}" == "byon" || "${CONFIG_TYPE}" == "proxy" ]]; then
    echo "Skipping step due to CONFIG_TYPE being \"${CONFIG_TYPE}\"."
    exit 0
fi

export OS_CLIENT_CONFIG_FILE=${SHARED_DIR}/clouds.yaml
CLUSTER_NAME=$(<"${SHARED_DIR}"/CLUSTER_NAME)
OPENSTACK_EXTERNAL_NETWORK="${OPENSTACK_EXTERNAL_NETWORK:-$(<"${SHARED_DIR}/OPENSTACK_EXTERNAL_NETWORK")}"

LB_FIP_AND_ID=$(openstack floating ip create --description $CLUSTER_NAME.api-fip $OPENSTACK_EXTERNAL_NETWORK --format value -c 'floating_ip_address' -c 'id')
echo ${LB_FIP_AND_ID} |awk '{print $1}' > ${SHARED_DIR}/API_IP
echo ${LB_FIP_AND_ID} |awk '{print $2}' > ${SHARED_DIR}/LB_FIP_UID
cp ${SHARED_DIR}/API_IP ${ARTIFACT_DIR}
cp ${SHARED_DIR}/LB_FIP_UID ${ARTIFACT_DIR}
#Mark the fip for deletion
echo ${LB_FIP_AND_ID} |awk '{print $2}' >> ${SHARED_DIR}/DELETE_FIPS
cp ${SHARED_DIR}/DELETE_FIPS ${ARTIFACT_DIR}

INGRESS_FIP_AND_ID=$(openstack floating ip create --description ${CLUSTER_NAME}.ingress-fip ${OPENSTACK_EXTERNAL_NETWORK} --format value -c 'floating_ip_address' -c 'id')
echo ${INGRESS_FIP_AND_ID} |awk '{print $1}' > ${SHARED_DIR}/INGRESS_IP
echo ${INGRESS_FIP_AND_ID} |awk '{print $2}' > ${SHARED_DIR}/INGRESS_FIP_UID
cp ${SHARED_DIR}/INGRESS_IP ${ARTIFACT_DIR}
cp ${SHARED_DIR}/INGRESS_FIP_UID ${ARTIFACT_DIR}
#Mark the fip for deletion
echo ${INGRESS_FIP_AND_ID} |awk '{print $2}' >> ${SHARED_DIR}/DELETE_FIPS
cp ${SHARED_DIR}/DELETE_FIPS ${ARTIFACT_DIR}

Properties

Property Value Description
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.

GitHub Link:

https://github.com/openshift/release/blob/master/ci-operator/step-registry/openstack/conf/createfips/openstack-conf-createfips-ref.yaml

Owners:

Approvers:

Reviewers:

Source code for this page located on GitHub