Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[major] Remove image mirroring support for UDS #1231

Merged
merged 1 commit into from
Sep 5, 2024
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
4 changes: 1 addition & 3 deletions docs/commands/mirror-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ Usage
- `-u|--username REGISTRY_USERNAME` Username to authenticate to the target registry
- `-p|--password REGISTRY_PASSWORD` Password to authenticate to the target registry

### Source Registry Entitlements
### Source Registry Entitlement
- `--ibm-entitlement IBM_ENTITLEMENT_KEY` IBM Entitlement Key
- `--redhat-username REDHAT_CONNECT_USERNAME` Red Hat Connect Username (only required when mirroring UDS images)
- `--redhat-password REDHAT_CONNECT_PASSWORD` Red Hat Connect Password (only required when mirroring UDS images)

### Maximo Operator Catalog Selection
- `-c|--catalog MAS_CATALOG_VERSION` Maximo Operator Catalog Version to mirror (e.g. @@MAS_LATEST_CATALOG@@)
Expand Down
28 changes: 17 additions & 11 deletions docs/guides/choosing-the-right-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,8 @@ Choosing the Right Catalog
===============================================================================

!!! important
In all cases we **strongly discourage the use of manual update approval strategy for operator subscriptions**. In our experience it leads to overly complicated updates requiring significant administrative effort when taking into account the range of operators running in a cluster across numerous namespaces. **If you desire control over when updates are introduced to your cluster, we highly recommend the use of our static operator catalogs.** This not only provides more control but also allows for the use of [`mas update`](./update.md) to manage MAS and update MAS dependencies.
In all cases we **strongly discourage the use of manual update approval strategy for operator subscriptions** and all IBM-provided automation is designed to work with the automatic update approval strategy only. In our experience it leads to overly complicated updates requiring significant administrative effort when taking into account the range of operators running in a cluster across numerous namespaces. **To control when updates are introduced to your cluster, control them at the catalog level**, this not only provides more control but also allows for the use of [`mas update`](./update.md) to manage the update lifecycle of both MAS and it's dependencies because there is often more to performing an update than just delivering a new operator version.

Automatic Updates
-------------------------------------------------------------------------------
- Goal: I want to receive updates automatically as soon as they are available
- Solution: Use the **dynamic catalogs and automatic update approval strategy**

The content in this catalog is updated regularly. Multiple installations at different times will not necessarily be identical because package updates are being delivered to the channels.

- Only security updates and bug fixes will be delivered this way (software updates).
- Software upgrades require the user to explicitly change a subscription channel.
- Automatic updates delivered do not include updates to MAS dependencies and hence have to be done manually.

User-Controlled Updates
-------------------------------------------------------------------------------
Expand Down Expand Up @@ -42,3 +32,19 @@ The MAS CLI `mirror-images` command accepts the name of a static catalog to cont

!!! important
To apply updates in a disconnected cluster, run the `mirror-images` command with the name of the new static catalog you wish to update to **before** updating the CatalogSource in your cluster


Automatic Updates
-------------------------------------------------------------------------------
- Goal: I want to receive updates automatically as soon as they are available
- Solution: Use the **dynamic catalogs and automatic update approval strategy**

The content in this catalog is updated regularly. Multiple installations at different times will not necessarily be identical because package updates are being delivered to the channels.

!!! important
From MAS 9.0 onwards the dynamic operator catalog is no longer supported, only static operator catalogs are available.

- Only security updates and bug fixes will be delivered this way (software updates).
- Software upgrades require the user to explicitly change a subscription channel.
- Automatic updates delivered do not include updates to MAS dependencies and hence have to be done manually.

18 changes: 8 additions & 10 deletions docs/guides/image-mirroring.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Image Mirroring Overview
-------------------------------------------------------------------------------
We recommend the use of two-phase mirroring, it is slower than direct mirroring and requires more storage capacity, but can allow you to more easily recover from network glitches and creates a clean seperation of the tasks of getting the content from the source registry and putting it into the target registry which can make debugging failures easier.

