Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ tests:
- as: installer-rehearse-alibabacloud
interval: 960h
steps:
cluster_profile: alibabacloud-cn-qe
workflow: cucushift-installer-rehearse-alibabacloud-ipi
cluster_profile: alibabacloud-qe
workflow: cucushift-installer-rehearse-alibabacloud-ipi-private
- as: installer-rehearse-gcp
interval: 960h
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@ periodics:
interval: 960h
labels:
ci-operator.openshift.io/cloud: alibabacloud
ci-operator.openshift.io/cloud-cluster-profile: alibabacloud-cn-qe
ci-operator.openshift.io/cloud-cluster-profile: alibabacloud-qe
ci-operator.openshift.io/variant: installer-rehearse-4.12
ci.openshift.io/generator: prowgen
job-release: "4.12"
Expand Down Expand Up @@ -1269,7 +1269,7 @@ periodics:
secretName: ci-pull-credentials
- name: cluster-profile
secret:
secretName: cluster-secrets-alibabacloud-cn-qe
secretName: cluster-secrets-alibabacloud-qe
- name: pull-secret
secret:
secretName: registry-pull-credentials
Expand Down
4 changes: 4 additions & 0 deletions ci-operator/step-registry/alibabacloud/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
approvers:
- gpei
- jianlinliu
- jianli-wei
1 change: 1 addition & 0 deletions ci-operator/step-registry/alibabacloud/deprovision/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

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

if [ ! -f "${SHARED_DIR}/destroy-bastion.sh" ]; then
echo "No 'destroy-bastion.sh' found, aborted." && exit 0
fi

workdir="/tmp/installer"
mkdir -p "${workdir}"
pushd "${workdir}"

if ! [ -x "$(command -v aliyun)" ]; then
echo "$(date -u --rfc-3339=seconds) - Downloading 'aliyun' as it's not intalled..."
curl -sSL "https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz" --output aliyun-cli-linux-latest-amd64.tgz && \
tar -xvf aliyun-cli-linux-latest-amd64.tgz && \
rm -f aliyun-cli-linux-latest-amd64.tgz
ALIYUN_BIN="${workdir}/aliyun"
else
ALIYUN_BIN="$(which aliyun)"
fi

# copy the creds to the SHARED_DIR
if test -f "${CLUSTER_PROFILE_DIR}/alibabacreds.ini"
then
echo "$(date -u --rfc-3339=seconds) - Copying creds from CLUSTER_PROFILE_DIR to SHARED_DIR..."
cp ${CLUSTER_PROFILE_DIR}/alibabacreds.ini ${SHARED_DIR}
cp ${CLUSTER_PROFILE_DIR}/config ${SHARED_DIR}
cp ${CLUSTER_PROFILE_DIR}/envvars ${SHARED_DIR}
else
echo "$(date -u --rfc-3339=seconds) - Copying creds from /var/run/vault/alibaba/ to SHARED_DIR..."
cp /var/run/vault/alibaba/alibabacreds.ini ${SHARED_DIR}
cp /var/run/vault/alibaba/config ${SHARED_DIR}
cp /var/run/vault/alibaba/envvars ${SHARED_DIR}
fi

source ${SHARED_DIR}/envvars

echo "$(date -u --rfc-3339=seconds) - 'aliyun' authentication..."
ALIYUN_PROFILE="${SHARED_DIR}/config"
${ALIYUN_BIN} configure set --config-path "${ALIYUN_PROFILE}"

## Destroying DNS resources of mirror registry
if [[ -f "${SHARED_DIR}/destroy-mirror-dns.sh" ]]; then
echo "$(date -u --rfc-3339=seconds) - Destroying DNS resources of mirror registry..."
sh "${SHARED_DIR}/destroy-mirror-dns.sh"
fi

## Destroy the SSH bastion
echo "$(date -u --rfc-3339=seconds) - Destroying the bastion host..."
sh "${SHARED_DIR}/destroy-bastion.sh"

popd
rm -rf "${workdir}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"path": "alibabacloud/deprovision/bastionhost/alibabacloud-deprovision-bastionhost-ref.yaml",
"owners": {
"approvers": [
"gpei",
"jianlinliu",
"jianli-wei"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ref:
as: alibabacloud-deprovision-bastionhost
from_image:
namespace: ocp
name: "4.12"
tag: upi-installer
commands: alibabacloud-deprovision-bastionhost-commands.sh
resources:
requests:
cpu: 10m
memory: 100Mi
documentation: |-
The step destroys all resources configured by "alibabacloud-provision-bastionhost".
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

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

if [ ! -f "${SHARED_DIR}/destroy-vpc.sh" ]; then
echo "No 'destroy-vpc.sh' found, aborted." && exit 0
fi

workdir="/tmp/installer"
mkdir -p "${workdir}"
pushd "${workdir}"

if ! [ -x "$(command -v aliyun)" ]; then
echo "$(date -u --rfc-3339=seconds) - Downloading 'aliyun' as it's not intalled..."
curl -sSL "https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz" --output aliyun-cli-linux-latest-amd64.tgz && \
tar -xvf aliyun-cli-linux-latest-amd64.tgz && \
rm -f aliyun-cli-linux-latest-amd64.tgz
ALIYUN_BIN="${workdir}/aliyun"
else
ALIYUN_BIN="$(which aliyun)"
fi

# copy the creds to the SHARED_DIR
if test -f "${CLUSTER_PROFILE_DIR}/alibabacreds.ini"
then
echo "$(date -u --rfc-3339=seconds) - Copying creds from CLUSTER_PROFILE_DIR to SHARED_DIR..."
cp ${CLUSTER_PROFILE_DIR}/alibabacreds.ini ${SHARED_DIR}
cp ${CLUSTER_PROFILE_DIR}/config ${SHARED_DIR}
cp ${CLUSTER_PROFILE_DIR}/envvars ${SHARED_DIR}
else
echo "$(date -u --rfc-3339=seconds) - Copying creds from /var/run/vault/alibaba/ to SHARED_DIR..."
cp /var/run/vault/alibaba/alibabacreds.ini ${SHARED_DIR}
cp /var/run/vault/alibaba/config ${SHARED_DIR}
cp /var/run/vault/alibaba/envvars ${SHARED_DIR}
fi

source ${SHARED_DIR}/envvars

echo "$(date -u --rfc-3339=seconds) - 'aliyun' authentication..."
ALIYUN_PROFILE="${SHARED_DIR}/config"
${ALIYUN_BIN} configure set --config-path "${ALIYUN_PROFILE}"

## Destroy the VPC
echo "$(date -u --rfc-3339=seconds) - Destroying the VPC..."
sh "${SHARED_DIR}/destroy-vpc.sh"

popd
rm -rf "${workdir}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"path": "alibabacloud/deprovision/vpc/alibabacloud-deprovision-vpc-ref.yaml",
"owners": {
"approvers": [
"gpei",
"jianlinliu",
"jianli-wei"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ref:
as: alibabacloud-deprovision-vpc
from_image:
namespace: ocp
name: "4.12"
tag: upi-installer
commands: alibabacloud-deprovision-vpc-commands.sh
resources:
requests:
cpu: 10m
memory: 100Mi
documentation: |-
The step destroys all resources configured by "alibabacloud-provision-vpc".
1 change: 1 addition & 0 deletions ci-operator/step-registry/alibabacloud/provision/OWNERS
Loading