Deliver playbook to mirror IBM Foundational Services images
Closed this issue · 1 comments
durera commented
Implement a playbook to automate the steps documented in our manual instructions to customers
Mirroring IBM Foundational Services
- Reference:https://www.ibm.com/docs/en/cpfs?topic=ifsoa-installing-cloud-pak-foundational-services-in-air-gapped-environment
- Reference: https://www.ibm.com/docs/en/cpfs?topic=environment-bastion-host
- Reference: https://github.com/IBM/cloud-pak-cli
Note: Do not use the tilde when specifying CLOUDCTL_OUTPUTDIR
export CLOUDCTL_OUTPUTDIR=/root/offline/ibm-cp-common-services
1. Download the IBM Common Services Cloud Pak archive
cloudctl case save --repo https://github.com/IBM/cloud-pak/raw/master/repo/case --case ibm-cp-common-services --version 1.9.0
--outputdir $CLOUDCTL_OUTPUTDIR
mkdir $CLOUDCTL_OUTPUTDIR/CP
mv -v $CLOUDCTL_OUTPUTDIR/charts $CLOUDCTL_OUTPUTDIR/CP
mv -fv $CLOUDCTL_OUTPUTDIR/ibm-cp-common-services-* $CLOUDCTL_OUTPUTDIR/CP
mv -fv $CLOUDCTL_OUTPUTDIR/ibm-licensing-* $CLOUDCTL_OUTPUTDIR/CP
mv -fv $CLOUDCTL_OUTPUTDIR/ibm-events-operator-* $CLOUDCTL_OUTPUTDIR/CP
mv -fv $CLOUDCTL_OUTPUTDIR/ibm-crossplane-bundle-* $CLOUDCTL_OUTPUTDIR/CP
2. Create the namespace where you want to install IBM Common Services.
oc create namespace ibm-common-services
cloudctl case launch --case $CLOUDCTL_OUTPUTDIR/CP/ibm-cp-common-services-1.9.0.tgz --inventory
ibmCommonServiceOperatorSetup --action configure-creds-airgap --args "--registry icr.io --user cp --pass $ENTITLEMENT_KEY"
cloudctl case launch --case $CLOUDCTL_OUTPUTDIR/CP/ibm-cp-common-services-1.9.0.tgz --inventory
ibmCommonServiceOperatorSetup --action configure-creds-airgap --args --registry quay.io --user ******* --pass *******
cloudctl case launch --case $CLOUDCTL_OUTPUTDIR/CP/ibm-cp-common-services-1.9.0.tgz --inventory
ibmCommonServiceOperatorSetup --action configure-creds-airgap --args "--registry $MIRROR_REGISTRY --user
$REGISTRY_USERNAME --pass $REGISTRY_PASSWORD"
cloudctl case launch --case $CLOUDCTL_OUTPUTDIR/CP/ibm-cp-common-services-1.9.0.tgz --inventory
ibmCommonServiceOperatorSetup --action mirror-images --args "--registry $MIRROR_REGISTRY --inputDir
$CLOUDCTL_OUTPUTDIR/CP"
3. Create the ':latest' tag for the IBM Common Services catalog image that was downloaded
podman pull $MIRROR_REGISTRY/cpopen/ibm-common-service-catalog:v3.13.0-20211103.000000-000000000 --tls-verify=false
podman tag $MIRROR_REGISTRY/cpopen/ibm-common-service-catalog:v3.13.0-20211103.000000-000000000
$MIRROR_REGISTRY/cpopen/ibm-common-service-catalog:latest
podman push $MIRROR_REGISTRY/cpopen/ibm-common-service-catalog:latest --tls-verify=false
durera commented
This has been implemented, see ibm.mas_airgap.mirror_common_services
playbook