Step: baremetalds-assisted-operator-upgrade

Using OLM, upgrade the Infrastrure Operator to the latest version.

Container image used for this step: assisted-service-scripts

assisted-service-scripts 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
CHANNEL_UPGRADE_OVERRIDE Parameter[?] (default: alpha)

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

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

echo "************ baremetalds assisted operator upgrade command ************"

# Fetch packet basic configuration
# shellcheck source=/dev/null
source "${SHARED_DIR}/packet-conf.sh"

# # ZTP scripts have a lot of default values for the spoke cluster configuration. Adding this so that they can be changed.
# if [[ -n "${ASSISTED_ZTP_CONFIG:-}" ]]; then
#   readarray -t config <<< "${ASSISTED_ZTP_CONFIG}"
#   for var in "${config[@]}"; do
#     if [[ ! -z "${var}" ]]; then
#       echo "export ${var}" >> "${SHARED_DIR}/assisted-ztp-config"
#     fi
#   done
# fi

# # Copy configuration for ZTP vars if present
# if [[ -e "${SHARED_DIR}/assisted-ztp-config" ]]
# then
#   scp "${SSHOPTS[@]}" "${SHARED_DIR}/assisted-ztp-config" "root@${IP}:assisted-ztp-config"
# fi

tar -czf - . | ssh "${SSHOPTS[@]}" "root@${IP}" "cat > /root/assisted-service.tar.gz"

# shellcheck disable=SC2087
ssh "${SSHOPTS[@]}" "root@${IP}" bash - << EOF |& sed -e 's/.*auths\{0,1\}".*/*** PULL_SECRET ***/g'

set -xeo pipefail

# cd /root/dev-scripts
# source common.sh
# source utils.sh
# source network.sh

REPO_DIR="/home/assisted-service"
if [ ! -d "\${REPO_DIR}" ]; then
  mkdir -p "\${REPO_DIR}"

  echo "### Untar assisted-service code..."
  tar -xzvf /root/assisted-service.tar.gz -C "\${REPO_DIR}"
fi

cd "\${REPO_DIR}/deploy/operator/"


echo "### Upgrading AI operator..."

export CHANNEL_UPGRADE_OVERRIDE="${CHANNEL_UPGRADE_OVERRIDE}"

# source /root/config

# # Inject job configuration for ZTP, if available
# if [[ -e /root/assisted-ztp-config ]]
# then
#   source /root/assisted-ztp-config
# fi

./upgrade/upgrade.sh

EOF

Properties

Property Value Description
Step timeout[?] 1h0m0s Limits the execution time of the step.
Termination grace period[?] 1m0s Period of time until SIGKILL signal is sent to the test pod (after SIGTERM signal is sent).
Resource requests (cpu) 1000m Used in .resources.requests of the pod running this step.
Resource requests (memory) 500Mi Used in .resources.requests of the pod running this step.

GitHub Link:

https://github.com/openshift/release/blob/master/ci-operator/step-registry/baremetalds/assisted/operator/upgrade/baremetalds-assisted-operator-upgrade-ref.yaml

Owners:

Approvers:

Source code for this page located on GitHub