This guide assumes that you are looking to mirror content for the latest release (**@@MAS_LATEST_CHANNEL@@**) from the most recent catalog update (**@@MAS_LATEST_CATALOG@@**), and that you are installing all MAS applications. If you are not installing certain applications or dependencies take care to remove the appropriate `--mirror-x` flags to avoid mirroring unnecessary images.
This guide assumes that you are looking to mirror content for the latest release (**@@MAS_LATEST_CHANNEL@@**) from the most recent catalog update (**@@MAS_LATEST_CATALOG@@**), and that you are installing all MAS applications & dependencies. If you are not installing certain applications or dependencies take care to remove the appropriate `--mirror-x` flags to avoid mirroring unnecessary images.


Preparation
Expand All @@ -20,8 +20,6 @@ export REGISTRY_HOST=xxx
export REGISTRY_PORT=xxx
export REGISTRY_USERNAME=xxx
export REGISTRY_PASSWORD=xxx
export REDHAT_USERNAME=xxx
export REDHAT_PASSWORD=xxx
```


Expand Down Expand Up @@ -53,15 +51,15 @@ Stage 2 - Apps
mas mirror-images -m to-filesystem -d $LOCAL_DIR/apps \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c @@MAS_LATEST_CATALOG@@ -C @@MAS_LATEST_CHANNEL@@ \
--mirror-assist --mirror-hputilities --mirror-iot --mirror-manage --mirror-monitor --mirror-optimizer --mirror-predict --mirror-visualinspection \
--mirror-assist --mirror-iot --mirror-manage --mirror-icd --mirror-monitor --mirror-optimizer --mirror-predict --mirror-visualinspection \
--ibm-entitlement $IBM_ENTITLEMENT_KEY
```

```bash
mas mirror-images -m from-filesystem -d $LOCAL_DIR/apps \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c @@MAS_LATEST_CATALOG@@ -C @@MAS_LATEST_CHANNEL@@ \
--mirror-assist --mirror-hputilities --mirror-iot --mirror-manage --mirror-monitor --mirror-optimizer --mirror-predict --mirror-visualinspection
--mirror-assist --mirror-iot --mirror-manage --mirror-icd --mirror-monitor --mirror-optimizer --mirror-predict --mirror-visualinspection
```


Expand All @@ -71,15 +69,15 @@ Stage 3 - CP4D
mas mirror-images -m to-filesystem -d $LOCAL_DIR/cp4d \
-H $REGISTRY_HOST -P $REGISTRY_PORT- u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c @@MAS_LATEST_CATALOG@@ -C @@MAS_LATEST_CHANNEL@@ \
--mirror-cp4d --mirror-spark --mirror-wml --mirror-wsl \
--mirror-cp4d --mirror-spark --mirror-wml --mirror-wsl --mirror-cognos \
--ibm-entitlement $IBM_ENTITLEMENT_KEY
```

```bash
mas mirror-images -m from-filesystem -d $LOCAL_DIR/cp4d \
-H $REGISTRY_HOST -P $REGISTRY_PORT- u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c @@MAS_LATEST_CATALOG@@ -C @@MAS_LATEST_CHANNEL@@ \
--mirror-cp4d --mirror-spark --mirror-wml --mirror-wsl
--mirror-cp4d --mirror-spark --mirror-wml --mirror-wsl --mirror-cognos
```


Expand All @@ -89,13 +87,13 @@ Stage 4 - Other Dependencies
mas mirror-images -m to-filesystem -d $LOCAL_DIR/other \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c @@MAS_LATEST_CATALOG@@ -C @@MAS_LATEST_CHANNEL@@ \
--mirror-mongo --mirror-tsm --mirror-uds --mirror-sls --mirror-cfs --mirror-appconnect --mirror-db2 \
--ibm-entitlement $IBM_ENTITLEMENT_KEY --redhat-username $REDHAT_USERNAME --redhat-password $REDHAT_PASSWORD
--mirror-mongo --mirror-tsm --mirror-sls --mirror-cfs --mirror-db2 --mirror-appconnect \
--ibm-entitlement $IBM_ENTITLEMENT_KEY
```

