Step: baremetalds-assisted-operator-setup

Installing Assisted Service Operator and Hive.

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
INDEX_IMAGE Dependency[?] Pull specification for ci-index image
ASSISTED_INSTALLER_IMAGE Dependency[?] Pull specification for assisted-installer image
ASSISTED_AGENT_IMAGE Dependency[?] Pull specification for assisted-installer-agent image
ASSISTED_CONTROLLER_IMAGE Dependency[?] Pull specification for assisted-installer-controller image
ASSISTED_IMAGE_SERVICE_IMAGE Dependency[?] Pull specification for assisted-image-service image
ASSISTED_OPENSHIFT_INSTALL_RELEASE_IMAGE Dependency[?] Pull specification for release:latest image
DISCONNECTED Parameter[?] Should we work on top of a disconnected environment (default: false)

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

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

echo "************ baremetalds assisted operator setup command ************"

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

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

# shellcheck disable=SC2087
ssh "${SSHOPTS[@]}" "root@${IP}" bash - << EOF

set -xeo pipefail

cd /root/dev-scripts
source common.sh
source utils.sh
source network.sh
export -f wrap_if_ipv6 ipversion

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}"

echo "### Setup assisted installer..."

images=(${ASSISTED_AGENT_IMAGE} ${ASSISTED_CONTROLLER_IMAGE} ${ASSISTED_INSTALLER_IMAGE} ${ASSISTED_IMAGE_SERVICE_IMAGE})

cat << VARS >> /root/config
export DISCONNECTED="${DISCONNECTED:-}"

# TODO: remove this and support mirroring an index referenced by digest value
# https://issues.redhat.com/browse/MGMT-6858
export INDEX_IMAGE="\$(dirname ${INDEX_IMAGE})/pipeline:ci-index"

export PUBLIC_CONTAINER_REGISTRIES="\$(for image in \${images}; do echo \${image} | cut -d'/' -f1; done | sort -u | paste -sd ',' -)"
export ASSISTED_OPENSHIFT_INSTALL_RELEASE_IMAGE="${ASSISTED_OPENSHIFT_INSTALL_RELEASE_IMAGE}"

# Fix for disconnected Hive
export GO_REQUIRED_MIN_VERSION="1.14.4"
VARS

source /root/config

deploy/operator/deploy.sh

EOF

Properties

Property Value Description
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/setup/baremetalds-assisted-operator-setup-ref.yaml

Owners:

Approvers:

Source code for this page located on GitHub