```bash
mas mirror-images -m from-filesystem -d $LOCAL_DIR/other \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c @@MAS_LATEST_CATALOG@@ -C @@MAS_LATEST_CHANNEL@@ \
--mirror-mongo --mirror-tsm --mirror-uds --mirror-sls --mirror-cfs --mirror-appconnect --mirror-db2
--mirror-mongo --mirror-tsm --mirror-sls --mirror-cfs --mirror-db2 --mirror-appconnect
```
4 changes: 2 additions & 2 deletions docs/guides/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ The other values can be left at their defaults. Finally, click **Generate** and
For more information about how to access the IBM License Key Center review the [getting started documentation](https://www.ibm.com/support/pages/system/files/inline-files/GettingStartedEnglish_2020.pdf) available from the IBM support website.

### 1.3 OpenShift Cluster
You should already have a target OpenShift cluster ready to install Maximo Application suite into. If you do not already have one then refer to the [OpenShift Container Platform installation overview](https://docs.openshift.com/container-platform/4.12/installing/index.html).
You should already have a target OpenShift cluster ready to install Maximo Application suite into. If you do not already have one then refer to the [OpenShift Container Platform installation overview](https://docs.openshift.com/container-platform/4.15/installing/index.html).

The CLI also supports OpenShift provisioning in many hyperscaler providers:

- [AWS](../commands/provision-rosa.md)
- [IBM Cloud](../commands/provision-roks.md)
- [IBM DevIT FYRE(Internal)](../commands/provision-fyre.md)
- [IBM DevIT FYRE (Internal)](../commands/provision-fyre.md)


### 1.4 Operator Catalog Selection
Expand Down
3 changes: 0 additions & 3 deletions image/cli/mascli/functions/internal/save_config
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ export REGISTRY_PRIVATE_HOST="$REGISTRY_PRIVATE_HOST"
export REGISTRY_PRIVATE_PORT="$REGISTRY_PRIVATE_PORT"
export REGISTRY_PRIVATE_CA_FILE="$REGISTRY_PRIVATE_CA_FILE"

export REDHAT_CONNECT_USERNAME="$REDHAT_CONNECT_USERNAME"
export REDHAT_CONNECT_PASSWORD="$REDHAT_CONNECT_PASSWORD"

export MIRROR_MODE_SELECTION="$MIRROR_MODE_SELECTION"
export OCP_RELEASE_SELECTION="$OCP_RELEASE_SELECTION"
export MIRROR_REDHAT_PLATFORM="$MIRROR_REDHAT_PLATFORM"
Expand Down
42 changes: 5 additions & 37 deletions image/cli/mascli/functions/mirror_images
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ Registry Prefix (Optional):

Source Registry Entitlements (Required based on what content you choose to mirror):
--ibm-entitlement ${COLOR_YELLOW}IBM_ENTITLEMENT_KEY${TEXT_RESET} IBM Entitlement Key
--redhat-username ${COLOR_YELLOW}REDHAT_CONNECT_USERNAME${TEXT_RESET} Red Hat Connect Username (only required when mirroring UDS images)
--redhat-password ${COLOR_YELLOW}REDHAT_CONNECT_PASSWORD${TEXT_RESET} Red Hat Connect Password (only required when mirroring UDS images)
--artifactory-username ${COLOR_YELLOW}ARTIFACTORY_USERNAME${TEXT_RESET} Artifactory Username
--artifactory-token ${COLOR_YELLOW}ARTIFACTORY_TOKEN${TEXT_RESET} Artifactory Token

Expand All @@ -39,7 +37,6 @@ Content Selection (Core Platform):

Content Selection (Applications):
--mirror-assist Mirror images for IBM Maximo Assist
--mirror-hputilities Mirror images for IBM Maximo Health & Predict Utilities
--mirror-iot Mirror images for IBM Maximo IoT
--mirror-manage Mirror images for IBM Maximo Manage
--mirror-icd Mirror image for IBM Maximo IT (Separately entitled IBM Maximo Manage extension)
Expand Down Expand Up @@ -94,7 +91,6 @@ function mirror_everything() {
# Dependencies (Other)
MIRROR_CATALOG=true
MIRROR_COMMONSERVICES=true
MIRROR_UDS=true
MIRROR_SLS=true
MIRROR_TRUSTSTOREMGR=true
MIRROR_MONGOCE=true
Expand All @@ -117,7 +113,6 @@ function mirror_to_registry_noninteractive() {
# Main content
MIRROR_MAS_CORE=false
MIRROR_MAS_ASSIST=false
MIRROR_MAS_HPUTILITIES=false
MIRROR_MAS_IOT=false
MIRROR_MAS_MANAGE=false
MIRROR_MAS_ICD=false
Expand All @@ -129,7 +124,6 @@ function mirror_to_registry_noninteractive() {
# Dependencies
MIRROR_CATALOG=false
MIRROR_COMMONSERVICES=false
MIRROR_UDS=false
MIRROR_SLS=false
MIRROR_TRUSTSTOREMGR=false
MIRROR_MONGOCE=false
Expand Down Expand Up @@ -165,7 +159,7 @@ function mirror_to_registry_noninteractive() {
REGISTRY_PUBLIC_PORT=$1 && shift
;;
-x| --prefix)
REGISTRY_PREFIX=$1 && shift
REGISTRY_PREFIX=$1 && shift
;;
-u|--username)
REGISTRY_USERNAME=$1 && shift
Expand All @@ -178,12 +172,6 @@ function mirror_to_registry_noninteractive() {
--ibm-entitlement)
IBM_ENTITLEMENT_KEY=$1 && shift
;;
--redhat-username)
REDHAT_CONNECT_USERNAME=$1 && shift
;;
--redhat-password)
REDHAT_CONNECT_PASSWORD=$1 && shift
;;
--artifactory-username)
ARTIFACTORY_USERNAME=$1 && shift
;;
Expand Down Expand Up @@ -211,16 +199,15 @@ function mirror_to_registry_noninteractive() {
--mirror-assist)
MIRROR_MAS_ASSIST=true
;;
--mirror-hputilities)
MIRROR_MAS_HPUTILITIES=true
;;
--mirror-iot)
MIRROR_MAS_IOT=true
;;
--mirror-manage)
MIRROR_MAS_MANAGE=true
;;
--mirror-icd)
# Handle case where user selects to mirror ICD without selecting to mirror manage explicitly
MIRROR_MAS_MANAGE=true
MIRROR_MAS_ICD=true
;;
--mirror-monitor)
Expand All @@ -240,9 +227,6 @@ function mirror_to_registry_noninteractive() {
--mirror-cfs)
MIRROR_COMMONSERVICES=true
;;
--mirror-uds)
MIRROR_UDS=true
;;
--mirror-sls)
MIRROR_SLS=true
;;
Expand Down Expand Up @@ -319,11 +303,6 @@ function mirror_to_registry_noninteractive() {
[[ -z "$REGISTRY_PASSWORD" ]] && mirror_to_registry_help "REGISTRY_PASSWORD is not set"
fi

if [[ $MIRROR_UDS == "true" ]]; then
[[ -z "$REDHAT_CONNECT_USERNAME" ]] && mirror_to_registry_help "REDHAT_CONNECT_USERNAME is not set"
[[ -z "$REDHAT_CONNECT_PASSWORD" ]] && mirror_to_registry_help "REDHAT_CONNECT_PASSWORD is not set"
fi

if [[ "$MIRROR_EVERYTHING" == "true" ]]; then
mirror_everything
fi
Expand Down Expand Up @@ -398,7 +377,6 @@ function mirror_to_registry_interactive() {
prompt_for_confirm "IBM Maximo Application Suite - Visual Inspection" MIRROR_MAS_VISUALINSPECTION

prompt_for_confirm_default_yes "IBM Foundational Services" MIRROR_COMMONSERVICES
prompt_for_confirm_default_yes "IBM User Data Services" MIRROR_UDS
prompt_for_confirm_default_yes "IBM Suite License Service" MIRROR_SLS
prompt_for_confirm_default_yes "IBM Truststore Manager" MIRROR_TRUSTSTOREMGR
if prompt_for_confirm_default_yes "MongoDb Community Edition"; then
Expand Down Expand Up @@ -444,7 +422,7 @@ function mirror_to_registry_interactive() {
prompt_for_confirm "IBM Watson Machine Learning" MIRROR_WML
prompt_for_confirm "IBM Analytics Engine (Spark)" MIRROR_SPARK
prompt_for_confirm "IBM Cognos Analytics" MIRROR_COGNOS

prompt_for_confirm "IBM AppConnect" MIRROR_APPCONNECT
fi

Expand All @@ -461,10 +439,6 @@ function mirror_to_registry_interactive() {
echo_h2 "Configure Authentication"
prompt_for_secret "IBM Entitlement Key" IBM_ENTITLEMENT_KEY "Re-use saved IBM Entitlement Key?"

if [[ $MIRROR_UDS == "true" ]]; then
prompt_for_input "Red Hat Connect Username" REDHAT_CONNECT_USERNAME
prompt_for_secret "Red Hat Connect Password" REDHAT_CONNECT_PASSWORD "Re-use saved password?"
fi
}


Expand All @@ -482,7 +456,7 @@ function mirror_one_thing() {
echo -en "\033[u" # Restore cursor position
if [[ $mirror_result == "0" ]];
then echo -e "${COLOR_GREEN}[SUCCESS] ${MOT_NAME}: ${MOT_LOGFILE}${TEXT_RESET}"
else
else
echo -e "${COLOR_RED}[FAILURE] ${MOT_NAME}: ${MOT_LOGFILE}${TEXT_RESET}"
echo
cat "$MOT_LOGFILE"
Expand Down Expand Up @@ -526,7 +500,6 @@ function mirror_to_registry() {
# Dependency control
export MIRROR_CATALOG
export MIRROR_COMMONSERVICES
export MIRROR_UDS
export MIRROR_SLS
export MIRROR_TRUSTSTOREMGR
export MIRROR_MONGOCE
Expand All @@ -545,14 +518,11 @@ function mirror_to_registry() {

# Authentication
export IBM_ENTITLEMENT_KEY
export REDHAT_CONNECT_USERNAME
export REDHAT_CONNECT_PASSWORD
export ARTIFACTORY_USERNAME
export ARTIFACTORY_TOKEN

if [[ "$MIRROR_CATALOG" == true ||
"$MIRROR_COMMONSERVICES" == true ||
"$MIRROR_UDS" == true ||
"$MIRROR_SLS" == true ||
"$MIRROR_TRUSTSTOREMGR" == true ||
"$MIRROR_MONGOCE" == true ||
Expand Down Expand Up @@ -628,7 +598,6 @@ function mirror_to_registry() {
reset_colors
echo_h4 "Content Selection (Other Dependencies)" " "
show_mirror_status "IBM Cloud Pak Foundation Services ..." $MIRROR_COMMONSERVICES
show_mirror_status "IBM User Data Services .............." $MIRROR_UDS
show_mirror_status "IBM Suite License Service ..........." $MIRROR_SLS
show_mirror_status "IBM Truststore Manager .............." $MIRROR_TRUSTSTOREMGR
show_mirror_status "MongoDb Community Edition ..........." $MIRROR_MONGOCE
Expand Down Expand Up @@ -657,7 +626,6 @@ function mirror_to_registry() {

mirror_one_thing $MIRROR_MAS_CORE "IBM Maximo Application Suite Core" "$LOG_PREFIX-core.log" mirror_core
mirror_one_thing $MIRROR_MAS_ASSIST "IBM Maximo Assist" "$LOG_PREFIX-assist.log" mirror_add_assist
mirror_one_thing $MIRROR_MAS_HPUTILITIES "IBM Maximo Health & Predict Utilities" "$LOG_PREFIX-hputilities.log" mirror_add_hputilities
mirror_one_thing $MIRROR_MAS_IOT "IBM Maximo IoT" "$LOG_PREFIX-iot.log" mirror_add_iot
mirror_one_thing $MIRROR_MAS_MANAGE "IBM Maximo Manage" "$LOG_PREFIX-manage.log" mirror_add_manage
mirror_one_thing $MIRROR_MAS_MONITOR "IBM Maximo Monitor" "$LOG_PREFIX-monitor.log" mirror_add_monitor
Expand Down