diff --git a/build/bin/copy-role-docs.sh b/build/bin/copy-role-docs.sh index ecbddead0..018ae9684 100644 --- a/build/bin/copy-role-docs.sh +++ b/build/bin/copy-role-docs.sh @@ -40,7 +40,6 @@ copyDoc gencfg_workspace copyDoc grafana copyDoc ibm_catalogs copyDoc ibmcloud_resource_key -copyDoc install_operator copyDoc kafka copyDoc key_rotation copyDoc kmodels diff --git a/docs/execution-environment.md b/docs/execution-environment.md index 8808f0769..8e4db2e24 100644 --- a/docs/execution-environment.md +++ b/docs/execution-environment.md @@ -245,148 +245,6 @@ If you need to set an environment variable then you can do this in the playbook - ibm.mas_devops.ocp_efs ``` -### backup/restore -The backup and restore tasks and playbooks provided in the `ibm.mas_devops` collection has a number of differences with other roles/playbooks that can make creating the playbook difficult. The following playbook is an example of how a backup for core playbook can be written to work with AAP, along with a rclone.conf.j2 file that should be stored in the same location as the playbook in your SCM. The playbook needs to set both the `environment` so that the `ansible_env` var is set, and for task vars to be set to override the common_vars that are looking for environment variables on the local controller (note that `environment` does not update the local controller environment so lookups using the ansible builtin `env` won't pick up those values). - -This playbook requires the following survey questions to be setup: - -```yaml -{ - "aws_access_key_id": "$encrypted$", - "aws_secret_access_key": "$encrypted$", - "ocp_token": "$encrypted$", - "ocp_server": "https://api.your_ocp_cluster:6443" -} -``` - -```yaml ---- -- name: "Backup/Restore MAS Core" - hosts: localhost - any_errors_fatal: true - - vars: - # Define the target for backup/restore - mas_instance_id: aap1 - - # Define what action to perform - masbr_action: backup - - # Define storage type - masbr_storage_type: cloud - masbr_storage_cloud_rclone_file: rclone.conf - masbr_storage_cloud_rclone_name: masbr - masbr_storage_cloud_bucket: mas-backup - - # Define what to backup/restore - masbr_job_component: - name: "core" - instance: "{{ mas_instance_id }}" - namespace: "mas-{{ mas_instance_id }}-core" - - # Configure path to backup_restore tasks that should be present in the execution environment - role_path: "/usr/share/ansible/collections/ansible_collections/ibm/mas_devops/roles/suite_backup_restore" - - # Set here to get into ansible_env - environment: - MASBR_STORAGE_TYPE: cloud - MASBR_STORAGE_CLOUD_RCLONE_FILE: rclone.conf - MASBR_STORAGE_CLOUD_RCLONE_NAME: masbr - MASBR_STORAGE_CLOUD_BUCKET: mas-backup - - pre_tasks: - - name: "Asserts aws_access_key_id secret defined" - assert: - that: aws_access_key_id is defined - fail_msg: "aws_access_key_id not defined" - - - name: "Asserts aws_secret_access_key secret defined" - assert: - that: aws_secret_access_key is defined - fail_msg: "aws_secret_access_key not defined" - - # Template out the rclone.conf so no credentials are stored in git - - name: "Create rclone.conf" - template: - src: "{{ masbr_storage_cloud_rclone_file }}.j2" - dest: "{{ masbr_storage_cloud_rclone_file }}" - - roles: - - ibm.mas_devops.ocp_login - - tasks: - - # Common checks before run tasks - # ------------------------------------------------------------------------- - - name: "Before run tasks" - include_tasks: - file: "{{ role_path }}/../../common_tasks/backup_restore/before_run_tasks.yml" - vars: - _job_type: "{{ masbr_action }}" - masbr_storage_type: cloud - masbr_storage_cloud_rclone_file: rclone.conf - masbr_storage_cloud_rclone_name: masbr - masbr_storage_cloud_bucket: mas-backup - - # Create k8s Job to run backup/restore tasks - # ------------------------------------------------------------------------- - - name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: - file: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" - vars: - _rt_playbook_name: "br_core" - _rt_env: - - name: "MASBR_ACTION" - value: "{{ masbr_action }}" - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - masbr_storage_type: cloud - masbr_storage_cloud_rclone_file: rclone.conf - masbr_storage_cloud_rclone_name: masbr - masbr_storage_cloud_bucket: mas-backup - - # Run backup/restore tasks locally - # ------------------------------------------------------------------------- - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job - block: - - name: "MongoDB: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.mongodb - vars: - mongodb_action: "{{ masbr_action }}" - mas_app_id: "core" - masbr_storage_type: cloud - masbr_storage_cloud_rclone_file: rclone.conf - masbr_storage_cloud_rclone_name: masbr - masbr_storage_cloud_bucket: mas-backup - - - name: "MAS Core namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_backup_restore - vars: - masbr_storage_type: cloud - masbr_storage_cloud_rclone_file: rclone.conf - masbr_storage_cloud_rclone_name: masbr - masbr_storage_cloud_bucket: mas-backup -``` - -The following file is stored in your SCM and is a template to be injected with the credentials needed during the play. This allows the file to be stored in SCM without exposing credentials. - -rclone.conf.j2 -``` -[masbr] -type = s3 -provider = Minio -endpoint = http://minio-api.apps.mydomain.com -access_key_id = "{{ aws_access_key_id }}" -secret_access_key = "{{ aws_secret_access_key }}" -region = minio -``` - Troubleshooting ------------------------------------------------------------------------------- @@ -459,37 +317,3 @@ Example setting role vars: vars: kafka_version: 3.7.0 ``` - -One caveat to the above is the `backup/restore` tasks as these use a combination of ansible vars and expecting environment variables to be set in the `ansible_env` variable. In order to work with `the backup/restore` tasks you need to set both `environment` and role/task vars (not play vars). - -Example, showing `environment` and task vars set. See [backup exmaple](#examples-of-playbooks) for more complete play: -```yaml -- name: "Backup/Restore MAS Core" - hosts: localhost - any_errors_fatal: true - - vars: - # Configure path to backup_restore tasks - role_path: "/usr/share/ansible/collections/ansible_collections/ibm/mas_devops/roles/suite_backup_restore" - - # Set here to get into ansible_env - environment: - MASBR_STORAGE_TYPE: cloud - MASBR_STORAGE_CLOUD_RCLONE_FILE: rclone.conf - MASBR_STORAGE_CLOUD_RCLONE_NAME: masbr - MASBR_STORAGE_CLOUD_BUCKET: mas-backup - - tasks: - - # Common checks before run tasks - # ------------------------------------------------------------------------- - - name: "Before run tasks" - include_tasks: - file: "{{ role_path }}/../../common_tasks/backup_restore/before_run_tasks.yml" - vars: - _job_type: "{{ masbr_action }}" - masbr_storage_type: cloud - masbr_storage_cloud_rclone_file: rclone.conf - masbr_storage_cloud_rclone_name: masbr - masbr_storage_cloud_bucket: mas-backup -``` \ No newline at end of file diff --git a/docs/playbooks/backup-restore.md b/docs/playbooks/backup-restore.md index e254780a2..d5d6a820e 100644 --- a/docs/playbooks/backup-restore.md +++ b/docs/playbooks/backup-restore.md @@ -16,113 +16,37 @@ MAS Devops Collection includes playbooks for backing up and restoring of the fol - [Visual Inspection](#backuprestore-for-visual-inspection) -Creation of both **full** and **incremental** backups are supported. Backup and restore actions can be executed locally, or by generating **on-demand** or **scheduled** jobs that will allow the work to be performed on your OpenShift cluster using the [MAS CLI container image](https://github.ibm.com/ibm-mas/cli). - -!!! tip - The backup and restore Ansible roles can also be used individually, allowing you to build your own customized backup and restore playbook covering exactly what you need. For example, you can only [backup/restore Manage attachments](../roles/suite_app_backup_restore.md). - +Creation of both **full** and **incremental** backups are supported. The backup and restore Ansible roles can also be used individually, allowing you to build your own customized backup and restore playbook covering exactly what you need. For example, you can only [backup/restore Manage attachments](../roles/suite_app_backup_restore.md). For more information about backup and restore for Maximo Application Suite, please refer to [Backing up and restoring Maximo Application Suite](https://www.ibm.com/docs/en/mas-cd/continuous-delivery?topic=administering-backing-up-restoring-maximo-application-suite) in the product documentation. -Configuration +Configuration - Storage ------------------------------------------------------------------------------- +You can save the backup files to a folder on your local file system by setting the following environment variables: -### Storage - -| Envrionment variable | Required (Default Value) | Description | -| ------------------------------------ | -------------------------------------- | ----------- | -| MASBR_STORAGE_TYPE | **Yes** | Type of storage system for saving the backup files | -| MASBR_STORAGE_LOCAL_FOLDER | **Yes**, if `MASBR_STORAGE_TYPE=local` | The local path to save the backup files | -| MASBR_STORAGE_CLOUD_RCLONE_FILE | **Yes**, if `MASBR_STORAGE_TYPE=cloud` | The path of `rclone.conf` file | -| MASBR_STORAGE_CLOUD_RCLONE_NAME | **Yes** if `MASBR_STORAGE_TYPE=cloud` | The configuration name defined in `rclone.conf` file | -| MASBR_STORAGE_CLOUD_BUCKET | **Yes**, if `MASBR_STORAGE_TYPE=cloud` | Object storage bucket for saving backup files | -| MASBR_LOCAL_TEMP_FOLDER | No (`/tmp/masbr`) | Local folder for saving the temporary backup/restore data, the data in this folder will be deleted after the backup/restore job completed. | - -You need to set the environment variable `MASBR_STORAGE_TYPE` before you perform a backup or restore job. This variable indicates what type of storage systems that you are using for saving the backup files. Currently, it supports below types: - -- `local`: use the local file system, e.g. a folder on your laptop or workstation. -- `cloud`: use the cloud object storage, such as IBM Cloud Object Storage, AWS S3, etc. - -###### Use Local Folder - -You can save the backup files to a folder on your local file system by setting the following environment variables: -``` -MASBR_STORAGE_TYPE=local -MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -``` -- `MASBR_STORAGE_LOCAL_FOLDER`: the path for saving the backup files - -###### Use Cloud Object Storage - -The backup playbooks use [Rclone](https://rclone.org/) to copy backup files from data stores to cloud object storage. It requires a Rclone configuration file which you can either create it manually, or you can install the Rclone tool and create the configuration file by running the `rclone config` command. For more information about the rclone config command and configuration file format, please refer to the [Rclone documentation](https://rclone.org/s3/#configuration). - -Below is a sample Rclone configuration file that using MinIO object storage: -``` -[masbr] -type = s3 -provider = Minio -endpoint = http://minio-api.apps.mydomain.com -access_key_id = Qfx9YGnykJapxL7pzUyA -secret_access_key = qKRGSnxsJ7z6pIA74sVxJ6fkEh4Fq5m4fo0inDuJ -region = minio -``` - -Set the following environment variables to indicate the playbooks to use cloud object storage for saving backup files: -``` -MASBR_STORAGE_TYPE=cloud -MASBR_STORAGE_CLOUD_RCLONE_FILE=/mnt/configmap/rclone.conf -MASBR_STORAGE_CLOUD_RCLONE_NAME=masbr -MASBR_STORAGE_CLOUD_BUCKET=mas-backup -``` - -- `MASBR_STORAGE_CLOUD_RCLONE_FILE`: the path where your rclone.conf file is located -- `MASBR_STORAGE_CLOUD_RCLONE_NAME`: the Rclone configuration name (`[masbr]` from above sample) defined in the rclone.conf file -- `MASBR_STORAGE_CLOUD_BUCKET`: the bucket name you created on the object storage for saving the backup files - - -### Kubernetes Jobs -| Envrionment variable | Required (Default Value) | Description | -| ------------------------------------ | ------------------------ | ----------- | -| MASBR_CONFIRM_CLUSTER | No (`false`) | Set `true` or `false` to indicate the playbook whether to confirm the currently connected cluster before running the backup or restore job | -| MASBR_CREATE_TASK_JOB | No (`true`) | Whether to run backup/restore process in kubernetes Job | -| MASBR_COPY_TIMEOUT_SEC | No (`43200`) | The transfer files timeout in seconds, default timeout value is 12 hours. | -| MASBR_JOB_TIMEZONE | No | The [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for creating scheduled job. If not set a value for this variable, this role will use UTC time zone when creating a CronJob for running scheduled job. | -| MASBR_CLEANUP_SCHEDULE | No (`0 1 * * *`) | Cron expression of cleanup Job (default to run at 1:00 every day) | -| MASBR_CLEANUP_TTL_SEC | No (`604800`) | All completed jobs that exceed this TTL(time-to-live) in seconds will be deleted (default TTL is 1 week: 3600 * 24 * 7) | -| MASBR_MASCLI_IMAGE_TAG | No (`latest`) | MAS CLI docker image tag | -| MASBR_MASCLI_IMAGE_PULL_POLICY | No | MAS CLI docker [image pull policy](https://kubernetes.io/docs/concepts/containers/images/#imagepullpolicy-defaulting) | - -When the playbook starts running, it will first perform some checks, such as checking the required environment variables, get the source or target cluster information, etc. Then, depending on the value of `MASBR_CREATE_TASK_JOB`, the remaining backup/restore process can be ran in different ways: - -- `MASBR_CREATE_TASK_JOB=false`, run backup/restore process in your current terminal, and you can view the terminal output to get the progress of the backup/restore. -- `MASBR_CREATE_TASK_JOB=true`, a new kubernetes Job will be created to run the backup/restore process in the cluster, then you can check the log of the created kubernetes Job in the cluster to monitor the backup/restore progress. - -The environment variable `MASBR_CREATE_TASK_JOB` is only valid when using cloud object storage (`MASBR_STORAGE_TYPE=cloud`). The playbooks will always run backup/restore process in your local terminal when using local storage system (`MASBR_STORAGE_TYPE=local`). +| Envrionment variable | Required (Default Value) | Description | +| ------------------------------------ | -------------------------- | ----------- | +| MASBR_STORAGE_LOCAL_FOLDER | **Yes** | The local path to save the backup files | +| MASBR_LOCAL_TEMP_FOLDER | No (`/tmp/masbr`) | Local folder for saving the temporary backup/restore data, the data in this folder will be deleted after the backup/restore job completed. | -During the backup/restore process, the playbook will copy backup files between different data stores and specified backup storage systems. Set a suitable value for the environment variable `MASBR_COPY_TIMEOUT_SEC` to avoid the playbook entering a waiting state due to some errors, such as the specified storage system network speed is too slow or cannot be connected. - -!!! warning - Set a suitable value for `MASBR_COPY_TIMEOUT_SEC` based on the estimated size of the backup/restore data and the network conditions, setting it too low can result in the data copying process being interrupted. - -The playbook will create an additional CronJob `masbr-cleanup` for each namespace that has backup/restore jobs created. This cleanup CronJob will periodically delete the completed jobs that exceed a certain priod of time which specified by `MASBR_CLEANUP_TTL_SEC`. You can also specify when to run the cleanup CronJob by setting Cron expression for `MASBR_CLEANUP_SCHEDULE`. +Configuration - Backup +------------------------------------------------------------------------------- -### Backups | Envrionment variable | Required (Default Value) | Description | | ------------------------------------ | ------------------------ | ----------- | | MASBR_ACTION | **Yes** | Whether to run the playbook to perform a `backup` or a `restore` | | MASBR_BACKUP_TYPE | No (`full`) | Set `full` or `incr` to indicate the playbook to create a **full** backup or **incremental** backup. | | MASBR_BACKUP_FROM_VERSION | No | Set the full backup version to use in the incremental backup, this will be in the format of a `YYYMMDDHHMMSS` timestamp (e.g. `20240621021316`). | -| MASBR_BACKUP_SCHEDULE | No | Set [Cron expression](ttps://en.wikipedia.org/wiki/Cron) to create a scheduled backup. If not set a value for this varialbe, the playbook will create an on-demand backup. | The playbooks are switched to backup mode by setting `MASBR_ACTION` to `backup`. -###### Full Backups -If you set environment variable `MASBR_BACKUP_TYPE=full` or do not specify a value for this variable, the playbook will take a full backup. +### Full Backups +If you set environment variable `MASBR_BACKUP_TYPE=full` or do not specify a value for this variable, the playbook will take a full backup. -###### Incremental Backups -You can set environment variable `MASBR_BACKUP_TYPE=incr` to indicate the playbook to take an incremental backup. +### Incremental Backups +You can set environment variable `MASBR_BACKUP_TYPE=incr` to indicate the playbook to take an incremental backup. !!! important Only supports creating incremental backup for MonogDB, Db2 and persistent volume data. The playbook will always create a full backup for other type of data regardless of whether this variable be set to `incr`. @@ -132,30 +56,10 @@ The environment variable `MASBR_BACKUP_FROM_VERSION` is only valid if `MASBR_BAC !!! important The backup files you specified by `MASBR_BACKUP_FROM_VERSION` must be a Full backup. And the component name and data types in the specified Full backup file must be same as the current incremental backup job. -###### Scheduled Backups -In addition to create an on-demand backup job, you can also set environment variable `MASBR_BACKUP_SCHEDULE` to indicate the playbook to create a kubernetes CronJob to run the backup process periodically. - -The value of `MASBR_BACKUP_SCHEDULE` is a [Cron expression](https://en.wikipedia.org/wiki/Cron): - -``` - ┌───────────── minute (0–59) - │ ┌───────────── hour (0–23) - │ │ ┌───────────── day of the month (1–31) - │ │ │ ┌───────────── month (1–12) - │ │ │ │ ┌───────────── day of the week (0–6) (Sunday to Saturday; - │ │ │ │ │ 7 is also Sunday on some systems) - │ │ │ │ │ - │ │ │ │ │ - * * * * * -``` - -For example, set below value to create a scheduled backup job that will run at 1:00 a.m. from Monday to Friday: -`MASBR_BACKUP_SCHEDULE="0 1 * * 1-5"` - -By default, the kubernetes CronJob use UTC time zone, so maybe you want to set environment variable `MASBR_JOB_TIMEZONE` with the Cron expression based on your local [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) +Configuration - Restore +------------------------------------------------------------------------------- -### Restore | Envrionment variable | Required (Default Value) | Description | | ------------------------------------ | ------------------------ | ----------- | | MASBR_ACTION | **Yes** | Whether to run the playbook to perform a `backup` or a `restore` | @@ -166,22 +70,6 @@ The playbooks are switched to restore mode by setting `MASBR_ACTION` to `restore In the case of restoring from an incremental backup, the corresponding full backup will be restored first before continuing to restore the incremental backup. -### Slack Notifications -| Envrionment variable | Required (Default Value) | Description | -| ------------------------------------ | ---------------------------------- | ----------- | -| MASBR_SLACK_ENABLED | No (`false`) | Set `true` or `false` to indicate whether the playbook will send Slack notification messages of the backup and restore progress | -| MASBR_SLACK_LEVEL | No (`info`) | Set `failure`, `info` or `verbose` to indicate the playbook to send Slack notification messages in which backup and resore phases | -| MASBR_SLACK_TOKEN | Yes, if `MASBR_SLACK_ENABLED=true` | Slack integration token | -| MASBR_SLACK_CHANNEL | Yes, if `MASBR_SLACK_ENABLED=true` | Channel to send the message to | -| MASBR_SLACK_USER | No (`MASBR`) | Sender of the message | - -Integration with Slack is supported with below notification levels: - -- `verbose`: send notifications when job in the phase `InProgress`, `Completed`, `Failed` or `PartiallyFailed`. -- `info`: send notifications when job in the phase `Completed`, `Failed` or `PartiallyFailed`. -- `failure`: send notifications only when job in the phase `Failed` or `PartiallyFailed` - - Backup/Restore for MongoDB ------------------------------------------------------------------------------- This playbook `ibm.mas_devops.br_mongodb` will invoke the role [mongodb](../roles/mongodb.md) to backup/restore the MongoDB databases. @@ -189,7 +77,7 @@ This playbook `ibm.mas_devops.br_mongodb` will invoke the role [mongodb](../role This playbook supports backing up and restoring databases for an in-cluster MongoDB CE instance. If you are using other MongoDB venders, such as IBM Cloud Databases for MongoDB, Amazon DocumentDB or MongoDB Altas Database, please refer to the corresponding vender's documentation for more information about their provided backup/restore service. ### Environment Variables - +- `MONGODB_NAMESPACE`: By default the backup and restore processes will use a namespace of `mongoce`, if you have customized the install of MongoDb CE you must set this environment variable to the appropriate namespace you wish to backup from/restore to. - `MAS_INSTANCE_ID`: **Required**. This playbook supports backup/restore MongoDB databases that belong to a specific MAS instance, call the playbook multiple times with different values for `MAS_INSTANCE_ID` if you wish to back up multiple MAS instances that use the same MongoDB CE instance. - `MAS_APP_ID`: **Optional**. By default, this playbook will backup all databases belonging to the specified MAS instance. You can backup the databases only belong to a specific MAS application by setting this environment variable to a supported MAS application id `core`, `manage`, `iot`, `monitor`, `health`, `optimizer` or `visualinspection`. @@ -197,39 +85,26 @@ This playbook supports backing up and restoring databases for an in-cluster Mong ```bash # Full backup all MongoDB data for the dev1 instance export MASBR_ACTION=backup -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev ansible-playbook ibm.mas_devops.br_mongodb # Incremental backup all MongoDB data for the dev1 instance export MASBR_ACTION=backup export MASBR_BACKUP_TYPE=incr -export MASBR_STORAGE_TYPE=local -export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 -ansible-playbook ibm.mas_devops.br_mongodb - -# Create a scheduled backup Job for the dev1 instance -export MASBR_ACTION=backup -export MASBR_BACKUP_SCHEDULE="50 0 * * *" -export MASBR_JOB_TIMEZONE="Asia/Shanghai" -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev ansible-playbook ibm.mas_devops.br_mongodb # Restore all MongoDB data for the dev1 instance export MASBR_ACTION=restore -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export MASBR_RESTORE_FROM_VERSION=20240630132439 -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev ansible-playbook ibm.mas_devops.br_mongodb # Backup just the IoT MongoDB data for the dev2 instance export MASBR_ACTION=backup -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export MAS_INSTANCE_ID=dev2 export MAS_APP_ID=iot @@ -249,7 +124,6 @@ This playbook `ibm.mas_devops.br_db2` will invoke the role [db2](../roles/db2.md ```bash # Full backup for the db2w-shared Db2 instance export MASBR_ACTION=backup -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export DB2_INSTANCE_NAME=db2w-shared ansible-playbook ibm.mas_devops.br_db2 @@ -257,23 +131,12 @@ ansible-playbook ibm.mas_devops.br_db2 # Incremental backup for the db2w-shared Db2 instance export MASBR_ACTION=backup export MASBR_BACKUP_TYPE=incr -export MASBR_STORAGE_TYPE=local -export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export DB2_INSTANCE_NAME=db2w-shared -ansible-playbook ibm.mas_devops.br_db2 - -# Create a scheduled backup Job for the db2w-shared Db2 instance -export MASBR_ACTION=backup -export MASBR_BACKUP_SCHEDULE="50 0 * * *" -export MASBR_JOB_TIMEZONE="Asia/Shanghai" -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export DB2_INSTANCE_NAME=db2w-shared ansible-playbook ibm.mas_devops.br_db2 # Restore for the db2w-shared Db2 instance export MASBR_ACTION=restore -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export MASBR_RESTORE_FROM_VERSION=20240630132439 export DB2_INSTANCE_NAME=db2w-shared @@ -298,34 +161,22 @@ This playbook `ibm.mas_devops.br_core` will backup the following components that ```bash # Full backup all core data for the dev1 instance export MASBR_ACTION=backup -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev ansible-playbook ibm.mas_devops.br_core # Incremental backup all core data for the dev1 instance export MASBR_ACTION=backup export MASBR_BACKUP_TYPE=incr -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 -ansible-playbook ibm.mas_devops.br_core - -# Create a scheduled backup Job for the dev1 instance -export MASBR_ACTION=backup -export MASBR_BACKUP_SCHEDULE="50 0 * * *" -export MASBR_JOB_TIMEZONE="Asia/Shanghai" -export MASBR_STORAGE_TYPE=local -export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev ansible-playbook ibm.mas_devops.br_core # Restore all core data for the dev1 instance export MASBR_ACTION=restore -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export MASBR_RESTORE_FROM_VERSION=20240630132439 -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev ansible-playbook ibm.mas_devops.br_core ``` @@ -346,51 +197,35 @@ This playbook `ibm.mas_devops.br_manage` will backup the following components th - `MAS_INSTANCE_ID` **Required**. This playbook only supports backing up components belong to a specific MAS instance at a time. If you have multiple MAS instances in the cluster to be backed up, you need to run this playbook multiple times with different value of this environment variable. - `MAS_WORKSPACE_ID` **Required**. This playbook only supports backing up components belong to a specific MAS workspace at a time. If you have multiple MAS workspaces in the cluster to be backed up, you need to run this playbook multiple times with different value of this environment variable. -- `DB2_INSTANCE_NAME` **Required**. This playbook will backup the the Db2 instance used by Manage, you need to set the correct Db2 instance name for this environment variable. +- `DB2_INSTANCE_NAME` **Optional**. When defined, this playbook will backup the Db2 instance used by Manage. DB2 role is skipped when environment variable is not defined.. ### Examples ```bash # Full backup all manage data for the dev1 instance and ws1 workspace export MASBR_ACTION=backup -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 -export DB2_INSTANCE_NAME=mas-dev1-ws1-manage +export DB2_INSTANCE_NAME=mas-dev1-ws1-manage # set this to execute db2 backup role ansible-playbook ibm.mas_devops.br_manage # Incremental backup all manage data for the dev1 instance and ws1 workspace export MASBR_ACTION=backup export MASBR_BACKUP_TYPE=incr -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 -export DB2_INSTANCE_NAME=mas-dev1-ws1-manage +export DB2_INSTANCE_NAME=mas-dev1-ws1-manage # set this to execute db2 backup role ansible-playbook ibm.mas_devops.br_manage # Restore all manage data for the dev1 instance and ws1 workspace export MASBR_ACTION=restore -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export MASBR_RESTORE_FROM_VERSION=20240630132439 -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 -export DB2_INSTANCE_NAME=mas-dev1-ws1-manage -ansible-playbook ibm.mas_devops.br_manage - -# Create a scheduled backup of all manage data for the dev1 instance and ws1 workspace -# This will run at 01:00, Monday through Friday -export MASBR_ACTION=backup -export MASBR_BACKUP_TYPE=incr -export MASBR_BACKUP_SCHEDULE="0 1 * * 1-5" -export MASBR_JOB_TIMEZONE="Asia/Shanghai" -export MASBR_STORAGE_TYPE=local -export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 -export MAS_WORKSPACE_ID=ws1 -export DB2_INSTANCE_NAME=mas-dev1-ws1-manage +export DB2_INSTANCE_NAME=mas-dev1-ws1-manage # set this to execute db2 backup role ansible-playbook ibm.mas_devops.br_manage ``` @@ -417,9 +252,8 @@ This playbook `ibm.mas_devops.br_iot` will backup the following components that ```bash # Full backup all iot data for the dev1 instance export MASBR_ACTION=backup -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=db2w-shared ansible-playbook ibm.mas_devops.br_iot @@ -427,35 +261,21 @@ ansible-playbook ibm.mas_devops.br_iot # Incremental backup all iot data for the dev1 instance export MASBR_ACTION=backup export MASBR_BACKUP_TYPE=incr -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=db2w-shared ansible-playbook ibm.mas_devops.br_iot # Restore all iot data for the dev1 instance export MASBR_ACTION=restore -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export MASBR_RESTORE_FROM_VERSION=20240630132439 -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=db2w-shared ansible-playbook ibm.mas_devops.br_iot -# Create a scheduled backup of all iot data for the dev1 instance -# This will run at 01:00, Monday through Friday -export MASBR_ACTION=backup -export MASBR_BACKUP_TYPE=incr -export MASBR_BACKUP_SCHEDULE="0 1 * * 1-5" -export MASBR_JOB_TIMEZONE="Asia/Shanghai" -export MASBR_STORAGE_TYPE=local -export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 -export MAS_WORKSPACE_ID=ws1 -export DB2_INSTANCE_NAME=db2w-shared -ansible-playbook ibm.mas_devops.br_iot ``` @@ -483,9 +303,8 @@ This playbook `ibm.mas_devops.br_monitor` will backup the following components t ```bash # Full backup all monitor data for the dev1 instance export MASBR_ACTION=backup -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=db2w-shared ansible-playbook ibm.mas_devops.br_monitor @@ -493,32 +312,17 @@ ansible-playbook ibm.mas_devops.br_monitor # Incremental backup all monitor data for the dev1 instance export MASBR_ACTION=backup export MASBR_BACKUP_TYPE=incr -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=db2w-shared ansible-playbook ibm.mas_devops.br_monitor # Restore all monitor data for the dev1 instance export MASBR_ACTION=restore -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export MASBR_RESTORE_FROM_VERSION=20240630132439 -export MAS_INSTANCE_ID=dev1 -export MAS_WORKSPACE_ID=ws1 -export DB2_INSTANCE_NAME=db2w-shared -ansible-playbook ibm.mas_devops.br_monitor - -# Create a scheduled backup of all monitor data for the dev1 instance -# This will run at 01:00, Monday through Friday -export MASBR_ACTION=backup -export MASBR_BACKUP_TYPE=incr -export MASBR_BACKUP_SCHEDULE="0 1 * * 1-5" -export MASBR_JOB_TIMEZONE="Asia/Shanghai" -export MASBR_STORAGE_TYPE=local -export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=db2w-shared ansible-playbook ibm.mas_devops.br_monitor @@ -548,9 +352,8 @@ This playbook `ibm.mas_devops.br_health` will backup the following components th ```bash # Full backup all health data for the dev1 instance and ws1 workspace export MASBR_ACTION=backup -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=mas-dev1-ws1-manage ansible-playbook ibm.mas_devops.br_health @@ -558,32 +361,17 @@ ansible-playbook ibm.mas_devops.br_health # Incremental backup all health data for the dev1 instance and ws1 workspace export MASBR_ACTION=backup export MASBR_BACKUP_TYPE=incr -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=mas-dev1-ws1-manage ansible-playbook ibm.mas_devops.br_health # Restore all health data for the dev1 instance and ws1 workspace export MASBR_ACTION=restore -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export MASBR_RESTORE_FROM_VERSION=20240630132439 -export MAS_INSTANCE_ID=dev1 -export MAS_WORKSPACE_ID=ws1 -export DB2_INSTANCE_NAME=mas-dev1-ws1-manage -ansible-playbook ibm.mas_devops.br_health - -# Create a scheduled backup of all health data for the dev1 instance and ws1 workspace -# This will run at 01:00, Monday through Friday -export MASBR_ACTION=backup -export MASBR_BACKUP_TYPE=incr -export MASBR_BACKUP_SCHEDULE="0 1 * * 1-5" -export MASBR_JOB_TIMEZONE="Asia/Shanghai" -export MASBR_STORAGE_TYPE=local -export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=mas-dev1-ws1-manage ansible-playbook ibm.mas_devops.br_health @@ -613,9 +401,8 @@ This playbook `ibm.mas_devops.br_optimizer` will backup the following components ```bash # Full backup all optimizer data for the dev1 instance and ws1 workspace export MASBR_ACTION=backup -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=mas-dev1-ws1-manage ansible-playbook ibm.mas_devops.br_optimizer @@ -623,32 +410,17 @@ ansible-playbook ibm.mas_devops.br_optimizer # Incremental backup all optimizer data for the dev1 instance and ws1 workspace export MASBR_ACTION=backup export MASBR_BACKUP_TYPE=incr -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=mas-dev1-ws1-manage ansible-playbook ibm.mas_devops.br_optimizer # Restore all optimizer data for the dev1 instance and ws1 workspace export MASBR_ACTION=restore -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export MASBR_RESTORE_FROM_VERSION=20240630132439 -export MAS_INSTANCE_ID=dev1 -export MAS_WORKSPACE_ID=ws1 -export DB2_INSTANCE_NAME=mas-dev1-ws1-manage -ansible-playbook ibm.mas_devops.br_optimizer - -# Create a scheduled backup of all optimizer data for the dev1 instance and ws1 workspace -# This will run at 01:00, Monday through Friday -export MASBR_ACTION=backup -export MASBR_BACKUP_TYPE=incr -export MASBR_BACKUP_SCHEDULE="0 1 * * 1-5" -export MASBR_JOB_TIMEZONE="Asia/Shanghai" -export MASBR_STORAGE_TYPE=local -export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 export DB2_INSTANCE_NAME=mas-dev1-ws1-manage ansible-playbook ibm.mas_devops.br_optimizer @@ -675,45 +447,31 @@ This playbook `ibm.mas_devops.br_visualinspection` will backup the following com ```bash # Full backup all visual inspection data for the dev1 instance and ws1 workspace export MASBR_ACTION=backup -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 ansible-playbook ibm.mas_devops.br_visualinspection # Incremental backup all visual inspection data for the dev1 instance and ws1 workspace export MASBR_ACTION=backup export MASBR_BACKUP_TYPE=incr -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 ansible-playbook ibm.mas_devops.br_visualinspection # Restore all visual inspection data for the dev1 instance and ws1 workspace export MASBR_ACTION=restore -export MASBR_STORAGE_TYPE=local export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup export MASBR_RESTORE_FROM_VERSION=20240630132439 -export MAS_INSTANCE_ID=dev1 -export MAS_WORKSPACE_ID=ws1 -ansible-playbook ibm.mas_devops.br_visualinspection - -# Create a scheduled backup of all visual inspection data for the dev1 instance and ws1 workspace -# This will run at 01:00, Monday through Friday -export MASBR_ACTION=backup -export MASBR_BACKUP_TYPE=incr -export MASBR_BACKUP_SCHEDULE="0 1 * * 1-5" -export MASBR_JOB_TIMEZONE="Asia/Shanghai" -export MASBR_STORAGE_TYPE=local -export MASBR_STORAGE_LOCAL_FOLDER=/tmp/backup -export MAS_INSTANCE_ID=dev1 +export MAS_INSTANCE_ID=dev export MAS_WORKSPACE_ID=ws1 ansible-playbook ibm.mas_devops.br_visualinspection ``` -## Reference +Reference +------------------------------------------------------------------------------- ### Directory Structure No matter what kind of storage systems you choose, the folder structure created in the storage system is same. diff --git a/ibm/mas_devops/common_tasks/backup_restore/before_run_tasks.yml b/ibm/mas_devops/common_tasks/backup_restore/before_run_tasks.yml index 5fd073631..7d037d774 100644 --- a/ibm/mas_devops/common_tasks/backup_restore/before_run_tasks.yml +++ b/ibm/mas_devops/common_tasks/backup_restore/before_run_tasks.yml @@ -24,24 +24,6 @@ include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/check_{{ _job_type }}_vars.yml" -# Add labels to current Job -# ----------------------------------------------------------------------------- -- name: "Add lables to current Job" - when: - - masbr_running_in_task_job - - masbr_task_type == "schedule" - - masbr_included_before_run_tasks is not defined - shell: >- - job_name=$(oc get job -n {{ _job_namespace }} --sort-by=.metadata.creationTimestamp --no-headers - | grep {{ _job_name }} | awk '{print $1}' | tail -n 1); - oc label job ${job_name} -n {{ _job_namespace }} masbr-job={{ masbr_job_name }}; - pod_name=$(oc get pod -n {{ _job_namespace }} -l job-name=${job_name} --no-headers | awk '{print $1}'); - oc label pod ${pod_name} -n {{ _job_namespace }} masbr-job={{ masbr_job_name }} - vars: - _job_namespace: "{{ lookup('env', 'MASBR_TASK_JOB_NAMESPACE') }}" - _job_name: "{{ lookup('env', 'MASBR_TASK_JOB_NAME') }}" - - # Before backup/restore component # ------------------------------------------------------------------------- - name: "Before {{ _job_type }} {{ masbr_job_component.name }}" diff --git a/ibm/mas_devops/common_tasks/backup_restore/check_backup_vars.yml b/ibm/mas_devops/common_tasks/backup_restore/check_backup_vars.yml index 152b5e33d..abb99d4b6 100644 --- a/ibm/mas_devops/common_tasks/backup_restore/check_backup_vars.yml +++ b/ibm/mas_devops/common_tasks/backup_restore/check_backup_vars.yml @@ -1,6 +1,6 @@ --- # Set below common job facts: -# masbr_task_type: backup, restore, schedule +# masbr_task_type: backup, restore # masbr_job_type: backup, restore # masbr_job_name, masbr_job_name_final # @@ -23,10 +23,6 @@ # only used when masbr_backup_type='incr' masbr_backup_from_version: "{{ lookup('env', 'MASBR_BACKUP_FROM_VERSION') | default('', true) }}" - # Cron expression for scheduled backup - # https://en.wikipedia.org/wiki/Cron - masbr_backup_schedule: "{{ lookup('env', 'MASBR_BACKUP_SCHEDULE') | default('', true) }}" - # Check 'masbr_job_component' # ----------------------------------------------------------------------------- @@ -87,28 +83,9 @@ # Set 'masbr_task_type' # ----------------------------------------------------------------------------- -- name: "Set fact: running task type (schedule)" - when: masbr_backup_schedule is defined and masbr_backup_schedule | length > 0 - set_fact: - masbr_task_type: "schedule" - -- name: "Set fact: always create a new Job version for each Job of the CronJob" - when: - - masbr_backup_schedule is defined and masbr_backup_schedule | length > 0 - - masbr_included_before_run_tasks is not defined - set_fact: - masbr_job_version: "{{ masbr_timestamp_format | strftime }}" - -- name: "Set fact: running task type (backup)" - when: masbr_task_type is not defined - set_fact: - masbr_task_type: "backup" - - -# Set backup job variables -# ----------------------------------------------------------------------------- - name: "Set fact: backup job variables" set_fact: + masbr_task_type: "backup" masbr_job_type: "backup" - name: "Set fact: job name include instance" diff --git a/ibm/mas_devops/common_tasks/backup_restore/check_common_vars.yml b/ibm/mas_devops/common_tasks/backup_restore/check_common_vars.yml index 1744b521b..a29a1c995 100644 --- a/ibm/mas_devops/common_tasks/backup_restore/check_common_vars.yml +++ b/ibm/mas_devops/common_tasks/backup_restore/check_common_vars.yml @@ -9,9 +9,6 @@ # ONLY FOR DEV __masbr_dev_create_env_file: "{{ lookup('env', '__MASBR_DEV_CREATE_ENV_FILE') | default(false, true) | bool }}" - # Whether the tasks are already running in a k8s Job/CronJob - masbr_running_in_task_job: "{{ lookup('env', 'MASBR_RUNNING_IN_TASK_JOB') | default(false, true) | bool }}" - # Temp folder in the Pod for backup/restore masbr_pod_temp_folder: "/tmp/masbr" @@ -34,132 +31,12 @@ # Storage location # ----------------------------------------------------------------------------- -- name: "Set fact: default values of storage location variables" - set_fact: - masbr_use_local_storage: false - masbr_use_pvc_storage: false - masbr_use_cloud_storage: false - -# Must specified supported storage location type -- name: "Fail if masbr_storage_type is not provided" +- name: "Fail if masbr_storage_local_folder is not provided" assert: - that: masbr_storage_type is defined and masbr_storage_type != "" - fail_msg: "masbr_storage_type is required" - -- name: "Fail if masbr_storage_type is not supported" - assert: - that: masbr_storage_type in ['local', 'pvc', 'cloud'] - fail_msg: "masbr_storage_type must be one of the supported value: local, pvc, cloud" - -# Specified local storage location -- name: "Check variables for local backup storage" - when: masbr_storage_type == "local" - block: - - name: "Fail if masbr_storage_local_folder is not provided" - assert: - that: masbr_storage_local_folder is defined and masbr_storage_local_folder != "" - fail_msg: "masbr_storage_local_folder is required" - - - name: "Set fact: use local backup storage" - set_fact: - masbr_use_local_storage: true - # Not support creating k8s Job/CronJob to run tasks when using local storage - masbr_create_task_job: false - - - name: "Debug: variables for local backup storage" - debug: - msg: - - "Use local storage .................. {{ masbr_use_local_storage }}" - - "Local storage folder ............... {{ masbr_storage_local_folder }}" - - "Run tasks in k8s Job ............... {{ masbr_create_task_job }}" - -# Specified pvc storage location -- name: "Check variables for pvc backup storage" - when: masbr_storage_type == "pvc" - block: - - name: "Fail if masbr_storage_pvc_name is not provided" - assert: - that: masbr_storage_pvc_name is defined and masbr_storage_pvc_name != "" - fail_msg: "masbr_storage_pvc_name is required" - - - name: "Fail if masbr_storage_pvc_path is not provided" - assert: - that: masbr_storage_pvc_path is defined and masbr_storage_pvc_path != "" - fail_msg: "masbr_storage_pvc_path is required" - - - name: "Set fact: use pvc backup storage" - set_fact: - masbr_use_pvc_storage: true - # By default, we will create k8s Job/CronJob to run tasks when using pvc storage - # You can set 'MASBR_CREATE_TASK_JOB' to 'false' when developing and running tasks on local workstation - masbr_create_task_job: "{{ lookup('env', 'MASBR_CREATE_TASK_JOB') | default(true, true) | bool }}" - - - name: "Debug: variables for pvc backup storage" - debug: - msg: - - "Use PVC storage .................... {{ masbr_use_pvc_storage }}" - - "PVC name ........................... {{ masbr_storage_pvc_name }}" - - "PVC mount path ..................... {{ masbr_storage_pvc_path }}" - - "Run tasks in k8s Job ............... {{ masbr_create_task_job }}" - -# Specified cloud storage location -- name: "Check variables for cloud backup storage" - when: masbr_storage_type == "cloud" - block: - - name: "Fail if masbr_storage_cloud_rclone_file is not provided" - assert: - that: masbr_storage_cloud_rclone_file is defined and masbr_storage_cloud_rclone_file != "" - fail_msg: "masbr_storage_cloud_rclone_file is required" - - - name: "Fail if masbr_storage_cloud_rclone_name is not provided" - assert: - that: masbr_storage_cloud_rclone_name is defined and masbr_storage_cloud_rclone_name != "" - fail_msg: "masbr_storage_cloud_rclone_name is required" - - - name: "Fail if masbr_storage_cloud_bucket is not provided" - assert: - that: masbr_storage_cloud_bucket is defined and masbr_storage_cloud_bucket != "" - fail_msg: "masbr_storage_cloud_bucket is required" - - - name: "Set fact: use cloud backup storage" - set_fact: - masbr_use_cloud_storage: true - # By default, we will create k8s Job/CronJob to run tasks when using cloud storage - # You can set 'MASBR_CREATE_TASK_JOB' to 'false' when developing and running tasks on local workstation - masbr_create_task_job: "{{ lookup('env', 'MASBR_CREATE_TASK_JOB') | default(true, true) | bool }}" - - - name: "Debug: variables for cloud backup storage" - debug: - msg: - - "Use cloud storage .................. {{ masbr_use_cloud_storage }}" - - "Rclone config file ................. {{ masbr_storage_cloud_rclone_file }}" - - "Rclone config name ................. {{ masbr_storage_cloud_rclone_name }}" - - "Bucket name ........................ {{ masbr_storage_cloud_bucket }}" - - "Run tasks in k8s Job ............... {{ masbr_create_task_job }}" - - -# Sending notification -# ----------------------------------------------------------------------------- -- name: "Check variables for Slack" - when: masbr_slack_enabled - block: - - name: "Fail if masbr_slack_token is not provided" - assert: - that: masbr_slack_token is defined and masbr_slack_token != "" - fail_msg: "masbr_slack_token is required when masbr_slack_enabled set to true" - - - name: "Fail if masbr_slack_channel is not provided" - assert: - that: masbr_slack_channel is defined and masbr_slack_channel != "" - fail_msg: "masbr_slack_channel is required when masbr_slack_enabled set to true" - - - name: "Debug: variables for sending Slack notification" - debug: - msg: - - "Slack channel ...................... {{ masbr_slack_channel }}" - - "Slack user ......................... {{ masbr_slack_user }}" - - "Notification level ................. {{ masbr_slack_level }} ({{ masbr_notification_levels[masbr_slack_level] | join(',') }})" + that: masbr_storage_local_folder is defined and masbr_storage_local_folder != "" + fail_msg: "masbr_storage_local_folder is required" - - name: "Set fact: reset masbr_sent_notifications" - set_fact: - masbr_sent_notifications: [] +- name: "Debug: variables for local backup storage" + debug: + msg: + - "Local storage folder ............... {{ masbr_storage_local_folder }}" diff --git a/ibm/mas_devops/common_tasks/backup_restore/copy_local_files_to_storage.yml b/ibm/mas_devops/common_tasks/backup_restore/copy_local_files_to_storage.yml index 44dd7fb4b..058043a51 100644 --- a/ibm/mas_devops/common_tasks/backup_restore/copy_local_files_to_storage.yml +++ b/ibm/mas_devops/common_tasks/backup_restore/copy_local_files_to_storage.yml @@ -1,59 +1,24 @@ --- # Copy local job files to local storage # ----------------------------------------------------------------------------- -- name: "Copy local job files to local storage" - when: masbr_use_local_storage - block: - - name: "Set fact: local storage job folder" - set_fact: - masbr_storage_job_folder: >- - {{ masbr_storage_local_folder }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} - - - name: "Debug: local storage job folder" - debug: - msg: "Local storage job folder .......... {{ masbr_storage_job_folder }}" - - - name: "Copy local job files to local storage job folder" - shell: >- - mkdir -p {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} && - cp -rf {{ [masbr_local_job_folder, item.src_file] | path_join }} - {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} && - ls -lA {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} - loop: "{{ masbr_cf_paths }}" - register: _local_copy_output - - - name: "Debug: copy local job files to local storage job folder" - debug: - msg: "{{ _local_copy_output | json_query('results[*].stdout_lines') }}" - - -# Copy local job files to cloud storage -# ----------------------------------------------------------------------------- -- name: "Copy local job files to cloud storage" - when: masbr_use_cloud_storage - block: - - name: "Set fact: cloud storage job folder" - set_fact: - masbr_storage_job_folder: >- - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} - - - name: "Debug: cloud storage job folder" - debug: - msg: "Cloud storage job folder .......... {{ masbr_storage_job_folder }}" - - - name: "Copy local job files to cloud storage job folder" - shell: >- - rclone --links --progress --no-check-certificate --config {{ masbr_storage_cloud_rclone_file }} - copy --no-traverse - {{ [masbr_local_job_folder, item.src_file] | path_join }} - {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} - loop: "{{ masbr_cf_paths }}" - register: _rclone_copy_output - - - name: "Debug: copy local job files to cloud storage job folder" - debug: - msg: "{{ _rclone_copy_output | json_query('results[*].stdout_lines') }}" - - -# Copy local job files to pvc storage -# ----------------------------------------------------------------------------- +- name: "Set fact: local storage job folder" + set_fact: + masbr_storage_job_folder: >- + {{ masbr_storage_local_folder }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} + +- name: "Debug: local storage job folder" + debug: + msg: "Local storage job folder .......... {{ masbr_storage_job_folder }}" + +- name: "Copy local job files to local storage job folder" + shell: >- + mkdir -p {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} && + cp -rf {{ [masbr_local_job_folder, item.src_file] | path_join }} + {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} && + ls -lA {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} + loop: "{{ masbr_cf_paths }}" + register: _local_copy_output + +- name: "Debug: copy local job files to local storage job folder" + debug: + msg: "{{ _local_copy_output | json_query('results[*].stdout_lines') }}" diff --git a/ibm/mas_devops/common_tasks/backup_restore/copy_pod_files_to_storage.yml b/ibm/mas_devops/common_tasks/backup_restore/copy_pod_files_to_storage.yml index 3f10c4be2..2601a6557 100644 --- a/ibm/mas_devops/common_tasks/backup_restore/copy_pod_files_to_storage.yml +++ b/ibm/mas_devops/common_tasks/backup_restore/copy_pod_files_to_storage.yml @@ -1,323 +1,47 @@ --- # Copy files from pod to local storage # ----------------------------------------------------------------------------- -- name: "Copy files from pod to local storage" - when: masbr_use_local_storage - block: - # Local storage job folder - - name: "Set fact: local storage job folder" - set_fact: - masbr_storage_job_folder: >- - {{ masbr_storage_local_folder }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} - - - name: "Debug: local storage job folder" - debug: - msg: "Local storage job folder ......... {{ masbr_storage_job_folder }}" - - # Condition 1. src_folder -> dest_folder: copy src_folder/* to dest_folder/* - - name: "Copy files from pod folder to local storage folder" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - shell: >- - mkdir -p {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} && - oc cp --retries=50 -c {{ masbr_cf_container_name }} - {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:{{ item.src_folder }} - {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} - loop: "{{ masbr_cf_paths }}" - - # Condition 2. src_file -> dest_folder: copy src_file to dest_folder/src_file - - name: "Copy file from pod to local storage folder" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - shell: >- - mkdir -p {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} && - oc cp --retries=50 -c {{ masbr_cf_container_name }} - {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:{{ item.src_file }} - {{ [masbr_storage_job_folder, item.dest_folder, item.src_file|basename] | path_join }} - loop: "{{ masbr_cf_paths }}" - - # Condition 3. src_file -> dest_file - - name: "Copy file from pod to local storage file" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_file is defined and item.dest_file | length > 0 - shell: >- - mkdir -p {{ [masbr_storage_job_folder, item.dest_file|dirname] | path_join }} && - oc cp --retries=50 -c {{ masbr_cf_container_name }} - {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:{{ item.src_file }} - {{ [masbr_storage_job_folder, item.dest_file] | path_join }} - loop: "{{ masbr_cf_paths }}" - - -# Copy files from pod to cloud storage -# ----------------------------------------------------------------------------- -- name: "Copy files from pod to cloud storage" - when: masbr_use_cloud_storage - block: - # Cloud storage job folder - - name: "Set fact: cloud storage job folder" - set_fact: - masbr_storage_job_folder: >- - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} - - - name: "Debug: cloud storage job folder" - debug: - msg: "Cloud storage job folder ......... {{ masbr_storage_job_folder }}" - - # Cloud storage from job folder - # (only used for incremental backup 'src_folder -> dest_folder') - - name: "Set fact: cloud storage from job folder" - when: masbr_cf_from_job_name is defined and masbr_cf_from_job_name | length > 0 - set_fact: - masbr_storage_from_job_folder: >- - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_from_job_name }} - - - name: "Debug: cloud storage from job folder" - when: masbr_cf_from_job_name is defined and masbr_cf_from_job_name | length > 0 - debug: - msg: "Cloud storage from job folder ......... {{ masbr_storage_from_job_folder }}" - - # The source paths are not located in pvc, so we need to copy files to mounted pvc job folder first, - # then create a Job pod to mount the same pvc and copy files from pvc to cloud storage folder. - - name: "Copy files to mounted pvc job folder" - when: masbr_cf_are_pvc_paths is not defined or not masbr_cf_are_pvc_paths - block: - # pvc job folder - - name: "Set fact: pvc job folder" - set_fact: - masbr_cf_paths_from_pvc: [] - masbr_cf_pvc_job_folder: >- - {{ [masbr_cf_pvc_mount_path, masbr_cf_job_name] | path_join }} - - - name: "Debug: pvc job folder" - debug: - msg: "PVC job folder .................... {{ masbr_cf_pvc_job_folder }}" - - - name: "Set fact: list dest files in pvc" - set_fact: - masbr_cf_ls_dest_files: [] - - # Condition 1. src_folder -> dest_folder: copy src_folder/* to dest_folder/* - - name: "Copy files from pod folder to pvc job folder" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'mkdir -p {{ [masbr_cf_pvc_job_folder, item.dest_folder|basename] | path_join }} && - cp -rf {{ item.src_folder }}/* {{ [masbr_cf_pvc_job_folder, item.dest_folder|basename] | path_join }} && - ls -lA {{ [masbr_cf_pvc_job_folder, item.dest_folder|basename] | path_join }}' - loop: "{{ masbr_cf_paths }}" - register: _ls_output - - - name: "Set fact: append dest files in pvc" - set_fact: - masbr_cf_ls_dest_files: "{{ masbr_cf_ls_dest_files + _ls_output | json_query('results[*].stdout_lines') }}" - - - name: "Set fact: change source paths based on pvc job folder" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - set_fact: - masbr_cf_paths_from_pvc: >- - {{ masbr_cf_paths_from_pvc + [{ - 'src_folder': [masbr_cf_pvc_job_folder, item.dest_folder|basename] | path_join, - 'dest_folder': item.dest_folder - }] }} - loop: "{{ masbr_cf_paths }}" - - # Condition 2. src_file -> dest_folder: copy src_file to dest_folder/src_file - - name: "Copy file from pod to pvc job folder" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'mkdir -p {{ [masbr_cf_pvc_job_folder, item.dest_folder|basename] | path_join }} && - cp -f {{ item.src_file }} {{ [masbr_cf_pvc_job_folder, item.dest_folder|basename] | path_join }} && - ls -lA {{ [masbr_cf_pvc_job_folder, item.dest_folder|basename] | path_join }}' - loop: "{{ masbr_cf_paths }}" - register: _ls_output - - - name: "Set fact: append dest files in pvc" - set_fact: - masbr_cf_ls_dest_files: "{{ masbr_cf_ls_dest_files + _ls_output | json_query('results[*].stdout_lines') }}" - - - name: "Set fact: change source paths based on pvc job folder" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - set_fact: - masbr_cf_paths_from_pvc: >- - {{ masbr_cf_paths_from_pvc + [{ - 'src_file': [masbr_cf_pvc_job_folder, item.dest_folder|basename, item.src_file|basename] | path_join, - 'dest_folder': item.dest_folder - }] }} - loop: "{{ masbr_cf_paths }}" - - # Condition 3. src_file -> dest_file - - name: "Copy file from pod to pvc job file" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_file is defined and item.dest_file | length > 0 - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'mkdir -p {{ [masbr_cf_pvc_job_folder, item.dest_file|dirname] | path_join }} && - cp -f {{ item.src_file }} {{ [masbr_cf_pvc_job_folder, item.dest_file|dirname] | path_join }} && - ls -lA {{ [masbr_cf_pvc_job_folder, item.dest_file|dirname] | path_join }}' - loop: "{{ masbr_cf_paths }}" - register: _ls_output - - - name: "Set fact: append dest files in pvc" - set_fact: - masbr_cf_ls_dest_files: "{{ masbr_cf_ls_dest_files + _ls_output | json_query('results[*].stdout_lines') }}" - - - name: "Set fact: change source paths based on pvc job folder" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_file is defined and item.dest_file | length > 0 - set_fact: - masbr_cf_paths_from_pvc: >- - {{ masbr_cf_paths_from_pvc + [{ - 'src_file': [masbr_cf_pvc_job_folder, item.dest_file|dirname, item.src_file|basename] | path_join, - 'dest_file': item.dest_file - }] }} - loop: "{{ masbr_cf_paths }}" - - - name: "Debug: list files in pvc paths" - debug: - msg: "{{ masbr_cf_ls_dest_files }}" - - - name: "Set fact: file paths in pvc job folder" - when: masbr_cf_are_pvc_paths is defined and masbr_cf_are_pvc_paths - set_fact: - masbr_cf_paths_from_pvc: "{{ masbr_cf_paths }}" - - - name: "Debug: file paths in pvc job folder" - debug: - msg: "{{ masbr_cf_paths_from_pvc }}" - - - # Set job variables - # ----------------------------------------------------------------------------- - - name: "Set fact: copy file Job name" - set_fact: - # must be no more than 63 characters and in lower case - # format 'copy--', e.g. - # 'copy-20240424210110-20240424210110' - masbr_cf_k8s_name: >- - copy-{{ masbr_job_version }}-{{ masbr_timestamp_format | strftime }} - - - name: "Debug: copy file Job name" - debug: - msg: - - "Copy file Job name ..................... {{ masbr_cf_k8s_name }}" - - - # Set copy file commands: mounted pvc -> cloud storage - # ------------------------------------------------------------------------- - # Copy files from mounted pvc folder to cloud storage - - name: "Set fact: initial rclone copy file command" - set_fact: - masbr_cf_cmds: >- - mkdir -p /tmp/logs; - rclone version 2>&1 | tee /tmp/logs/rclone-version.log - - # Condition 1. src_folder -> dest_folder: copy src_folder/* to dest_folder/* - - name: "Set fact: copy all files from pvc folder to cloud storage folder (full)" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - - masbr_cf_from_job_name is not defined or masbr_cf_from_job_name | length == 0 - set_fact: - masbr_cf_cmds: >- - {{ masbr_cf_cmds }} && - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - copy --no-traverse - {{ item.src_folder }} {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} - 2>&1 | tee /tmp/logs/rclone-copy.log - loop: "{{ masbr_cf_paths_from_pvc }}" - - - name: "Set fact: copy changed files from pvc folder to cloud storage folder (incremental)" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - - masbr_cf_from_job_name is defined and masbr_cf_from_job_name | length > 0 - set_fact: - masbr_cf_cmds: >- - {{ masbr_cf_cmds }} && - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - sync {{ item.src_folder }} {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} - --compare-dest {{ [masbr_storage_from_job_folder, item.dest_folder] | path_join }} - 2>&1 | tee /tmp/logs/rclone-sync.log; - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - check {{ item.src_folder }} {{ [masbr_storage_from_job_folder, item.dest_folder] | path_join }} - --combined /tmp/masbr-changes.txt - 2>&1 | tee /tmp/logs/rclone-check.log; - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - copy /tmp/masbr-changes.txt {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} - 2>&1 | tee /tmp/logs/rclone-copy.log - loop: "{{ masbr_cf_paths_from_pvc }}" - - # Condition 2. src_file -> dest_folder: copy src_file to dest_folder/src_file - - name: "Set fact: copy file from pvc to cloud storage folder" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - set_fact: - masbr_cf_cmds: >- - {{ masbr_cf_cmds }} && - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - copy --no-traverse - {{ item.src_file }} {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} - 2>&1 | tee /tmp/logs/rclone-copy.log - loop: "{{ masbr_cf_paths_from_pvc }}" - - # Condition 3. src_file -> dest_file - - name: "Set fact: copy file from pvc to cloud storage file" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_file is defined and item.dest_file | length > 0 - set_fact: - masbr_cf_cmds: >- - {{ masbr_cf_cmds }} && - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - copyto {{ item.src_file }} {{ [masbr_storage_job_folder, item.dest_file] | path_join }} - 2>&1 | tee /tmp/logs/rclone-copyto.log - loop: "{{ masbr_cf_paths_from_pvc }}" - - - name: "Set fact: command for copying logs" - set_fact: - masbr_cf_cmds: >- - {{ masbr_cf_cmds }}; - ls -lA /tmp/logs; - tar -czf /tmp/{{ masbr_cf_k8s_name }}-log.tar.gz -C /tmp/logs .; - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - copy /tmp/{{ masbr_cf_k8s_name }}-log.tar.gz - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_job_type }}s/{{ masbr_job_name_final }}/log - - - name: "Debug: rclone copy file command" - debug: - msg: "{{ masbr_cf_cmds }}" - - - # Create copy file Job: mounted pvc -> cloud storage - # ------------------------------------------------------------------------- - # 1. The Job pod will mount the PVC where the files will be copied from - # 2. Use rclone to copy files from PVC to COS - - name: "Create copy file Job" - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_copy_cloud_files_job.yml" - - always: - # Clean up - - name: "Delete pvc job folder" - when: masbr_cf_pvc_job_folder is defined and masbr_cf_pvc_job_folder | length > 0 - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'rm -rf {{ masbr_cf_pvc_job_folder }}' - - -# Copy files from pod to pvc storage -# ----------------------------------------------------------------------------- +- name: "Set fact: local storage job folder" + set_fact: + masbr_storage_job_folder: >- + {{ masbr_storage_local_folder }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} + +- name: "Debug: local storage job folder" + debug: + msg: "Local storage job folder ......... {{ masbr_storage_job_folder }}" + +# Condition 1. src_folder -> dest_folder: copy src_folder/* to dest_folder/* +- name: "Copy files from pod folder to local storage folder" + when: + - item.src_folder is defined and item.src_folder | length > 0 + - item.dest_folder is defined and item.dest_folder | length > 0 + shell: >- + mkdir -p {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} && + oc cp --retries=50 -c {{ masbr_cf_container_name }} + {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:{{ item.src_folder }} + {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} + loop: "{{ masbr_cf_paths }}" + +# Condition 2. src_file -> dest_folder: copy src_file to dest_folder/src_file +- name: "Copy file from pod to local storage folder" + when: + - item.src_file is defined and item.src_file | length > 0 + - item.dest_folder is defined and item.dest_folder | length > 0 + shell: >- + mkdir -p {{ [masbr_storage_job_folder, item.dest_folder] | path_join }} && + oc cp --retries=50 -c {{ masbr_cf_container_name }} + {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:{{ item.src_file }} + {{ [masbr_storage_job_folder, item.dest_folder, item.src_file|basename] | path_join }} + loop: "{{ masbr_cf_paths }}" + +# Condition 3. src_file -> dest_file +- name: "Copy file from pod to local storage file" + when: + - item.src_file is defined and item.src_file | length > 0 + - item.dest_file is defined and item.dest_file | length > 0 + shell: >- + mkdir -p {{ [masbr_storage_job_folder, item.dest_file|dirname] | path_join }} && + oc cp --retries=50 -c {{ masbr_cf_container_name }} + {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:{{ item.src_file }} + {{ [masbr_storage_job_folder, item.dest_file] | path_join }} + loop: "{{ masbr_cf_paths }}" diff --git a/ibm/mas_devops/common_tasks/backup_restore/copy_storage_files_to_local.yml b/ibm/mas_devops/common_tasks/backup_restore/copy_storage_files_to_local.yml index fff540b3a..363e4516c 100644 --- a/ibm/mas_devops/common_tasks/backup_restore/copy_storage_files_to_local.yml +++ b/ibm/mas_devops/common_tasks/backup_restore/copy_storage_files_to_local.yml @@ -1,59 +1,24 @@ --- # Copy job files from local storage to local job folder # ----------------------------------------------------------------------------- -- name: "Copy job files from local storage to local job folder" - when: masbr_use_local_storage - block: - - name: "Set fact: local storage job folder" - set_fact: - masbr_storage_job_folder: >- - {{ masbr_storage_local_folder }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} - - - name: "Debug: local storage job folder" - debug: - msg: "Local storage job folder .......... {{ masbr_storage_job_folder }}" - - - name: "Copy job files from local storage to local job folder" - shell: >- - mkdir -p {{ [masbr_local_job_folder, item.dest_folder] | path_join }} && - cp -rf {{ [masbr_storage_job_folder, item.src_file] | path_join }} - {{ [masbr_local_job_folder, item.dest_folder] | path_join }} && - ls -lA {{ [masbr_local_job_folder, item.dest_folder] | path_join }} - loop: "{{ masbr_cf_paths }}" - register: _local_copy_output - - - name: "Debug: copy job files from local storage to local job folder" - debug: - msg: "{{ _local_copy_output | json_query('results[*].stdout_lines') }}" - - -# Copy job files from cloud storage to local job folder -# ----------------------------------------------------------------------------- -- name: "Copy job files from cloud storage to local job folder" - when: masbr_use_cloud_storage - block: - - name: "Set fact: cloud storage job folder" - set_fact: - masbr_storage_job_folder: >- - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} - - - name: "Debug: cloud storage job folder" - debug: - msg: "Cloud storage job folder .......... {{ masbr_storage_job_folder }}" - - - name: "Copy job files from cloud storage to local job folder" - shell: >- - rclone --links --progress --no-check-certificate --config {{ masbr_storage_cloud_rclone_file }} - copy --no-traverse - {{ [masbr_storage_job_folder, item.src_file] | path_join }} - {{ [masbr_local_job_folder, item.dest_folder] | path_join }} - loop: "{{ masbr_cf_paths }}" - register: _rclone_copy_output +- name: "Set fact: local storage job folder" + set_fact: + masbr_storage_job_folder: >- + {{ masbr_storage_local_folder }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} - - name: "Debug: copy job files from cloud storage to local job folder" - debug: - msg: "{{ _rclone_copy_output | json_query('results[*].stdout_lines') }}" +- name: "Debug: local storage job folder" + debug: + msg: "Local storage job folder .......... {{ masbr_storage_job_folder }}" - -# Copy job files from pvc storage to local job folder -# ----------------------------------------------------------------------------- +- name: "Copy job files from local storage to local job folder" + shell: >- + mkdir -p {{ [masbr_local_job_folder, item.dest_folder] | path_join }} && + cp -rf {{ [masbr_storage_job_folder, item.src_file] | path_join }} + {{ [masbr_local_job_folder, item.dest_folder] | path_join }} && + ls -lA {{ [masbr_local_job_folder, item.dest_folder] | path_join }} + loop: "{{ masbr_cf_paths }}" + register: _local_copy_output + +- name: "Debug: copy job files from local storage to local job folder" + debug: + msg: "{{ _local_copy_output | json_query('results[*].stdout_lines') }}" diff --git a/ibm/mas_devops/common_tasks/backup_restore/copy_storage_files_to_pod.yml b/ibm/mas_devops/common_tasks/backup_restore/copy_storage_files_to_pod.yml index b775e114e..6aa3eb024 100644 --- a/ibm/mas_devops/common_tasks/backup_restore/copy_storage_files_to_pod.yml +++ b/ibm/mas_devops/common_tasks/backup_restore/copy_storage_files_to_pod.yml @@ -1,432 +1,51 @@ --- # Copy files from local storage to pod # ----------------------------------------------------------------------------- -- name: "Copy files from local storage to pod" - when: masbr_use_local_storage - block: - # Local storage job folder - - name: "Set fact: local storage job folder" - set_fact: - masbr_storage_job_folder: >- - {{ masbr_storage_local_folder }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} - - name: "Debug: local storage job folder" - debug: - msg: "Local storage job folder .......... {{ masbr_storage_job_folder }}" - - # Condition 1. src_folder -> dest_folder: copy src_folder/* to dest_folder/* - # - # - exec into masbr_cf_pod_name/masbr_cf_container_name, create temp folder - # - cp from src_folder to temp folder inside masbr_cf_pod_name/masbr_cf_container_name - # - exec into masbr_cf_pod_name/masbr_cf_container_name, move temp_dest_folder to dest_folder and delete temp_dest_folder - - name: "Copy files from local storage folder to pod folder" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'temp_dest_folder={{ [item.dest_folder, masbr_job_version] | path_join }} && mkdir -p ${temp_dest_folder}' - && oc cp --retries=50 -c {{ masbr_cf_container_name }} - {{ [masbr_storage_job_folder, item.src_folder] | path_join }} - {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:${temp_dest_folder} - && oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'mv -f ${temp_dest_folder}/* {{ item.dest_folder }} && rm -rf ${temp_dest_folder}' - loop: "{{ masbr_cf_paths }}" - - # Condition 2. src_file -> dest_folder: copy src_file to dest_folder/src_file - - name: "Copy file from local storage folder to pod folder" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'mkdir -p {{ item.dest_folder }}' - && oc cp --retries=50 -c {{ masbr_cf_container_name }} - {{ [masbr_storage_job_folder, item.src_file] | path_join }} - {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:{{ item.dest_folder }} - loop: "{{ masbr_cf_paths }}" - - # Condition 3. src_file -> dest_file - # - exec into masbr_cf_pod_name/masbr_cf_container_name, create temp folder - # - cp from src_folder to temp folder inside masbr_cf_pod_name/masbr_cf_container_name - # - exec into masbr_cf_pod_name/masbr_cf_container_name, move temp_dest_folder to dest_folder and delete temp_dest_folder - - name: "Copy file from local storage folder to pod file" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_file is defined and item.dest_file | length > 0 - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'temp_dest_folder={{ [item.dest_file|dirname, masbr_job_version] | path_join }} && mkdir -p ${temp_dest_folder}' - && oc cp --retries=50 -c {{ masbr_cf_container_name }} - {{ [masbr_storage_job_folder, item.src_file] | path_join }} - {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:${temp_dest_folder} - && oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'mv -f ${temp_dest_folder}/{{ item.src_file|basename }} {{ item.dest_file }} && rm -rf ${temp_dest_folder}' - loop: "{{ masbr_cf_paths }}" - - -# Copy files from cloud storage to pod -# ----------------------------------------------------------------------------- -- name: "Copy files from cloud storage to pod" - when: masbr_use_cloud_storage - block: - # Cloud storage job folder - - name: "Set fact: cloud storage job folder" - set_fact: - masbr_storage_job_folder: >- - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} - - - name: "Debug: cloud storage job folder" - debug: - msg: "Cloud storage job folder .......... {{ masbr_storage_job_folder }}" - - # Cloud storage from job folder - # (only used for restoring from incremental backup 'src_folder -> dest_folder') - - name: "Set fact: cloud storage from job folder" - when: masbr_cf_from_job_name is defined and masbr_cf_from_job_name | length > 0 - set_fact: - masbr_storage_from_job_folder: >- - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_from_job_name }} - - - name: "Debug: cloud storage from job folder" - when: masbr_cf_from_job_name is defined and masbr_cf_from_job_name | length > 0 - debug: - msg: "Cloud storage from job folder ......... {{ masbr_storage_from_job_folder }}" - - - name: "Set fact: pvc paths" - set_fact: - # Copy to PVC paths by default - masbr_cf_paths_to_pvc: "{{ masbr_cf_paths }}" - masbr_cf_paths_from_pvc: [] - - # The target paths are not located in pvc, so we need to create a Job to copy files from cloud storage - # to mounted pvc job folder first, then copy files from pvc to pod destination folder. - - name: "Set pvc paths" - when: masbr_cf_are_pvc_paths is not defined or not masbr_cf_are_pvc_paths - block: - # pvc job folder - - name: "Set fact: pvc job folder" - set_fact: - masbr_cf_paths_to_pvc: [] - masbr_cf_pvc_job_folder: >- - {{ [masbr_cf_pvc_mount_path, masbr_cf_job_name] | path_join }} - - - name: "Debug: pvc job folder" - debug: - msg: "PVC job folder .................... {{ masbr_cf_pvc_job_folder }}" - - # Condition 1. src_folder -> dest_folder: copy src_folder/* to dest_folder/* - - name: "Set fact: change destination paths based on pvc job folder" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - set_fact: - masbr_cf_paths_to_pvc: >- - {{ masbr_cf_paths_to_pvc + [{ - 'src_folder': item.src_folder, - 'dest_folder': [masbr_cf_pvc_job_folder, item.dest_folder|basename] | path_join - }] }} - masbr_cf_paths_from_pvc: >- - {{ masbr_cf_paths_from_pvc + [{ - 'src_folder': [masbr_cf_pvc_job_folder, item.dest_folder|basename] | path_join, - 'dest_folder': item.dest_folder - }] }} - loop: "{{ masbr_cf_paths }}" - - # Condition 2. src_file -> dest_folder: copy src_file to dest_folder/src_file - - name: "Set fact: change destination paths based on pvc job folder" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - set_fact: - masbr_cf_paths_to_pvc: >- - {{ masbr_cf_paths_to_pvc + [{ - 'src_file': item.src_file, - 'dest_folder': [masbr_cf_pvc_job_folder, item.dest_folder|basename] | path_join - }] }} - masbr_cf_paths_from_pvc: >- - {{ masbr_cf_paths_from_pvc + [{ - 'src_file': [masbr_cf_pvc_job_folder, item.dest_folder|basename, item.src_file|basename] | path_join, - 'dest_folder': item.dest_folder - }] }} - loop: "{{ masbr_cf_paths }}" - - # Condition 3. src_file -> dest_file - - name: "Set fact: change destination paths based on pvc job folder" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_file is defined and item.dest_file | length > 0 - set_fact: - masbr_cf_paths_to_pvc: >- - {{ masbr_cf_paths_to_pvc + [{ - 'src_file': item.src_file, - 'dest_file': [masbr_cf_pvc_job_folder, item.src_file|dirname, item.dest_file|basename] | path_join, - }] }} - masbr_cf_paths_from_pvc: >- - {{ masbr_cf_paths_from_pvc + [{ - 'src_file': [masbr_cf_pvc_job_folder, item.dest_file|dirname, item.src_file|basename] | path_join, - 'dest_file': item.dest_file - }] }} - loop: "{{ masbr_cf_paths }}" - - - name: "Debug: paths of copying files from cloud storage to pvc" - debug: - msg: "{{ masbr_cf_paths_to_pvc }}" - - - # Set job variables - # ----------------------------------------------------------------------------- - - name: "Set fact: copy file Job name" - set_fact: - # must be no more than 63 characters and in lower case - # format 'copy--', e.g. - # 'copy-20240424210110-20240424210110' - masbr_cf_k8s_name: >- - copy-{{ masbr_job_version }}-{{ masbr_timestamp_format | strftime }} - - - name: "Debug: copy file Job name" - debug: - msg: - - "Copy file Job name ..................... {{ masbr_cf_k8s_name }}" - - - # Set copy file commands: cloud storage -> mounted pvc - # ------------------------------------------------------------------------- - - name: "Set fact: dest paths in pvc" - set_fact: - # For debugging only - masbr_cf_dest_folders: [] - - - name: "Set fact: initial rclone copy file command" - set_fact: - masbr_cf_cmds: >- - mkdir -p /tmp/logs; - rclone version 2>&1 | tee /tmp/logs/rclone-version.log - - # Condition 1. src_folder -> dest_folder: copy src_folder/* to dest_folder/* - # When restoring from a full backup: use 'rclone sync' - # When restoring from an incremental backup: - # 1. use 'rclone copy' to copy full backup, use 'rclone check' to create 'missing-on-src-full.txt' - # 2. use 'rclone copy' to copy incremental backup, use 'rclone check' to create 'missing-on-src-incr.txt' - # 3. create 'masbr-deletions.txt' based on 'masbr-changes.txt' and the intersect lines in - # 'missing-on-src-full.txt' and 'missing-on-src-incr.txt' - # 4. 'rclone delete' based on 'masbr-deletions.txt' - - name: "Set fact: type of the restoring backup" - set_fact: - _restoring_type: >- - {{ 'incr' if (masbr_cf_from_job_name is defined and masbr_cf_from_job_name | length > 0) else 'full' }} - - - name: "Set fact: command for copying files from cloud storage folder to pvc folder ({{ _restoring_type }})" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - set_fact: - masbr_cf_dest_folders: "{{ masbr_cf_dest_folders + [item.dest_folder] }}" - masbr_cf_cmds: >- - {{ masbr_cf_cmds }}; - mkdir -p {{ item.dest_folder }}; - {{ 'rm -rf ' + item.dest_folder + '/*;' if masbr_cf_delete_dest is defined and masbr_cf_delete_dest }} - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - {{ 'copy --no-traverse' if (masbr_cf_from_job_name is defined and masbr_cf_from_job_name | length > 0) - else 'sync' }} - {{ [masbr_storage_job_folder, item.src_folder] | path_join }} {{ item.dest_folder }} - 2>&1 | tee /tmp/logs/rclone-copy-{{ _restoring_type }}.log - loop: "{{ masbr_cf_paths_to_pvc }}" - - - name: "Set fact: command for copying files from cloud storage folder to pvc folder (full)" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - - masbr_cf_from_job_name is defined and masbr_cf_from_job_name | length > 0 - set_fact: - masbr_cf_dest_folders: "{{ masbr_cf_dest_folders + [item.dest_folder] }}" - masbr_cf_cmds: >- - {{ masbr_cf_cmds }}; - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - copy --no-traverse - {{ [masbr_storage_from_job_folder, item.src_folder] | path_join }} {{ item.dest_folder }} - 2>&1 | tee /tmp/logs/rclone-copy-full.log - loop: "{{ masbr_cf_paths_to_pvc }}" - - - name: "Set fact: command for creating changes file" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - - masbr_cf_from_job_name is defined and masbr_cf_from_job_name | length > 0 - set_fact: - masbr_cf_cmds: >- - {{ masbr_cf_cmds }}; - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - check {{ [masbr_storage_job_folder, item.src_folder] | path_join }} {{ item.dest_folder }} - --missing-on-src /tmp/logs/missing-on-src-incr.txt - 2>&1 | tee /tmp/logs/rclone-check-incr.log; - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - check {{ [masbr_storage_from_job_folder, item.src_folder] | path_join }} {{ item.dest_folder }} - --missing-on-src /tmp/logs/missing-on-src-full.txt - 2>&1 | tee /tmp/logs/rclone-check-full.log - loop: "{{ masbr_cf_paths_to_pvc }}" - - - name: "Set fact: command for deleting files" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - - masbr_cf_from_job_name is defined and masbr_cf_from_job_name | length > 0 - set_fact: - masbr_cf_cmds: >- - {{ masbr_cf_cmds }}; - mv {{ [item.dest_folder, 'masbr-changes.txt'] | path_join }} /tmp/logs/masbr-changes.txt; - cat /tmp/logs/masbr-changes.txt | grep "^-" | awk '{print $2}' > /tmp/logs/masbr-deletions.txt; - sort /tmp/logs/missing-on-src-full.txt /tmp/logs/missing-on-src-incr.txt - | uniq -d >> /tmp/logs/masbr-deletions.txt; - rclone --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - delete {{ item.dest_folder }} --files-from /tmp/logs/masbr-deletions.txt - 2>&1 | tee /tmp/logs/rclone-delete.log; - rclone --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - rmdirs {{ item.dest_folder }} --leave-root - 2>&1 | tee /tmp/logs/rclone-rmdirs.log - loop: "{{ masbr_cf_paths_to_pvc }}" - - # Condition 2. src_file -> dest_folder: copy src_file to dest_folder/src_file - - name: "Set fact: copy file from cloud storage folder to pvc folder" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - set_fact: - masbr_cf_dest_folders: "{{ masbr_cf_dest_folders + [item.dest_folder] }}" - masbr_cf_cmds: >- - {{ masbr_cf_cmds }}; - mkdir -p {{ item.dest_folder }}; - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - copy --no-traverse - {{ [masbr_storage_job_folder, item.src_file] | path_join }} {{ item.dest_folder }} - 2>&1 | tee /tmp/logs/rclone-copy.log - loop: "{{ masbr_cf_paths_to_pvc }}" - - # Condition 3. src_file -> dest_file - - name: "Set fact: copy file from cloud storage to pvc file" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_file is defined and item.dest_file | length > 0 - set_fact: - masbr_cf_dest_folders: "{{ masbr_cf_dest_folders + [item.dest_file | dirname] }}" - masbr_cf_cmds: >- - {{ masbr_cf_cmds }}; - mkdir -p {{ item.dest_file | dirname }}; - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - copyto {{ [masbr_storage_job_folder, item.src_file] | path_join }} {{ item.dest_file }} - 2>&1 | tee /tmp/logs/rclone-copyto.log - loop: "{{ masbr_cf_paths_to_pvc }}" - - - name: "Set fact: command for copying logs" - set_fact: - masbr_cf_cmds: >- - {{ masbr_cf_cmds }}; - ls -lA /tmp/logs; - tar -czf /tmp/{{ masbr_cf_k8s_name }}-log.tar.gz -C /tmp/logs .; - rclone --links --progress --no-check-certificate --config ${MASBR_STORAGE_CLOUD_RCLONE_FILE} - copy /tmp/{{ masbr_cf_k8s_name }}-log.tar.gz - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_job_type }}s/{{ masbr_job_name_final }}/log - - - name: "Debug: rclone copy file command" - debug: - msg: "Rclone copy file command .......... {{ masbr_cf_cmds }}" - - - # Create copy file Job: cloud storage -> mounted pvc - # ------------------------------------------------------------------------- - # 1. The Job pod will mount the PVC where the files will be saved to - # 2. Use rclone to copy files from COS to PVC - - name: "Create copy file Job" - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_copy_cloud_files_job.yml" - - - name: "List copied files in pvc paths" - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'ls -lA {{ item }}' - loop: "{{ masbr_cf_dest_folders }}" - register: _ls_pvc_paths_output - - - name: "Debug: list files in pvc paths" - debug: - msg: "{{ _ls_pvc_paths_output | json_query('results[*].stdout_lines') }}" - - - # Copy files: mounted pvc -> pod temp folder - # ------------------------------------------------------------------------- - - name: "Copy files from pvc to pod" - when: masbr_cf_are_pvc_paths is not defined or not masbr_cf_are_pvc_paths - block: - - name: "Set fact: list dest files in pod" - set_fact: - masbr_cf_ls_dest_files: [] - - - name: "Debug: paths of copying files from pvc to pod" - debug: - msg: "{{ masbr_cf_paths_from_pvc }}" - - # Condition 1. src_folder -> dest_folder: copy src_folder/* to dest_folder/* - - name: "Copy files from pvc folder to pod folder" - when: - - item.src_folder is defined and item.src_folder | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'mkdir -p {{ item.dest_folder }} && - cp -rf {{ item.src_folder }}/* {{ item.dest_folder }} && - ls -lA {{ item.dest_folder }}' - loop: "{{ masbr_cf_paths_from_pvc }}" - register: _ls_output - - - name: "Set fact: append dest files in pod" - set_fact: - masbr_cf_ls_dest_files: "{{ masbr_cf_ls_dest_files + _ls_output | json_query('results[*].stdout_lines') }}" - - # Condition 2. src_file -> dest_folder: copy src_file to dest_folder/src_file - - name: "Copy file from pvc to pod folder" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_folder is defined and item.dest_folder | length > 0 - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'mkdir -p {{ item.dest_folder }} && - cp -r {{ item.src_file }} {{ item.dest_folder }} && - ls -lA {{ item.dest_folder }}' - loop: "{{ masbr_cf_paths_from_pvc }}" - register: _ls_output - - - name: "Set fact: append dest files in pod" - set_fact: - masbr_cf_ls_dest_files: "{{ masbr_cf_ls_dest_files + _ls_output | json_query('results[*].stdout_lines') }}" - - # Condition 3. src_file -> dest_file - - name: "Copy file from pvc to pod file" - when: - - item.src_file is defined and item.src_file | length > 0 - - item.dest_file is defined and item.dest_file | length > 0 - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'mkdir -p {{ item.dest_file | direname }} && - cp -r {{ item.src_file }} {{ item.dest_file }} && - ls -lA {{ item.dest_file | direname }}' - loop: "{{ masbr_cf_paths_from_pvc }}" - register: _ls_output - - - name: "Set fact: append dest files in pod" - set_fact: - masbr_cf_ls_dest_files: "{{ masbr_cf_ls_dest_files + _ls_output | json_query('results[*].stdout_lines') }}" - - - name: "Debug: list files in pod paths" - debug: - msg: "{{ masbr_cf_ls_dest_files }}" - - always: - # Clean up - - name: "Delete pvc job folder" - when: masbr_cf_pvc_job_folder is defined and masbr_cf_pvc_job_folder | length > 0 - shell: >- - oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c - 'rm -rf {{ masbr_cf_pvc_job_folder }}' - - -# Copy files from pvc storage to pod -# ----------------------------------------------------------------------------- +# Local storage job folder +- name: "Set fact: local storage job folder" + set_fact: + masbr_storage_job_folder: >- + {{ masbr_storage_local_folder }}/{{ masbr_cf_job_type }}s/{{ masbr_cf_job_name }} + +- name: "Debug: local storage job folder" + debug: + msg: "Local storage job folder .......... {{ masbr_storage_job_folder }}" + +# Condition 1. src_folder -> dest_folder: copy src_folder/* to dest_folder/* +# +# - exec into masbr_cf_pod_name/masbr_cf_container_name, create temp folder +# - cp from src_folder to temp folder inside masbr_cf_pod_name/masbr_cf_container_name +# - exec into masbr_cf_pod_name/masbr_cf_container_name, move temp_dest_folder to dest_folder and delete temp_dest_folder +- name: "Copy files from local storage folder to pod folder" + when: + - item.src_folder is defined and item.src_folder | length > 0 + - item.dest_folder is defined and item.dest_folder | length > 0 + shell: >- + oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c 'temp_dest_folder={{ [item.dest_folder, masbr_job_version] | path_join }} && mkdir -p ${temp_dest_folder}' \ + && oc cp --retries=50 -c {{ masbr_cf_container_name }} {{ [masbr_storage_job_folder, item.src_folder] | path_join }} {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:${temp_dest_folder} \ + && oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c 'mv -f ${temp_dest_folder}/* {{ item.dest_folder }} && rm -rf ${temp_dest_folder}' + loop: "{{ masbr_cf_paths }}" + +# Condition 2. src_file -> dest_folder: copy src_file to dest_folder/src_file +- name: "Copy file from local storage folder to pod folder" + when: + - item.src_file is defined and item.src_file | length > 0 + - item.dest_folder is defined and item.dest_folder | length > 0 + shell: >- + oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c 'mkdir -p {{ item.dest_folder }}' \ + && oc cp --retries=50 -c {{ masbr_cf_container_name }} {{ [masbr_storage_job_folder, item.src_file] | path_join }} {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:{{ item.dest_folder }} + loop: "{{ masbr_cf_paths }}" + +# Condition 3. src_file -> dest_file +# - exec into masbr_cf_pod_name/masbr_cf_container_name, create temp folder +# - cp from src_folder to temp folder inside masbr_cf_pod_name/masbr_cf_container_name +# - exec into masbr_cf_pod_name/masbr_cf_container_name, move temp_dest_folder to dest_folder and delete temp_dest_folder +- name: "Copy file from local storage folder to pod file" + when: + - item.src_file is defined and item.src_file | length > 0 + - item.dest_file is defined and item.dest_file | length > 0 + shell: >- + oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c 'temp_dest_folder={{ [item.dest_file|dirname, masbr_job_version] | path_join }} && mkdir -p ${temp_dest_folder}' \ + && oc cp --retries=50 -c {{ masbr_cf_container_name }} {{ [masbr_storage_job_folder, item.src_file] | path_join }} {{ masbr_cf_namespace }}/{{ masbr_cf_pod_name }}:${temp_dest_folder} \ + && oc exec {{ masbr_cf_pod_name }} -c {{ masbr_cf_container_name }} -n {{ masbr_cf_namespace }} -- bash -c 'mv -f ${temp_dest_folder}/{{ item.src_file|basename }} {{ item.dest_file }} && rm -rf ${temp_dest_folder}' diff --git a/ibm/mas_devops/common_tasks/backup_restore/create_copy_cloud_files_job.yml b/ibm/mas_devops/common_tasks/backup_restore/create_copy_cloud_files_job.yml deleted file mode 100644 index 677042037..000000000 --- a/ibm/mas_devops/common_tasks/backup_restore/create_copy_cloud_files_job.yml +++ /dev/null @@ -1,145 +0,0 @@ ---- -# Create k8s job to copy files between pod and cloud storage -# Related facts (name staring with 'masbr_cf_'): -# masbr_cf_job_type -# masbr_cf_job_name -# masbr_cf_from_job_name -# masbr_cf_namespace -# masbr_cf_are_pvc_paths: true|false -# masbr_cf_pod_name: only used when masbr_cf_are_pvc_paths=false -# masbr_cf_container_name: only used when masbr_cf_are_pvc_paths=false -# masbr_cf_affinity: true|false -# masbr_cf_pvc_name -# masbr_cf_pvc_mount_path -# masbr_cf_pvc_sub_path -# masbr_cf_paths -# masbr_cf_delete_dest: true|false, only used when coping files from cloud storage to pvc - - -# Get pod information -# ----------------------------------------------------------------------------- -- name: "Get pod information" - kubernetes.core.k8s_info: - api_version: v1 - kind: Pod - name: "{{ masbr_cf_pod_name }}" - namespace: "{{ masbr_cf_namespace }}" - register: _pod_info - -- name: "Set fact: pod infomation" - set_fact: - masbr_cf_service_account_name: "{{ _pod_info.resources[0].spec.serviceAccountName | default('') }}" - masbr_cf_service_account: "{{ _pod_info.resources[0].spec.serviceAccount | default('') }}" - masbr_cf_pod_security_context: "{{ _pod_info.resources[0].spec.securityContext }}" - masbr_cf_container_security_context: >- - {{ _pod_info.resources[0] | json_query('spec.containers[?name==`' + masbr_cf_container_name + '`].securityContext') | first }} - - -- name: "Debug: pod information" - debug: - msg: - - "Pod service account .................... {{ masbr_cf_service_account }}" - - "Pod service account name ............... {{ masbr_cf_service_account_name }}" - - "Pod security context ................... {{ masbr_cf_pod_security_context }}" - - "Container name ......................... {{ masbr_cf_container_name }}" - - "Container security context ............. {{ masbr_cf_container_security_context }}" - - -# Create ConfigMap -# ----------------------------------------------------------------------------- -- name: "Get rclone config" - shell: > - cat {{ masbr_storage_cloud_rclone_file }} - register: _rclone_config_content - -- name: "Create configmap to save rclone config" - kubernetes.core.k8s: - definition: - apiVersion: v1 - kind: ConfigMap - metadata: - name: "{{ masbr_cf_k8s_name }}" - namespace: "{{ masbr_cf_namespace }}" - labels: - mas.ibm.com/masbr: "" - masbr-type: "copy" - masbr-job: "{{ masbr_job_name }}" - data: - rclone.conf: "{{ _rclone_config_content.stdout }}" - wait: true - -- name: "Set fact: reset masbr_cf_env" - set_fact: - masbr_cf_env: [] - -- name: "Set fact: add rclone config file to env variables" - set_fact: - masbr_cf_env: >- - {{ masbr_cf_env + [ - {'name': 'MASBR_STORAGE_CLOUD_RCLONE_FILE', 'value': '/mnt/configmap/rclone.conf'}, - {'name': 'RCLONE_VERBOSE', 'value': '2'} - ] }} - - -# Create Job -# ----------------------------------------------------------------------------- -- name: "Create copying file Job" - kubernetes.core.k8s: - template: "{{ role_path }}/../../common_tasks/templates/backup_restore/copy_cloud_files_job.yml.j2" - state: present - wait: true - - -# Save Job log -# ----------------------------------------------------------------------------- -- name: "Save copy file Job log" - block: - - name: "Wait for Job to be Completed or Failed (10s delay)" - kubernetes.core.k8s_info: - api_version: batch/v1 - kind: Job - name: "{{ masbr_cf_k8s_name }}" - namespace: "{{ masbr_cf_namespace }}" - register: _job_info - until: - - _job_info.resources is defined - - _job_info.resources | length > 0 - - (_job_info.resources | json_query('[*].status.conditions[?type==`Complete`][].status') | select ('match','True') | list | length == 1) or - (_job_info.resources | json_query('[*].status.conditions[?type==`Failed`][].status') | select ('match','True') | list | length == 1) - retries: "{{ (masbr_copy_timeout_sec|int // 10) | int }}" - delay: 10 - - always: - - name: "Get Job pod information" - shell: >- - mkdir -p {{ masbr_local_job_folder }}/log/{{ masbr_cf_k8s_name }}; - pod_name=$(oc get pod -n {{ masbr_cf_namespace }} --no-headers=true -l job-name={{ masbr_cf_k8s_name }} | awk '{print $1}' | head -n 1); - oc describe -n {{ masbr_cf_namespace }} pod ${pod_name} > {{ masbr_local_job_folder }}/log/{{ masbr_cf_k8s_name }}/${pod_name}-describe.txt; - oc get -n {{ masbr_cf_namespace }} pod ${pod_name} -o yaml > {{ masbr_local_job_folder }}/log/{{ masbr_cf_k8s_name }}/${pod_name}.yaml; - ls -lA {{ masbr_local_job_folder }}/log/{{ masbr_cf_k8s_name }} - register: _get_log_files_output - - - name: "Debug: list Job log files" - debug: - msg: - - "Local job log folder ............... {{ masbr_local_job_folder }}/log/{{ masbr_cf_k8s_name }}" - - "{{ _get_log_files_output.stdout_lines }}" - - - name: "Set fact: copy file Job log name" - set_fact: - masbr_cf_log_file_name: >- - {{ masbr_cf_k8s_name }}-describe.tar.gz - - - name: "Create a tar.gz archive of all log files" - shell: >- - tar -czf {{ masbr_local_job_folder }}/log/{{ masbr_cf_log_file_name }} - -C {{ masbr_local_job_folder }}/log/{{ masbr_cf_k8s_name }} . - - - name: "Copy log file from local to storage location" - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/copy_local_files_to_storage.yml" - vars: - masbr_cf_job_type: "{{ masbr_job_type }}" - masbr_cf_job_name: "{{ masbr_job_name_final }}" - masbr_cf_paths: - - src_file: "log/{{ masbr_cf_log_file_name }}" - dest_folder: "log" diff --git a/ibm/mas_devops/common_tasks/backup_restore/create_run_tasks_job.yml b/ibm/mas_devops/common_tasks/backup_restore/create_run_tasks_job.yml deleted file mode 100644 index 94009bc97..000000000 --- a/ibm/mas_devops/common_tasks/backup_restore/create_run_tasks_job.yml +++ /dev/null @@ -1,211 +0,0 @@ ---- -# Input parameters: -# _rt_playbook_name -# _rt_role_name -# _rt_env - - -# Set task variables -# ----------------------------------------------------------------------------- -- name: "Set fact: task variables" - set_fact: - masbr_rt_namespace: "{{ masbr_job_component.namespace }}" - -- name: "Set fact: task name (backup)" - when: masbr_task_type == "backup" - set_fact: - # Format '--' - # - Job name must be no more than 63 characters and in lower case: - # 'backup-full-20240508151053' - masbr_rt_k8s_name: >- - {{ masbr_task_type }}-{{ masbr_backup_type }}-{{ masbr_job_version }} - -- name: "Set fact: task name (schedule)" - when: masbr_task_type == "schedule" - set_fact: - # Format '--' - # - CronJob name must be no longer than 52 characters and in lower case: - # 'schedule-incr-20240424210110' - masbr_rt_k8s_name: >- - {{ masbr_task_type }}-{{ masbr_backup_type }}-{{ masbr_timestamp_format | strftime }} - -- name: "Set fact: task name (restore)" - when: masbr_task_type == "restore" - set_fact: - # Format '---' - # - Job name must be no more than 63 characters and in lower case: - # 'restore-full-20240508151704' - masbr_rt_k8s_name: >- - {{ masbr_task_type }}-{{ masbr_restore_from_yaml.type }}-{{ masbr_restore_from_version }}-{{ masbr_job_version }} - -- name: "Debug: run task Job name" - debug: - msg: "{{ masbr_rt_k8s_name }}" - -# masbr_rt_cmds -- name: "Set fact: run playbook command" - when: _rt_playbook_name is defined and _rt_playbook_name | length > 0 - set_fact: - masbr_rt_cmds: > - ansible-playbook ibm.mas_devops.{{ _rt_playbook_name }} - -- name: "Set fact: run role command" - when: _rt_role_name is defined and _rt_role_name | length > 0 - set_fact: - masbr_rt_cmds: > - ROLE_NAME={{ _rt_role_name }} ansible-playbook ibm.mas_devops.run_role - -- name: "Debug: run task Job command" - debug: - msg: "{{ masbr_rt_cmds }}" - -# masbr_rt_env -- name: "Set fact: default common env variables" - set_fact: - masbr_rt_common_env: - - name: "ANSIBLE_LOG_PATH" - value: "/tmp/ansible.log" - - name: "MASBR_CONFIRM_CLUSTER" - value: "false" - - name: "MASBR_CREATE_TASK_JOB" - value: "false" - - name: "MASBR_RUNNING_IN_TASK_JOB" - value: "true" - - name: "MASBR_TASK_JOB_NAMESPACE" - value: "{{ masbr_rt_namespace }}" - - name: "MASBR_TASK_JOB_NAME" - value: "{{ masbr_rt_k8s_name }}" - - name: "MASBR_ACTION" - value: "{{ masbr_action | default('backup') }}" - -- name: "Set fact: add additional common env variables (staring with 'MASBR_')" - set_fact: - masbr_rt_common_env: "{{ masbr_rt_common_env + [item] }}" - with_items: >- - {{ ansible_env | - ansible.utils.keep_keys(target=['MASBR_'], matching_parameter='starts_with') | - dict2items(key_name='name', value_name='value') }} - # Exclude below 'MASBR_' env vars because we will override them - when: >- - item.name not in [ - 'MASBR_CONFIRM_CLUSTER', - 'MASBR_CREATE_TASK_JOB', - 'MASBR_RUNNING_IN_TASK_JOB', - 'MASBR_TASK_JOB_NAMESPACE', - 'MASBR_TASK_JOB_NAME', - 'MASBR_STORAGE_CLOUD_RCLONE_FILE' - ] - -- name: "Set fact: add role specific env variables" - set_fact: - masbr_rt_env: "{{ masbr_rt_common_env + _rt_env | default([]) }}" - -- name: "Debug: run task Job env" - debug: - msg: "{{ masbr_rt_env }}" - - -# Create configmap to save rclone config -# ----------------------------------------------------------------------------- -- name: "Create configmap to save rclone config" - when: masbr_use_cloud_storage - block: - # rclone config - - name: "Get rclone config" - shell: > - cat {{ masbr_storage_cloud_rclone_file }} - register: _rclone_config_content - - - name: "Create configmap to save rclone config" - kubernetes.core.k8s: - definition: - apiVersion: v1 - kind: ConfigMap - metadata: - name: "{{ masbr_rt_k8s_name }}" - namespace: "{{ masbr_rt_namespace }}" - labels: - mas.ibm.com/masbr: "" - masbr-type: "{{ masbr_task_type}}" - masbr-job: "{{ masbr_job_name }}" - data: - rclone.conf: "{{ _rclone_config_content.stdout }}" - wait: true - - - name: "Set fact: add rclone config file to env variables" - set_fact: - masbr_rt_env: >- - {{ masbr_rt_env + [ - {'name': 'MASBR_STORAGE_CLOUD_RCLONE_FILE', 'value': '/mnt/configmap/rclone.conf'} - ] }} - - -# Create Job -# ----------------------------------------------------------------------------- -- name: "Create cleanup Job" - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_cleanup_job.yml" - vars: - masbr_cleanup_namespace: "{{ masbr_rt_namespace }}" - -- name: "Create run tasks Job" - kubernetes.core.k8s: - template: "{{ role_path }}/../../common_tasks/templates/backup_restore/run_task_job.yml.j2" - state: present - wait: true - - -# ONLY FOR DEV -# ----------------------------------------------------------------------------- -- name: "Create env file for running tasks in docker" - when: __masbr_dev_create_env_file - block: - - name: "Create env file" - shell: > - rm -f /tmp/run_task_job.env; - touch /tmp/run_task_job.env - - - name: "Write env file" - shell: > - echo "{{ item.name }}={{ item.value }}" >> /tmp/run_task_job.env - loop: "{{ masbr_rt_env }}" - - - name: "Get OCP login command" - shell: > - echo "oc login --server=$(oc whoami --show-server) --token=$(oc whoami --show-token)" - register: _oc_login_output - - - name: "Run docker command" - debug: - msg: - - >- - Step 1: podman run -ti -v {{ masbr_storage_cloud_rclone_file | dirname }}:/mnt/configmap - --env-file=/tmp/run_task_job.env quay.io/ibmmas/cli:local - - "Step 2: {{ _oc_login_output.stdout }}" - - "Step 3: {{ masbr_rt_cmds }}" - - -# Display information of the created task -# ----------------------------------------------------------------------------- -- name: "Get OCP URL" - shell: >- - echo "$(oc whoami --show-console)/k8s/ns/{{ masbr_rt_namespace }}/{{ 'cronjobs' - if masbr_task_type == 'schedule' else 'jobs' }}/{{ masbr_rt_k8s_name }}" - register: _oc_url_output - -- name: "Summary of backup job" - when: masbr_job_type == "backup" - debug: - msg: - - "Backup version ..................... {{ masbr_job_version }}" - - "Backup from ........................ {{ masbr_backup_from | default('', true) }}" - - "Job name ........................... {{ masbr_rt_k8s_name }}" - - "Job link ........................... {{ _oc_url_output.stdout }}" - -- name: "Summary of restore job" - when: masbr_job_type == "restore" - debug: - msg: - - "Restore version .................... {{ masbr_job_version }}" - - "Restore from ....................... {{ masbr_restore_from | default('', true) }}" - - "Job name ........................... {{ masbr_rt_k8s_name }}" - - "Job link ........................... {{ _oc_url_output.stdout }}" diff --git a/ibm/mas_devops/common_tasks/backup_restore/delete_storage_job_folder.yml b/ibm/mas_devops/common_tasks/backup_restore/delete_storage_job_folder.yml index 29902f843..60d6a71fa 100644 --- a/ibm/mas_devops/common_tasks/backup_restore/delete_storage_job_folder.yml +++ b/ibm/mas_devops/common_tasks/backup_restore/delete_storage_job_folder.yml @@ -1,41 +1,15 @@ --- # Delete the job folder from local storage # ----------------------------------------------------------------------------- -- name: "Delete the job folder from local storage" - when: masbr_use_local_storage - block: - - name: "Set fact: local storage job folder" - set_fact: - masbr_storage_job_folder: "{{ masbr_storage_local_folder }}/{{ masbr_job_type }}s/{{ masbr_job_name }}" - - - name: "Debug: local storage job folder" - debug: - msg: "Local storage job folder .......... {{ masbr_storage_job_folder }}" - - - name: "Delete the job folder from local storage" - command: rm -rf {{ masbr_storage_job_folder }} - args: - removes: "{{ masbr_storage_job_folder }}" - - -# Delete the job folder from cloud storage -# ----------------------------------------------------------------------------- -- name: "Delete the job folder from cloud storage" - when: masbr_use_cloud_storage - block: - - name: "Set fact: cloud storage job folder" - set_fact: - masbr_storage_job_folder: >- - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_job_type }}s/{{ masbr_job_name }} - - - name: "Debug: cloud storage job folder" - debug: - msg: "Cloud storage job folder .......... {{ masbr_storage_job_folder }}" - - - name: "Delete the job folder from cloud storage" - shell: > - rclone --config {{ masbr_storage_cloud_rclone_file }} delete {{ masbr_storage_job_folder }} +- name: "Set fact: local storage job folder" + set_fact: + masbr_storage_job_folder: "{{ masbr_storage_local_folder }}/{{ masbr_job_type }}s/{{ masbr_job_name }}" +- name: "Debug: local storage job folder" + debug: + msg: "Local storage job folder .......... {{ masbr_storage_job_folder }}" -# Delete the job folder from pvc storage -# ----------------------------------------------------------------------------- +- name: "Delete the job folder from local storage" + command: rm -rf {{ masbr_storage_job_folder }} + args: + removes: "{{ masbr_storage_job_folder }}" diff --git a/ibm/mas_devops/common_tasks/backup_restore/list_storage_job_folders.yml b/ibm/mas_devops/common_tasks/backup_restore/list_storage_job_folders.yml index 45916544e..7115813af 100644 --- a/ibm/mas_devops/common_tasks/backup_restore/list_storage_job_folders.yml +++ b/ibm/mas_devops/common_tasks/backup_restore/list_storage_job_folders.yml @@ -1,67 +1,27 @@ --- # List job folders in local storage # ----------------------------------------------------------------------------- -- name: "List job folders in local storage" - when: masbr_use_local_storage - block: - - name: "Set fact: local storage job type folder" - set_fact: - masbr_storage_job_type_folder: "{{ masbr_storage_local_folder }}/{{ masbr_ls_job_type }}s" - - - name: "Debug: list job folders variables" - debug: - msg: - - "Search folder ...................... {{ masbr_storage_job_type_folder }}" - - "Search filter ...................... {{ masbr_ls_filter | default('', true) }}" - - - name: "List job folders in local storage" - changed_when: false - shell: >- - ls {{ masbr_storage_job_type_folder }} {{ masbr_ls_filter | default('') }}; - exit 0 - register: _ls_output - - - name: "Set fact: results of list job folders" - set_fact: - masbr_ls_results: "{{ _ls_output.stdout_lines }}" - - - name: "Debug: results of list job folders" - debug: - msg: "Results of list job folders ....... {{ masbr_ls_results }}" - - -# List job folders in cloud storage -# ----------------------------------------------------------------------------- -- name: "List job folders in cloud storage" - when: masbr_use_cloud_storage - block: - - name: "Set fact: cloud storage job type folder" - set_fact: - masbr_storage_job_type_folder: >- - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_ls_job_type }}s - - - name: "Debug: list job folders variables" - debug: - msg: - - "Search folder ...................... {{ masbr_storage_job_type_folder }}" - - "Search filter ...................... {{ masbr_ls_filter | default('', true) }}" - - - name: "List job folders in cloud storage" - changed_when: false - shell: >- - rclone lsd --no-check-certificate --config {{ masbr_storage_cloud_rclone_file }} - {{ masbr_storage_job_type_folder }} | awk '{print $5}' {{ masbr_ls_filter | default('') }}; - exit 0 - register: _ls_output - - - name: "Set fact: results of list job folders" - set_fact: - masbr_ls_results: "{{ _ls_output.stdout_lines }}" +- name: "Set fact: local storage job type folder" + set_fact: + masbr_storage_job_type_folder: "{{ masbr_storage_local_folder }}/{{ masbr_ls_job_type }}s" - - name: "Debug: results of list job folders" - debug: - msg: "Results of list job folders ....... {{ masbr_ls_results }}" +- name: "Debug: list job folders variables" + debug: + msg: + - "Search folder ...................... {{ masbr_storage_job_type_folder }}" + - "Search filter ...................... {{ masbr_ls_filter | default('', true) }}" - -# List job folders in pvc storage -# ----------------------------------------------------------------------------- +- name: "List job folders in local storage" + changed_when: false + shell: >- + ls {{ masbr_storage_job_type_folder }} {{ masbr_ls_filter | default('') }}; + exit 0 + register: _ls_output + +- name: "Set fact: results of list job folders" + set_fact: + masbr_ls_results: "{{ _ls_output.stdout_lines }}" + +- name: "Debug: results of list job folders" + debug: + msg: "Results of list job folders ....... {{ masbr_ls_results }}" diff --git a/ibm/mas_devops/common_tasks/backup_restore/rename_storage_job_folder.yml b/ibm/mas_devops/common_tasks/backup_restore/rename_storage_job_folder.yml index 5e7d04601..fa271acc4 100644 --- a/ibm/mas_devops/common_tasks/backup_restore/rename_storage_job_folder.yml +++ b/ibm/mas_devops/common_tasks/backup_restore/rename_storage_job_folder.yml @@ -6,50 +6,19 @@ # Rename the job folder in local storage # ----------------------------------------------------------------------------- -- name: "Rename the job folder in local storage" - when: masbr_use_local_storage - block: - - name: "Set fact: local storage job folder" - set_fact: - masbr_storage_job_folder: "{{ masbr_storage_local_folder }}/{{ masbr_job_type }}s/{{ masbr_job_name }}" - masbr_storage_job_folder_final: "{{ masbr_storage_local_folder }}/{{ masbr_job_type }}s/{{ masbr_job_name_final }}" - - - name: "Debug: rename local storage job folder" - debug: - msg: - - "Source job folder .................. {{ masbr_storage_job_folder }}" - - "Dest job folder .................... {{ masbr_storage_job_folder_final }}" - - - name: "Rename the job folder in local storage" - command: mv {{ masbr_storage_job_folder }} {{ masbr_storage_job_folder_final }} - args: - removes: "{{ masbr_storage_job_folder }}" - creates: "{{ masbr_storage_job_folder_final }}" - - -# Rename the job folder in cloud storage -# ----------------------------------------------------------------------------- -- name: "Rename the job folder in cloud storage" - when: masbr_use_cloud_storage - block: - - name: "Set fact: cloud storage job folder" - set_fact: - masbr_storage_job_folder: >- - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_job_type }}s/{{ masbr_job_name }} - masbr_storage_job_folder_final: >- - {{ masbr_storage_cloud_rclone_name }}:{{ masbr_storage_cloud_bucket }}/{{ masbr_job_type }}s/{{ masbr_job_name_final }} - - - name: "Debug: rename cloud storage job folder" - debug: - msg: - - "Source job folder .................. {{ masbr_storage_job_folder }}" - - "Dest job folder .................... {{ masbr_storage_job_folder_final }}" - - - name: "Rename the job folder in cloud storage" - shell: >- - rclone --config {{ masbr_storage_cloud_rclone_file }} - move --no-traverse {{ masbr_storage_job_folder }} {{ masbr_storage_job_folder_final }} +- name: "Set fact: local storage job folder" + set_fact: + masbr_storage_job_folder: "{{ masbr_storage_local_folder }}/{{ masbr_job_type }}s/{{ masbr_job_name }}" + masbr_storage_job_folder_final: "{{ masbr_storage_local_folder }}/{{ masbr_job_type }}s/{{ masbr_job_name_final }}" +- name: "Debug: rename local storage job folder" + debug: + msg: + - "Source job folder .................. {{ masbr_storage_job_folder }}" + - "Dest job folder .................... {{ masbr_storage_job_folder_final }}" -# Rename the job folder in pvc storage -# ----------------------------------------------------------------------------- +- name: "Rename the job folder in local storage" + command: mv {{ masbr_storage_job_folder }} {{ masbr_storage_job_folder_final }} + args: + removes: "{{ masbr_storage_job_folder }}" + creates: "{{ masbr_storage_job_folder_final }}" diff --git a/ibm/mas_devops/common_tasks/backup_restore/send_notification.yml b/ibm/mas_devops/common_tasks/backup_restore/send_notification.yml deleted file mode 100644 index c7e97b152..000000000 --- a/ibm/mas_devops/common_tasks/backup_restore/send_notification.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -# Send Slack notification -# ----------------------------------------------------------------------------- -- name: "Send Slack notification" - when: - - masbr_slack_enabled - - masbr_job_status.phase in masbr_notification_levels[masbr_slack_level] - block: - - name: "Set fact: Slack message" - set_fact: - slack_msg: | - {{ masbr_job_type | capitalize }} {{ masbr_job_component.name }} is {{ masbr_job_status.phase }} - Job name: `{{ masbr_job_name }}` - slack_color: >- - {% if masbr_job_status.phase == 'InProgress' %} warning - {% elif masbr_job_status.phase == 'Completed' %} good - {% elif masbr_job_status.phase in ['Failed', 'PartiallyFailed'] %} danger - {% endif %} - - - name: "Send Slack message" - community.general.slack: - token: "{{ masbr_slack_token }}" - channel: "{{ masbr_slack_channel }}" - msg: "{{ slack_msg }}" - color: "{{ slack_color | trim }}" - - - name: "Set fact: append to masbr_job_status.sentNotifications (Slack)" - set_fact: - masbr_sent_notifications: >- - {{ masbr_sent_notifications + [{ - "type": "Slack", - "channel": masbr_slack_channel, - "timestamp": "%Y-%m-%dT%H:%M:%S" | strftime, - "phase": masbr_job_status.phase - }] }} diff --git a/ibm/mas_devops/common_tasks/backup_restore/update_job_status.yml b/ibm/mas_devops/common_tasks/backup_restore/update_job_status.yml index 3562a588e..fd61b8675 100644 --- a/ibm/mas_devops/common_tasks/backup_restore/update_job_status.yml +++ b/ibm/mas_devops/common_tasks/backup_restore/update_job_status.yml @@ -125,28 +125,6 @@ }) }} -# Send notification -# ----------------------------------------------------------------------------- -- name: "Send notification" - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/send_notification.yml" - -- name: "Update fact: masbr_job_status.sentNotifications" - when: - - masbr_sent_notifications is defined - - masbr_sent_notifications | length > 0 - block: - - name: "Update fact: masbr_job_status.sentNotifications" - ansible.utils.update_fact: - updates: - - path: masbr_job_status.sentNotifications - value: "{{ masbr_sent_notifications }}" - register: _job_status_updated - - - name: "Set fact: masbr_job_status.sentNotifications" - set_fact: - masbr_job_status: "{{ _job_status_updated.masbr_job_status }}" - - # Create job file # ----------------------------------------------------------------------------- - name: "Debug: update job variables" diff --git a/ibm/mas_devops/common_tasks/create_subscription.yml b/ibm/mas_devops/common_tasks/create_subscription.yml deleted file mode 100644 index b0e17f567..000000000 --- a/ibm/mas_devops/common_tasks/create_subscription.yml +++ /dev/null @@ -1,141 +0,0 @@ ---- - -# Usage Examples -# ----------------------------------------------------------------------------- -# - name: Create Red Hat Certificate Manager Subscription -# include_tasks: "{{ role_path }}/../../common_tasks/create_subscription.yml" -# vars: -# subscription_namespace: "{{ cert_manager_operator_namespace }}" -# package_name: openshift-cert-manager-operator -# channel_name: stable-v1 - -# Optionally provide a config object as well: -# -# - name: "install : Create Grafana v5 Subscription" -# include_tasks: "{{ role_path }}/../../common_tasks/create_subscription.yml" -# vars: -# package_name: grafana-operator -# channel_name: v5 -# subscription_namespace: "{{ grafana_v5_namespace }}" -# subscription_config: -# env: -# - name: "WATCH_NAMESPACE" -# value: "" -# - name: "DASHBOARD_NAMESPACES_ALL" -# value: "true" - - -# 1. Validate inputs -# ----------------------------------------------------------------------------- -- name: "create_subscription: Assert that PackageManifest exists" - ansible.builtin.assert: - that: - - package_name is defined and package_name != "" - - subscription_namespace is defined and subscription_namespace != "" - fail_msg: "Unable to create subscription: package_name and subscription_namespace variables must both be set" - - -# 2. Lookup Required Subscription Information -# ----------------------------------------------------------------------------- -- name: "create_subscription : Get package manifest" - kubernetes.core.k8s_info: - api_version: packages.operators.coreos.com/v1 - kind: PackageManifest - name: "{{ package_name }}" - # Note: A namespace must be provided when calling packages.operators.coreos.com/v1 - namespace: openshift-marketplace - register: _manifest - -- name: "create_subscription: Assert that PackageManifest exists" - ansible.builtin.assert: - that: - - _manifest is defined - - _manifest.resources is defined - - _manifest.resources | length == 1 - fail_msg: "Unable to create subscription, packageManifest not found: {{ package_name }}" - -- name: "create_subscription : Set the subscription information" - set_fact: - _source: "{{ _manifest.resources[0].status.catalogSource }}" - _source_namespace: "{{ _manifest.resources[0].status.catalogSourceNamespace }}" - _default_channel: "{{ _manifest.resources[0].status.defaultChannel }}" - -- name: "create_subscription: Use default channel if none is provided" - when: channel_name is not defined or channel_name == "" - set_fact: - channel_name: "{{ _default_channel }}" - - -# 3. Determine whether a new OperatorGroup must be created -# ----------------------------------------------------------------------------- -- name: "create_subscription: Check if operator group is present in {{ subscription_namespace }} namespace" - kubernetes.core.k8s_info: - namespace: "{{ subscription_namespace }}" - kind: OperatorGroup - register: _og_info - - -# 4. Create Subscription -# ----------------------------------------------------------------------------- -- name: "create_subscription: Debug settings" - debug: - msg: - - "Package Name ............................ {{ package_name }}" - - "Namespace ............................... {{ subscription_namespace }}" - - "OperatorGroup Exists .................... {{ _og_info.resources | length != 0 }}" - - "Catalog Source .......................... {{ _source }}" - - "Catalog Source Namespace ................ {{ _source_namespace }}" - - "Default Channel ......................... {{ _default_channel }}" - - "Channel ................................. {{ channel_name }}" - - "Configuration ........................... {{ subscription_config | default('', True) }}" - -- name: "create_subscription: Create {{ package_name }} subscription in {{ subscription_namespace }}" - kubernetes.core.k8s: - template: "templates/subscription.yml.j2" - wait: yes - wait_timeout: 120 - - -# 5. Wait for InstallPlan to complete -# ----------------------------------------------------------------------------- -- name: "create_subscription : Lookup InstallPlan" - kubernetes.core.k8s_info: - api_version: operators.coreos.com/v1alpha1 - kind: InstallPlan - namespace: "{{ subscription_namespace }}" - label_selectors: - - operators.coreos.com/{{ package_name }}.{{ subscription_namespace }} - register: _installplan_info - retries: 30 - delay: 60 # Retry for approx 30 minutes (60s * 30 attempts) before giving up - until: _installplan_info.resources | length > 0 - -- name: "create_subscription : Wait for InstallPlan to complete" - when: _installplan_info.resources[0].status.phase != "Complete" - kubernetes.core.k8s_info: - api_version: operators.coreos.com/v1alpha1 - kind: InstallPlan - name: "{{ _installplan_info.resources[0].metadata.name }}" - namespace: "{{ subscription_namespace }}" - register: _installplan_info - retries: 20 - delay: 30 # Retry for approx 10 minutes (20s * 30 attempts) before giving up - until: - - _installplan_info.resources[0].status.phase is defined - - _installplan_info.resources[0].status.phase == "Complete" - -# 5. Wait for Subscription to complete -# ----------------------------------------------------------------------------- -- name: "create_subscription : Wait for Subscription state to become 'AtLatestKnown'" - kubernetes.core.k8s_info: - api_version: operators.coreos.com/v1alpha1 - kind: Subscription - namespace: "{{ subscription_namespace }}" - name: "{{ package_name }}" - register: _subscription_info - retries: 30 - delay: 30 # Retry for approx 15 minutes (30s * 30 attempts) before giving up - until: - - _subscription_info.resources | length > 0 - - _subscription_info.resources[0].status.state is defined - - _subscription_info.resources[0].status.state == "AtLatestKnown" diff --git a/ibm/mas_devops/common_tasks/default_storage_classes.yml b/ibm/mas_devops/common_tasks/default_storage_classes.yml new file mode 100644 index 000000000..f31bc5c7c --- /dev/null +++ b/ibm/mas_devops/common_tasks/default_storage_classes.yml @@ -0,0 +1,15 @@ +--- + +# Lookup & use default supported storage class +# ----------------------------------------------------------------------------- +# See: ibm/mas_devops/plugins/action/get_default_storage_classes.py +- name: "default-storage-classes : Lookup default storage classes" + ibm.mas_devops.get_default_storage_classes: + register: defaultStorageClasses + +- name: "default-storage-classes : Debug default storage classes" + debug: + msg: + - "Provider ............................... {{ defaultStorageClasses.provider }}" + - "Default RWX ............................ {{ defaultStorageClasses.rwx }}" + - "Default RWO ............................ {{ defaultStorageClasses.rwo }}" diff --git a/ibm/mas_devops/common_tasks/templates/backup_restore/run_task_job.yml.j2 b/ibm/mas_devops/common_tasks/templates/backup_restore/run_task_job.yml.j2 deleted file mode 100644 index 767b34c70..000000000 --- a/ibm/mas_devops/common_tasks/templates/backup_restore/run_task_job.yml.j2 +++ /dev/null @@ -1,149 +0,0 @@ ---- -kind: ServiceAccount -apiVersion: v1 -metadata: - name: "masbr-sa" - namespace: "{{ masbr_rt_namespace }}" - labels: - mas.ibm.com/masbr: "" - ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: "masbr-{{ masbr_rt_namespace }}" - labels: - mas.ibm.com/masbr: "" -subjects: - - kind: ServiceAccount - name: "masbr-sa" - namespace: "{{ masbr_rt_namespace }}" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cluster-admin - -{% if masbr_use_cloud_storage %} ---- -kind: NetworkPolicy -apiVersion: networking.k8s.io/v1 -metadata: - name: "masbr-network-policy" - namespace: "{{ masbr_rt_namespace }}" - labels: - mas.ibm.com/masbr: "" -spec: - podSelector: - matchLabels: - mas.ibm.com/masbr: "" - egress: - - {} - policyTypes: - - Egress -{% endif %} - -{% if masbr_task_type in ['backup', 'restore'] %} ---- -kind: Job -apiVersion: batch/v1 -metadata: - name: "{{ masbr_rt_k8s_name }}" - namespace: "{{ masbr_rt_namespace }}" - labels: - mas.ibm.com/masbr: "" - masbr-type: "{{ masbr_task_type}}" - masbr-job: "{{ masbr_job_name }}" -spec: - backoffLimit: 1 - template: - metadata: - name: "{{ masbr_rt_k8s_name }}" - labels: - mas.ibm.com/masbr: "" - masbr-type: "{{ masbr_task_type}}" - masbr-job: "{{ masbr_job_name }}" - spec: - serviceAccountName: masbr-sa - containers: - - name: main - image: quay.io/ibmmas/cli:{{ masbr_mascli_image_tag }} -{% if masbr_mascli_image_pull_policy is defined and masbr_mascli_image_pull_policy | length > 0 %} - imagePullPolicy: "{{ masbr_mascli_image_pull_policy }}" -{% endif %} - command: - - sh - - '-c' - - >- - {{ masbr_rt_cmds }} -{% if masbr_rt_env is defined and masbr_rt_env | length > 0 %} - env: {{ masbr_rt_env }} -{% endif %} -{% if masbr_use_cloud_storage %} - volumeMounts: - - name: cm-volume - readOnly: true - mountPath: /mnt/configmap -{% endif %} - restartPolicy: Never -{% if masbr_use_cloud_storage %} - volumes: - - name: cm-volume - configMap: - name: "{{ masbr_rt_k8s_name }}" -{% endif %} -{% endif %} - -{% if masbr_task_type == 'schedule' %} ---- -kind: CronJob -apiVersion: batch/v1 -metadata: - name: "{{ masbr_rt_k8s_name }}" - namespace: "{{ masbr_rt_namespace }}" - labels: - mas.ibm.com/masbr: "" - masbr-type: "{{ masbr_task_type}}" -spec: - schedule: "{{ masbr_backup_schedule }}" -{% if masbr_job_timezone is defined and masbr_job_timezone | length > 0 %} - timeZone: "{{ masbr_job_timezone }}" -{% endif %} - jobTemplate: - spec: - backoffLimit: 1 - template: - metadata: - name: "{{ masbr_rt_k8s_name }}" - labels: - mas.ibm.com/masbr: "" - masbr-type: "{{ masbr_task_type}}" - spec: - serviceAccountName: masbr-sa - containers: - - name: main - image: quay.io/ibmmas/cli:{{ masbr_mascli_image_tag }} -{% if masbr_mascli_image_pull_policy is defined and masbr_mascli_image_pull_policy | length > 0 %} - imagePullPolicy: "{{ masbr_mascli_image_pull_policy }}" -{% endif %} - command: - - sh - - '-c' - - >- - {{ masbr_rt_cmds }} -{% if masbr_rt_env is defined and masbr_rt_env | length > 0 %} - env: {{ masbr_rt_env }} -{% endif %} -{% if masbr_use_cloud_storage %} - volumeMounts: - - name: cm-volume - readOnly: true - mountPath: /mnt/configmap -{% endif %} - restartPolicy: Never -{% if masbr_use_cloud_storage %} - volumes: - - name: cm-volume - configMap: - name: "{{ masbr_rt_k8s_name }}" -{% endif %} -{% endif %} diff --git a/ibm/mas_devops/common_vars/backup_restore.yml b/ibm/mas_devops/common_vars/backup_restore.yml index 5c4788aea..32f0140fb 100644 --- a/ibm/mas_devops/common_vars/backup_restore.yml +++ b/ibm/mas_devops/common_vars/backup_restore.yml @@ -32,22 +32,8 @@ masbr_mascli_image_pull_policy: "{{ lookup('env', 'MASBR_MASCLI_IMAGE_PULL_POLIC # ----------------------------------------------------------------------------- # Local temp folder for backup/restore masbr_local_temp_folder: "{{ lookup('env', 'MASBR_LOCAL_TEMP_FOLDER') | default('/tmp/masbr', true) }}" - -# -masbr_storage_type: "{{ lookup('env', 'MASBR_STORAGE_TYPE') }}" - -# when masbr_storage_type='local' masbr_storage_local_folder: "{{ lookup('env', 'MASBR_STORAGE_LOCAL_FOLDER') }}" -# when masbr_storage_type='pvc' -masbr_storage_pvc_name: "{{ lookup('env', 'MASBR_STORAGE_PVC_NAME') }}" -masbr_storage_pvc_path: "{{ lookup('env', 'MASBR_STORAGE_PVC_PATH') | default('masbr', true) }}" - -# when masbr_storage_type='cloud' -masbr_storage_cloud_rclone_file: "{{ lookup('env', 'MASBR_STORAGE_CLOUD_RCLONE_FILE') }}" -masbr_storage_cloud_rclone_name: "{{ lookup('env', 'MASBR_STORAGE_CLOUD_RCLONE_NAME') }}" -masbr_storage_cloud_bucket: "{{ lookup('env', 'MASBR_STORAGE_CLOUD_BUCKET') }}" - # Notification variables # ----------------------------------------------------------------------------- @@ -68,10 +54,3 @@ masbr_notification_levels: failure: - "Failed" - "PartiallyFailed" - -# Slack notification -masbr_slack_enabled: "{{ lookup('env', 'MASBR_SLACK_ENABLED') | default(false, true) | bool }}" -masbr_slack_level: "{{ lookup('env', 'MASBR_SLACK_LEVEL') | default('info', true) }}" -masbr_slack_token: "{{ lookup('env', 'MASBR_SLACK_TOKEN') }}" -masbr_slack_channel: "{{ lookup('env', 'MASBR_SLACK_CHANNEL') }}" -masbr_slack_user: "{{ lookup('env', 'MASBR_SLACK_USER') | default('MASBR', true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-230414-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-230414-amd64.yml deleted file mode 100644 index d7942f13d..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-230414-amd64.yml +++ /dev/null @@ -1,72 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v230411 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:4e7a81ee11bd0667f1cadc1ea1da44865e412fb0597186cfc8baa9ceb3015592 - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.0 # Operator version 3.23.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.1 # Operator version 110508.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.4.0 # Operator version 4.4.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.9 # Operator version 2.0.9 -sls_version: 3.6.0 # Operator version 3.6.0 -tsm_version: 1.5.0 # Operator version 1.5.0 -dd_version: 1.1.3 # Operator version 1.1.3 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.7.0 # Operator version 3.6.0 -wsl_version: 6.3.0 # Operator version 6.3.0 -wml_version: 6.3.0 # Operator version 3.3.0 -spark_version: 6.3.0 # Operator version 3.3.0 -wd_version: 5.3.0 # Operator version 4.6.3 -cognos_version: 23.3.0 # Operator version 23.3.0 - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.9.x: 8.9.4 # Updated - 8.10.x: 8.10.0 # No Update -mas_assist_version: - 8.9.x: 8.6.3 # Updated - 8.10.x: 8.7.0 # No Update -mas_hputilities_version: - 8.9.x: 8.5.1 # Updated - 8.10.x: 8.6.0 # Updated -mas_iot_version: - 8.9.x: 8.6.5 # Updated - 8.10.x: 8.7.0 # No Update -mas_manage_version: - 8.9.x: 8.5.4 # Updated - 8.10.x: 8.6.0 # No Update -mas_monitor_version: - 8.9.x: 8.9.4 # No Update - 8.10.x: 8.10.0 # No Update -mas_optimizer_version: - 8.9.x: 8.3.3 # Updated - 8.10.x: 8.4.0 # No Update -mas_predict_version: - 8.9.x: 8.7.2 # Updated - 8.10.x: 8.8.0 # No Update -mas_visualinspection_version: - 8.9.x: 8.7.0 # No Update - 8.10.x: 8.8.0 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.2.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version: 4.4.21 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.3 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-230518-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-230518-amd64.yml deleted file mode 100644 index 4d667cd90..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-230518-amd64.yml +++ /dev/null @@ -1,72 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v230518 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:14cba8ea86a045901cc506f260e4f7aaa5d7a60a1922b927c30353f55e1c5cec - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.0 # Operator version 3.23.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.1 # Operator version 110508.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.4.0 # Operator version 4.4.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.9 # Operator version 2.0.9 -sls_version: 3.7.0 # Operator version 3.7.0 -tsm_version: 1.5.0 # Operator version 1.5.0 -dd_version: 1.1.4 # Operator version 1.1.4 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.7.0 # Operator version 3.6.0 -wsl_version: 6.3.0 # Operator version 6.3.0 -wml_version: 6.3.0 # Operator version 3.3.0 -spark_version: 6.3.0 # Operator version 3.3.0 -wd_version: 5.3.0 # Operator version 4.6.3 -cognos_version: 23.3.0 # Operator version 23.3.0 - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.9.x: 8.9.5 # Updated - 8.10.x: 8.10.1 # Updated -mas_assist_version: - 8.9.x: 8.6.3 # No Update - 8.10.x: 8.7.0 # No Update -mas_hputilities_version: - 8.9.x: 8.5.1 # No Update - 8.10.x: 8.6.1 # Updated -mas_iot_version: - 8.9.x: 8.6.6 # Updated - 8.10.x: 8.7.1 # Updated -mas_manage_version: - 8.9.x: 8.5.5 # Updated - 8.10.x: 8.6.1 # Updated -mas_monitor_version: - 8.9.x: 8.9.5 # Updated - 8.10.x: 8.10.1 # Updated -mas_optimizer_version: - 8.9.x: 8.3.3 # No Update - 8.10.x: 8.4.1 # Updated -mas_predict_version: - 8.9.x: 8.7.2 # No Update - 8.10.x: 8.8.0 # No Update -mas_visualinspection_version: - 8.9.x: 8.7.1 # Updated - 8.10.x: 8.8.0 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.2.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version: 4.4.21 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.3 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-230526-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-230526-amd64.yml deleted file mode 100644 index ba27b89d7..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-230526-amd64.yml +++ /dev/null @@ -1,72 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v230518 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:bdae03cfd469399d29a962448dcf790dcf81d309c4bc233637c3acecf228aa1f - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.0 # Operator version 3.23.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.1 # Operator version 110508.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.4.0 # Operator version 4.4.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.9 # Operator version 2.0.9 -sls_version: 3.7.0 # Operator version 3.7.0 -tsm_version: 1.5.0 # Operator version 1.5.0 -dd_version: 1.1.4 # Operator version 1.1.4 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.7.0 # Operator version 3.6.0 -wsl_version: 6.3.0 # Operator version 6.3.0 -wml_version: 6.3.0 # Operator version 3.3.0 -spark_version: 6.3.0 # Operator version 3.3.0 -wd_version: 5.3.0 # Operator version 4.6.3 -cognos_version: 23.3.0 # Operator version 23.3.0 - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.9.x: 8.9.5 # Updated - 8.10.x: 8.10.1 # Updated -mas_assist_version: - 8.9.x: 8.6.3 # No Update - 8.10.x: 8.7.0 # No Update -mas_hputilities_version: - 8.9.x: 8.5.1 # No Update - 8.10.x: 8.6.1 # Updated -mas_iot_version: - 8.9.x: 8.6.6 # Updated - 8.10.x: 8.7.1 # Updated -mas_manage_version: - 8.9.x: 8.5.5 # Updated - 8.10.x: 8.6.1 # Updated -mas_monitor_version: - 8.9.x: 8.9.5 # Updated - 8.10.x: 8.10.2 # Updated -mas_optimizer_version: - 8.9.x: 8.3.3 # No Update - 8.10.x: 8.4.1 # Updated -mas_predict_version: - 8.9.x: 8.7.2 # No Update - 8.10.x: 8.8.1 # Updated -mas_visualinspection_version: - 8.9.x: 8.7.1 # Updated - 8.10.x: 8.8.0 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.2.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version: 4.4.21 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.3 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-230616-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-230616-amd64.yml deleted file mode 100644 index 2ebbede3e..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-230616-amd64.yml +++ /dev/null @@ -1,72 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v230616 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:cb0a38132a1e16964d9aa9b7eb5d247543df5feea218bb1100757290a07bc042 - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.2 # Operator version 3.23.2 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.1 # Operator version 110508.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.6.0 # Operator version 4.6.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.10 # Operator version 2.0.10 -sls_version: 3.7.0 # Operator version 3.7.0 -tsm_version: 1.5.0 # Operator version 1.5.0 -dd_version: 1.1.4 # Operator version 1.1.4 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.8.0+20230417.110116 # Operator version 3.7.0 -wsl_version: 6.4.0 # Operator version 6.4.0 -wml_version: 6.4.0 # Operator version 3.4.0 -spark_version: 6.4.0 # Operator version 3.4.0 -wd_version: 5.3.0 # Operator version 4.6.3 -cognos_version: 23.4.0 # Operator version 23.4.0 - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.9.x: 8.9.6 # Updated - 8.10.x: 8.10.2 # Updated -mas_assist_version: - 8.9.x: 8.6.4 # Updated - 8.10.x: 8.7.1 # Updated -mas_hputilities_version: - 8.9.x: 8.5.1 # No Update - 8.10.x: 8.6.1 # No Update -mas_iot_version: - 8.9.x: 8.6.7 # Updated - 8.10.x: 8.7.2 # Updated -mas_manage_version: - 8.9.x: 8.5.6 # Updated - 8.10.x: 8.6.2 # Updated -mas_monitor_version: - 8.9.x: 8.9.5 # No Update - 8.10.x: 8.10.3 # Updated -mas_optimizer_version: - 8.9.x: 8.3.3 # No Update - 8.10.x: 8.4.1 # No Update -mas_predict_version: - 8.9.x: 8.7.2 # No Update - 8.10.x: 8.8.1 # No Update -mas_visualinspection_version: - 8.9.x: 8.7.1 # No Update - 8.10.x: 8.8.1 # Updated - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.3.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version: 4.4.21 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.4 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-230627-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-230627-amd64.yml deleted file mode 100644 index 184dcf824..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-230627-amd64.yml +++ /dev/null @@ -1,84 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v230627 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:42891d978163c24737f799ed870ad340f5b3e6cd9b14644eaf1c5810ed5ef7cf - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.2 # Operator version 3.23.2 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.1 # Operator version 110508.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.6.0 # Operator version 4.6.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.10 # Operator version 2.0.10 -sls_version: 3.7.0 # Operator version 3.7.0 -tsm_version: 1.5.0 # Operator version 1.5.0 -dd_version: 1.1.4 # Operator version 1.1.4 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.8.0+20230417.110116 # Operator version 3.7.0 -wsl_version: 6.4.0 # Operator version 6.4.0 -wml_version: 6.4.0 # Operator version 3.4.0 -spark_version: 6.4.0 # Operator version 3.4.0 -cognos_version: 23.4.0 # Operator version 23.4.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.3.0 # Operator version 4.6.3 -model_train_version: 1.2.5 # Operator version 1.1.7 -elasticsearch_version: 1.1.1336 # Operator version 1.1.1336 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.9.x: 8.9.7 # Updated - 8.10.x: 8.10.2 # No Update -mas_assist_version: - 8.9.x: 8.6.4 # No Update - 8.10.x: 8.7.1 # No Update -mas_hputilities_version: - 8.9.x: 8.5.1 # No Update - 8.10.x: 8.6.1 # No Update -mas_iot_version: - 8.9.x: 8.6.7 # No Update - 8.10.x: 8.7.2 # No Update -mas_manage_version: - 8.9.x: 8.5.6 # No Update - 8.10.x: 8.6.2 # No Update -mas_monitor_version: - 8.9.x: 8.9.5 # No Update - 8.10.x: 8.10.3 # No Update -mas_optimizer_version: - 8.9.x: 8.3.3 # No Update - 8.10.x: 8.4.1 # No Update -mas_predict_version: - 8.9.x: 8.7.2 # No Update - 8.10.x: 8.8.1 # No Update -mas_visualinspection_version: - 8.9.x: 8.7.1 # No Update - 8.10.x: 8.8.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.3.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version: 4.4.21 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.1 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.0 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.4 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-230721-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-230721-amd64.yml deleted file mode 100644 index c84946e85..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-230721-amd64.yml +++ /dev/null @@ -1,84 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v230721 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:200df0fe4723d2ec40433be5793ee3afe341f966f66b7acaa1fb43b412c90848 - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.2 # Operator version 3.23.2 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.1 # Operator version 110508.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.6.0 # Operator version 4.6.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.11 # Operator version 2.0.11 -sls_version: 3.7.0 # Operator version 3.7.0 -tsm_version: 1.5.0 # Operator version 1.5.0 -dd_version: 1.1.4 # Operator version 1.1.4 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.8.0+20230417.110116 # Operator version 3.7.0 -wsl_version: 6.4.0 # Operator version 6.4.0 -wml_version: 6.4.0 # Operator version 3.4.0 -spark_version: 6.4.0 # Operator version 3.4.0 -cognos_version: 23.4.0 # Operator version 23.4.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.3.0 # Operator version 4.6.3 -model_train_version: 1.2.5 # Operator version 1.1.7 -elasticsearch_version: 1.1.1336 # Operator version 1.1.1336 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.9.x: 8.9.7 # No Update - 8.10.x: 8.10.2 # No Update -mas_assist_version: - 8.9.x: 8.6.4 # No Update - 8.10.x: 8.7.1 # No Update -mas_hputilities_version: - 8.9.x: 8.5.1 # No Update - 8.10.x: 8.6.1 # No Update -mas_iot_version: - 8.9.x: 8.6.7 # No Update - 8.10.x: 8.7.2 # No Update -mas_manage_version: - 8.9.x: 8.5.6 # No Update - 8.10.x: 8.6.2 # No Update -mas_monitor_version: - 8.9.x: 8.9.5 # No Update - 8.10.x: 8.10.3 # No Update -mas_optimizer_version: - 8.9.x: 8.3.3 # No Update - 8.10.x: 8.4.1 # No Update -mas_predict_version: - 8.9.x: 8.7.2 # No Update - 8.10.x: 8.8.1 # No Update -mas_visualinspection_version: - 8.9.x: 8.7.1 # No Update - 8.10.x: 8.8.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.3.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version: 4.4.21 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.1 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.0 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.4 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-230725-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-230725-amd64.yml deleted file mode 100644 index 2df24ff94..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-230725-amd64.yml +++ /dev/null @@ -1,88 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v230725 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:f0776894d5b584bfdd10c3de2f5e586ddafdaca9b247d13ef05dc23fe98cfe2a - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.2 # Operator version 3.23.2 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.1 # Operator version 110508.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.6.0 # Operator version 4.6.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.11 # Operator version 2.0.11 -sls_version: 3.7.0 # Operator version 3.7.0 -tsm_version: 1.5.0 # Operator version 1.5.0 -dd_version: 1.1.4 # Operator version 1.1.4 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.8.0+20230417.110116 # Operator version 3.7.0 -wsl_version: 6.4.0 # Operator version 6.4.0 -wml_version: 6.4.0 # Operator version 3.4.0 -spark_version: 6.4.0 # Operator version 3.4.0 -cognos_version: 23.4.0 # Operator version 23.4.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.3.0 # Operator version 4.6.3 -model_train_version: 1.2.5 # Operator version 1.1.7 -elasticsearch_version: 1.1.1336 # Operator version 1.1.1336 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.9.x: 8.9.8 # Updated - 8.10.x: 8.10.3 # Updated -mas_assist_version: - 8.9.x: 8.6.4 # No Update - 8.10.x: 8.7.1 # No Update -mas_hputilities_version: - 8.9.x: 8.5.1 # No Update - 8.10.x: 8.6.1 # No Update -mas_iot_version: - 8.9.x: 8.6.8 # Updated - 8.10.x: 8.7.3 # Updated -mas_manage_version: - 8.9.x: 8.5.7 # Updated - 8.10.x: 8.6.3 # Updated -mas_monitor_version: - 8.9.x: 8.9.6 # Updated - 8.10.x: 8.10.4 # Updated -mas_optimizer_version: - 8.9.x: 8.3.3 # No Update - 8.10.x: 8.4.1 # No Update -mas_predict_version: - 8.9.x: 8.7.2 # No Update - 8.10.x: 8.8.2 # Updated -mas_visualinspection_version: - 8.9.x: 8.7.1 # No Update - 8.10.x: 8.8.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.3.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version: 4.4.21 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.1 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.0 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.4 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-230829-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-230829-amd64.yml deleted file mode 100644 index b194a9171..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-230829-amd64.yml +++ /dev/null @@ -1,88 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v230829 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:ecc076b3219db96ed78faac32c815282515d830bc5c6025268be96ca15618f7e - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.4 # Operator version 3.23.4 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.4 # Operator version 110508.0.2 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.6.1 # Operator version 4.6.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.11 # Operator version 2.0.11 -sls_version: 3.7.0 # Operator version 3.7.0 -tsm_version: 1.5.0 # Operator version 1.5.0 -dd_version: 1.1.4 # Operator version 1.1.4 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.8.0+20230417.110116 # Operator version 3.7.0 -wsl_version: 6.4.0 # Operator version 6.4.0 -wml_version: 6.4.0 # Operator version 3.4.0 -spark_version: 6.4.0 # Operator version 3.4.0 -cognos_version: 23.4.0 # Operator version 23.4.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.3.0 # Operator version 4.6.3 -model_train_version: 1.2.7 # Operator version 1.1.9 -elasticsearch_version: 1.1.1541 # Operator version 1.1.1541 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.9.x: 8.9.9 # Updated - 8.10.x: 8.10.4 # Updated -mas_assist_version: - 8.9.x: 8.6.5 # Updated - 8.10.x: 8.7.2 # Updated -mas_hputilities_version: - 8.9.x: 8.5.3 # Updated - 8.10.x: 8.6.2 # Updated -mas_iot_version: - 8.9.x: 8.6.9 # Updated - 8.10.x: 8.7.4 # Updated -mas_manage_version: - 8.9.x: 8.5.8 # Updated - 8.10.x: 8.6.4 # Updated -mas_monitor_version: - 8.9.x: 8.9.6 # No Update - 8.10.x: 8.10.4 # No Update -mas_optimizer_version: - 8.9.x: 8.3.3 # No Update - 8.10.x: 8.4.1 # No Update -mas_predict_version: - 8.9.x: 8.7.2 # No Update - 8.10.x: 8.8.2 # No Update -mas_visualinspection_version: - 8.9.x: 8.7.1 # No Update - 8.10.x: 8.8.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.4.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version: 4.4.21 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.2 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.1 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.4 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-230926-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-230926-amd64.yml deleted file mode 100644 index a4288c72d..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-230926-amd64.yml +++ /dev/null @@ -1,88 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v230926 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:b3ad0d8d20eee9c7e48ba93b956a4f452e48ba0a648e76c39100c352f2cb6537 - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.4 # Operator version 3.23.4 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.4 # Operator version 110508.0.2 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.6.1 # Operator version 4.6.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.11 # Operator version 2.0.11 -sls_version: 3.8.0 # Operator version 3.8.0 -tsm_version: 1.5.1 # Operator version 1.5.1 -dd_version: 1.1.5 # Operator version 1.1.5 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.9.0+20230524.165553 # Operator version 3.8.0 -wsl_version: 6.5.0 # Operator version 6.5.0 -wml_version: 6.5.0 # Operator version 3.5.0 -spark_version: 6.5.0 # Operator version 3.5.0 -cognos_version: 23.5.0 # Operator version 23.5.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.5.0 # Operator version 4.6.5 -model_train_version: 1.2.7 # Operator version 1.1.9 -elasticsearch_version: 1.1.1541 # Operator version 1.1.1541 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.10.x: 8.10.5 # Updated - 8.11.x: 8.11.0 # Updated -mas_assist_version: - 8.10.x: 8.7.2 # No Update - 8.11.x: 8.8.0 # Updated -mas_hputilities_version: - 8.10.x: 8.6.2 # No Update - 8.11.x: "" # Not Supported -mas_iot_version: - 8.10.x: 8.7.4 # No Update - 8.11.x: 8.8.0 # Updated -mas_manage_version: - 8.10.x: 8.6.5 # Updated - 8.11.x: 8.7.0 # Updated -mas_monitor_version: - 8.10.x: 8.10.5 # Updated - 8.11.x: 8.11.0 # Updated -mas_optimizer_version: - 8.10.x: 8.4.1 # No Update - 8.11.x: 8.5.0 # Updated -mas_predict_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.0 # Updated -mas_visualinspection_version: - 8.10.x: 8.8.1 # No Update - 8.11.x: 8.9.0 # Updated - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.4.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version: 4.4.21 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.2 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.1 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.6 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-231004-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-231004-amd64.yml deleted file mode 100644 index 9c3f53e2e..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-231004-amd64.yml +++ /dev/null @@ -1,98 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v231004 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:32b28d56327215dcab58664f10987b3e961c0ee9630744b9f66b710e9d879dca - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.4 # Operator version 3.23.4 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.4 # Operator version 110508.0.2 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.6.1 # Operator version 4.6.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.11 # Operator version 2.0.11 -sls_version: 3.8.1 # Operator version 3.8.1 -tsm_version: 1.5.1 # Operator version 1.5.1 -dd_version: 1.1.5 # Operator version 1.1.5 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.9.0+20230524.165553 # Operator version 3.8.0 -wsl_version: 6.5.0 # Operator version 6.5.0 -wml_version: 6.5.0 # Operator version 3.5.0 -spark_version: 6.5.0 # Operator version 3.5.0 -cognos_version: 23.5.0 # Operator version 23.5.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.5.0 # Operator version 4.6.5 -model_train_version: 1.2.7 # Operator version 1.1.9 -elasticsearch_version: 1.1.1541 # Operator version 1.1.1541 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.10.x: 8.10.5 # No Update - 8.11.x: 8.11.1 # Updated - 8.9.x: 8.9.10 # Updated -mas_assist_version: - 8.10.x: 8.7.2 # No Update - 8.11.x: 8.8.0 # No Update - 8.9.x: 8.6.5 # No Update -mas_hputilities_version: - 8.10.x: 8.6.2 # No Update - 8.11.x: "" # Not Supported - 8.9.x: 8.5.3 # No Update -mas_iot_version: - 8.10.x: 8.7.4 # No Update - 8.11.x: 8.8.0 # No Update - 8.9.x: 8.6.9 # No Update -mas_manage_version: - 8.10.x: 8.6.5 # No Update - 8.11.x: 8.7.0 # No Update - 8.9.x: 8.5.9 # Updated -mas_monitor_version: - 8.10.x: 8.10.5 # No Update - 8.11.x: 8.11.0 # No Update - 8.9.x: 8.9.6 # No Update -mas_optimizer_version: - 8.10.x: 8.4.1 # No Update - 8.11.x: 8.5.0 # No Update - 8.9.x: 8.3.3 # No Update -mas_predict_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.0 # No Update - 8.9.x: 8.7.2 # No Update -mas_visualinspection_version: - 8.10.x: 8.8.1 # No Update - 8.11.x: 8.9.0 # No Update - 8.9.x: 8.7.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.4.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 4.4.21 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.2 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.1 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.6 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-231031-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-231031-amd64.yml deleted file mode 100644 index 14da09bf0..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-231031-amd64.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v231031 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:31f0f52a55cc97e7d6c80b844c1d13791efa303eeca87b41954dd2ab67d75378 - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.4 # Operator version 3.23.4 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.4 # Operator version 110508.0.2 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.6.1 # Operator version 4.6.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 -sls_version: 3.8.1 # Operator version 3.8.1 -tsm_version: 1.5.1 # Operator version 1.5.1 -dd_version: 1.1.5 # Operator version 1.1.5 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.9.0+20230524.165553 # Operator version 3.8.0 -wsl_version: 6.5.0 # Operator version 6.5.0 -wml_version: 6.5.0 # Operator version 3.5.0 -spark_version: 6.5.0 # Operator version 3.5.0 -cognos_version: 23.5.0 # Operator version 23.5.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.5.0 # Operator version 4.6.5 -model_train_version: 1.2.7 # Operator version 1.1.9 -elasticsearch_version: 1.1.1541 # Operator version 1.1.1541 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.10.x: 8.10.6 # Updated - 8.11.x: 8.11.2 # Updated - 8.9.x: 8.9.10 # No Update -mas_assist_version: - 8.10.x: 8.7.2 # No Update - 8.11.x: 8.8.1 # Updated - 8.9.x: 8.6.5 # No Update -mas_hputilities_version: - 8.10.x: 8.6.2 # No Update - 8.11.x: "" # Not Supported - 8.9.x: 8.5.3 # No Update -mas_iot_version: - 8.10.x: 8.7.5 # Updated - 8.11.x: 8.8.1 # Updated - 8.9.x: 8.6.9 # No Update -mas_manage_version: - 8.10.x: 8.6.6 # Updated - 8.11.x: 8.7.1 # Updated - 8.9.x: 8.5.9 # No Update -mas_monitor_version: - 8.10.x: 8.10.5 # No Update - 8.11.x: 8.11.1 # Updated - 8.9.x: 8.9.6 # No Update -mas_optimizer_version: - 8.10.x: 8.4.1 # No Update - 8.11.x: 8.5.0 # No Update - 8.9.x: 8.3.3 # No Update -mas_predict_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.0 # No Update - 8.9.x: 8.7.2 # No Update -mas_visualinspection_version: - 8.10.x: 8.8.1 # No Update - 8.11.x: 8.9.0 # No Update - 8.9.x: 8.7.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.4.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 4.4.21 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror extra mongo versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.21 -mongo_extras_version_6: 6.0.10 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.2 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.1 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.6 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-231128-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-231128-amd64.yml deleted file mode 100644 index f032710e1..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-231128-amd64.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v231128 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:e9f2439166ee18b540b8fc4484e3df5235bfaf7293dadd181b5755c3c79c602a - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.4 # Operator version 3.23.4 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.1.4 # Operator version 110508.0.2 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.6.1 # Operator version 4.6.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 -sls_version: 3.8.1 # Operator version 3.8.1 -tsm_version: 1.5.1 # Operator version 1.5.1 -dd_version: 1.1.5 # Operator version 1.1.5 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.9.0+20230524.165553 # Operator version 3.8.0 -wsl_version: 6.5.0 # Operator version 6.5.0 -wml_version: 6.5.0 # Operator version 3.5.0 -spark_version: 6.5.0 # Operator version 3.5.0 -cognos_version: 23.5.0 # Operator version 23.5.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.5.0 # Operator version 4.6.5 -model_train_version: 1.2.7 # Operator version 1.1.9 -elasticsearch_version: 1.1.1541 # Operator version 1.1.1541 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.10.x: 8.10.7 # Updated - 8.11.x: 8.11.3 # Updated - 8.9.x: 8.9.10 # No Update -mas_assist_version: - 8.10.x: 8.7.2 # No Update - 8.11.x: 8.8.1 # No Update - 8.9.x: 8.6.5 # No Update -mas_hputilities_version: - 8.10.x: 8.6.2 # No Update - 8.11.x: "" # Not Supported - 8.9.x: 8.5.3 # No Update -mas_iot_version: - 8.10.x: 8.7.6 # Updated - 8.11.x: 8.8.2 # Updated - 8.9.x: 8.6.9 # No Update -mas_manage_version: - 8.10.x: 8.6.7 # Updated - 8.11.x: 8.7.2 # Updated - 8.9.x: 8.5.9 # No Update -mas_monitor_version: - 8.10.x: 8.10.6 # Updated - 8.11.x: 8.11.2 # Updated - 8.9.x: 8.9.6 # No Update -mas_optimizer_version: - 8.10.x: 8.4.1 # No Update - 8.11.x: 8.5.0 # No Update - 8.9.x: 8.3.3 # No Update -mas_predict_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.0 # No Update - 8.9.x: 8.7.2 # No Update -mas_visualinspection_version: - 8.10.x: 8.8.1 # No Update - 8.11.x: 8.9.0 # No Update - 8.9.x: 8.7.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.4.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 5.0.21 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.21 -mongo_extras_version_6: 6.0.10 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.2 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.1 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.2 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.6 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-231228-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-231228-amd64.yml deleted file mode 100644 index 61bc1d2f6..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-231228-amd64.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v231228 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:431656fe80e0d565d9b130bb53e6ef12ec0370e3422975f6f4ddbfe95f728cda - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.10 # Operator version 3.23.10 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.4.2 # Operator version 110508.0.3 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.9.0 # Operator version 4.9.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 -sls_version: 3.8.1 # Operator version 3.8.1 -tsm_version: 1.5.1 # Operator version 1.5.1 -dd_version: 1.1.5 # Operator version 1.1.5 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.9.0+20230524.165553 # Operator version 3.8.0 -wsl_version: 6.5.0 # Operator version 6.5.0 -wml_version: 6.5.0 # Operator version 3.5.0 -spark_version: 6.5.0 # Operator version 3.5.0 -cognos_version: 23.5.0 # Operator version 23.5.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.5.0 # Operator version 4.6.5 -model_train_version: 1.2.10 # Operator version 1.1.12 -elasticsearch_version: 1.1.1807 # Operator version 1.1.1807 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.10.x: 8.10.8 # Updated - 8.11.x: 8.11.5 # Updated - 8.9.x: 8.9.10 # No Update -mas_assist_version: - 8.10.x: 8.7.2 # No Update - 8.11.x: 8.8.1 # No Update - 8.9.x: 8.6.5 # No Update -mas_hputilities_version: - 8.10.x: 8.6.2 # No Update - 8.11.x: "" # Not Supported - 8.9.x: 8.5.3 # No Update -mas_iot_version: - 8.10.x: 8.7.7 # Updated - 8.11.x: 8.8.3 # Updated - 8.9.x: 8.6.9 # No Update -mas_manage_version: - 8.10.x: 8.6.8 # Updated - 8.11.x: 8.7.3 # Updated - 8.9.x: 8.5.9 # No Update -mas_monitor_version: - 8.10.x: 8.10.6 # No Update - 8.11.x: 8.11.2 # No Update - 8.9.x: 8.9.6 # No Update -mas_optimizer_version: - 8.10.x: 8.4.2 # Updated - 8.11.x: 8.5.1 # Updated - 8.9.x: 8.3.3 # No Update -mas_predict_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.0 # No Update - 8.9.x: 8.7.2 # No Update -mas_visualinspection_version: - 8.10.x: 8.8.1 # No Update - 8.11.x: 8.9.0 # No Update - 8.9.x: 8.7.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 5.0.23 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.3 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.2 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.2 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.6 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-240130-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-240130-amd64.yml deleted file mode 100644 index e6ac5b41b..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-240130-amd64.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v240130 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:7944a630ce47776338238717cb04ff98e1faf90087fd339708a0785c683326ca - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.11 # Operator version 3.23.11 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.6.0 # Operator version 110509.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.9.0 # Operator version 4.9.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 -sls_version: 3.8.1 # Operator version 3.8.1 -tsm_version: 1.5.1 # Operator version 1.5.1 -dd_version: 1.1.6 # Operator version 1.1.6 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.9.0+20230524.165553 # Operator version 3.8.0 -wsl_version: 6.5.0 # Operator version 6.5.0 -wml_version: 6.5.0 # Operator version 3.5.0 -spark_version: 6.5.0 # Operator version 3.5.0 -cognos_version: 23.5.0 # Operator version 23.5.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.5.0 # Operator version 4.6.5 -model_train_version: 1.2.11 # Operator version 1.1.13 -elasticsearch_version: 1.1.1845 # Operator version 1.1.1845 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.10.x: 8.10.9 # Updated - 8.11.x: 8.11.6 # Updated - 8.9.x: 8.9.10 # No Update -mas_assist_version: - 8.10.x: 8.7.2 # No Update - 8.11.x: 8.8.1 # No Update - 8.9.x: 8.6.5 # No Update -mas_hputilities_version: - 8.10.x: 8.6.3 # Updated - 8.11.x: "" # Not Supported - 8.9.x: 8.5.3 # No Update -mas_iot_version: - 8.10.x: 8.7.8 # Updated - 8.11.x: 8.8.4 # Updated - 8.9.x: 8.6.9 # No Update -mas_manage_version: - 8.10.x: 8.6.9 # Updated - 8.11.x: 8.7.4 # Updated - 8.9.x: 8.5.9 # No Update -mas_monitor_version: - 8.10.x: 8.10.6 # No Update - 8.11.x: 8.11.3 # Updated - 8.9.x: 8.9.6 # No Update -mas_optimizer_version: - 8.10.x: 8.4.2 # No Update - 8.11.x: 8.5.1 # No Update - 8.9.x: 8.3.3 # No Update -mas_predict_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.1 # Updated - 8.9.x: 8.7.2 # No Update -mas_visualinspection_version: - 8.10.x: 8.8.1 # No Update - 8.11.x: 8.9.0 # No Update - 8.9.x: 8.7.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 5.0.23 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.4 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.3 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.2 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.6 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-240227-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-240227-amd64.yml deleted file mode 100644 index e5a10afec..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-240227-amd64.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v240227 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:8a2f2226b4aa47d42ccb564083d2a6e365fc4b116fb9a82ea83e269383a1efa1 - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.11 # Operator version 3.23.11 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.6.0 # Operator version 110509.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.9.0 # Operator version 4.9.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 -sls_version: 3.8.1 # Operator version 3.8.1 -tsm_version: 1.5.1 # Operator version 1.5.1 -dd_version: 1.1.6 # Operator version 1.1.6 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.9.0+20230524.165553 # Operator version 3.8.0 -wsl_version: 6.5.0 # Operator version 6.5.0 -wml_version: 6.5.0 # Operator version 3.5.0 -spark_version: 6.5.0 # Operator version 3.5.0 -cognos_version: 23.5.0 # Operator version 23.5.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.5.0 # Operator version 4.6.5 -model_train_version: 1.2.11 # Operator version 1.1.13 -elasticsearch_version: 1.1.1845 # Operator version 1.1.1845 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.10.x: 8.10.10 # Updated - 8.11.x: 8.11.7 # Updated - 8.9.x: 8.9.10 # No Update -mas_assist_version: - 8.10.x: 8.7.3 # Updated - 8.11.x: 8.8.2 # Updated - 8.9.x: 8.6.5 # No Update -mas_hputilities_version: - 8.10.x: 8.6.4 # Updated - 8.11.x: "" # Not Supported - 8.9.x: 8.5.3 # No Update -mas_iot_version: - 8.10.x: 8.7.9 # Updated - 8.11.x: 8.8.5 # Updated - 8.9.x: 8.6.9 # No Update -mas_manage_version: - 8.10.x: 8.6.10 # Updated - 8.11.x: 8.7.5 # Updated - 8.9.x: 8.5.9 # No Update -mas_monitor_version: - 8.10.x: 8.10.7 # Updated - 8.11.x: 8.11.4 # Updated - 8.9.x: 8.9.6 # No Update -mas_optimizer_version: - 8.10.x: 8.4.3 # Updated - 8.11.x: 8.5.2 # Updated - 8.9.x: 8.3.3 # No Update -mas_predict_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.2 # Updated - 8.9.x: 8.7.2 # No Update -mas_visualinspection_version: - 8.10.x: 8.8.2 # Updated - 8.11.x: 8.9.1 # Updated - 8.9.x: 8.7.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 5.0.23 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.4 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.3 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.3 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.6 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-240326-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-240326-amd64.yml deleted file mode 100644 index 08f737199..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-240326-amd64.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog v240326 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:9c891bb6fa8496e1ef514d29b253bf5b1e817fe95963f6e536170688aa95f1d2 - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.12 # Operator version 3.23.12 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.6.2 # Operator version 110509.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.9.0 # Operator version 4.9.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 -sls_version: 3.8.1 # Operator version 3.8.1 -tsm_version: 1.5.3 # Operator version 1.5.3 -dd_version: 1.1.7 # Operator version 1.1.7 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.9.0+20230524.165553 # Operator version 3.8.0 -wsl_version: 6.5.0 # Operator version 6.5.0 -wml_version: 6.5.0 # Operator version 3.5.0 -spark_version: 6.5.0 # Operator version 3.5.0 -cognos_version: 23.5.0 # Operator version 23.5.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.5.0 # Operator version 4.6.5 -model_train_version: 1.2.13 # Operator version 1.1.15 -elasticsearch_version: 1.1.1960 # Operator version 1.1.1960 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.10.x: 8.10.11 # Updated - 8.11.x: 8.11.8 # Updated - 8.9.x: 8.9.10 # No Update -mas_assist_version: - 8.10.x: 8.7.3 # No Update - 8.11.x: 8.8.2 # No Update - 8.9.x: 8.6.5 # No Update -mas_hputilities_version: - 8.10.x: 8.6.4 # No Update - 8.11.x: "" # Not Supported - 8.9.x: 8.5.3 # No Update -mas_iot_version: - 8.10.x: 8.7.10 # Updated - 8.11.x: 8.8.6 # Updated - 8.9.x: 8.6.9 # No Update -mas_manage_version: - 8.10.x: 8.6.11 # Updated - 8.11.x: 8.7.6 # Updated - 8.9.x: 8.5.9 # No Update -mas_monitor_version: - 8.10.x: 8.10.8 # Updated - 8.11.x: 8.11.5 # Updated - 8.9.x: 8.9.6 # No Update -mas_optimizer_version: - 8.10.x: 8.4.4 # Updated - 8.11.x: 8.5.3 # Updated - 8.9.x: 8.3.3 # No Update -mas_predict_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.2 # No Update - 8.9.x: 8.7.2 # No Update -mas_visualinspection_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.1 # No Update - 8.9.x: 8.7.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 5.0.23 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.5 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.4 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.3 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.6 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-240405-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-240405-amd64.yml deleted file mode 100644 index 3d1beb910..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-240405-amd64.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog 240405 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:8f03470e84cad81cd5e7aaaf4bce3a08b6575d48b2d27de07c25872f73ecc59c - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.12 # Operator version 3.23.12 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.6.2 # Operator version 110509.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.9.0 # Operator version 4.9.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 -sls_version: 3.8.1 # Operator version 3.8.1 -tsm_version: 1.5.3 # Operator version 1.5.3 -dd_version: 1.1.7 # Operator version 1.1.7 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.9.0+20230524.165553 # Operator version 3.8.0 -wsl_version: 6.5.0 # Operator version 6.5.0 -wml_version: 6.5.0 # Operator version 3.5.0 -spark_version: 6.5.0 # Operator version 3.5.0 -cognos_version: 23.5.0 # Operator version 23.5.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.5.0 # Operator version 4.6.5 -model_train_version: 1.2.13 # Operator version 1.1.15 -elasticsearch_version: 1.1.1960 # Operator version 1.1.1960 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.10.x: 8.10.11 # No Update - 8.11.x: 8.11.9 # Updated - 8.9.x: 8.9.10 # No Update -mas_assist_version: - 8.10.x: 8.7.3 # No Update - 8.11.x: 8.8.2 # No Update - 8.9.x: 8.6.5 # No Update -mas_hputilities_version: - 8.10.x: 8.6.4 # No Update - 8.11.x: "" # Not Supported - 8.9.x: 8.5.3 # No Update -mas_iot_version: - 8.10.x: 8.7.10 # No Update - 8.11.x: 8.8.6 # No Update - 8.9.x: 8.6.9 # No Update -mas_manage_version: - 8.10.x: 8.6.11 # No Update - 8.11.x: 8.7.6 # No Update - 8.9.x: 8.5.9 # No Update -mas_monitor_version: - 8.10.x: 8.10.8 # No Update - 8.11.x: 8.11.5 # No Update - 8.9.x: 8.9.6 # No Update -mas_optimizer_version: - 8.10.x: 8.4.4 # No Update - 8.11.x: 8.5.3 # No Update - 8.9.x: 8.3.3 # No Update -mas_predict_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.2 # No Update - 8.9.x: 8.7.2 # No Update -mas_visualinspection_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.1 # No Update - 8.9.x: 8.7.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 5.0.23 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.5 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.4 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.3 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.6 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-240430-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-240430-amd64.yml deleted file mode 100644 index c7a3844f0..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-240430-amd64.yml +++ /dev/null @@ -1,104 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog 240430 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:ce8e623505fbfca7fa207b341a442448b99ff44eeb527df5f3a4c687a47e47e4 - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.12 # Operator version 3.23.12 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.6.2 # Operator version 110509.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 4.9.0 # Operator version 4.9.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 -sls_version: 3.9.0 # Operator version 3.9.0 -tsm_version: 1.5.3 # Operator version 1.5.3 -dd_version: 1.1.7 # Operator version 1.1.7 -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.9.0+20230524.165553 # Operator version 3.8.0 -wsl_version: 6.5.0 # Operator version 6.5.0 -wml_version: 6.5.0 # Operator version 3.5.0 -spark_version: 6.5.0 # Operator version 3.5.0 -cognos_version: 23.5.0 # Operator version 23.5.0 - - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.5.0 # Operator version 4.6.5 -model_train_version: 1.2.13 # Operator version 1.1.15 -elasticsearch_version: 1.1.1960 # Operator version 1.1.1960 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.10.x: 8.10.13 # Updated - 8.11.x: 8.11.10 # Updated - 8.9.x: 8.9.10 # No Update -mas_assist_version: - 8.10.x: 8.7.4 # Updated - 8.11.x: 8.8.3 # Updated - 8.9.x: 8.6.5 # No Update -mas_hputilities_version: - 8.10.x: 8.6.5 # Updated - 8.11.x: "" # Not Supported - 8.9.x: 8.5.3 # No Update -mas_iot_version: - 8.10.x: 8.7.11 # Updated - 8.11.x: 8.8.7 # Updated - 8.9.x: 8.6.9 # No Update -mas_manage_version: - 8.10.x: 8.6.13 # Updated - 8.11.x: 8.7.7 # Updated - 8.9.x: 8.5.9 # No Update -mas_monitor_version: - 8.10.x: 8.10.9 # Updated - 8.11.x: 8.11.6 # Updated - 8.9.x: 8.9.6 # No Update -mas_optimizer_version: - 8.10.x: 8.4.5 # Updated - 8.11.x: 8.5.4 # Updated - 8.9.x: 8.3.3 # No Update -mas_predict_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.2 # No Update - 8.9.x: 8.7.2 # No Update -mas_visualinspection_version: - 8.10.x: 8.8.3 # Updated - 8.11.x: 8.9.2 # Updated - 8.9.x: 8.7.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 5.0.23 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.5 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.4 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.0.3 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.6 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v8-240528-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v8-240528-amd64.yml deleted file mode 100644 index 61271033a..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v8-240528-amd64.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog 240528 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:5ca51934b3aec978e261e6dc9704fd3d46a308010bd6c86252788d69aac3fa9f - -# Dependencies -# ----------------------------------------------------------------------------- -common_svcs_version: 1.19.13 # Operator version 3.23.13 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -db2u_version: 5.6.2 # Operator version 110509.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 5.0.0 # Operator version 5.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 -sls_version: 3.9.1 # Operator version 3.9.1 (https://github.ibm.com/maximoappsuite/ibm-sls/releases) -tsm_version: 1.5.3 # Operator version 1.5.3 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases) -dd_version: 1.1.8 # Operator version 1.1.8 (https://github.ibm.com/maximoappsuite/ibm-data-dictionary/releases) -appconnect_version: 6.2.0 # Operator version 6.2.0 -cp4d_platform_version: 2.9.0+20230524.165553 # Operator version 3.8.0 -wsl_version: 6.5.0 # Operator version 6.5.0 -wml_version: 6.5.0 # Operator version 3.5.0 -spark_version: 6.5.0 # Operator version 3.5.0 -cognos_version: 23.5.0 # Operator version 23.5.0 - -# Watson discovery and its dependencies -# Match corresponding case version for default versions in the catalog source -# ----------------------------------------------------------------------------- -wd_version: 5.5.0 # Operator version 4.6.5 -model_train_version: 1.2.13 # Operator version 1.1.15 -elasticsearch_version: 1.1.2071 # Operator version 1.1.2071 -couchdb_version: 1.0.13 # Operator version 2.2.1 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 8.10.x: 8.10.14 # Updated - 8.11.x: 8.11.11 # Updated - 8.9.x: 8.9.10 # No Update -mas_assist_version: - 8.10.x: 8.7.4 # No Update - 8.11.x: 8.8.3 # No Update - 8.9.x: 8.6.5 # No Update -mas_hputilities_version: - 8.10.x: 8.6.5 # No Update - 8.11.x: "" # Not Supported - 8.9.x: 8.5.3 # No Update -mas_iot_version: - 8.10.x: 8.7.13 # Updated - 8.11.x: 8.8.9 # Updated - 8.9.x: 8.6.9 # No Update -mas_manage_version: - 8.10.x: 8.6.14 # Updated - 8.11.x: 8.7.8 # Updated - 8.9.x: 8.5.9 # No Update -mas_monitor_version: - 8.10.x: 8.10.10 # Updated - 8.11.x: 8.11.7 # Updated - 8.9.x: 8.9.6 # No Update -mas_optimizer_version: - 8.10.x: 8.4.6 # Updated - 8.11.x: 8.5.5 # Updated - 8.9.x: 8.3.3 # No Update -mas_predict_version: - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.2 # No Update - 8.9.x: 8.7.2 # No Update -mas_visualinspection_version: - 8.10.x: 8.8.4 # Updated - 8.11.x: 8.9.3 # Updated - 8.9.x: 8.7.1 # No Update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 5.0.23 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.5 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -wd_extras_version: 1.0.4 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.1.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.6.6 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v9-240625-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v9-240625-amd64.yml deleted file mode 100644 index 56e20657a..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v9-240625-amd64.yml +++ /dev/null @@ -1,99 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog 240625 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:e74f646327e728aa523199e9dfb2e95efb67385755c3ac9f0763ab6563e63843 - -# Dependencies -# ----------------------------------------------------------------------------- -ibm_licensing_version: 4.2.3 # Operator version 4.2.3 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-licensing) -common_svcs_version: 4.3.0 # Operator version 4.3.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -cp4d_platform_version: 4.0.0+20231213.115030 # Operator version 5.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-datacore/4.0.0%2B20231213.115030) - -db2u_version: 5.6.2 # Operator version 110509.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 5.0.0 # Operator version 5.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 -sls_version: 3.9.1 # Operator version 3.9.1 (https://github.ibm.com/maximoappsuite/ibm-sls/releases) -tsm_version: 1.5.4 # Operator version 1.5.4 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases) -dd_version: 1.1.9 # Operator version 1.1.9 (https://github.ibm.com/maximoappsuite/ibm-data-dictionary/releases) -appconnect_version: 6.2.0 # Operator version 6.2.0 -wsl_version: 8.0.0 # Operator version 8.0.0 -wml_version: 8.0.0 # Operator version 5.0.0 -spark_version: 8.0.0 # Operator version 5.0.0 -cognos_version: 25.0.0 # Operator version 25.0.0 -couchdb_version: 1.0.13 # Operator version 2.2.1 (This is required for Assist 9.0, https://github.com/IBM/cloud-pak/blob/master/repo/case/ibm-couchdb/index.yaml) -elasticsearch_version: 1.1.2071 # Operator version 1.1.2071 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 9.0.x: 9.0.0 # Updated - 8.10.x: 8.10.15 # Updated - 8.11.x: 8.11.12 # Updated -mas_assist_version: - 9.0.x: 9.0.0 # Updated - 8.10.x: 8.7.5 # Updated - 8.11.x: 8.8.4 # Updated -mas_hputilities_version: - 9.0.x: "" # Not Supported - 8.10.x: 8.6.5 # No Update - 8.11.x: "" # Not Supported -mas_iot_version: - 9.0.x: 9.0.0 # Updated - 8.10.x: 8.7.14 # Updated - 8.11.x: 8.8.10 # Updated -mas_manage_version: - 9.0.x: 9.0.0 # Updated - 8.10.x: 8.6.15 # Updated - 8.11.x: 8.7.9 # Updated -mas_monitor_version: - 9.0.x: 9.0.0 # Updated - 8.10.x: 8.10.11 # Updated - 8.11.x: 8.11.8 # Updated -mas_optimizer_version: - 9.0.x: 9.0.0 # Updated - 8.10.x: 8.4.7 # Updated - 8.11.x: 8.5.6 # Updated -mas_predict_version: - 9.0.x: 9.0.0 # Updated - 8.10.x: 8.8.2 # No Update - 8.11.x: 8.9.3 # Updated -mas_visualinspection_version: - 9.0.x: 9.0.0 # Updated - 8.10.x: 8.8.4 # No update - 8.11.x: 8.9.3 # No update - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 6.0.12 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.5 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -#wd_extras_version: 1.0.4 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.1.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.8.0 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v9-240730-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v9-240730-amd64.yml deleted file mode 100644 index 7b494a00c..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v9-240730-amd64.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog 240625 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:c38ceab72008bd8ae6ecb4bf8e29453e6a6e6d8ecbdb1e40b465fef401c51d56 - -# Dependencies -# ----------------------------------------------------------------------------- -ibm_licensing_version: 4.2.4 # Operator version 4.2.4 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-licensing) -common_svcs_version: 4.3.0 # Operator version 4.3.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -cp4d_platform_version: 4.0.0+20231213.115030 # Operator version 5.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-datacore/4.0.0%2B20231213.115030) - -db2u_version: 5.6.2 # Operator version 110509.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 5.0.1 # Operator version 5.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change -sls_version: 3.9.1 # Operator version 3.9.1 (https://github.ibm.com/maximoappsuite/ibm-sls/releases) -tsm_version: 1.5.4 # Operator version 1.5.4 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases) -dd_version: 1.1.10 # updated # Operator version 1.1.10 (https://github.ibm.com/maximoappsuite/ibm-data-dictionary/releases) -appconnect_version: 6.2.0 # Operator version 6.2.0 # sticking to 6.2.0 version # Please do Not Change -wsl_version: 8.0.0 # Operator version 8.0.0 -wml_version: 8.0.0 # Operator version 5.0.0 -spark_version: 8.0.0 # Operator version 5.0.0 -cognos_version: 25.0.0 # Operator version 25.0.0 -couchdb_version: 1.0.13 # Operator version 2.2.1 (This is required for Assist 9.0, https://github.com/IBM/cloud-pak/blob/master/repo/case/ibm-couchdb/index.yaml) -elasticsearch_version: 1.1.2153 # Operator version 1.1.2153 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 9.0.x: 9.0.1 # Updated - 8.10.x: 8.10.16 # Updated - 8.11.x: 8.11.13 # Updated -mas_assist_version: - 9.0.x: 9.0.1 # Updated - 8.10.x: 8.7.6 # Updated - 8.11.x: 8.8.5 # Updated -mas_hputilities_version: - 9.0.x: "" # Not Supported - 8.10.x: 8.6.6 # Updated - 8.11.x: "" # Not Supported -mas_iot_version: - 9.0.x: 9.0.1 # Updated - 8.10.x: 8.7.15 # Updated - 8.11.x: 8.8.11 # Updated -mas_manage_version: - 9.0.x: 9.0.1 # Updated - 8.10.x: 8.6.16 # Updated - 8.11.x: 8.7.10 # Updated -mas_monitor_version: - 9.0.x: 9.0.1 # Updated - 8.10.x: 8.10.12 # Updated - 8.11.x: 8.11.9 # Updated -mas_optimizer_version: - 9.0.x: 9.0.1 # Updated - 8.10.x: 8.4.8 # Updated - 8.11.x: 8.5.7 # Updated -mas_predict_version: - 9.0.x: 9.0.0 # No Update - 8.10.x: 8.8.3 # Updated - 8.11.x: 8.9.3 # No Update -mas_visualinspection_version: - 9.0.x: 9.0.1 # Updated - 8.10.x: 8.8.4 # No update - 8.11.x: 8.9.4 # Updated - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 6.0.12 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 -mongo_extras_version_7: 7.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.5 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -#wd_extras_version: 1.0.4 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.1.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.8.0 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v9-240827-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v9-240827-amd64.yml deleted file mode 100644 index 0c4847e13..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v9-240827-amd64.yml +++ /dev/null @@ -1,99 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog 240625 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:bcace8fa41d14ce1b818467243bbc8469f7538ac4bc46198139454626f99f367 - -# Dependencies -# ----------------------------------------------------------------------------- -ibm_licensing_version: 4.2.4 # Operator version 4.2.4 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-licensing) -common_svcs_version: 4.3.0 # Operator version 4.3.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -cp4d_platform_version: 4.0.0+20231213.115030 # Operator version 5.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-datacore/4.0.0%2B20231213.115030) - -db2u_version: 5.6.2 # Operator version 110509.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 5.0.1 # Operator version 5.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change -sls_version: 3.10.0 # updated # Operator version 3.10.0 (https://github.ibm.com/maximoappsuite/ibm-sls/releases) -tsm_version: 1.5.4 # Operator version 1.5.4 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases) -dd_version: 1.1.11 # updated # Operator version 1.1.11 (https://github.ibm.com/maximoappsuite/ibm-data-dictionary/releases) -appconnect_version: 6.2.0 # Operator version 6.2.0 # sticking to 6.2.0 version # Please do Not Change -wsl_version: 8.0.0 # Operator version 8.0.0 -wml_version: 8.0.0 # Operator version 5.0.0 -spark_version: 8.0.0 # Operator version 5.0.0 -cognos_version: 25.0.0 # Operator version 25.0.0 -couchdb_version: 1.0.13 # Operator version 2.2.1 (This is required for Assist 9.0, https://github.com/IBM/cloud-pak/blob/master/repo/case/ibm-couchdb/index.yaml) -elasticsearch_version: 1.1.2153 # Operator version 1.1.2153 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 9.0.x: 9.0.2 # Updated - 8.10.x: 8.10.17 # Updated - 8.11.x: 8.11.14 # Updated -mas_assist_version: - 9.0.x: 9.0.2 # Updated - 8.10.x: 8.7.7 # Updated - 8.11.x: 8.8.6 # Updated -mas_hputilities_version: - 9.0.x: "" # Not Supported - 8.10.x: 8.6.7 # Updated - 8.11.x: "" # Not Supported -mas_iot_version: - 9.0.x: 9.0.2 # Updated - 8.10.x: 8.7.16 # Updated - 8.11.x: 8.8.12 # Updated -mas_manage_version: - 9.0.x: 9.0.2 # Updated - 8.10.x: 8.6.17 # Updated - 8.11.x: 8.7.11 # Updated -mas_monitor_version: - 9.0.x: 9.0.2 # Updated - 8.10.x: 8.10.13 # Updated - 8.11.x: 8.11.10 # Updated -mas_optimizer_version: - 9.0.x: 9.0.2 # Updated - 8.10.x: 8.4.9 # Updated - 8.11.x: 8.5.8 # Updated -mas_predict_version: - 9.0.x: 9.0.1 # Updated - 8.10.x: 8.8.3 # No Update - 8.11.x: 8.9.3 # No Update -mas_visualinspection_version: - 9.0.x: 9.0.2 # Updated - 8.10.x: 8.8.4 # No update - 8.11.x: 8.9.5 # Updated - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 6.0.12 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.5 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -#wd_extras_version: 1.0.4 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.1.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.8.0 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v9-241003-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v9-241003-amd64.yml deleted file mode 100644 index f713845c6..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v9-241003-amd64.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog 240625 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:ba2237481b2ce7407698775a71f44daaecd2db6f74855f20829ac1bceeddb3d9 - -# Dependencies -# ----------------------------------------------------------------------------- -ibm_licensing_version: 4.2.7 # Operator version 4.2.7 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-licensing) -common_svcs_version: 4.3.0 # check once why we have 4.3.0 in all previous versions since so long it's 4.3.0 # Operator version 4.3.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -cp4d_platform_version: 4.0.0+20231213.115030 # Operator version 5.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-datacore/4.0.0%2B20231213.115030) - -db2u_version: 6.0.1+20240704.142950.9960 # Operator version 110509.0.2 to find the version 6.0.1, search CASE_VERSION in db2u, catalog.yaml into ibm-maximo-operator-catalog (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 5.0.1 # Operator version 5.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change -sls_version: 3.10.0 # No Update # Operator version 3.10.0 (https://github.ibm.com/maximoappsuite/ibm-sls/releases) -tsm_version: 1.5.4 # Operator version 1.5.4 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases) -dd_version: 1.1.12 # Updated # Operator version 1.1.11 (https://github.ibm.com/maximoappsuite/ibm-data-dictionary/releases) -appconnect_version: 6.2.0 # Operator version 6.2.0 # sticking to 6.2.0 version # Please do Not Change -wsl_version: 8.0.0 # Operator version 8.0.0 -wml_version: 8.0.0 # Operator version 5.0.0 -spark_version: 8.0.0 # Operator version 5.0.0 -cognos_version: 25.0.0 # Operator version 25.0.0 -couchdb_version: 1.0.13 # Operator version 2.2.1 (This is required for Assist 9.0, https://github.com/IBM/cloud-pak/blob/master/repo/case/ibm-couchdb/index.yaml) -elasticsearch_version: 1.1.2238 # Operator version 1.1.2238 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 9.0.x: 9.0.3 # Updated - 8.10.x: 8.10.18 # Updated - 8.11.x: 8.11.15 # Updated -mas_assist_version: - 9.0.x: 9.0.2 # No Update - 8.10.x: 8.7.7 # No Update - 8.11.x: 8.8.6 # No Update -mas_hputilities_version: - 9.0.x: "" # Not Supported - 8.10.x: 8.6.7 # No Update - 8.11.x: "" # Not Supported -mas_iot_version: - 9.0.x: 9.0.3 # Updated - 8.10.x: 8.7.17 # Updated - 8.11.x: 8.8.13 # Updated -mas_manage_version: - 9.0.x: 9.0.3 # Updated - 8.10.x: 8.6.18 # Updated - 8.11.x: 8.7.12 # Updated -mas_monitor_version: - 9.0.x: 9.0.3 # Updated - 8.10.x: 8.10.14 # Updated - 8.11.x: 8.11.11 # Updated -mas_optimizer_version: - 9.0.x: 9.0.3 # Updated - 8.10.x: 8.4.10 # Updated - 8.11.x: 8.5.9 # Updated -mas_predict_version: - 9.0.x: 9.0.2 # Updated - 8.10.x: 8.8.3 # No Update - 8.11.x: 8.9.5 # Updated -mas_visualinspection_version: - 9.0.x: 9.0.3 # Updated - 8.10.x: 8.8.4 # No update - 8.11.x: 8.9.6 # Updated - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 7.0.12 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 -mongo_extras_version_7: 7.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.6 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -#wd_extras_version: 1.0.4 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.1.1 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.8.0 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/casebundles/v9-241107-amd64.yml b/ibm/mas_devops/common_vars/casebundles/v9-241107-amd64.yml deleted file mode 100644 index 6309a238e..000000000 --- a/ibm/mas_devops/common_vars/casebundles/v9-241107-amd64.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -# Case bundle configuration for IBM Maximo Operator Catalog 240625 -# ----------------------------------------------------------------------------- -# In the future this won't be necessary as we'll be able to mirror from the -# catalog itself, but not everything in the catalog supports this yet (including MAS) -# so we need to use the CASE bundle mirror process still. - -catalog_digest: sha256:2d470131ab6948d5262553547fafa1b472fa25690be5abba8719ad7493cd8911 - -# Dependencies -# ----------------------------------------------------------------------------- -ibm_licensing_version: 4.2.7 # Operator version 4.2.7 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-licensing) -common_svcs_version: 4.3.0 # check once why we have 4.3.0 in all previous versions since so long it's 4.3.0 # Operator version 4.3.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services) -cp4d_platform_version: 4.0.0+20231213.115030 # Operator version 5.0.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-datacore/4.0.0%2B20231213.115030) - -db2u_version: 6.0.1+20240704.142950.9960 # Operator version 110509.0.2 to find the version 6.0.1, search CASE_VERSION in db2u, catalog.yaml into ibm-maximo-operator-catalog (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator) -events_version: 5.0.1 # Operator version 5.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator) -uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change -sls_version: 3.10.1 # Updated # Operator version 3.10.0 (https://github.ibm.com/maximoappsuite/ibm-sls/releases) -tsm_version: 1.5.4 # Operator version 1.5.4 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases) -dd_version: 1.1.12 # No Update # Operator version 1.1.11 (https://github.ibm.com/maximoappsuite/ibm-data-dictionary/releases) -appconnect_version: 6.2.0 # Operator version 6.2.0 # sticking to 6.2.0 version # Please do Not Change -wsl_version: 8.0.0 # Operator version 8.0.0 -wml_version: 8.0.0 # Operator version 5.0.0 -spark_version: 8.0.0 # Operator version 5.0.0 -cognos_version: 25.0.0 # Operator version 25.0.0 -couchdb_version: 1.0.13 # Operator version 2.2.1 (This is required for Assist 9.0, https://github.com/IBM/cloud-pak/blob/master/repo/case/ibm-couchdb/index.yaml) -elasticsearch_version: 1.1.2238 # Operator version 1.1.2238 - - -# Maximo Application Suite -# ----------------------------------------------------------------------------- -mas_core_version: - 9.0.x: 9.0.5 # Updated - 8.10.x: 8.10.19 # Updated - 8.11.x: 8.11.16 # Updated -mas_assist_version: - 9.0.x: 9.0.2 # No Update - 8.10.x: 8.7.7 # No Update - 8.11.x: 8.8.6 # No Update -mas_hputilities_version: - 9.0.x: "" # Not Supported - 8.10.x: 8.6.7 # No Update - 8.11.x: "" # Not Supported -mas_iot_version: - 9.0.x: 9.0.4 # Updated - 8.10.x: 8.7.18 # Updated - 8.11.x: 8.8.14 # Updated -mas_manage_version: - 9.0.x: 9.0.5 # Updated - 8.10.x: 8.6.19 # Updated - 8.11.x: 8.7.13 # Updated -mas_monitor_version: - 9.0.x: 9.0.4 # Updated - 8.10.x: 8.10.14 # No Update - 8.11.x: 8.11.12 # Updated -mas_optimizer_version: - 9.0.x: 9.0.4 # Updated - 8.10.x: 8.4.11 # Updated - 8.11.x: 8.5.10 # Updated -mas_predict_version: - 9.0.x: 9.0.2 # No Update - 8.10.x: 8.8.4 # Updated - 8.11.x: 8.9.5 # No Update -mas_visualinspection_version: - 9.0.x: 9.0.4 # Updated - 8.10.x: 8.8.4 # No update - 8.11.x: 8.9.7 # Updated - -# Extra Images for UDS -# ------------------------------------------------------------------------------ -uds_extras_version: 1.5.0 - -# Extra Images for Mongo -# ------------------------------------------------------------------------------ -mongo_extras_version_default: 7.0.12 -mongo_extras_version: "{{ lookup('env', 'MONGODB_VERSION') | default(mongo_extras_version_default, True) }}" - -# Variables used to mirror additional mongo image versions -mongo_extras_version_4: 4.4.21 -mongo_extras_version_5: 5.0.23 -mongo_extras_version_6: 6.0.12 -mongo_extras_version_7: 7.0.12 - -# Extra Images for Db2u -# ------------------------------------------------------------------------------ -db2u_extras_version: 1.0.6 - -# Extra Images for IBM Watson Discovery -# ------------------------------------------------------------------------------ -#wd_extras_version: 1.0.4 - -# Extra Images for Amlen -# ------------------------------------------------------------------------------ -amlen_extras_version: 1.1.2 - -# Default Cloud Pak for Data version -# ------------------------------------------------------------------------------ -cpd_product_version_default: 4.8.0 -cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default(cpd_product_version_default, true) }}" diff --git a/ibm/mas_devops/common_vars/default_storage_classes.yml b/ibm/mas_devops/common_vars/default_storage_classes.yml deleted file mode 100644 index 4d9375042..000000000 --- a/ibm/mas_devops/common_vars/default_storage_classes.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -default_storage_classes_rwx: - - ibmc-file-gold-gid - - ocs-storagecluster-cephfs - - ocs-external-storagecluster-cephfs - - efs - - azurefiles-premium - - nfs-client - -default_storage_classes_rwx_nogid: - - ibmc-file-gold - - ocs-storagecluster-cephfs - - efs - - azurefiles-premium - - nfs-client - -default_storage_classes_rwo: - - ibmc-block-gold - - ocs-storagecluster-ceph-rbd - - ocs-external-storagecluster-ceph-rbd - - gp3-csi - - managed-premium - - nfs-client diff --git a/ibm/mas_devops/playbooks/br_core.yml b/ibm/mas_devops/playbooks/br_core.yml index 8f4fcf757..2e51a0ccc 100644 --- a/ibm/mas_devops/playbooks/br_core.yml +++ b/ibm/mas_devops/playbooks/br_core.yml @@ -31,7 +31,6 @@ that: masbr_action in ["backup", "restore"] fail_msg: "masbr_action is required and must be set to 'backup' or 'restore'" - # Common checks before run tasks # ------------------------------------------------------------------------- - name: "Before run tasks" @@ -40,34 +39,13 @@ _job_type: "{{ masbr_action }}" tasks: - # Create k8s Job to run backup/restore tasks - # ------------------------------------------------------------------------- - - name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" + - name: "MongoDB: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.mongodb vars: - _rt_playbook_name: "br_core" - _rt_env: - - name: "MASBR_ACTION" - value: "{{ masbr_action }}" - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - - # Run backup/restore tasks locally - # ------------------------------------------------------------------------- - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job - block: - - name: "MongoDB: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.mongodb - vars: - mongodb_action: "{{ masbr_action }}" - mas_app_id: "core" + mongodb_action: "{{ masbr_action }}" + mas_app_id: "core" - - name: "MAS Core namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_backup_restore + - name: "MAS Core namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_backup_restore diff --git a/ibm/mas_devops/playbooks/br_db2.yml b/ibm/mas_devops/playbooks/br_db2.yml index 5d7c30a88..94d7b9b9b 100644 --- a/ibm/mas_devops/playbooks/br_db2.yml +++ b/ibm/mas_devops/playbooks/br_db2.yml @@ -47,33 +47,10 @@ _job_type: "{{ masbr_action }}" tasks: - # Create k8s Job to run backup/restore tasks - # ------------------------------------------------------------------------- - - name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" - vars: - _rt_playbook_name: "br_db2" - _rt_env: - - name: "MASBR_ACTION" - value: "{{ masbr_action }}" - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "DB2_INSTANCE_NAME" - value: "{{ db2_instance_id }}" - - name: "DB2_NAMESPACE" - value: "{{ db2_namespace }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - # Run backup/restore tasks locally # ------------------------------------------------------------------------- - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job - block: - - name: "Db2 {{ masbr_action }}" - include_role: - name: ibm.mas_devops.db2 - vars: - db2_action: "{{ masbr_action }}" + - name: "Db2 {{ masbr_action }}" + include_role: + name: ibm.mas_devops.db2 + vars: + db2_action: "{{ masbr_action }}" diff --git a/ibm/mas_devops/playbooks/br_health.yml b/ibm/mas_devops/playbooks/br_health.yml index 5c4ae8610..5c440bc50 100644 --- a/ibm/mas_devops/playbooks/br_health.yml +++ b/ibm/mas_devops/playbooks/br_health.yml @@ -53,57 +53,31 @@ _job_type: "{{ masbr_action }}" tasks: - # Create k8s Job to run backup/restore tasks - # ------------------------------------------------------------------------- - - name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" + - name: "MongoDB: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.mongodb vars: - _rt_playbook_name: "br_health" - _rt_env: - - name: "MASBR_ACTION" - value: "{{ masbr_action }}" - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - name: "MAS_WORKSPACE_ID" - value: "{{ mas_workspace_id }}" - - name: "DB2_INSTANCE_NAME" - value: "{{ db2_instance_id }}" - - name: "DB2_NAMESPACE" - value: "{{ db2_namespace }}" - - # Run backup/restore tasks locally - # ------------------------------------------------------------------------- - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job - block: - - name: "MongoDB: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.mongodb - vars: - mongodb_action: "{{ masbr_action }}" - mas_app_id: "health" + mongodb_action: "{{ masbr_action }}" + mas_app_id: "health" - - name: "Db2: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.db2 - vars: - db2_action: "{{ masbr_action }}" + - name: "Db2: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.db2 + vars: + db2_action: "{{ masbr_action }}" - - name: "MAS Core namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_backup_restore + - name: "MAS Core namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_backup_restore - - name: "Manage namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_app_backup_restore - vars: - mas_app_id: "manage" + - name: "Manage namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_app_backup_restore + vars: + mas_app_id: "manage" - - name: "Health namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_app_backup_restore - vars: - mas_app_id: "health" + - name: "Health namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_app_backup_restore + vars: + mas_app_id: "health" diff --git a/ibm/mas_devops/playbooks/br_iot.yml b/ibm/mas_devops/playbooks/br_iot.yml index 03845f9ca..cb5d2d2a5 100644 --- a/ibm/mas_devops/playbooks/br_iot.yml +++ b/ibm/mas_devops/playbooks/br_iot.yml @@ -53,51 +53,25 @@ _job_type: "{{ masbr_action }}" tasks: - # Create k8s Job to run backup/restore tasks - # ------------------------------------------------------------------------- - - name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" + - name: "MongoDB: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.mongodb vars: - _rt_playbook_name: "br_iot" - _rt_env: - - name: "MASBR_ACTION" - value: "{{ masbr_action }}" - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - name: "MAS_WORKSPACE_ID" - value: "{{ mas_workspace_id }}" - - name: "DB2_INSTANCE_NAME" - value: "{{ db2_instance_id }}" - - name: "DB2_NAMESPACE" - value: "{{ db2_namespace }}" - - # Run backup/restore tasks locally - # ------------------------------------------------------------------------- - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job - block: - - name: "MongoDB: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.mongodb - vars: - mongodb_action: "{{ masbr_action }}" - mas_app_id: "iot" + mongodb_action: "{{ masbr_action }}" + mas_app_id: "iot" - - name: "Db2: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.db2 - vars: - db2_action: "{{ masbr_action }}" + - name: "Db2: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.db2 + vars: + db2_action: "{{ masbr_action }}" - - name: "MAS Core namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_backup_restore + - name: "MAS Core namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_backup_restore - - name: "IoT namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_app_backup_restore - vars: - mas_app_id: "iot" + - name: "IoT namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_app_backup_restore + vars: + mas_app_id: "iot" diff --git a/ibm/mas_devops/playbooks/br_manage.yml b/ibm/mas_devops/playbooks/br_manage.yml index c4fa4c012..a14e6f80d 100644 --- a/ibm/mas_devops/playbooks/br_manage.yml +++ b/ibm/mas_devops/playbooks/br_manage.yml @@ -34,11 +34,6 @@ that: mas_workspace_id is defined and mas_workspace_id != "" fail_msg: "mas_workspace_id is required" - - name: "Fail if db2_instance_id is not provided" - assert: - that: db2_instance_id is defined and db2_instance_id != "" - fail_msg: "db2_instance_id is required" - - name: "Fail if masbr_action is not set to backup|restore" assert: that: masbr_action in ["backup", "restore"] @@ -53,51 +48,26 @@ _job_type: "{{ masbr_action }}" tasks: - # Create k8s Job to run backup/restore tasks - # ------------------------------------------------------------------------- - - name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" + - name: "MongoDB: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.mongodb vars: - _rt_playbook_name: "br_manage" - _rt_env: - - name: "MASBR_ACTION" - value: "{{ masbr_action }}" - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - name: "MAS_WORKSPACE_ID" - value: "{{ mas_workspace_id }}" - - name: "DB2_INSTANCE_NAME" - value: "{{ db2_instance_id }}" - - name: "DB2_NAMESPACE" - value: "{{ db2_namespace }}" + mongodb_action: "{{ masbr_action }}" + mas_app_id: "manage" - # Run backup/restore tasks locally - # ------------------------------------------------------------------------- - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job - block: - - name: "MongoDB: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.mongodb - vars: - mongodb_action: "{{ masbr_action }}" - mas_app_id: "manage" - - - name: "Db2: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.db2 - vars: - db2_action: "{{ masbr_action }}" + - name: "Db2: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.db2 + vars: + db2_action: "{{ masbr_action }}" + when: db2_instance_id is defined and db2_instance_id != "" - - name: "MAS Core namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_backup_restore + - name: "MAS Core namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_backup_restore - - name: "Manage namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_app_backup_restore - vars: - mas_app_id: "manage" + - name: "Manage namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_app_backup_restore + vars: + mas_app_id: "manage" diff --git a/ibm/mas_devops/playbooks/br_mongodb.yml b/ibm/mas_devops/playbooks/br_mongodb.yml index b2389d7ed..c15a65af8 100644 --- a/ibm/mas_devops/playbooks/br_mongodb.yml +++ b/ibm/mas_devops/playbooks/br_mongodb.yml @@ -43,35 +43,8 @@ _job_type: "{{ masbr_action }}" tasks: - # Create k8s Job to run backup/restore tasks - # ------------------------------------------------------------------------- - - name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" + - name: "MongoDB: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.mongodb vars: - _rt_playbook_name: "br_mongodb" - _rt_env: - - name: "MASBR_ACTION" - value: "{{ masbr_action }}" - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - name: "MAS_APP_ID" - value: "{{ mas_app_id }}" - - name: "MONGODB_PROVIDER" - value: "{{ mongodb_provider }}" - - name: "MONGODB_NAMESPACE" - value: "{{ mongodb_namespace }}" - - - # Run backup/restore tasks locally - # ------------------------------------------------------------------------- - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job - block: - - name: "MongoDB: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.mongodb - vars: - mongodb_action: "{{ masbr_action }}" + mongodb_action: "{{ masbr_action }}" diff --git a/ibm/mas_devops/playbooks/br_monitor.yml b/ibm/mas_devops/playbooks/br_monitor.yml index 0ffdc36ed..ef2c68f88 100644 --- a/ibm/mas_devops/playbooks/br_monitor.yml +++ b/ibm/mas_devops/playbooks/br_monitor.yml @@ -53,57 +53,31 @@ _job_type: "{{ masbr_action }}" tasks: - # Create k8s Job to run backup/restore tasks - # ------------------------------------------------------------------------- - - name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" + - name: "MongoDB: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.mongodb vars: - _rt_playbook_name: "br_monitor" - _rt_env: - - name: "MASBR_ACTION" - value: "{{ masbr_action }}" - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - name: "MAS_WORKSPACE_ID" - value: "{{ mas_workspace_id }}" - - name: "DB2_INSTANCE_NAME" - value: "{{ db2_instance_id }}" - - name: "DB2_NAMESPACE" - value: "{{ db2_namespace }}" - - # Run backup/restore tasks locally - # ------------------------------------------------------------------------- - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job - block: - - name: "MongoDB: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.mongodb - vars: - mongodb_action: "{{ masbr_action }}" - mas_app_id: "monitor" + mongodb_action: "{{ masbr_action }}" + mas_app_id: "monitor" - - name: "Db2: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.db2 - vars: - db2_action: "{{ masbr_action }}" + - name: "Db2: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.db2 + vars: + db2_action: "{{ masbr_action }}" - - name: "MAS Core namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_backup_restore + - name: "MAS Core namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_backup_restore - - name: "IoT namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_app_backup_restore - vars: - mas_app_id: "iot" + - name: "IoT namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_app_backup_restore + vars: + mas_app_id: "iot" - - name: "Monitor namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_app_backup_restore - vars: - mas_app_id: "monitor" + - name: "Monitor namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_app_backup_restore + vars: + mas_app_id: "monitor" diff --git a/ibm/mas_devops/playbooks/br_optimizer.yml b/ibm/mas_devops/playbooks/br_optimizer.yml index 475161b2f..041d209d9 100644 --- a/ibm/mas_devops/playbooks/br_optimizer.yml +++ b/ibm/mas_devops/playbooks/br_optimizer.yml @@ -53,57 +53,31 @@ _job_type: "{{ masbr_action }}" tasks: - # Create k8s Job to run backup/restore tasks - # ------------------------------------------------------------------------- - - name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" + - name: "MongoDB: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.mongodb vars: - _rt_playbook_name: "br_optimizer" - _rt_env: - - name: "MASBR_ACTION" - value: "{{ masbr_action }}" - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - name: "MAS_WORKSPACE_ID" - value: "{{ mas_workspace_id }}" - - name: "DB2_INSTANCE_NAME" - value: "{{ db2_instance_id }}" - - name: "DB2_NAMESPACE" - value: "{{ db2_namespace }}" - - # Run backup/restore tasks locally - # ------------------------------------------------------------------------- - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job - block: - - name: "MongoDB: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.mongodb - vars: - mongodb_action: "{{ masbr_action }}" - mas_app_id: "optimizer" + mongodb_action: "{{ masbr_action }}" + mas_app_id: "optimizer" - - name: "Db2: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.db2 - vars: - db2_action: "{{ masbr_action }}" + - name: "Db2: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.db2 + vars: + db2_action: "{{ masbr_action }}" - - name: "MAS Core namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_backup_restore + - name: "MAS Core namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_backup_restore - - name: "Manage namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_app_backup_restore - vars: - mas_app_id: "manage" + - name: "Manage namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_app_backup_restore + vars: + mas_app_id: "manage" - - name: "Optimizer namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_app_backup_restore - vars: - mas_app_id: "optimizer" + - name: "Optimizer namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_app_backup_restore + vars: + mas_app_id: "optimizer" diff --git a/ibm/mas_devops/playbooks/br_visualinspection.yml b/ibm/mas_devops/playbooks/br_visualinspection.yml index 3c62c0465..feeddc1ca 100644 --- a/ibm/mas_devops/playbooks/br_visualinspection.yml +++ b/ibm/mas_devops/playbooks/br_visualinspection.yml @@ -46,42 +46,19 @@ _job_type: "{{ masbr_action }}" tasks: - # Create k8s Job to run backup/restore tasks - # ------------------------------------------------------------------------- - - name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" + - name: "MongoDB: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.mongodb vars: - _rt_playbook_name: "br_visualinspection" - _rt_env: - - name: "MASBR_ACTION" - value: "{{ masbr_action }}" - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - name: "MAS_WORKSPACE_ID" - value: "{{ mas_workspace_id }}" - + mongodb_action: "{{ masbr_action }}" + mas_app_id: "visualinspection" - # Run backup/restore tasks locally - # ------------------------------------------------------------------------- - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job - block: - - name: "MongoDB: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.mongodb - vars: - mongodb_action: "{{ masbr_action }}" - mas_app_id: "visualinspection" + - name: "MAS Core namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_backup_restore - - name: "MAS Core namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_backup_restore - - - name: "Visual Inspection namespace: {{ masbr_action }}" - include_role: - name: ibm.mas_devops.suite_app_backup_restore - vars: - mas_app_id: "visualinspection" + - name: "Visual Inspection namespace: {{ masbr_action }}" + include_role: + name: ibm.mas_devops.suite_app_backup_restore + vars: + mas_app_id: "visualinspection" diff --git a/ibm/mas_devops/playbooks/mirror_add_assist.yml b/ibm/mas_devops/playbooks/mirror_add_assist.yml index b03dcdbe0..d5a16cd9a 100644 --- a/ibm/mas_devops/playbooks/mirror_add_assist.yml +++ b/ibm/mas_devops/playbooks/mirror_add_assist.yml @@ -8,49 +8,45 @@ mirror_mode: "{{ lookup('env', 'MIRROR_MODE') | default ('direct', True) }}" pre_tasks: - - name: "Get stats for the catalog file" - ansible.builtin.stat: - path: "{{ playbook_dir }}/../common_vars/casebundles/{{ catalog_tag }}.yml" - register: catalog_file_stats + - name: "Load Catalog Metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: mas_catalog_metadata - - name: "Debug stats if the digest image map file exists" - ansible.builtin.set_fact: - file_catalog_tag: "{{ (catalog_file_stats.stat.exists|bool) | ternary(catalog_tag, '@@MAS_LATEST_CATALOG@@') }}" - - - name: Load CASE bundle versions - include_vars: - file: "{{ playbook_dir }}/../common_vars/casebundles/{{ file_catalog_tag }}.yml" + - name: "Check that the catalog is a know catalog" + assert: + that: mas_catalog_metadata.failed == false roles: # 1. IBM Maximo Assist # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: mirror_mode != "from-filesystem" vars: case_name: ibm-mas-assist - case_version: "{{ lookup('env', 'MAS_ASSIST_VERSION') | default (mas_assist_version[mas_channel], True) }}" + case_version: "{{ lookup('env', 'MAS_ASSIST_VERSION') | default (mas_catalog_metadata.mas_assist_version[mas_channel], True) }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images vars: manifest_name: ibm-mas-assist - manifest_version: "{{ lookup('env', 'MAS_ASSIST_VERSION') | default (mas_assist_version[mas_channel], True) }}" + manifest_version: "{{ lookup('env', 'MAS_ASSIST_VERSION') | default (mas_catalog_metadata.mas_assist_version[mas_channel], True) }}" # 2. IBM MAS Assist dependency from 9.0 - ibm-couchdb # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - couchdb_version is defined - mirror_mode != "from-filesystem" vars: case_name: ibm-couchdb - case_version: "{{ couchdb_version }}" + case_version: "{{ mas_catalog_metadata.couchdb_version }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: couchdb_version is defined vars: manifest_name: ibm-couchdb - manifest_version: "{{ couchdb_version }}" + manifest_version: "{{ mas_catalog_metadata.couchdb_version }}" diff --git a/ibm/mas_devops/playbooks/mirror_add_hputilities.yml b/ibm/mas_devops/playbooks/mirror_add_hputilities.yml deleted file mode 100644 index d5973f896..000000000 --- a/ibm/mas_devops/playbooks/mirror_add_hputilities.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -- hosts: localhost - any_errors_fatal: true - - vars: - catalog_tag: "{{ lookup('env', 'MAS_CATALOG_VERSION') | default ('@@MAS_LATEST_CATALOG@@', True) }}" - mas_channel: "{{ lookup('env', 'MAS_CHANNEL') | default ('8.10.x', True) }}" - mirror_mode: "{{ lookup('env', 'MIRROR_MODE') | default ('direct', True) }}" - - pre_tasks: - - name: "Get stats for the catalog file" - ansible.builtin.stat: - path: "{{ playbook_dir }}/../common_vars/casebundles/{{ catalog_tag }}.yml" - register: catalog_file_stats - - - name: "Debug stats if the digest image map file exists" - ansible.builtin.set_fact: - file_catalog_tag: "{{ (catalog_file_stats.stat.exists|bool) | ternary(catalog_tag, '@@MAS_LATEST_CATALOG@@') }}" - - - name: Load CASE bundle versions - include_vars: - file: "{{ playbook_dir }}/../common_vars/casebundles/{{ file_catalog_tag }}.yml" - - roles: - # 1. IBM Maximo Health and Predict Utilities - # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare - when: mirror_mode != "from-filesystem" - vars: - case_name: ibm-mas-hputilities - case_version: "{{ lookup('env', 'MAS_HPUTILITIES_VERSION') | default (mas_hputilities_version[mas_channel], True) }}" - exclude_images: [] - ibmpak_skip_dependencies: false - - - name: ibm.mas_devops.mirror_images - vars: - manifest_name: ibm-mas-hputilities - manifest_version: "{{ lookup('env', 'MAS_HPUTILITIES_VERSION') | default (mas_hputilities_version[mas_channel], True) }}" diff --git a/ibm/mas_devops/playbooks/mirror_add_iot.yml b/ibm/mas_devops/playbooks/mirror_add_iot.yml index 62b556803..11459a790 100644 --- a/ibm/mas_devops/playbooks/mirror_add_iot.yml +++ b/ibm/mas_devops/playbooks/mirror_add_iot.yml @@ -8,47 +8,43 @@ mirror_mode: "{{ lookup('env', 'MIRROR_MODE') | default ('direct', True) }}" pre_tasks: - - name: "Get stats for the catalog file" - ansible.builtin.stat: - path: "{{ playbook_dir }}/../common_vars/casebundles/{{ catalog_tag }}.yml" - register: catalog_file_stats + - name: "Load Catalog Metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: mas_catalog_metadata - - name: "Debug stats if the digest image map file exists" - ansible.builtin.set_fact: - file_catalog_tag: "{{ (catalog_file_stats.stat.exists|bool) | ternary(catalog_tag, '@@MAS_LATEST_CATALOG@@') }}" - - - name: Load CASE bundle versions - include_vars: - file: "{{ playbook_dir }}/../common_vars/casebundles/{{ file_catalog_tag }}.yml" + - name: "Check that the catalog is a know catalog" + assert: + that: mas_catalog_metadata.failed == false roles: # 1. IBM Maximo IoT # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: mirror_mode != "from-filesystem" vars: case_name: ibm-mas-iot - case_version: "{{ lookup('env', 'MAS_IOT_VERSION') | default (mas_iot_version[mas_channel], True) }}" + case_version: "{{ lookup('env', 'MAS_IOT_VERSION') | default (mas_catalog_metadata.mas_iot_version[mas_channel], True) }}" exclude_images: [] - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images vars: manifest_name: ibm-mas-iot - manifest_version: "{{ lookup('env', 'MAS_IOT_VERSION') | default (mas_iot_version[mas_channel], True) }}" + manifest_version: "{{ lookup('env', 'MAS_IOT_VERSION') | default (mas_catalog_metadata.mas_iot_version[mas_channel], True) }}" # 2. Eclipse Amlen # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_extras_prepare + - role: ibm.mas_devops.mirror_extras_prepare when: - amlen_extras_version is defined - mirror_mode != "from-filesystem" vars: extras_name: amlen - extras_version: "{{ amlen_extras_version }}" + extras_version: "{{ mas_catalog_metadata.amlen_extras_version }}" - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: amlen_extras_version is defined vars: manifest_name: extras_amlen - manifest_version: "{{ amlen_extras_version }}" + manifest_version: "{{ mas_catalog_metadata.amlen_extras_version }}" diff --git a/ibm/mas_devops/playbooks/mirror_add_manage.yml b/ibm/mas_devops/playbooks/mirror_add_manage.yml index 8ed7cde88..cb307155e 100644 --- a/ibm/mas_devops/playbooks/mirror_add_manage.yml +++ b/ibm/mas_devops/playbooks/mirror_add_manage.yml @@ -9,31 +9,27 @@ mirror_icd: "{{ lookup('env', 'MIRROR_MAS_ICD') }}" pre_tasks: - - name: "Get stats for the catalog file" - ansible.builtin.stat: - path: "{{ playbook_dir }}/../common_vars/casebundles/{{ catalog_tag }}.yml" - register: catalog_file_stats + - name: "Load Catalog Metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: mas_catalog_metadata - - name: "Debug stats if the digest image map file exists" - ansible.builtin.set_fact: - file_catalog_tag: "{{ (catalog_file_stats.stat.exists|bool) | ternary(catalog_tag, '@@MAS_LATEST_CATALOG@@') }}" - - - name: Load CASE bundle versions - include_vars: - file: "{{ playbook_dir }}/../common_vars/casebundles/{{ file_catalog_tag }}.yml" + - name: "Check that the catalog is a know catalog" + assert: + that: mas_catalog_metadata.failed == false roles: # 1. IBM Maximo Manage # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: mirror_mode != "from-filesystem" vars: case_name: ibm-mas-manage - case_version: "{{ lookup('env', 'MAS_MANAGE_VERSION') | default (mas_manage_version[mas_channel], True) }}" + case_version: "{{ lookup('env', 'MAS_MANAGE_VERSION') | default (mas_catalog_metadata.mas_manage_version[mas_channel], True) }}" exclude_images: [] image_group_filter: "{{ (mirror_icd == 'true') | ternary ('ibmmasManage,ibmMasManage,ibmmasMaximoIT', 'ibmmasManage,ibmMasManage') }}" - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images vars: manifest_name: ibm-mas-manage - manifest_version: "{{ lookup('env', 'MAS_MANAGE_VERSION') | default (mas_manage_version[mas_channel], True) }}" + manifest_version: "{{ lookup('env', 'MAS_MANAGE_VERSION') | default (mas_catalog_metadata.mas_manage_version[mas_channel], True) }}" diff --git a/ibm/mas_devops/playbooks/mirror_add_monitor.yml b/ibm/mas_devops/playbooks/mirror_add_monitor.yml index 7b203a09f..c2655022d 100644 --- a/ibm/mas_devops/playbooks/mirror_add_monitor.yml +++ b/ibm/mas_devops/playbooks/mirror_add_monitor.yml @@ -8,45 +8,41 @@ mirror_mode: "{{ lookup('env', 'MIRROR_MODE') | default ('direct', True) }}" pre_tasks: - - name: "Get stats for the catalog file" - ansible.builtin.stat: - path: "{{ playbook_dir }}/../common_vars/casebundles/{{ catalog_tag }}.yml" - register: catalog_file_stats + - name: "Load Catalog Metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: mas_catalog_metadata - - name: "Debug stats if the digest image map file exists" - ansible.builtin.set_fact: - file_catalog_tag: "{{ (catalog_file_stats.stat.exists|bool) | ternary(catalog_tag, '@@MAS_LATEST_CATALOG@@') }}" - - - name: Load CASE bundle versions - include_vars: - file: "{{ playbook_dir }}/../common_vars/casebundles/{{ file_catalog_tag }}.yml" + - name: "Check that the catalog is a know catalog" + assert: + that: mas_catalog_metadata.failed == false roles: # 1. IBM Asset Data Dictionary # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: mirror_mode != "from-filesystem" vars: case_name: ibm-data-dictionary - case_version: "{{ lookup('env', 'DATA_DICTIONARY_VERSION') | default (dd_version, True) }}" + case_version: "{{ lookup('env', 'DATA_DICTIONARY_VERSION') | default (mas_catalog_metadata.dd_version, True) }}" exclude_images: [] - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images vars: manifest_name: ibm-data-dictionary - manifest_version: "{{ lookup('env', 'DATA_DICTIONARY_VERSION') | default (dd_version, True) }}" + manifest_version: "{{ lookup('env', 'DATA_DICTIONARY_VERSION') | default (mas_catalog_metadata.dd_version, True) }}" # 2. IBM Maximo Monitor # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: mirror_mode != "from-filesystem" vars: case_name: ibm-mas-monitor - case_version: "{{ lookup('env', 'MAS_MONITOR_VERSION') | default (mas_monitor_version[mas_channel], True) }}" + case_version: "{{ lookup('env', 'MAS_MONITOR_VERSION') | default (mas_catalog_metadata.mas_monitor_version[mas_channel], True) }}" exclude_images: [] - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images vars: manifest_name: ibm-mas-monitor - manifest_version: "{{ lookup('env', 'MAS_MONITOR_VERSION') | default (mas_monitor_version[mas_channel], True) }}" + manifest_version: "{{ lookup('env', 'MAS_MONITOR_VERSION') | default (mas_catalog_metadata.mas_monitor_version[mas_channel], True) }}" diff --git a/ibm/mas_devops/playbooks/mirror_add_optimizer.yml b/ibm/mas_devops/playbooks/mirror_add_optimizer.yml index 5fafede1c..eaa51b043 100644 --- a/ibm/mas_devops/playbooks/mirror_add_optimizer.yml +++ b/ibm/mas_devops/playbooks/mirror_add_optimizer.yml @@ -8,30 +8,26 @@ mirror_mode: "{{ lookup('env', 'MIRROR_MODE') | default ('direct', True) }}" pre_tasks: - - name: "Get stats for the catalog file" - ansible.builtin.stat: - path: "{{ playbook_dir }}/../common_vars/casebundles/{{ catalog_tag }}.yml" - register: catalog_file_stats + - name: "Load Catalog Metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: mas_catalog_metadata - - name: "Debug stats if the digest image map file exists" - ansible.builtin.set_fact: - file_catalog_tag: "{{ (catalog_file_stats.stat.exists|bool) | ternary(catalog_tag, '@@MAS_LATEST_CATALOG@@') }}" - - - name: Load CASE bundle versions - include_vars: - file: "{{ playbook_dir }}/../common_vars/casebundles/{{ file_catalog_tag }}.yml" + - name: "Check that the catalog is a know catalog" + assert: + that: mas_catalog_metadata.failed == false roles: # 1. IBM Maximo Optimizer # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: mirror_mode != "from-filesystem" vars: case_name: ibm-mas-optimizer - case_version: "{{ lookup('env', 'MAS_OPTIMIZER_VERSION') | default (mas_optimizer_version[mas_channel], True) }}" + case_version: "{{ lookup('env', 'MAS_OPTIMIZER_VERSION') | default (mas_catalog_metadata.mas_optimizer_version[mas_channel], True) }}" exclude_images: [] - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images vars: manifest_name: ibm-mas-optimizer - manifest_version: "{{ lookup('env', 'MAS_OPTIMIZER_VERSION') | default (mas_optimizer_version[mas_channel], True) }}" + manifest_version: "{{ lookup('env', 'MAS_OPTIMIZER_VERSION') | default (mas_catalog_metadata.mas_optimizer_version[mas_channel], True) }}" diff --git a/ibm/mas_devops/playbooks/mirror_add_predict.yml b/ibm/mas_devops/playbooks/mirror_add_predict.yml index 24ef9e43f..d9d7a53af 100644 --- a/ibm/mas_devops/playbooks/mirror_add_predict.yml +++ b/ibm/mas_devops/playbooks/mirror_add_predict.yml @@ -8,31 +8,27 @@ mirror_mode: "{{ lookup('env', 'MIRROR_MODE') | default ('direct', True) }}" pre_tasks: - - name: "Get stats for the catalog file" - ansible.builtin.stat: - path: "{{ playbook_dir }}/../common_vars/casebundles/{{ catalog_tag }}.yml" - register: catalog_file_stats + - name: "Load Catalog Metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: mas_catalog_metadata - - name: "Debug stats if the digest image map file exists" - ansible.builtin.set_fact: - file_catalog_tag: "{{ (catalog_file_stats.stat.exists|bool) | ternary(catalog_tag, '@@MAS_LATEST_CATALOG@@') }}" - - - name: Load CASE bundle versions - include_vars: - file: "{{ playbook_dir }}/../common_vars/casebundles/{{ file_catalog_tag }}.yml" + - name: "Check that the catalog is a know catalog" + assert: + that: mas_catalog_metadata.failed == false roles: # 1. IBM Maximo Predict # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: mirror_mode != "from-filesystem" vars: case_name: ibm-mas-predict - case_version: "{{ lookup('env', 'MAS_PREDICT_VERSION') | default (mas_predict_version[mas_channel], True) }}" + case_version: "{{ lookup('env', 'MAS_PREDICT_VERSION') | default (mas_catalog_metadata.mas_predict_version[mas_channel], True) }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images vars: manifest_name: ibm-mas-predict - manifest_version: "{{ lookup('env', 'MAS_PREDICT_VERSION') | default (mas_predict_version[mas_channel], True) }}" + manifest_version: "{{ lookup('env', 'MAS_PREDICT_VERSION') | default (mas_catalog_metadata.mas_predict_version[mas_channel], True) }}" diff --git a/ibm/mas_devops/playbooks/mirror_add_visualinspection.yml b/ibm/mas_devops/playbooks/mirror_add_visualinspection.yml index 05134ac4f..6fadf429e 100644 --- a/ibm/mas_devops/playbooks/mirror_add_visualinspection.yml +++ b/ibm/mas_devops/playbooks/mirror_add_visualinspection.yml @@ -14,30 +14,26 @@ mirror_mode: "{{ lookup('env', 'MIRROR_MODE') | default ('direct', True) }}" pre_tasks: - - name: "Get stats for the catalog file" - ansible.builtin.stat: - path: "{{ playbook_dir }}/../common_vars/casebundles/{{ catalog_tag }}.yml" - register: catalog_file_stats + - name: "Load Catalog Metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: mas_catalog_metadata - - name: "Debug stats if the digest image map file exists" - ansible.builtin.set_fact: - file_catalog_tag: "{{ (catalog_file_stats.stat.exists|bool) | ternary(catalog_tag, '@@MAS_LATEST_CATALOG@@') }}" - - - name: Load CASE bundle versions - include_vars: - file: "{{ playbook_dir }}/../common_vars/casebundles/{{ file_catalog_tag }}.yml" + - name: "Check that the catalog is a know catalog" + assert: + that: mas_catalog_metadata.failed == false roles: # 1. IBM Maximo Visual Inspection # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: mirror_mode != "from-filesystem" vars: case_name: ibm-mas-visualinspection - case_version: "{{ lookup('env', 'MAS_VISUALINSPECTION_VERSION') | default (mas_visualinspection_version[mas_channel], True) }}" + case_version: "{{ lookup('env', 'MAS_VISUALINSPECTION_VERSION') | default (mas_catalog_metadata.mas_visualinspection_version[mas_channel], True) }}" exclude_images: [] - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images vars: manifest_name: ibm-mas-visualinspection - manifest_version: "{{ lookup('env', 'MAS_VISUALINSPECTION_VERSION') | default (mas_visualinspection_version[mas_channel], True) }}" + manifest_version: "{{ lookup('env', 'MAS_VISUALINSPECTION_VERSION') | default (mas_catalog_metadata.mas_visualinspection_version[mas_channel], True) }}" diff --git a/ibm/mas_devops/playbooks/mirror_core.yml b/ibm/mas_devops/playbooks/mirror_core.yml index 8953f12d9..d2e3c6722 100644 --- a/ibm/mas_devops/playbooks/mirror_core.yml +++ b/ibm/mas_devops/playbooks/mirror_core.yml @@ -8,31 +8,27 @@ mirror_mode: "{{ lookup('env', 'MIRROR_MODE') | default ('direct', True) }}" pre_tasks: - - name: "Get stats for the catalog file" - ansible.builtin.stat: - path: "{{ playbook_dir }}/../common_vars/casebundles/{{ catalog_tag }}.yml" - register: catalog_file_stats + - name: "Load Catalog Metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: mas_catalog_metadata - - name: "Debug stats if the digest image map file exists" - ansible.builtin.set_fact: - file_catalog_tag: "{{ (catalog_file_stats.stat.exists|bool) | ternary(catalog_tag, '@@MAS_LATEST_CATALOG@@') }}" - - - name: Load CASE bundle versions - include_vars: - file: "{{ playbook_dir }}/../common_vars/casebundles/{{ file_catalog_tag }}.yml" + - name: "Check that the catalog is a know catalog" + assert: + that: mas_catalog_metadata.failed == false roles: # 1. IBM Maximo Application Suite Core # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: mirror_mode != "from-filesystem" vars: case_name: ibm-mas - case_version: "{{ lookup('env', 'MAS_CORE_VERSION') | default (mas_core_version[mas_channel], True) | replace('_', '.') }}" + case_version: "{{ lookup('env', 'MAS_CORE_VERSION') | default (mas_catalog_metadata.mas_core_version[mas_channel], True) | replace('_', '.') }}" exclude_images: [] ibmpak_skip_dependencies: true - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images vars: manifest_name: ibm-mas - manifest_version: "{{ lookup('env', 'MAS_CORE_VERSION') | default (mas_core_version[mas_channel], True) | replace('_', '.') }}" + manifest_version: "{{ lookup('env', 'MAS_CORE_VERSION') | default (mas_catalog_metadata.mas_core_version[mas_channel], True) | replace('_', '.') }}" diff --git a/ibm/mas_devops/playbooks/mirror_dependencies.yml b/ibm/mas_devops/playbooks/mirror_dependencies.yml index c56d44e76..3d009b7ef 100644 --- a/ibm/mas_devops/playbooks/mirror_dependencies.yml +++ b/ibm/mas_devops/playbooks/mirror_dependencies.yml @@ -66,30 +66,33 @@ mirror_odf: "{{ lookup('env', 'MIRROR_ODF') | default ('False', True) | bool }}" pre_tasks: - - name: "Get stats for the catalog file" - ansible.builtin.stat: - path: "{{ playbook_dir }}/../common_vars/casebundles/{{ catalog_tag }}.yml" - register: catalog_file_stats + - name: "Load Catalog Metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: mas_catalog_metadata - - name: "Debug stats if the digest image map file exists" - ansible.builtin.set_fact: - file_catalog_tag: "{{ (catalog_file_stats.stat.exists|bool) | ternary(catalog_tag, '@@MAS_LATEST_CATALOG@@') }}" + - name: "Check that the catalog is a know catalog" + assert: + that: mas_catalog_metadata.failed == false - - name: Load CASE bundle versions - include_vars: - file: "{{ playbook_dir }}/../common_vars/casebundles/{{ file_catalog_tag }}.yml" + # If the CPD_PRODUCT_VERSION environment variable wasn't set, then use the default from the catalog metadata + - name: "Set default cpd_product_version (if necessary)" + when: cpd_product_version == "" + set_fact: + cpd_product_version: "{{ mas_catalog_metadata.cpd_product_version_default }}" roles: # 1. IBM Maximo Operator Catalog # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_extras_prepare + - role: ibm.mas_devops.mirror_extras_prepare when: - mirror_catalog - mirror_mode != "from-filesystem" vars: extras_name: catalog + catalog_digest: "{{ mas_catalog_metadata.catalog_digest }}" - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_catalog vars: manifest_name: catalog @@ -98,91 +101,91 @@ # 2. MongoDb Community Edition # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_extras_prepare + - role: ibm.mas_devops.mirror_extras_prepare when: - mirror_mongoce - mirror_mode != "from-filesystem" vars: extras_name: mongoce - extras_version: "{{ mongo_extras_version }}" + extras_version: "{{ mas_catalog_metadata.mongo_extras_version_default }}" - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_mongoce vars: manifest_name: extras_mongoce - manifest_version: "{{ mongo_extras_version }}" + manifest_version: "{{ mas_catalog_metadata.mongo_extras_version_default }}" # Mirror Mongo v4 specifically when requested - - name: ibm.mas_devops.mirror_extras_prepare + - role: ibm.mas_devops.mirror_extras_prepare when: - mirror_mode != "from-filesystem" - mirror_mongoce_v4 vars: extras_name: mongoce - extras_version: "{{ mongo_extras_version_4 }}" + extras_version: "{{ mas_catalog_metadata.mongo_extras_version_4 }}" - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_mongoce_v4 vars: manifest_name: extras_mongoce - manifest_version: "{{ mongo_extras_version_4 }}" + manifest_version: "{{ mas_catalog_metadata.mongo_extras_version_4 }}" # Mirror Mongo v5 specifically when requested - - name: ibm.mas_devops.mirror_extras_prepare + - role: ibm.mas_devops.mirror_extras_prepare when: - mirror_mode != "from-filesystem" - mirror_mongoce_v5 vars: extras_name: mongoce - extras_version: "{{ mongo_extras_version_5 }}" + extras_version: "{{ mas_catalog_metadata.mongo_extras_version_5 }}" - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_mongoce_v5 vars: manifest_name: extras_mongoce - manifest_version: "{{ mongo_extras_version_5 }}" + manifest_version: "{{ mas_catalog_metadata.mongo_extras_version_5 }}" # Mirror Mongo v6 specifically when requested - - name: ibm.mas_devops.mirror_extras_prepare + - role: ibm.mas_devops.mirror_extras_prepare when: - mirror_mode != "from-filesystem" - mirror_mongoce_v6 vars: extras_name: mongoce - extras_version: "{{ mongo_extras_version_6 }}" + extras_version: "{{ mas_catalog_metadata.mongo_extras_version_6 }}" - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_mongoce_v6 vars: manifest_name: extras_mongoce - manifest_version: "{{ mongo_extras_version_6 }}" + manifest_version: "{{ mas_catalog_metadata.mongo_extras_version_6 }}" # Mirror Mongo v7 specifically when requested - - name: ibm.mas_devops.mirror_extras_prepare + - role: ibm.mas_devops.mirror_extras_prepare when: - mirror_mode != "from-filesystem" - mirror_mongoce_v7 vars: extras_name: mongoce - extras_version: "{{ mongo_extras_version_7 }}" + extras_version: "{{ mas_catalog_metadata.mongo_extras_version_7 }}" - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_mongoce_v7 vars: manifest_name: extras_mongoce - manifest_version: "{{ mongo_extras_version_7 }}" + manifest_version: "{{mas_catalog_metadata.mongo_extras_version_7 }}" # 3. IBM Cloud Pak Foundation Services # ------------------------------------------------------------------------- # Just mirror IBM Cloud Pak Foundation Services images 'mirror_common_svcs' is set, or if CPD 4.8+ is being mirrored - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_common_svcs or (cpd_48_or_higher and mirror_cp4d) - mirror_mode != "from-filesystem" vars: case_name: ibm-cp-common-services - case_version: "{{ common_svcs_version }}" + case_version: "{{ mas_catalog_metadata.common_svcs_version }}" exclude_images: - ibm-auditlogging - ibm-cpp @@ -191,20 +194,20 @@ - ibm-events-operator ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_common_svcs or (cpd_48_or_higher and mirror_cp4d) vars: manifest_name: ibm-cp-common-services - manifest_version: "{{ common_svcs_version }}" + manifest_version: "{{ mas_catalog_metadata.common_svcs_version }}" - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_cp4d - - ibm_zen_version is defined + - mas_catalog_metadata.ibm_zen_version is defined - mirror_mode != "from-filesystem" vars: case_name: ibm-zen - case_version: "{{ ibm_zen_version }}" + case_version: "{{ mas_catalog_metadata.ibm_zen_version }}" exclude_images: - ibm-auditlogging - ibm-cpp @@ -213,24 +216,24 @@ - ibm-events-operator ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: - mirror_cp4d - - ibm_zen_version is defined + - mas_catalog_metadata.ibm_zen_version is defined vars: manifest_name: ibm-zen - manifest_version: "{{ ibm_zen_version }}" + manifest_version: "{{ mas_catalog_metadata.ibm_zen_version }}" # Mirroring another version for Cloud Pak Foundation Services - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_common_svcs - mirror_mode != "from-filesystem" - - common_svcs_version_1 is defined - - common_svcs_version_1 != "" + - mas_catalog_metadata.common_svcs_version_1 is defined + - mas_catalog_metadata.common_svcs_version_1 != "" vars: case_name: ibm-cp-common-services - case_version: "{{ common_svcs_version_1 }}" + case_version: "{{ mas_catalog_metadata.common_svcs_version_1 }}" exclude_images: - ibm-auditlogging - ibm-cpp @@ -239,67 +242,67 @@ - ibm-events-operator ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: - mirror_common_svcs - - common_svcs_version_1 is defined - - common_svcs_version_1 != "" + - mas_catalog_metadata.common_svcs_version_1 is defined + - mas_catalog_metadata.common_svcs_version_1 != "" vars: manifest_name: ibm-cp-common-services - manifest_version: "{{ common_svcs_version_1 }}" + manifest_version: "{{ mas_catalog_metadata.common_svcs_version_1 }}" # 4. IBM Suite License Service # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_sls - mirror_mode != "from-filesystem" vars: case_name: ibm-sls - case_version: "{{ lookup('env', 'SLS_VERSION') | default (sls_version, True) }}" + case_version: "{{ lookup('env', 'SLS_VERSION') | default (mas_catalog_metadata.sls_version, True) }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_sls vars: manifest_name: ibm-sls - manifest_version: "{{ lookup('env', 'SLS_VERSION') | default (sls_version, True) }}" + manifest_version: "{{ lookup('env', 'SLS_VERSION') | default (mas_catalog_metadata.sls_version, True) }}" # 5. IBM Truststore Manager # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_tsm - mirror_mode != "from-filesystem" vars: case_name: ibm-truststore-mgr - case_version: "{{ lookup('env', 'TSM_VERSION') | default (tsm_version, True) }}" + case_version: "{{ lookup('env', 'TSM_VERSION') | default (mas_catalog_metadata.tsm_version, True) }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_tsm vars: manifest_name: ibm-truststore-mgr - manifest_version: "{{ lookup('env', 'TSM_VERSION') | default (tsm_version, True) }}" + manifest_version: "{{ lookup('env', 'TSM_VERSION') | default (mas_catalog_metadata.tsm_version, True) }}" # 6.1 CP4D Platform # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_cp4d - mirror_mode != "from-filesystem" vars: case_name: ibm-cp-datacore - case_version: "{{ cp4d_platform_version }}" + case_version: "{{ mas_catalog_metadata.cp4d_platform_version }}" exclude_images: [] ibmpak_skip_dependencies: true - - name: ibm.mas_devops.mirror_extras_prepare + - role: ibm.mas_devops.mirror_extras_prepare when: - mirror_cp4d - cpd_48 @@ -308,7 +311,7 @@ extras_name: cp4d extras_version: "4.8.0" - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: - mirror_cp4d - cpd_48 @@ -316,238 +319,239 @@ manifest_name: extras_cp4d manifest_version: "4.8.0" - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_cp4d vars: manifest_name: ibm-cp-datacore - manifest_version: "{{ cp4d_platform_version }}" + manifest_version: "{{ mas_catalog_metadata.cp4d_platform_version }}" # 6.2 CP4D Platform - IBM Licensing dependency # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - cpd_48_or_higher - mirror_cp4d - mirror_mode != "from-filesystem" vars: case_name: ibm-licensing - case_version: "{{ ibm_licensing_version }}" + case_version: "{{ mas_catalog_metadata.ibm_licensing_version }}" exclude_images: [] ibmpak_skip_dependencies: true - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: - cpd_48_or_higher - mirror_cp4d - mirror_mode != "from-filesystem" vars: manifest_name: ibm-licensing - manifest_version: "{{ ibm_licensing_version }}" + manifest_version: "{{ mas_catalog_metadata.ibm_licensing_version }}" # 6.3 IBM Watson Studio and Watson Machine Learning dependency - ibm-ccs # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_wsl or mirror_wml - mirror_mode != "from-filesystem" vars: case_name: ibm-ccs - case_version: "{{ wsl_version }}" + case_version: "{{ mas_catalog_metadata.wsl_version }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_wsl or mirror_wml vars: manifest_name: ibm-ccs - manifest_version: "{{ wsl_version }}" + manifest_version: "{{ mas_catalog_metadata.wsl_version }}" # 7.1 IBM Watson Studio dependency - ibm-datarefinery # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_wsl - mirror_mode != "from-filesystem" vars: case_name: ibm-datarefinery - case_version: "{{ wsl_version }}" + case_version: "{{ mas_catalog_metadata.wsl_version }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_wsl vars: manifest_name: ibm-datarefinery - manifest_version: "{{ wsl_version }}" + manifest_version: "{{ mas_catalog_metadata.wsl_version }}" # 7.2 IBM Watson Studio dependency - ibm-wsl-runtimes # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_wsl - mirror_mode != "from-filesystem" vars: case_name: ibm-wsl-runtimes - case_version: "{{ wsl_version }}" + case_version: "{{ mas_catalog_metadata.wsl_version }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_wsl vars: manifest_name: ibm-wsl-runtimes - manifest_version: "{{ wsl_version }}" + manifest_version: "{{ mas_catalog_metadata.wsl_version }}" # 7.3 IBM Watson Studio dependency - ibm-elasticsearch-operator # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_wsl - mirror_mode != "from-filesystem" vars: case_name: ibm-elasticsearch-operator - case_version: "{{ elasticsearch_version }}" + case_version: "{{ mas_catalog_metadata.elasticsearch_version }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_wsl vars: manifest_name: ibm-elasticsearch-operator - manifest_version: "{{ elasticsearch_version }}" + manifest_version: "{{ mas_catalog_metadata.elasticsearch_version }}" # 7.4 IBM Watson Studio # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_wsl - mirror_mode != "from-filesystem" vars: case_name: ibm-wsl - case_version: "{{ wsl_version }}" + case_version: "{{ mas_catalog_metadata.wsl_version }}" exclude_images: [] ibmpak_skip_dependencies: true - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_wsl vars: manifest_name: ibm-wsl - manifest_version: "{{ wsl_version }}" + manifest_version: "{{ mas_catalog_metadata.wsl_version }}" # 8. IBM Watson Machine Learning # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_wml - mirror_mode != "from-filesystem" vars: case_name: ibm-wml-cpd - case_version: "{{ wml_version }}" + case_version: "{{ mas_catalog_metadata.wml_version }}" exclude_images: [] ibmpak_skip_dependencies: true - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_wml vars: manifest_name: ibm-wml-cpd - manifest_version: "{{ wml_version }}" + manifest_version: "{{ mas_catalog_metadata.wml_version }}" # 9. Analytics Engine (Spark) # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_spark - mirror_mode != "from-filesystem" vars: case_name: ibm-analyticsengine - case_version: "{{ spark_version }}" + case_version: "{{ mas_catalog_metadata.spark_version }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_spark vars: manifest_name: ibm-analyticsengine - manifest_version: "{{ spark_version }}" + manifest_version: "{{ mas_catalog_metadata.spark_version }}" # 10. IBM Db2u # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_db2u - mirror_mode != "from-filesystem" vars: case_name: ibm-db2uoperator - case_version: "{{ db2u_version }}" + case_version: "{{ mas_catalog_metadata.db2u_version }}" exclude_images: [] - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_db2u vars: manifest_name: "ibm-db2uoperator" - manifest_version: "{{ db2u_version }}" + manifest_version: "{{ mas_catalog_metadata.db2u_version }}" mirror_single_arch: amd64 - - name: ibm.mas_devops.mirror_extras_prepare + - role: ibm.mas_devops.mirror_extras_prepare when: - mirror_db2u - mirror_mode != "from-filesystem" vars: extras_name: db2u - extras_version: "{{ db2u_extras_version }}" + extras_version: "{{ mas_catalog_metadata.db2u_extras_version }}" - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_db2u vars: manifest_name: extras_db2u - manifest_version: "{{ db2u_extras_version }}" + manifest_version: "{{ mas_catalog_metadata.db2u_extras_version }}" # 11. Cognos Analytics # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_cognos - mirror_mode != "from-filesystem" vars: case_name: ibm-cognos-analytics-prod - case_version: "{{ cognos_version }}" + case_version: "{{ mas_catalog_metadata.cognos_version }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_cognos vars: manifest_name: ibm-cognos-analytics-prod - manifest_version: "{{ cognos_version }}" + manifest_version: "{{ mas_catalog_metadata.cognos_version }}" # 12. App Connect # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_case_prepare + - role: ibm.mas_devops.mirror_case_prepare when: - mirror_appconnect - mirror_mode != "from-filesystem" vars: case_name: ibm-appconnect - case_version: "{{ appconnect_version }}" + case_version: "{{ mas_catalog_metadata.appconnect_version }}" exclude_images: [] ibmpak_skip_dependencies: false - - name: ibm.mas_devops.mirror_images + - role: ibm.mas_devops.mirror_images when: mirror_appconnect vars: manifest_name: ibm-appconnect - manifest_version: "{{ appconnect_version }}" + manifest_version: "{{ mas_catalog_metadata.appconnect_version }}" - # 14. odf - some extras needed + + # 13. ODF - some extras needed # ------------------------------------------------------------------------- - - name: ibm.mas_devops.mirror_extras_prepare + - role: ibm.mas_devops.mirror_extras_prepare when: - mirror_odf - mirror_mode != "from-filesystem" diff --git a/ibm/mas_devops/plugins/action/apply_subscription.py b/ibm/mas_devops/plugins/action/apply_subscription.py new file mode 100644 index 000000000..f76ef3d0a --- /dev/null +++ b/ibm/mas_devops/plugins/action/apply_subscription.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 + +import logging +import urllib3 +from ansible_collections.kubernetes.core.plugins.module_utils.common import get_api_client +from ansible.errors import AnsibleError +from ansible.plugins.action import ActionBase + +from mas.devops.olm import applySubscription, OLMException + +urllib3.disable_warnings() # Disabling warnings will prevent InsecureRequestWarnings from dynClient +logging.basicConfig(level=logging.INFO, format='%(asctime)s %(name)-20s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S') + +class ActionModule(ActionBase): + """ + Usage Example + ------------- + tasks: + - name: "Apply Subscription" + ibm.mas_devops.apply_subscription: + namespace: test-namespace + package_name: ibm-sls + package_channel: 3.x + register: subscription + """ + def run(self, tmp=None, task_vars=None): + super(ActionModule, self).run(tmp, task_vars) + + # Target subscription + namespace = self._task.args.get('namespace', None) + config = self._task.args.get('config', None) + + # From which package? + packageName = self._task.args.get('package_name', None) + packageChannel = self._task.args.get('package_channel', None) + + # From which catalog? + catalogSource = self._task.args.get('catalog_source', None) + catalogSourceNamespace = self._task.args.get('catalog_source_namespace', None) + + if namespace is None: + raise AnsibleError(f"Error: namespace argument was not provided") + if not isinstance(packageName, str): + raise AnsibleError(f"Error: packageName argument is not a string") + + # Initialize DynamicClient and apply the Subscription + dynClient = get_api_client() + try: + subscription = applySubscription(dynClient, namespace, packageName, packageChannel, catalogSource, catalogSourceNamespace, config) + except OLMException as e: + raise AnsibleError(f"Error applying subscription: {e}") + + if subscription is None: + return dict( + message=f"Failed to apply subscription for {packageName} in {namespace}", + success=False, + failed=True, + changed=False + ) + + return dict( + message=f"Successfully applied subscription for {packageName} in {namespace}: {subscription.metadata.name}", + success=True, + failed=False, + changed=False, + **subscription.to_dict() + ) diff --git a/ibm/mas_devops/plugins/action/get_catalog_info.py b/ibm/mas_devops/plugins/action/get_catalog_info.py new file mode 100644 index 000000000..0d3c3c303 --- /dev/null +++ b/ibm/mas_devops/plugins/action/get_catalog_info.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 + +from ansible.errors import AnsibleError +from ansible.plugins.action import ActionBase + +from mas.devops.data import getCatalog + +class ActionModule(ActionBase): + """ + Usage Example + ------------- + tasks: + - name: "Load catalog metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + fail_if_catalog_does_not_exist: true + register: mas_catalog_metadata + """ + def run(self, tmp=None, task_vars=None): + super(ActionModule, self).run(tmp, task_vars) + + catalogId = self._task.args.get('mas_catalog_version', None) + failIfCatalogDoesNotExist = self._task.args.get('fail_if_catalog_does_not_exist', False) + + if catalogId is None: + raise AnsibleError(f"Error: mas_catalog_version argument was not provided") + if not isinstance(catalogId, str): + raise AnsibleError(f"Error: mas_catalog_version argument is not a string") + if not isinstance(failIfCatalogDoesNotExist, bool): + raise AnsibleError(f"Error: fail_if_catalog_does_not_exist argument is not a boolean") + + catalogData = getCatalog(catalogId) + + if catalogData is None: + return dict( + message=f"Failed to load catalog information for {catalogId}", + success=False, + failed=failIfCatalogDoesNotExist, + changed=False, + id=catalogId + ) + + return dict( + message=f"Successfully loaded catalog information for {catalogId}", + success=True, + failed=False, + changed=False, + id=catalogId, + **catalogData + ) diff --git a/ibm/mas_devops/plugins/action/get_default_storage_classes.py b/ibm/mas_devops/plugins/action/get_default_storage_classes.py new file mode 100644 index 000000000..c87b8d1da --- /dev/null +++ b/ibm/mas_devops/plugins/action/get_default_storage_classes.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 + +import urllib3 +from ansible_collections.kubernetes.core.plugins.module_utils.common import get_api_client +from ansible.plugins.action import ActionBase + +from mas.devops.mas import getDefaultStorageClasses + + +# Disabling warnings will prevent InsecureRequestWarnings from dynClient +urllib3.disable_warnings() + + +class ActionModule(ActionBase): + """ + Usage Example + ------------- + tasks: + - name: "Lookup default storage classes" + ibm.mas_devops.get_default_storage_classes: + register: defaultStorageClasses + """ + def run(self, tmp=None, task_vars=None): + super(ActionModule, self).run(tmp, task_vars) + + # Initialize DynamicClient and grab the task args + dynClient = get_api_client() + storageClasses = getDefaultStorageClasses(dynClient) + + # We don't want to fail if we can't find any default storage classes, doing so will + # result in roles/playbooks failing in environments where none of the default + # storage classes are available. We use the success=false to track when we couldn't + # find a default storage class, which does not trigger Ansible treating the action as + # failed. + if storageClasses.provider is None: + return dict( + message=f"Failed to find any default supported storage classes", + success=False, + failed=False, + changed=False, + **vars(storageClasses) + ) + + return dict( + message=f"Successfully found default storage classes ({storageClasses.provider})", + success=True, + failed=False, + changed=False, + **vars(storageClasses) + ) diff --git a/ibm/mas_devops/plugins/action/get_newest_catalog_tag.py b/ibm/mas_devops/plugins/action/get_newest_catalog_tag.py new file mode 100644 index 000000000..2c70cd511 --- /dev/null +++ b/ibm/mas_devops/plugins/action/get_newest_catalog_tag.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 + +from ansible.plugins.action import ActionBase +from ansible.errors import AnsibleError + +from mas.devops.data import getNewestCatalogTag + +class ActionModule(ActionBase): + def run(self, tmp=None, task_vars=None): + super(ActionModule, self).run(tmp, task_vars) + + # Initialize DynamicClient and grab the task args + arch = self._task.args['arch'] + catalogTag = getNewestCatalogTag(arch) + + if catalogTag is None: + raise AnsibleError(f"Error: No catalogs available for {arch}") + + return dict( + message=f"Successfully found newest catalog for {arch}", + failed=False, + changed=False, + arch=arch, + result=catalogTag + ) diff --git a/ibm/mas_devops/plugins/action/update_ibm_entitlement.py b/ibm/mas_devops/plugins/action/update_ibm_entitlement.py new file mode 100644 index 000000000..7bd98b146 --- /dev/null +++ b/ibm/mas_devops/plugins/action/update_ibm_entitlement.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python3 + +import logging +import urllib3 +from ansible_collections.kubernetes.core.plugins.module_utils.common import get_api_client +from ansible.errors import AnsibleError +from ansible.plugins.action import ActionBase + +from mas.devops.ocp import createNamespace +from mas.devops.mas import updateIBMEntitlementKey + +urllib3.disable_warnings() # Disabling warnings will prevent InsecureRequestWarnings from dynClient +logging.basicConfig(level=logging.INFO, format='%(asctime)s %(name)-20s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S') + +class ActionModule(ActionBase): + """ + Usage Example + ------------- + tasks: + - name: "Update IBM Entitlement Key" + ibm.mas_devops.update_ibm_entitlement: + namespace: "{{ mas_namespace }}" + icr_username: "{{ icr_username }}" + icr_password: "{{ icr_password }}" + artifactory_username: "{{ artifactory_username }}" + artifactory_password: "{{ artifactory_token }}" + register: secret + """ + def run(self, tmp=None, task_vars=None): + super(ActionModule, self).run(tmp, task_vars) + + namespace = self._task.args.get('namespace', None) + icrUsername = self._task.args.get('icr_username', None) + icrPassword = self._task.args.get('icr_password', None) + artifactoryUsername = self._task.args.get('artifactory_username', None) + artifactoryPassword = self._task.args.get('artifactory_password', None) + secretName = self._task.args.get('secret_name', None) + + if namespace is None: + raise AnsibleError(f"Error: namespace argument was not provided") + + # Initialize DynamicClient, ensure the namespace exists, and create/update the entitlement secret + dynClient = get_api_client() + createNamespace(dynClient, namespace) + secret = updateIBMEntitlementKey(dynClient, namespace, icrUsername, icrPassword, artifactoryUsername, artifactoryPassword, secretName) + + return dict( + message=f"Successfully updated IBM entitlement in {namespace}: {secret.metadata.name}", + success=True, + failed=False, + changed=False, + **secret.to_dict() + ) diff --git a/ibm/mas_devops/plugins/filter/filters.py b/ibm/mas_devops/plugins/filter/filters.py index d4cf386aa..bac70ec61 100644 --- a/ibm/mas_devops/plugins/filter/filters.py +++ b/ibm/mas_devops/plugins/filter/filters.py @@ -8,6 +8,7 @@ import yaml import re + def private_vlan(vlans): """ filter: private_vlan @@ -49,6 +50,7 @@ def public_vlan(vlans): public_vlan = [x['id'] for x in vlans if x['type'] == 'public'][0] return public_vlan + def appws_components(components): """ filter: appws_components @@ -75,6 +77,7 @@ def appws_components(components): return components_yaml + def db2_overwrite_config(components): """ filter: db2_overwrite_config @@ -102,6 +105,7 @@ def db2_overwrite_config(components): return components_yaml + def string2dict(_string = None): """ filter: string2dict @@ -130,6 +134,7 @@ def string2dict(_string = None): _dict = {} return _dict + def getAnnotations(annotations = None): """ filter: getAnnotations @@ -158,6 +163,7 @@ def getAnnotations(annotations = None): annotation_dict = {} return annotation_dict + def addAnnotationBlock(cr_definition,annotation_block = None): """ filter: addAnnotationBlock @@ -195,6 +201,7 @@ def addAnnotationBlock(cr_definition,annotation_block = None): return cr_definition + def getResourceNames(resourceList): """ filter: getResourceNames @@ -215,30 +222,6 @@ def getResourceNames(resourceList): resourceNames.append(resource['metadata']['name']) return resourceNames -def defaultStorageClass(storageClassLookup, storageClassOptions): - """ - filter: defaultStorageClass - author: David Parker - version_added: 10.0 - short_description: Return a dict of known storage classes - description: - - This filter returns the name of an available storage class from the list of options provided - options: - _storageClassLookup: - description: list of storageclass resources - required: True - _storageClassOptions: - description: list of storageclasses that are supported, the first one found in the results will be used - required: True - notes: - - limited error handling, will not handle unexpected data currently - """ - for classOptionName in storageClassOptions: - for storageClass in storageClassLookup["resources"]: - if storageClass['metadata']['name'] == classOptionName: - return classOptionName - # We couldn't find a suitable storage class - return "" def getWSLProjectId(wslProjectLookup, wslProjectName): """ @@ -264,6 +247,7 @@ def getWSLProjectId(wslProjectLookup, wslProjectName): # Project not found return "" + def setManagePVC(data, mountPath, pvcName, pvcSize, storageClassName, accessMode, volumeName = None): """ filter: setManagePVC @@ -293,7 +277,7 @@ def setManagePVC(data, mountPath, pvcName, pvcSize, storageClassName, accessMode """ pvc_list = [] - persistentVolumes = { + persistentVolumes = { "accessModes": [accessMode], "mountPath": mountPath, "pvcName": pvcName, @@ -308,6 +292,7 @@ def setManagePVC(data, mountPath, pvcName, pvcSize, storageClassName, accessMode pvc_list.append(pvc) return pvc_list + def setManageBirtProperties(data, rptRoute, rptServerBundleName): sb_list = [] rpt_bundle = { @@ -345,6 +330,7 @@ def setManageDoclinksProperties(data, doclinkPath01, bucketName, accessKey, secr sb_list.append(sb) return sb_list + def setManageFsDoclinksProperties(data, manage_url): sb_list = [] for sb in data: @@ -356,6 +342,7 @@ def setManageFsDoclinksProperties(data, manage_url): sb_list.append(sb) return sb_list + def _setSystemProperties(data, meaweb_value, oslc_rest_value, webapp_value, rest_webapp_value): sb_list = [] @@ -369,6 +356,7 @@ def _setSystemProperties(data, meaweb_value, oslc_rest_value, webapp_value, rest sb_list.append(sb) return sb_list + def format_pre_version_with_plus(data): """ Versions in format 9.0.0-pre.stable-3757 cannot be used to compare with the version @@ -379,6 +367,7 @@ def format_pre_version_with_plus(data): return data return data[::-1].replace("-", "+", 1)[::-1] + def format_pre_version_without_buildid(data): """ Versions in format 9.0.0-pre.stable-3757 cannot be used to compare with the version @@ -389,6 +378,7 @@ def format_pre_version_without_buildid(data): return data return data[:data.rfind("-")] + def get_db2_instance_name(binding_scope, mas_instance_id, mas_workspace_id, mas_application_id): if binding_scope == "": return "" @@ -399,6 +389,7 @@ def get_db2_instance_name(binding_scope, mas_instance_id, mas_workspace_id, mas_ } return jdbc_instance_names[binding_scope] + class FilterModule(object): def filters(self): return { @@ -410,7 +401,6 @@ def filters(self): 'string2dict': string2dict, 'getAnnotations': getAnnotations, 'getResourceNames': getResourceNames, - 'defaultStorageClass': defaultStorageClass, 'getWSLProjectId': getWSLProjectId, 'setManagePVC': setManagePVC, 'setManageBirtProperties': setManageBirtProperties, diff --git a/ibm/mas_devops/requirements.txt b/ibm/mas_devops/requirements.txt new file mode 100644 index 000000000..6974c01c5 --- /dev/null +++ b/ibm/mas_devops/requirements.txt @@ -0,0 +1 @@ +mas-devops >= 1.11.1 diff --git a/ibm/mas_devops/roles/aibroker/defaults/main.yml b/ibm/mas_devops/roles/aibroker/defaults/main.yml index 49d6eb667..c3b5aee6c 100644 --- a/ibm/mas_devops/roles/aibroker/defaults/main.yml +++ b/ibm/mas_devops/roles/aibroker/defaults/main.yml @@ -17,6 +17,10 @@ mas_entitlement_username: "{{ lookup('env', 'MAS_ENTITLEMENT_USERNAME') | defaul ibm_entitlement_key: "{{ lookup('env', 'IBM_ENTITLEMENT_KEY') }}" mas_entitlement_key: "{{ lookup('env', 'MAS_ENTITLEMENT_KEY') | default(ibm_entitlement_key, true) }}" +# Development Registry Entitlement +artifactory_username: "{{ lookup('env', 'ARTIFACTORY_USERNAME') | lower }}" +artifactory_token: "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}" + # MAS Annotation block # ----------------------------------------------------------------------------- mas_annotations: "{{ lookup('env', 'MAS_ANNOTATIONS') | default(None, true) }}" diff --git a/ibm/mas_devops/roles/aibroker/tasks/aibroker/main.yml b/ibm/mas_devops/roles/aibroker/tasks/aibroker/main.yml index 882666cfa..dd93accf7 100644 --- a/ibm/mas_devops/roles/aibroker/tasks/aibroker/main.yml +++ b/ibm/mas_devops/roles/aibroker/tasks/aibroker/main.yml @@ -17,18 +17,25 @@ kind: Namespace name: "{{ aibroker_namespace }}" + # Install the operator & create entitlement secret # ----------------------------------------------------------------------------- -- name: "Install IBM Maximo AI Broker Operator" - include_role: - name: ibm.mas_devops.install_operator - vars: +- name: "Create IBM Entitlement Key" + ibm.mas_devops.update_ibm_entitlement: namespace: "{{ aibroker_namespace }}" icr_username: "{{ mas_entitlement_username }}" icr_password: "{{ mas_entitlement_key }}" + artifactory_username: "{{ artifactory_username }}" + artifactory_password: "{{ artifactory_token }}" + +- name: "Create ibm-mas-aibroker Subscription" + ibm.mas_devops.apply_subscription: + namespace: "{{ aibroker_namespace }}" + package_name: ibm-mas-aibroker + package_channel: "{{ aibroker_channel }}" catalog_source: "{{ mas_catalog_source }}" - operator_group: "{{ lookup('template', 'templates/aibroker/operator-group.yml.j2') }}" - subscription: "{{ lookup('template', 'templates/aibroker/subscription.yml.j2') }}" + register: subscription + # Wait until the IBM Maximo AI Broker CRD is available # ----------------------------------------------------------------------------- diff --git a/ibm/mas_devops/roles/appconnect/tasks/determine-storage-classes.yml b/ibm/mas_devops/roles/appconnect/tasks/determine-storage-classes.yml index 3e0645b2a..112f88565 100644 --- a/ibm/mas_devops/roles/appconnect/tasks/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/appconnect/tasks/determine-storage-classes.yml @@ -1,38 +1,25 @@ --- -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" - -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses - -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" -# 2. Set Storage (Required) +# 2. Set storage class # ----------------------------------------------------------------------------- -- name: Default Storage if not set by user - when: appconnect_storage_class is not defined or appconnect_storage_class == "" +- name: "Use default storage class (RWX)" + when: + - appconnect_storage_class is not defined or appconnect_storage_class == "" + - defaultStorageClasses.success set_fact: - appconnect_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwx) }}" + appconnect_storage_class: "{{ defaultStorageClasses.rwx }}" - name: Assert that storage class has been defined assert: that: appconnect_storage_class is defined and appconnect_storage_class != "" fail_msg: "appconnect_storage_class must be defined" - -# 3. Debug storage class configuration -# ----------------------------------------------------------------------------- - name: "Debug AppConnect storage class configuration" debug: msg: - - "Storage class (appconnect) ...... {{ appconnect_storage_class }}" + - "Storage class (appconnect) ............. {{ appconnect_storage_class }}" diff --git a/ibm/mas_devops/roles/arcgis/defaults/main.yml b/ibm/mas_devops/roles/arcgis/defaults/main.yml index 1a36c08c9..7061a4ebf 100644 --- a/ibm/mas_devops/roles/arcgis/defaults/main.yml +++ b/ibm/mas_devops/roles/arcgis/defaults/main.yml @@ -29,6 +29,10 @@ mas_entitlement_username: "{{ lookup('env', 'MAS_ENTITLEMENT_USERNAME') | defaul ibm_entitlement_key: "{{ lookup('env', 'IBM_ENTITLEMENT_KEY') }}" mas_entitlement_key: "{{ lookup('env', 'MAS_ENTITLEMENT_KEY') | default(ibm_entitlement_key, true) }}" +# Development Registry Entitlement +artifactory_username: "{{ lookup('env', 'ARTIFACTORY_USERNAME') | lower }}" +artifactory_token: "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}" + # MAS Annotation block # ----------------------------------------------------------------------------- mas_annotations: "{{ lookup('env', 'MAS_ANNOTATIONS') | default(None, true) }}" diff --git a/ibm/mas_devops/roles/arcgis/tasks/main.yml b/ibm/mas_devops/roles/arcgis/tasks/main.yml index 51f1b196e..f5c5e78d3 100644 --- a/ibm/mas_devops/roles/arcgis/tasks/main.yml +++ b/ibm/mas_devops/roles/arcgis/tasks/main.yml @@ -43,18 +43,25 @@ state: present template: templates/namespace.yml.j2 + # 5. Install the operator & create entitlement secret # ----------------------------------------------------------------------------- -- name: "Install IBM Maximo Location Services for Esri Operator" - include_role: - name: ibm.mas_devops.install_operator - vars: +- name: "Create IBM Entitlement Key" + ibm.mas_devops.update_ibm_entitlement: namespace: "{{ mas_arcgis_namespace }}" icr_username: "{{ mas_entitlement_username }}" icr_password: "{{ mas_entitlement_key }}" + artifactory_username: "{{ artifactory_username }}" + artifactory_password: "{{ artifactory_token }}" + +- name: "Create ibm-mas-arcgis Subscription" + ibm.mas_devops.apply_subscription: + namespace: "{{ mas_arcgis_namespace }}" + package_name: ibm-mas-arcgis + package_channel: "{{ mas_arcgis_channel }}" catalog_source: "{{ mas_catalog_source }}" - operator_group: "{{ lookup('template', 'templates/operator-group.yml.j2') }}" - subscription: "{{ lookup('template', 'templates/subscription.yml.j2') }}" + register: subscription + # 6. Wait until the IBM Maximo Location Services CRD is available # ----------------------------------------------------------------------------- diff --git a/ibm/mas_devops/roles/arcgis/templates/operator-group.yml.j2 b/ibm/mas_devops/roles/arcgis/templates/operator-group.yml.j2 deleted file mode 100644 index 94d83a590..000000000 --- a/ibm/mas_devops/roles/arcgis/templates/operator-group.yml.j2 +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: ibm-mas-arcgis-operator-group - namespace: "{{ mas_arcgis_namespace }}" -{% if custom_labels is defined and custom_labels.items() %} - labels: -{% for key, value in custom_labels.items() %} - "{{ key }}": "{{ value }}" -{% endfor %} -{% endif %} -spec: - targetNamespaces: - - "{{ mas_arcgis_namespace }}" diff --git a/ibm/mas_devops/roles/arcgis/templates/subscription.yml.j2 b/ibm/mas_devops/roles/arcgis/templates/subscription.yml.j2 deleted file mode 100644 index 1e13237ee..000000000 --- a/ibm/mas_devops/roles/arcgis/templates/subscription.yml.j2 +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: ibm-mas-arcgis-operator - namespace: "{{ mas_arcgis_namespace }}" -spec: - channel: "{{ mas_arcgis_channel }}" - installPlanApproval: Automatic - name: ibm-mas-arcgis - source: "{{ mas_catalog_source }}" - sourceNamespace: openshift-marketplace diff --git a/ibm/mas_devops/roles/cert_manager/tasks/provider/redhat/install.yml b/ibm/mas_devops/roles/cert_manager/tasks/provider/redhat/install.yml index fbdbea160..5188054b1 100644 --- a/ibm/mas_devops/roles/cert_manager/tasks/provider/redhat/install.yml +++ b/ibm/mas_devops/roles/cert_manager/tasks/provider/redhat/install.yml @@ -70,11 +70,11 @@ # 4. Create RHCM Subscription # ----------------------------------------------------------------------------- - name: "install : Create Red Hat Certificate Manager Subscription" - include_tasks: "{{ role_path }}/../../common_tasks/create_subscription.yml" - vars: - subscription_namespace: "{{ cert_manager_operator_namespace }}" + ibm.mas_devops.apply_subscription: + namespace: "{{ cert_manager_operator_namespace }}" package_name: openshift-cert-manager-operator - channel_name: stable-v1 + package_channel: stable-v1 + register: subscription # 5. Wait for Subscription to be processed diff --git a/ibm/mas_devops/roles/cos/tasks/providers/ibm/deprovision.yml b/ibm/mas_devops/roles/cos/tasks/providers/ibm/deprovision.yml index 7cd1a38e8..d4427e1ae 100644 --- a/ibm/mas_devops/roles/cos/tasks/providers/ibm/deprovision.yml +++ b/ibm/mas_devops/roles/cos/tasks/providers/ibm/deprovision.yml @@ -39,7 +39,7 @@ - name: Fetch IBM Cloud Resource Group Id ibm.cloudcollection.ibm_resource_group_info: name: "{{ cos_resourcegroup }}" - cos_apikey: "{{ cos_apikey }}" + ibmcloud_api_key: "{{ cos_apikey }}" register: rg_info - name: Fetch IBM COS Information @@ -48,7 +48,7 @@ resource_group_id: "{{ rg_info.resource.id }}" service: "{{ cos_service }}" location: "{{ cos_location_info }}" - cos_apikey: "{{ cos_apikey }}" + ibmcloud_api_key: "{{ cos_apikey }}" register: cos_info failed_when: cos_info.rc != 0 and "No resource instance found" not in cos_info.stderr @@ -77,7 +77,7 @@ service: "cloud-object-storage" plan: "{{ cos_plan_type }}" location: "{{ cos_location_info }}" - cos_apikey: "{{ cos_apikey }}" + ibmcloud_api_key: "{{ cos_apikey }}" state: absent register: cos_deprovision_output diff --git a/ibm/mas_devops/roles/cp4d/README.md b/ibm/mas_devops/roles/cp4d/README.md index 32d09aeaa..2b9b48aa8 100644 --- a/ibm/mas_devops/roles/cp4d/README.md +++ b/ibm/mas_devops/roles/cp4d/README.md @@ -10,7 +10,7 @@ Currently supported Cloud Pak for Data release versions are: - 4.6.4 - 4.6.6 - 4.8.0 - - 5.0.0 (Install only, currently upgrade from 4.8 is not supported) + - 5.0.0 The role will automatically install or upgrade (if targeted to an existing CPD deployment) the corresponding Zen version associated to the chosen Cloud Pak for Data release, for example: @@ -23,6 +23,12 @@ The role will automatically install or upgrade (if targeted to an existing CPD d For more information about CPD versioning, see [IBM Cloud Pak for Data Operator and operand versions 4.9.x](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=planning-operator-operand-versions) or [IBM Cloud Pak for Data Operator and operand versions 5.0.x](https://www.ibm.com/docs/en/cloud-paks/cp-data/5.0.x?topic=planning-operator-operand-versions) +!!! info + - Install CP4D ControlPlane (~1 hour) + - Install CP4D Services (~30 Minutes - 1 hour for each service) + + All timings are estimates. + Cloud Pak for Data version mapping to MAS Catalog ==== @@ -31,7 +37,7 @@ If `CPD_PRODUCT_VERSION` variable is not defined, then the automation will try t Upgrade ------------------ -This role also supports seamlessly CPD control plane (or also called `Zen` service) minor version upgrades (CPD 4.6.x > CPD 4.8.x), and patch version upgrades (i.e CPD 4.8.0 -> CPD 4.8.1). +This role also supports seamlessly CPD control plane (or also called `Zen` service) minor version upgrades (CPD 4.6.x > CPD 4.8.0 or CPD 4.8.0 > CPD 5.0.0), and patch version upgrades (i.e CPD 4.6.0 -> CPD 4.6.6). All you need to do is to define `cpd_product_version` variable to the version you target to upgrade and run this role against an existing CPD instance. For more information about IBM Cloud Pak for Data upgrade process, refer to the [Cloud Pak for Data official documentation](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=upgrading). @@ -53,6 +59,63 @@ Cloud Pak for Data will be configured as a [specialized installation](https://ww Cloud Pak for Data deployment details ------------------ +### 5.0.x version: + +Cloud Pak for Data 5.0.x leverages Cloud Pak Foundational Services v4, which runs its deployments in isolated/dedicated scope model, that means that its dependencies will be grouped and installed within the Cloud Pak for Data related projects/namespaces. There are only two namespaces that will be used: CPD instance namespace (e.g `ibm-cpd`) and CPD operators namespace (e.g `ibm-cpd-operators`). + +In the **ibm-cpd-operators** namespace: +```bash +oc -n ibm-cpd-operators get deployments + +NAME READY UP-TO-DATE AVAILABLE AGE +cpd-platform-operator-manager 1/1 1 1 17h +ibm-common-service-operator 1/1 1 1 17h +ibm-namespace-scope-operator 1/1 1 1 17h +ibm-zen-operator 1/1 1 1 17h +meta-api-deploy 1/1 1 1 17h +operand-deployment-lifecycle-manager 1/1 1 1 17h +postgresql-operator-controller-manager-1-18-7 1/1 1 1 17h +``` + +In the **ibm-cpd** namespace: +```bash +oc -n ibm-cpd get zenservice,ibmcpd,deployments,sts,pvc + +NAME VERSION STATUS AGE +zenservice.zen.cpd.ibm.com/lite-cr 6.0.1 Completed 17h + +NAME AGE +ibmcpd.cpd.ibm.com/ibmcpd-cr 17h + +NAME READY UP-TO-DATE AVAILABLE AGE +deployment.apps/ibm-mcs-hubwork 1/1 1 1 17h +deployment.apps/ibm-mcs-placement 1/1 1 1 17h +deployment.apps/ibm-mcs-storage 1/1 1 1 17h +deployment.apps/ibm-nginx 3/3 3 3 16h +deployment.apps/ibm-nginx-tester 1/1 1 1 16h +deployment.apps/usermgmt 3/3 3 3 16h +deployment.apps/zen-audit 2/2 2 2 16h +deployment.apps/zen-core 3/3 3 3 16h +deployment.apps/zen-core-api 3/3 3 3 16h +deployment.apps/zen-watchdog 2/2 2 2 16h +deployment.apps/zen-watcher 1/1 1 1 16h + +NAME READY AGE +statefulset.apps/zen-minio 3/3 17h + +NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE +persistentvolumeclaim/export-zen-minio-0 Bound pvc-b2a2a729-13c1-4e7f-b672-0b5efc6aa40a 20Gi RWO ibmc-block-gold 17h +persistentvolumeclaim/export-zen-minio-1 Bound pvc-7e772a3a-8849-4291-8e14-501f49e79182 20Gi RWO ibmc-block-gold 17h +persistentvolumeclaim/export-zen-minio-2 Bound pvc-e0dd31dc-916d-4b15-9d9c-351db0a2b47f 20Gi RWO ibmc-block-gold 17h +persistentvolumeclaim/ibm-cs-postgres-backup Bound pvc-ef788b99-784f-4531-a1b3-12611f112551 20Gi RWO ibmc-block-gold 16h +persistentvolumeclaim/ibm-zen-objectstore-backup-pvc Bound pvc-d5e61dcf-65a3-4930-9cbf-ab80d04dda00 20Gi RWO ibmc-block-gold 16h +persistentvolumeclaim/zen-metastore-edb-1 Bound pvc-19d44f17-05ab-4dc0-bb5d-1b5f15ffd201 20Gi RWO ibmc-block-gold 17h +persistentvolumeclaim/zen-metastore-edb-2 Bound pvc-741ea444-b6f0-44ff-a123-bb4615d97381 20Gi RWO ibmc-block-gold 17h +``` + +!!! tip + You can retrieve the Initial Cloud Pak for Data password from the **admin-user-details** secret: `oc -n ibm-cpd get secret admin-user-details -o jsonpath="{.data.initial_admin_password}" | base64 -d` + ### 4.8.x version: Cloud Pak for Data 4.8.x leverages Cloud Pak Foundational Services v4, which runs its deployments in isolated/dedicated scope model, that means that its dependencies will be grouped and installed within the Cloud Pak for Data related projects/namespaces. Differently from CPD 4.6.x, there are only two namespaces that will be used: CPD instance namespace (e.g `ibm-cpd`) and CPD operators namespace (e.g `ibm-cpd-operators`). diff --git a/ibm/mas_devops/roles/cp4d/tasks/determine-ibmcatalog-tag.yml b/ibm/mas_devops/roles/cp4d/tasks/determine-ibmcatalog-tag.yml index 10a7851ff..c1cfec8bb 100644 --- a/ibm/mas_devops/roles/cp4d/tasks/determine-ibmcatalog-tag.yml +++ b/ibm/mas_devops/roles/cp4d/tasks/determine-ibmcatalog-tag.yml @@ -2,21 +2,20 @@ # The dependency version is based on the chosen ibm-operator-catalog. However the # ibm-operator-catalog does not explicitly include information about the cp4d version. # -# The configuration files in common_vars/casebundles do specify the dependency -# version for each of the MAS published ibm-operator-catalog catalogs. -# -# To determine which common_vars/casebundles configuration file to use, this role +# To determine which catalog metadata to use, this role # extracts the catalog_tag from the ibm-operator-catalog's displayName. # # For example: # displayName: IBM Maximo Operators (v9-240625-amd64) # # catalog_tag is v9-240625-amd64 -# dependency version will be determined by loading common_vars/casebundles/v9-240625-amd64.yml +# dependency version will be determined from the catalog metadata (get_catalog_info.py) + # 1. Get the IBM Catalog if available # ----------------------------------------------------------------------------- - name: "Lookup ibm-operator-catalog" + when: cpd_product_version is not defined or cpd_product_version == "" kubernetes.core.k8s_info: api_version: operators.coreos.com/v1alpha1 name: ibm-operator-catalog @@ -25,40 +24,42 @@ register: catalog_lookup - name: "Determine catalog version from catalog displayName" - block: - # extract the catalog tag from displayName - - set_fact: - catalog_tag: "{{ catalog_lookup.resources[0].spec.displayName.split('(')[1].split(')')[0].split(' ')[0] }}" - when: - - catalog_lookup is defined - - catalog_lookup.resources is defined - - catalog_lookup.resources | length > 0 - - catalog_lookup.resources[0].spec is defined - - catalog_lookup.resources[0].spec.displayName is defined - - '"(" in catalog_lookup.resources[0].spec.displayName' + when: + - catalog_lookup is defined + - catalog_lookup.resources is defined + - catalog_lookup.resources | length > 0 + - catalog_lookup.resources[0].spec is defined + - catalog_lookup.resources[0].spec.displayName is defined + - '"(" in catalog_lookup.resources[0].spec.displayName' + set_fact: + catalog_tag: "{{ catalog_lookup.resources[0].spec.displayName.split('(')[1].split(')')[0].split(' ')[0] }}" -- name: "Catalog Version" - debug: - msg: - - "Catalog Version ............................ {{ (catalog_tag is defined and catalog_tag != '') | ternary(catalog_tag, 'Undefined') }}" -# 2. Load default settings +# 2. Load catalog metadata # ----------------------------------------------------------------------------- -- name: Check if file exists in casebundles - stat: - path: "{{ role_path }}/../../common_vars/casebundles/{{ catalog_tag }}.yml" - register: file_exists_result +- name: "Load catalog metadata to determine default CP4D version" when: - catalog_tag is defined and catalog_tag != "" - - catalog_tag.split('-') | length == 3 # only pull casebundle if it's a curated catalog, skip if it's v8-amd64 + - cpd_product_version is not defined or cpd_product_version == "" + block: + - name: "Lookup catalog metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: catalog_metadata -- debug: - var: file_exists_result + - name: "Debug Catalog Metadata Lookup" + when: not catalog_metadata.failed + debug: + msg: + - "Catalog Version ................................ {{ catalog_tag }}" + - "Default CP4D Version ........................... {{ catalog_metadata.cpd_product_version_default }}" -- name: Load CASE bundle versions - include_vars: - file: "{{ role_path }}/../../common_vars/casebundles/{{ catalog_tag }}.yml" - when: - - file_exists_result is defined - - file_exists_result.stat is defined - - file_exists_result.stat.exists + - name: "Set CP4D Product Version (with default)" + when: not catalog_metadata.failed + set_fact: + cpd_product_version: "{{ catalog_metadata.cpd_product_version_default }}" + +- name: "Debug final CP4D version" + debug: + msg: + - "CP4D Version ................................... {{ cpd_product_version }}" diff --git a/ibm/mas_devops/roles/cp4d/tasks/determine-storage-classes.yml b/ibm/mas_devops/roles/cp4d/tasks/determine-storage-classes.yml index 4ff4a73ff..deac82d3e 100644 --- a/ibm/mas_devops/roles/cp4d/tasks/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/cp4d/tasks/determine-storage-classes.yml @@ -1,53 +1,38 @@ --- - -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" -- name: "determine-storage-classes : Lookup storage classes" - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses - -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" - -# 2. Set Primary Storage (Required) +# 2. Set default storage classes # ----------------------------------------------------------------------------- -- name: "determine-storage-classes : Default Primary Storage if not set by user" - when: cpd_primary_storage_class is not defined or cpd_primary_storage_class == "" +- name: "determine-storage-classes : Set default File Storage if not set by user" + when: + - defaultStorageClasses.success + - cpd_primary_storage_class is not defined or cpd_primary_storage_class == "" + set_fact: + cpd_primary_storage_class: "{{ defaultStorageClasses.rwx }}" + +- name: "determine-storage-classes : Set default Block Storage if not set by user" + when: + - defaultStorageClasses.success + - cpd_metadata_storage_class is not defined or cpd_metadata_storage_class == "" set_fact: - cpd_primary_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwx) }}" + cpd_metadata_storage_class: "{{ defaultStorageClasses.rwo }}" -- name: "determine-storage-classes : Assert that primary storage class has been defined" +- name: "determine-storage-classes : Assert that primary storage class has been defined (RWX)" assert: that: cpd_primary_storage_class is defined and cpd_primary_storage_class != "" fail_msg: "cpd_primary_storage_class must be defined" - -# 2. Set Metadata Storage (Required) -# ----------------------------------------------------------------------------- -- name: "determine-storage-classes : Default Metadata Storage if not set by user" - when: cpd_metadata_storage_class is not defined or cpd_metadata_storage_class == "" - set_fact: - cpd_metadata_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" - -- name: "determine-storage-classes : Assert that metadata storage class has been defined" +- name: "determine-storage-classes : Assert that metadata storage class has been defined (RWO)" assert: that: cpd_metadata_storage_class is defined and cpd_metadata_storage_class != "" fail_msg: "cpd_metadata_storage_class must be defined" - -# 3. Debug storage class configuration -# ----------------------------------------------------------------------------- - name: "determine-storage-classes : Debug CP4D storage class configuration" debug: msg: - - "Storage class (primary) .......... {{ cpd_primary_storage_class }}" - - "Storage class (metadata) ......... {{ cpd_metadata_storage_class }}" + - "Primary Storage class (RWX) ............ {{ cpd_primary_storage_class }}" + - "Metadata Storage class (RWO) ........... {{ cpd_metadata_storage_class }}" diff --git a/ibm/mas_devops/roles/cp4d/tasks/install-cp4d.yml b/ibm/mas_devops/roles/cp4d/tasks/install-cp4d.yml index 144b262a6..44e4fa78e 100644 --- a/ibm/mas_devops/roles/cp4d/tasks/install-cp4d.yml +++ b/ibm/mas_devops/roles/cp4d/tasks/install-cp4d.yml @@ -160,15 +160,6 @@ retries: 20 # Approximately 20 minutes before we give up delay: 60 # 1 minute -# 3-pre. Wait for Zen Metastore Cluster to be ready -# ----------------------------------------------------------------------------- -# There have been issues with Zen Metastore Cluster not starting due to Persistent Storage, -# This task restarts any failing pods -- name: "install-cp4d : Wait for zen-metadata to be ready again (60s delay)" - include_tasks: "tasks/wait/wait-zenmetastore-edb.yml" - when: - - cpd_48_or_higher - # 3. Wait for zenStatus # ----------------------------------------------------------------------------- # oc get ZenService lite-cr -o jsonpath="{.status.zenStatus}{'\n'}" diff --git a/ibm/mas_devops/roles/cp4d/tasks/wait/wait-zenmetastore-edb.yml b/ibm/mas_devops/roles/cp4d/tasks/wait/wait-zenmetastore-edb.yml deleted file mode 100644 index 22432104f..000000000 --- a/ibm/mas_devops/roles/cp4d/tasks/wait/wait-zenmetastore-edb.yml +++ /dev/null @@ -1,112 +0,0 @@ ---- -# 1. Wait for zen metastore cluster to start -# ----------------------------------------------------------------------------- -- name: "wait-zenmetastore-edb : Wait for Zen Metastore EDB Cluster to be created" - k8s_info: - kind: Cluster - namespace: "{{ cpd_instance_namespace }}" - name: "zen-metastore-edb" - register: zenmetastoreCluster - retries: 120 # Give 60 minutes for the zenService to start Zen Metastore Pods (Logs show this taking ~20 minutes in a good run) - delay: 30 - until: zenmetastoreCluster.resources[0].status is defined - -# 2. For V4.8, We need to patch the postgres licensing job acccording to https://www.ibm.com/support/pages/node/7158524 -- name: "wait-zenmetastore-edb : Check and display the create-postgres-license-config license expiry date" - when: cpd_48 - block: - - name: "wait-zenmetastore-edb : Fetch the license expiry date" - kubernetes.core.k8s_info: - kind: Cluster - namespace: "{{ cpd_instance_namespace }}" - name: "zen-metastore-edb" - register: zenmetastoreCluster - until: - zenmetastoreCluster.resources[0].spec.instances is defined - and zenmetastoreCluster.resources[0].status.licenseStatus.licenseStatus is defined - retries: 40 # Give 20 minutes - delay: 30 - - debug: - msg: - - "License Expiration .. {{ zenmetastoreCluster.resources[0].status.licenseStatus.licenseExpiration | default ('') }}" - - "License Status ...... {{ zenmetastoreCluster.resources[0].status.licenseStatus.licenseStatus}}" - -- name: "wait-zenmetastore-edb : Update create-postgres-license-config job" - when: - - cpd_48 - - zenmetastoreCluster.resources[0].status.licenseStatus.licenseExpiration is not defined - block: - - name: "wait-zenmetastore-edb : Wait for create-postgres-license-config Job to be Completed or Failed (10s delay)" - kubernetes.core.k8s_info: - api_version: batch/v1 - kind: Job - name: "create-postgres-license-config" - namespace: "{{ cpd_operators_namespace }}" - register: _job_info - until: - - _job_info.resources is defined - - _job_info.resources | length > 0 - - (_job_info.resources | json_query('[*].status.conditions[?type==`Complete`][].status') | select ('match','True') | list | length == 1) or - (_job_info.resources | json_query('[*].status.conditions[?type==`Failed`][].status') | select ('match','True') | list | length == 1) - retries: 30 - delay: 10 - - - name: "wait-zenmetastore-edb : Recreate the job with up to date license image" - shell: >- - oc get job create-postgres-license-config -n {{ cpd_operators_namespace }} -o yaml | \ - sed -e 's/operator.ibm.com\/opreq-control: "true"/operator.ibm.com\/opreq-control: "false"/' \ - -e 's|\(image: \).*|\1"cp.icr.io/cp/cpd/edb-postgres-license-provider@sha256:c1670e7dd93c1e65a6659ece644e44aa5c2150809ac1089e2fd6be37dceae4ce"|' \ - -e '/controller-uid:/d' | \ - oc replace --force -f - - register: _job_recreate_output - - - debug: - msg: "Recreate the job: {{ _job_recreate_output }}" - - - name: "wait-zenmetastore-edb : Wait for create-postgres-license-config Job to be Completed or Failed (10s delay)" - kubernetes.core.k8s_info: - api_version: batch/v1 - kind: Job - name: "create-postgres-license-config" - namespace: "{{ cpd_operators_namespace }}" - register: _job_info - until: - - _job_info.resources is defined - - _job_info.resources | length > 0 - - (_job_info.resources | json_query('[*].status.conditions[?type==`Complete`][].status') | select ('match','True') | list | length == 1) or - (_job_info.resources | json_query('[*].status.conditions[?type==`Failed`][].status') | select ('match','True') | list | length == 1) - retries: 30 - delay: 10 - - - name: "wait-zenmetastore-edb : Check and display the license expiry date" - kubernetes.core.k8s_info: - kind: Cluster - namespace: "{{ cpd_instance_namespace }}" - name: "zen-metastore-edb" - register: newzenmetastoreCluster - until: - newzenmetastoreCluster.resources[0].spec.instances is defined - and newzenmetastoreCluster.resources[0].status.licenseStatus.licenseStatus is defined - and "Valid license" in newzenmetastoreCluster.resources[0].status.licenseStatus.licenseStatus - retries: 40 # Give 20 minutes - delay: 30 - - - debug: - msg: - - "License Expiration .. {{ newzenmetastoreCluster.resources[0].status.licenseStatus.licenseExpiration | default ('') }}" - - "License Status ...... {{ newzenmetastoreCluster.resources[0].status.licenseStatus.licenseStatus | default ('')}}" - -# 3. Wait for zen metastore replica pods to become ready -# ----------------------------------------------------------------------------- -- name: "wait-zenmetastore-edb : Wait for ZenMetastore pods to be become ready" - k8s_info: - kind: Cluster - namespace: "{{ cpd_instance_namespace }}" - name: "zen-metastore-edb" - register: zenmetastoreCluster - retries: 40 # Give 20 minutes for the pods to become ready - delay: 30 - until: >- - zenmetastoreCluster.resources[0].spec.instances is defined - and zenmetastoreCluster.resources[0].status.readyInstances is defined - and zenmetastoreCluster.resources[0].spec.instances == zenmetastoreCluster.resources[0].status.readyInstances diff --git a/ibm/mas_devops/roles/cp4d_service/README.md b/ibm/mas_devops/roles/cp4d_service/README.md index 2881b1e79..9c54c4f5b 100644 --- a/ibm/mas_devops/roles/cp4d_service/README.md +++ b/ibm/mas_devops/roles/cp4d_service/README.md @@ -10,6 +10,7 @@ Currently supported Cloud Pak for Data release versions supported are: - 4.6.4 - 4.6.6 - 4.8.0 + - 5.0.0 The role will automatically install the corresponding CPD service operator channel and custom resource version associated to the chosen Cloud Pak for Data release version. @@ -24,12 +25,18 @@ These services can be deployed and configured using this role: - [Analytics Services (Apache Spark)](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=services-analytics) required by [Predict](https://www.ibm.com/docs/en/mas-cd/mhmpmh-and-p-u/continuous-delivery) - [Watson OpenScale](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=services-watson-openscale) an optional dependency for [Predict](https://www.ibm.com/docs/en/mas-cd/mhmpmh-and-p-u/continuous-delivery) - [SPSS Modeler](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=modeler-installing) optional dependency for [Predict](https://www.ibm.com/docs/en/mas-cd/mhmpmh-and-p-u/continuous-delivery) -- [Watson Discovery](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=services-watson-discovery) required by [Assist](https://www.ibm.com/docs/en/mas-cd/maximo-assist) +- [Watson Discovery](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=services-watson-discovery) required by [Assist](https://www.ibm.com/docs/en/mas-cd/maximo-assist) - Not supported with CPD 5.0 - [Cognos Analytics](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=analytics-installing) optional dependency for [Manage application](https://www.ibm.com/docs/en/mas-cd/maximo-manage) +!!! info + - Install CP4D Services (~30 Minutes - 1 hour for each service) + + All timings are estimates. + + Upgrade ------------------ -This role also supports seamlessly CPD services minor version upgrades (CPD 4.6.x -> CPD 4.8.x), as well as patch version upgrades (CPD 4.8.0 -> CPD 4.8.1), with the exception of [Watson Discovery](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=u-upgrading-from-version-46-2). +This role also supports seamlessly CPD services minor version upgrades (CPD 4.6.x > CPD 4.8.0 or CPD 4.8.0 > CPD 5.0.0), as well as patch version upgrades (e.g. CPD 4.6.0 -> CPD 4.6.6), with the exception of [Watson Discovery](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=u-upgrading-from-version-46-2). All you need to do is to define `cpd_product_version` variable to the version you target to upgrade and run this role for a particular CPD service. It's important that before you upgrade CPD services, the CPD Control Plane/Zen is also upgraded to the same release version. @@ -56,124 +63,78 @@ Subscriptions related to Watson Studio: Watson Studio is made up of many moving parts across multiple namespaces. -In the **ibm-common-services** namespace: - -- 15 workloads / 12 pods -- 0.126 CPU usage / 1.11 CPU requests / 3.57 CPU limit (11% utilization) -- 773.8 MiB memory usage, 2.27 GiB memory requests / 5.72 GiB memory limit (33% utilization) - -``` -oc -n ibm-common-services get deployments -NAME READY UP-TO-DATE AVAILABLE AGE -cert-manager-cainjector 1/1 1 1 4h57m -cert-manager-controller 1/1 1 1 4h57m -cert-manager-webhook 1/1 1 1 4h57m -configmap-watcher 1/1 1 1 4h57m -ibm-cert-manager-operator 1/1 1 1 4h58m -ibm-common-service-operator 1/1 1 1 5h3m -ibm-common-service-webhook 1/1 1 1 5h2m -ibm-namespace-scope-operator 1/1 1 1 5h3m -ibm-zen-operator 1/1 1 1 4h58m -meta-api-deploy 1/1 1 1 4h57m -operand-deployment-lifecycle-manager 1/1 1 1 5h2m -secretshare 1/1 1 1 5h2m -``` - In the **ibm-cpd-operators** namespace: -- 7 workloads / 7 pods -- 0.007 CPU usage / 0.7 CPU requests / 3.75 CPU limit (1% utilization) -- 263.4 MiB memory usage, 1.64 GiB memory requests /6.5 GiB memory limit (15% utilization) - ```bash oc -n ibm-cpd-operators get deployments -NAME READY UP-TO-DATE AVAILABLE AGE -cpd-platform-operator-manager 1/1 1 1 5h -ibm-common-service-operator 1/1 1 1 5h -ibm-cpd-ccs-operator 1/1 1 1 3h43m -ibm-cpd-datarefinery-operator 1/1 1 1 134m -ibm-cpd-ws-operator 1/1 1 1 3h45m -ibm-cpd-ws-runtimes-operator 1/1 1 1 118m -ibm-namespace-scope-operator 1/1 1 1 5h +NAME READY UP-TO-DATE AVAILABLE AGE +ibm-cpd-ccs-operator 1/1 1 1 83m +ibm-cpd-datarefinery-operator 1/1 1 1 83m +ibm-cpd-ws-operator 1/1 1 1 83m +ibm-cpd-ws-runtimes-operator 1/1 1 1 83m +ibm-elasticsearch-operator-ibm-es-controller-manager 1/1 1 1 83m ``` In the **ibm-cpd** namespace: -- 51 workloads / 101 pods -- 1.1 CPU usage / 18.72 CPU requests / 86.7 CPU limit (5% utilization) -- 16.46 GiB memory usage, 33.04 GiB memory requests / 175.7 GiB memory limit (50% utilization) - ```bash oc -n ibm-cpd get ccs,ws,datarefinery,notebookruntimes,deployments,sts NAME VERSION RECONCILED STATUS AGE -ccs.ccs.cpd.ibm.com/ccs-cr 4.0.9 4.0.9 Completed 3h42m +ccs.ccs.cpd.ibm.com/ccs-cr 9.0.0 9.0.0 Completed 82m NAME VERSION RECONCILED STATUS AGE -ws.ws.cpd.ibm.com/ws-cr 4.0.9 4.0.9 Completed 3h45m +ws.ws.cpd.ibm.com/ws-cr 9.0.0 9.0.0 Completed 83m -NAME VERSION STATUS AGE -datarefinery.datarefinery.cpd.ibm.com/datarefinery-sample 4.0.9 Completed 133m +NAME VERSION RECONCILED STATUS AGE +datarefinery.datarefinery.cpd.ibm.com/datarefinery-cr 9.0.0 9.0.0 Completed 36m -NAME VERSION RECONCILED STATUS AGE -notebookruntime.ws.cpd.ibm.com/ibm-cpd-ws-runtime-py39 4.0.9 Completed 116m +NAME NLP MODELS VERSION RECONCILED STATUS AGE +notebookruntime.ws.cpd.ibm.com/ibm-cpd-ws-runtime-241-py 9.0.0 9.0.0 Completed 22m NAME READY UP-TO-DATE AVAILABLE AGE -deployment.apps/asset-files-api 1/1 1 1 159m -deployment.apps/ax-cdsx-jupyter-notebooks-converter-deploy 1/1 1 1 111m -deployment.apps/ax-cdsx-notebooks-job-manager-deploy 1/1 1 1 111m -deployment.apps/ax-environments-api-deploy 1/1 1 1 144m -deployment.apps/ax-environments-ui-deploy 1/1 1 1 144m -deployment.apps/ax-wdp-notebooks-api-deploy 1/1 1 1 111m -deployment.apps/ax-ws-notebooks-ui-deploy 1/1 1 1 111m -deployment.apps/catalog-api 2/2 2 2 167m -deployment.apps/dap-dashboards-api 1/1 1 1 159m -deployment.apps/dataview-api-service 1/1 1 1 138m -deployment.apps/dc-main 1/1 1 1 167m -deployment.apps/event-logger-api 1/1 1 1 159m -deployment.apps/ibm-0100-model-viewer-prod 1/1 1 1 110m -deployment.apps/ibm-nginx 3/3 3 3 4h37m -deployment.apps/jobs-api 1/1 1 1 155m -deployment.apps/jobs-ui 1/1 1 1 155m -deployment.apps/ngp-projects-api 1/1 1 1 159m -deployment.apps/portal-catalog 1/1 1 1 166m -deployment.apps/portal-common-api 1/1 1 1 159m -deployment.apps/portal-dashboards 1/1 1 1 159m -deployment.apps/portal-job-manager 1/1 1 1 159m -deployment.apps/portal-main 1/1 1 1 159m -deployment.apps/portal-ml-dl 1/1 1 1 111m -deployment.apps/portal-notifications 1/1 1 1 159m -deployment.apps/portal-projects 1/1 1 1 159m -deployment.apps/redis-ha-haproxy 1/1 1 1 174m -deployment.apps/runtime-assemblies-operator 1/1 1 1 151m -deployment.apps/runtime-manager-api 1/1 1 1 147m -deployment.apps/spaces 1/1 1 1 142m -deployment.apps/spawner-api 1/1 1 1 146m -deployment.apps/usermgmt 3/3 3 3 4h39m -deployment.apps/wdp-connect-connection 1/1 1 1 167m -deployment.apps/wdp-connect-connector 1/1 1 1 167m -deployment.apps/wdp-connect-flight 1/1 1 1 167m -deployment.apps/wdp-dataprep 1/1 1 1 126m -deployment.apps/wdp-dataview 1/1 1 1 138m -deployment.apps/wdp-shaper 1/1 1 1 128m -deployment.apps/wkc-search 1/1 1 1 167m -deployment.apps/wml-main 1/1 1 1 143m -deployment.apps/zen-audit 1/1 1 1 4h33m -deployment.apps/zen-core 3/3 3 3 4h32m -deployment.apps/zen-core-api 3/3 3 3 4h32m -deployment.apps/zen-data-sorcerer 2/2 2 2 4h25m -deployment.apps/zen-watchdog 1/1 1 1 4h25m -deployment.apps/zen-watcher 1/1 1 1 4h32m - -NAME READY AGE -statefulset.apps/dsx-influxdb 1/1 4h28m -statefulset.apps/elasticsearch-master 3/3 171m -statefulset.apps/rabbitmq-ha 3/3 3h35m -statefulset.apps/redis-ha-server 3/3 3h1m -statefulset.apps/wdp-couchdb 3/3 3h38m -statefulset.apps/zen-metastoredb 3/3 4h43m +deployment.apps/asset-files-api 1/1 1 1 60m +deployment.apps/ax-cdsx-jupyter-notebooks-converter-deploy 1/1 1 1 15m +deployment.apps/ax-cdsx-notebooks-job-manager-deploy 1/1 1 1 15m +deployment.apps/ax-environments-api-deploy 1/1 1 1 53m +deployment.apps/ax-environments-ui-deploy 1/1 1 1 53m +deployment.apps/ax-wdp-notebooks-api-deploy 1/1 1 1 15m +deployment.apps/ax-ws-notebooks-ui-deploy 1/1 1 1 15m +deployment.apps/catalog-api 2/2 2 2 69m +deployment.apps/dataview-api-service 1/1 1 1 48m +deployment.apps/dc-main 1/1 1 1 65m +deployment.apps/event-logger-api 1/1 1 1 59m +deployment.apps/ibm-0100-model-viewer-prod 1/1 1 1 14m +deployment.apps/jobs-api 1/1 1 1 49m +deployment.apps/jobs-ui 1/1 1 1 49m +deployment.apps/ngp-projects-api 1/1 1 1 60m +deployment.apps/portal-catalog 1/1 1 1 65m +deployment.apps/portal-common-api 1/1 1 1 60m +deployment.apps/portal-job-manager 1/1 1 1 60m +deployment.apps/portal-main 1/1 1 1 60m +deployment.apps/portal-ml-dl 1/1 1 1 14m +deployment.apps/portal-notifications 1/1 1 1 60m +deployment.apps/portal-projects 1/1 1 1 60m +deployment.apps/redis-ha-haproxy 1/1 1 1 78m +deployment.apps/runtime-assemblies-operator 1/1 1 1 59m +deployment.apps/runtime-manager-api 1/1 1 1 59m +deployment.apps/spaces 1/1 1 1 48m +deployment.apps/task-credentials 1/1 1 1 48m +deployment.apps/wdp-connect-connection 1/1 1 1 66m +deployment.apps/wdp-connect-connector 1/1 1 1 66m +deployment.apps/wdp-connect-flight 1/1 1 1 66m +deployment.apps/wdp-dataprep 1/1 1 1 29m +deployment.apps/wdp-dataview 1/1 1 1 48m +deployment.apps/wdp-shaper 1/1 1 1 29m +deployment.apps/wkc-search 1/1 1 1 66m +deployment.apps/wml-main 1/1 1 1 48m + +NAME READY AGE +statefulset.apps/elasticsea-0ac3-ib-6fb9-es-server-esnodes 3/3 74m +statefulset.apps/rabbitmq-ha 3/3 79m +statefulset.apps/redis-ha-server 3/3 79m +statefulset.apps/wdp-couchdb 3/3 79m ``` - ### Watson Machine Learning Subscriptions related to Watson Machine Learning: @@ -181,117 +142,41 @@ Subscriptions related to Watson Machine Learning: - **ibm-cpd-wml** - **ibm-cpd-ccs** - Watson Machine Learning is made up of many moving parts across multiple namespaces. -In the **ibm-common-services** namespace: - -- 15 workloads / 12 pods -- 0.126 CPU usage / 1.11 CPU requests / 3.57 CPU limit (11% utilization) -- 773.8 MiB memory usage, 2.27 GiB memory requests / 5.72 GiB memory limit (33% utilization) - -```bash -oc -n ibm-common-services get deployments -NAME READY UP-TO-DATE AVAILABLE AGE -cert-manager-cainjector 1/1 1 1 4h7m -cert-manager-controller 1/1 1 1 4h7m -cert-manager-webhook 1/1 1 1 4h7m -configmap-watcher 1/1 1 1 4h7m -ibm-cert-manager-operator 1/1 1 1 4h8m -ibm-common-service-operator 1/1 1 1 4h14m -ibm-common-service-webhook 1/1 1 1 4h12m -ibm-namespace-scope-operator 1/1 1 1 4h13m -ibm-zen-operator 1/1 1 1 4h8m -meta-api-deploy 1/1 1 1 4h8m -operand-deployment-lifecycle-manager 1/1 1 1 4h12m -secretshare 1/1 1 1 4h12m -``` - In the **ibm-cpd-operators** namespace: -- 5 workloads / 5 pods -- 0.011 CPU usage / 0.5 CPU requests / 2.75 CPU limit (1% utilization) -- 177.4 MiB memory usage, 1.14 GiB memory requests / 4.5 GiB memory limit (15% utilization) - ```bash oc -n ibm-cpd-operators get deployments -NAME READY UP-TO-DATE AVAILABLE AGE -cpd-platform-operator-manager 1/1 1 1 3h57m -ibm-common-service-operator 1/1 1 1 3h57m -ibm-cpd-ccs-operator 1/1 1 1 150m -ibm-cpd-wml-operator 1/1 1 1 152m -ibm-namespace-scope-operator 1/1 1 1 3h57m +NAME READY UP-TO-DATE AVAILABLE AGE +ibm-cpd-ccs-operator 1/1 1 1 134m +ibm-cpd-datarefinery-operator 1/1 1 1 134m +ibm-cpd-wml-operator 1/1 1 1 49m +ibm-elasticsearch-operator-ibm-es-controller-manager 1/1 1 1 134m ``` In the **ibm-cpd** namespace: -- 50 workloads / 103 pods -- 1.28 CPU usage / 18.07 CPU requests / 86.15 CPU limit (7% utilization) -- 16.96 GiB memory usage, 41.29 GiB memory requests / 184.5 GiB memory limit (41% utilization) - -``` +```bash oc -n ibm-cpd get ccs,wmlbase,deployments,sts NAME VERSION RECONCILED STATUS AGE -ccs.ccs.cpd.ibm.com/ccs-cr 4.0.9 4.0.9 Completed 149m - -NAME VERSION BUILD STATUS AGE -wmlbase.wml.cpd.ibm.com/wml-cr 4.0.9 4.0.10-3220 Completed 151m - -NAME READY UP-TO-DATE AVAILABLE AGE -deployment.apps/asset-files-api 1/1 1 1 80m -deployment.apps/ax-environments-api-deploy 1/1 1 1 66m -deployment.apps/ax-environments-ui-deploy 1/1 1 1 66m -deployment.apps/catalog-api 2/2 2 2 89m -deployment.apps/dap-dashboards-api 1/1 1 1 80m -deployment.apps/dataview-api-service 1/1 1 1 62m -deployment.apps/dc-main 1/1 1 1 88m -deployment.apps/event-logger-api 1/1 1 1 80m -deployment.apps/ibm-nginx 3/3 3 3 3h34m -deployment.apps/jobs-api 1/1 1 1 76m -deployment.apps/jobs-ui 1/1 1 1 76m -deployment.apps/ngp-projects-api 1/1 1 1 80m -deployment.apps/portal-catalog 1/1 1 1 88m -deployment.apps/portal-common-api 1/1 1 1 80m -deployment.apps/portal-dashboards 1/1 1 1 80m -deployment.apps/portal-job-manager 1/1 1 1 80m -deployment.apps/portal-main 1/1 1 1 80m -deployment.apps/portal-notifications 1/1 1 1 80m -deployment.apps/portal-projects 1/1 1 1 80m -deployment.apps/redis-ha-haproxy 1/1 1 1 97m -deployment.apps/runtime-assemblies-operator 1/1 1 1 72m -deployment.apps/runtime-manager-api 1/1 1 1 70m -deployment.apps/spaces 1/1 1 1 64m -deployment.apps/spawner-api 1/1 1 1 69m -deployment.apps/usermgmt 3/3 3 3 3h36m -deployment.apps/wdp-connect-connection 1/1 1 1 88m -deployment.apps/wdp-connect-connector 1/1 1 1 88m -deployment.apps/wdp-connect-flight 1/1 1 1 88m -deployment.apps/wdp-dataview 1/1 1 1 62m -deployment.apps/wkc-search 1/1 1 1 88m -deployment.apps/wml-deployment-envoy 1/1 1 1 37m -deployment.apps/wml-main 1/1 1 1 65m -deployment.apps/wml-repositoryv4 1/1 1 1 18m -deployment.apps/wmltraining 1/1 1 1 13m -deployment.apps/wmltrainingorchestrator 1/1 1 1 8m11s -deployment.apps/zen-audit 1/1 1 1 3h28m -deployment.apps/zen-core 3/3 3 3 3h27m -deployment.apps/zen-core-api 3/3 3 3 3h27m -deployment.apps/zen-data-sorcerer 2/2 2 2 3h20m -deployment.apps/zen-watchdog 1/1 1 1 3h20m -deployment.apps/zen-watcher 1/1 1 1 3h27m - -NAME READY AGE -statefulset.apps/dsx-influxdb 1/1 3h23m -statefulset.apps/elasticsearch-master 3/3 94m -statefulset.apps/rabbitmq-ha 3/3 142m -statefulset.apps/redis-ha-server 3/3 106m -statefulset.apps/wdp-couchdb 3/3 145m -statefulset.apps/wml-deployment-agent 1/1 32m -statefulset.apps/wml-deployment-manager 1/1 24m -statefulset.apps/wml-deployments-etcd 3/3 43m -statefulset.apps/zen-metastoredb 3/3 3h40m -``` +ccs.ccs.cpd.ibm.com/ccs-cr 9.0.0 9.0.0 Completed 133m +NAME VERSION BUILD STATUS RECONCILED AGE +wmlbase.wml.cpd.ibm.com/wml-cr 5.0.0 5.0.0-918 Completed 5.0.0 50m + +NAME READY UP-TO-DATE AVAILABLE AGE +deployment.apps/wml-deployment-envoy 1/1 1 1 23m +deployment.apps/wml-deployment-manager 1/1 1 1 19m +deployment.apps/wml-main 1/1 1 1 99m +deployment.apps/wml-repositoryv4 1/1 1 1 16m +deployment.apps/wmltraining 1/1 1 1 15m +deployment.apps/wmltrainingorchestrator 1/1 1 1 14m + +NAME READY AGE +statefulset.apps/wml-cpd-etcd 3/3 26m +statefulset.apps/wml-deployment-agent 1/1 21m +``` ### Analytics Engine Subscriptions related to Analytics Engine: @@ -301,74 +186,30 @@ Subscriptions related to Analytics Engine: Analytics Engine is made up of many moving parts across multiple namespaces. -In the **ibm-common-services** namespace: - -- 15 workloads / 12 pods -- 0.051 CPU usage / 1.11 CPU requests / 3.57 CPU limit (5% utilization) -- 774.7 MiB memory usage, 2.27 GiB memory requests / 5.72 GiB memory limit (33% utilization) - -``` -oc -n ibm-common-services get deployments -NAME READY UP-TO-DATE AVAILABLE AGE -cert-manager-cainjector 1/1 1 1 126m -cert-manager-controller 1/1 1 1 126m -cert-manager-webhook 1/1 1 1 126m -configmap-watcher 1/1 1 1 126m -ibm-cert-manager-operator 1/1 1 1 126m -ibm-common-service-operator 1/1 1 1 131m -ibm-common-service-webhook 1/1 1 1 130m -ibm-namespace-scope-operator 1/1 1 1 131m -ibm-zen-operator 1/1 1 1 126m -meta-api-deploy 1/1 1 1 126m -operand-deployment-lifecycle-manager 1/1 1 1 130m -secretshare 1/1 1 1 130m -``` - In the **ibm-cpd-operators** namespace: -- 4 workloads / 4 pods -- 0.003 CPU usage / 0.4 CPU requests / 2 CPU limit (1% utilization) -- 131.5 MiB memory usage, 912 MiB memory requests / 3 GiB memory limit (15% utilization) - -``` +```bash oc -n ibm-cpd-operators get deployments -NAME READY UP-TO-DATE AVAILABLE AGE -cpd-platform-operator-manager 1/1 1 1 128m -ibm-common-service-operator 1/1 1 1 128m -ibm-cpd-ae-operator 1/1 1 1 65m -ibm-namespace-scope-operator 1/1 1 1 128m +NAME READY UP-TO-DATE AVAILABLE AGE +ibm-cpd-ae-operator 1/1 1 1 31m ``` In the **ibm-cpd** namespace: -- 16 workloads / 60 pods -- 0.449 CPU usage / 8.06 CPU requests / 21.15 CPU limit (5% utilization) -- 3.15 GiB memory usage, 14.31 GiB memory requests / 32.71 GiB memory limit (22% utilization) - -``` -oc -n ibm-cpd get analyticsengine,deployments,sts +```bash +oc -n ibm-cpd get analyticsengine,deployments NAME VERSION RECONCILED STATUS AGE -analyticsengine.ae.cpd.ibm.com/analyticsengine-sample 4.0.9 4.0.9 Completed 66m - -NAME READY UP-TO-DATE AVAILABLE AGE -deployment.apps/ibm-nginx 3/3 3 3 93m -deployment.apps/spark-hb-control-plane 1/1 1 1 62m -deployment.apps/spark-hb-create-trust-store 1/1 1 1 64m -deployment.apps/spark-hb-deployer-agent 1/1 1 1 62m -deployment.apps/spark-hb-helm-repo 1/1 1 1 62m -deployment.apps/spark-hb-nginx 1/1 1 1 62m -deployment.apps/spark-hb-register-hb-dataplane 1/1 1 1 55m -deployment.apps/usermgmt 3/3 3 3 94m -deployment.apps/zen-audit 1/1 1 1 89m -deployment.apps/zen-core 3/3 3 3 89m -deployment.apps/zen-core-api 3/3 3 3 89m -deployment.apps/zen-data-sorcerer 2/2 2 2 83m -deployment.apps/zen-watchdog 1/1 1 1 83m -deployment.apps/zen-watcher 1/1 1 1 89m - -NAME READY AGE -statefulset.apps/dsx-influxdb 1/1 85m -statefulset.apps/zen-metastoredb 3/3 118m +analyticsengine.ae.cpd.ibm.com/analyticsengine-sample 5.0.0 5.0.0 Completed 31m + +NAME READY UP-TO-DATE AVAILABLE AGE +deployment.apps/spark-hb-br-recovery 1/1 1 1 11m +deployment.apps/spark-hb-control-plane 1/1 1 1 19m +deployment.apps/spark-hb-create-trust-store 1/1 1 1 25m +deployment.apps/spark-hb-deployer-agent 1/1 1 1 19m +deployment.apps/spark-hb-nginx 1/1 1 1 19m +deployment.apps/spark-hb-register-hb-dataplane 1/1 1 1 10m +deployment.apps/spark-hb-ui 1/1 1 1 19m + ``` @@ -376,231 +217,118 @@ statefulset.apps/zen-metastoredb 3/3 118m Subscriptions related to Watson OpenScale (in the **ibm-cpd-operators** namespace): - **cpd-platform-operator** -- **ibm-cpd-wos** +- **ibm-cpd-wos-operator** Analytics Engine is made up of many moving parts across multiple namespaces. -In the **ibm-common-services** namespace: - -- 15 workloads / 12 pods -- 0.051 CPU usage / 1.11 CPU requests / 3.57 CPU limit (5% utilization) -- 774.7 MiB memory usage, 2.27 GiB memory requests / 5.72 GiB memory limit (33% utilization) - -``` -oc -n ibm-common-services get deployments -NAME READY UP-TO-DATE AVAILABLE AGE -cert-manager-cainjector 1/1 1 1 126m -cert-manager-controller 1/1 1 1 126m -cert-manager-webhook 1/1 1 1 126m -configmap-watcher 1/1 1 1 126m -ibm-cert-manager-operator 1/1 1 1 126m -ibm-common-service-operator 1/1 1 1 131m -ibm-common-service-webhook 1/1 1 1 130m -ibm-namespace-scope-operator 1/1 1 1 131m -ibm-zen-operator 1/1 1 1 126m -meta-api-deploy 1/1 1 1 126m -operand-deployment-lifecycle-manager 1/1 1 1 130m -secretshare 1/1 1 1 130m -``` - In the **ibm-cpd-operators** namespace: -- 4 workloads / 4 pods -- 0.005 CPU usage / 0.4 CPU requests / 2 CPU limit (1% utilization) -- 148.1 MiB memory usage, 912 MiB memory requests / 3 GiB memory limit (16% utilization) - -``` +```bash oc -n ibm-cpd-operators get deployments -NAME READY UP-TO-DATE AVAILABLE AGE -cpd-platform-operator-manager 1/1 1 1 145m -ibm-common-service-operator 1/1 1 1 145m -ibm-cpd-wos-operator 1/1 1 1 76m -ibm-namespace-scope-operator 1/1 1 1 145m +NAME READY UP-TO-DATE AVAILABLE AGE +ibm-cpd-wos-operator 1/1 1 1 30m ``` In the **ibm-cpd** namespace: -- 32 workloads / 63 pods -- 0.591 CPU usage / 16.76 CPU requests / 31.9 CPU limit (4% utilization) -- 7.67 GiB memory usage, 37.32 GiB memory requests / 97.89 GiB memory limit (20% utilization) -``` +```bash oc -n ibm-cpd get woservice,deployments,sts -NAME TYPE STORAGE SCALECONFIG PHASE RECONCILED STATUS -woservice.wos.cpd.ibm.com/aiopenscale service ibmc-file-gold-gid small Ready 4.0.9 Completed - -NAME READY UP-TO-DATE AVAILABLE AGE -deployment.apps/aiopenscale-ibm-aios-bias 1/1 1 1 61m -deployment.apps/aiopenscale-ibm-aios-bkpicombined 1/1 1 1 61m -deployment.apps/aiopenscale-ibm-aios-common-api 1/1 1 1 61m -deployment.apps/aiopenscale-ibm-aios-configuration 1/1 1 1 61m -deployment.apps/aiopenscale-ibm-aios-dashboard 1/1 1 1 60m -deployment.apps/aiopenscale-ibm-aios-datamart 1/1 1 1 60m -deployment.apps/aiopenscale-ibm-aios-drift 1/1 1 1 60m -deployment.apps/aiopenscale-ibm-aios-explainability 1/1 1 1 60m -deployment.apps/aiopenscale-ibm-aios-fast-path 1/1 1 1 60m -deployment.apps/aiopenscale-ibm-aios-feedback 1/1 1 1 59m -deployment.apps/aiopenscale-ibm-aios-ml-gateway-discovery 1/1 1 1 59m -deployment.apps/aiopenscale-ibm-aios-ml-gateway-service 1/1 1 1 59m -deployment.apps/aiopenscale-ibm-aios-mrm 1/1 1 1 59m -deployment.apps/aiopenscale-ibm-aios-nginx 1/1 1 1 58m -deployment.apps/aiopenscale-ibm-aios-notification 1/1 1 1 59m -deployment.apps/aiopenscale-ibm-aios-payload-logging 1/1 1 1 58m -deployment.apps/aiopenscale-ibm-aios-payload-logging-api 1/1 1 1 59m -deployment.apps/aiopenscale-ibm-aios-scheduling 1/1 1 1 58m -deployment.apps/ibm-nginx 3/3 3 3 125m -deployment.apps/usermgmt 3/3 3 3 127m -deployment.apps/zen-audit 1/1 1 1 120m -deployment.apps/zen-core 3/3 3 3 120m -deployment.apps/zen-core-api 3/3 3 3 120m -deployment.apps/zen-data-sorcerer 2/2 2 2 114m -deployment.apps/zen-watchdog 1/1 1 1 114m -deployment.apps/zen-watcher 1/1 1 1 120m - -NAME READY AGE -statefulset.apps/aiopenscale-ibm-aios-etcd 3/3 62m -statefulset.apps/aiopenscale-ibm-aios-kafka 3/3 62m -statefulset.apps/aiopenscale-ibm-aios-redis 3/3 62m -statefulset.apps/aiopenscale-ibm-aios-zookeeper 3/3 70m -statefulset.apps/dsx-influxdb 1/1 116m -statefulset.apps/zen-metastoredb 3/3 130m -``` +NAME TYPE STORAGE SCALECONFIG PHASE RECONCILED STATUS +woservice.wos.cpd.ibm.com/openscale-defaultinstance service small Ready 5.0.0 Completed + +NAME READY UP-TO-DATE AVAILABLE AGE +deployment.apps/openscale-defaultinstance-ibm-aios-bias 1/1 1 1 21m +deployment.apps/openscale-defaultinstance-ibm-aios-bkpicombined 1/1 1 1 21m +deployment.apps/openscale-defaultinstance-ibm-aios-common-api 1/1 1 1 22m +deployment.apps/openscale-defaultinstance-ibm-aios-configuration 1/1 1 1 22m +deployment.apps/openscale-defaultinstance-ibm-aios-dashboard 1/1 1 1 21m +deployment.apps/openscale-defaultinstance-ibm-aios-datamart 1/1 1 1 22m +deployment.apps/openscale-defaultinstance-ibm-aios-drift 1/1 1 1 21m +deployment.apps/openscale-defaultinstance-ibm-aios-explainability 1/1 1 1 21m +deployment.apps/openscale-defaultinstance-ibm-aios-fast-path 1/1 1 1 21m +deployment.apps/openscale-defaultinstance-ibm-aios-feedback 1/1 1 1 21m +deployment.apps/openscale-defaultinstance-ibm-aios-metrics-compute-manager 0/0 0 0 21m +deployment.apps/openscale-defaultinstance-ibm-aios-ml-gateway-discovery 1/1 1 1 22m +deployment.apps/openscale-defaultinstance-ibm-aios-ml-gateway-service 1/1 1 1 22m +deployment.apps/openscale-defaultinstance-ibm-aios-mrm 1/1 1 1 21m +deployment.apps/openscale-defaultinstance-ibm-aios-nginx 1/1 1 1 25m +deployment.apps/openscale-defaultinstance-ibm-aios-notification 1/1 1 1 21m +deployment.apps/openscale-defaultinstance-ibm-aios-payload-logging 1/1 1 1 21m +deployment.apps/openscale-defaultinstance-ibm-aios-payload-logging-api 1/1 1 1 22m +deployment.apps/openscale-defaultinstance-ibm-aios-redis 1/1 1 1 28m +deployment.apps/openscale-defaultinstance-ibm-aios-scheduling 1/1 1 1 21m + +NAME READY AGE +statefulset.apps/openscale-defaultinstance-ibm-aios-etcd 3/3 27m +statefulset.apps/openscale-defaultinstance-ibm-aios-kafka 3/3 27m +``` -### Watson Discovery -Subscriptions related to Watson Discovery (in the **ibm-cpd-operators** namespace): +### Cognos Analytics +Subscriptions related to Cognos Analytics (in the **ibm-cpd-operators** namespace): - **cpd-platform-operator** -- **ibm-watson-discovery-operator** -- **ibm-elasticsearch-operator** -- **ibm-etcd-operator** -- **ibm-minio-operator** -- **ibm-model-train-classic-operator** -- **ibm-rabbitmq-operator** -- **ibm-watson-gateway-operator** +- **ibm-ca-operator-controller-manager** -Subscriptions related to Watson Discovery (in the **ibm-common-services** namespace): +Cognos Analytics is made up of many moving parts across multiple namespaces. -- **cloud-native-postgresql** +In the **ibm-cpd-operators** namespace: -Watson Discovery is made up of many moving parts across multiple namespaces. +```bash +oc -n ibm-cpd-operators get deployments +NAME READY UP-TO-DATE AVAILABLE AGE +ibm-ca-operator-controller-manager 1/1 1 1 19m +``` -In the **ibm-common-services** namespace: +In the **ibm-cpd** namespace: -- 13 workloads / 16 pods -- 0.126 CPU usage / 1.11 CPU requests / 3.57 CPU limit (8% utilization) -- 921.9 MiB memory usage, 2.27 GiB memory requests / 5.72 GiB memory limit (40% utilization) -``` -oc -n ibm-common-services get deployments -NAME READY UP-TO-DATE AVAILABLE AGE -cert-manager-cainjector 1/1 1 1 3h9m -cert-manager-controller 1/1 1 1 3h9m -cert-manager-webhook 1/1 1 1 3h9m -configmap-watcher 1/1 1 1 3h9m -ibm-cert-manager-operator 1/1 1 1 3h10m -ibm-common-service-operator 1/1 1 1 3h16m -ibm-common-service-webhook 1/1 1 1 3h14m -ibm-namespace-scope-operator 1/1 1 1 3h15m -ibm-zen-operator 1/1 1 1 3h10m -meta-api-deploy 1/1 1 1 3h9m -operand-deployment-lifecycle-manager 1/1 1 1 3h14m -postgresql-operator-controller-manager-1-15-0 1/1 1 1 134m -secretshare 1/1 1 1 3h14m +```bash +oc -n ibm-cpd get caservice,deployments +NAME AGE +caservice.ca.cpd.ibm.com/ca-addon-cr 19m + +NAME READY UP-TO-DATE AVAILABLE AGE +deployment.apps/cognos-analytics-cognos-analytics-addon 1/1 1 1 9m17s + ``` -In the **ibm-cpd-operators** namespace: +### SPSS +Subscriptions related to SPSS (in the **ibm-cpd-operators** namespace): -- 10 workloads / 10 pods -- 0.984 CPU usage / 1.65 CPU requests / 7.3 CPU limit (60% utilization) -- 671.6 MiB memory usage, 2.56 GiB memory requests / 9.46 GiB memory limit (25% utilization) +- **cpd-platform-operator** +- **ibm-cpd-spss-operator** -``` -oc -n ibm-cpd-operators get deployments +SPSS is made up of many moving parts across multiple namespaces. + +In the **ibm-cpd-operators** namespace: + +```bash NAME READY UP-TO-DATE AVAILABLE AGE -cpd-platform-operator-manager 1/1 1 1 3h12m -gateway-operator 1/1 1 1 131m -ibm-common-service-operator 1/1 1 1 3h12m -ibm-elasticsearch-operator-ibm-es-controller-manager 1/1 1 1 131m -ibm-etcd-operator 1/1 1 1 131m -ibm-minio-operator 1/1 1 1 131m -ibm-model-train-classic-operator 1/1 1 1 131m -ibm-namespace-scope-operator 1/1 1 1 3h12m -ibm-rabbitmq-operator 1/1 1 1 131m -wd-discovery-operator 1/1 1 1 131m +ibm-cpd-canvasbase-operator 1/1 1 1 38m +ibm-cpd-spss-operator 1/1 1 1 38m ``` In the **ibm-cpd** namespace: -- 49 workloads / 83 pods -- 0.994 CPU usage / 20.06 CPU requests / 112.3 CPU limit (5% utilization) -- 12.2 GiB memory usage, 96.1 GiB memory requests / 195.5 GiB memory limit (12% utilization) -``` -oc -n ibm-cpd get watsondiscoveries,deployments,sts -NAME VERSION READY READYREASON UPDATING UPDATINGREASON DEPLOYED VERIFIED QUIESCE DATASTOREQUIESCE AGE -watsondiscovery.discovery.watson.ibm.com/wd 4.0.9 True Stable False Stable 23/23 23/23 NOT_QUIESCED NOT_QUIESCED 130m - -NAME READY UP-TO-DATE AVAILABLE AGE -deployment.apps/ibm-nginx 3/3 3 3 174m -deployment.apps/usermgmt 3/3 3 3 176m -deployment.apps/wd-discovery-cnm-api 1/1 1 1 39m -deployment.apps/wd-discovery-converter 1/1 1 1 39m -deployment.apps/wd-discovery-crawler 1/1 1 1 39m -deployment.apps/wd-discovery-gateway 1/1 1 1 19m -deployment.apps/wd-discovery-glimpse-builder 1/1 1 1 37m -deployment.apps/wd-discovery-glimpse-query 1/1 1 1 39m -deployment.apps/wd-discovery-haywire 1/1 1 1 39m -deployment.apps/wd-discovery-hdp-rm 1/1 1 1 39m -deployment.apps/wd-discovery-ingestion-api 1/1 1 1 39m -deployment.apps/wd-discovery-inlet 1/1 1 1 39m -deployment.apps/wd-discovery-management 1/1 1 1 39m -deployment.apps/wd-discovery-minerapp 1/1 1 1 24m -deployment.apps/wd-discovery-orchestrator 1/1 1 1 39m -deployment.apps/wd-discovery-outlet 1/1 1 1 39m -deployment.apps/wd-discovery-po-box 1/1 1 1 122m -deployment.apps/wd-discovery-project-data-prep-agent 1/1 1 1 39m -deployment.apps/wd-discovery-ranker-master 1/1 1 1 37m -deployment.apps/wd-discovery-ranker-monitor-agent 1/1 1 1 39m -deployment.apps/wd-discovery-ranker-rest 1/1 1 1 37m -deployment.apps/wd-discovery-rapi 1/1 1 1 120m -deployment.apps/wd-discovery-rcm 1/1 1 1 122m -deployment.apps/wd-discovery-serve-ranker 1/1 1 1 37m -deployment.apps/wd-discovery-stateless-api-model-runtime 1/1 1 1 39m -deployment.apps/wd-discovery-stateless-api-rest-proxy 1/1 1 1 39m -deployment.apps/wd-discovery-support 0/0 0 0 39m -deployment.apps/wd-discovery-tooling 1/1 1 1 24m -deployment.apps/wd-discovery-training-agents 1/1 1 1 39m -deployment.apps/wd-discovery-training-crud 1/1 1 1 39m -deployment.apps/wd-discovery-training-rest 1/1 1 1 39m -deployment.apps/wd-discovery-watson-gateway-gw-instance 1/1 1 1 15m -deployment.apps/wd-discovery-wd-indexer 1/1 1 1 122m -deployment.apps/wd-discovery-wksml 1/1 1 1 39m -deployment.apps/zen-audit 1/1 1 1 171m -deployment.apps/zen-core 3/3 3 3 171m -deployment.apps/zen-core-api 3/3 3 3 171m -deployment.apps/zen-data-sorcerer 2/2 2 2 165m -deployment.apps/zen-watchdog 1/1 1 1 165m -deployment.apps/zen-watcher 1/1 1 1 170m - -NAME READY AGE -statefulset.apps/dsx-influxdb 1/1 167m -statefulset.apps/wd-discovery-etcd 3/3 124m -statefulset.apps/wd-discovery-hdp-worker 2/2 39m -statefulset.apps/wd-discovery-sdu 1/1 24m -statefulset.apps/wd-ibm-elasticsearch-es-server-client 1/1 121m -statefulset.apps/wd-ibm-elasticsearch-es-server-data 1/1 121m -statefulset.apps/wd-ibm-elasticsearch-es-server-master 1/1 121m -statefulset.apps/wd-minio-discovery 4/4 125m -statefulset.apps/wd-rabbitmq-discovery 1/1 125m -statefulset.apps/zen-metastoredb 3/3 179m -``` +```bash +oc -n ibm-cpd get spss,deployments +NAME VERSION STATUS AGE +spss.spssmodeler.cpd.ibm.com/spssmodeler 9.0.0 Completed 38m +NAME READY UP-TO-DATE AVAILABLE AGE +deployment.apps/canvasbase-flow-api 1/1 1 1 35m +deployment.apps/canvasbase-flow-ui 1/1 1 1 30m +deployment.apps/spss-modeler-modeler-flow-api 1/1 1 1 22m + +``` Role Variables - Installation ----------------------------- ### cpd_service_name -Name of the service to install, supported values are: `wsl`, `wml`, `wd`, `aiopenscale` and `spark` +Name of the service to install, supported values are: `wsl`, `wml`, `wd`, `aiopenscale`, `spark`, `ca` and `spss` - **Required** - Environment Variable: `CPD_SERVICE_NAME` @@ -648,7 +376,7 @@ The CP4D Admin username to authenticate with CP4D APIs. If you didn't change the - Environment Variable: `CPD_ADMIN_USERNAME` - Default Value: - `admin` (CPD 4.6) - - `cpadmin` (CPD 4.8) + - `cpadmin` (CPD 4.8 and 5.0) ### cpd_admin_password The CP4D Admin User password to call CP4D API to provision Discovery Instance. If you didn't change the initial admin password after CP4D install, you don't need to provide it. The initial admin user password for `admin` or `cpdamin` will be used. @@ -657,7 +385,7 @@ The CP4D Admin User password to call CP4D API to provision Discovery Instance. I - Environment Variable: `CPD_ADMIN_PASSWORD` - Default Value: - CPD 4.6: Looked up from the `admin-user-details` secret in the `cpd_instance_namespace` namespace - - CPD 4.8: Looked up from the `ibm-iam-bindinfo-platform-auth-idp-credentials` secret in the `cpd_instance_namespace` namespace + - CPD 4.8 and 5.0: Looked up from the `ibm-iam-bindinfo-platform-auth-idp-credentials` secret in the `cpd_instance_namespace` namespace ### cpd_service_scale_config Adjust and scale the resources for your Cloud Pak for Data services to increase processing capacity. @@ -730,7 +458,7 @@ Example Playbook - hosts: localhost any_errors_fatal: true vars: - cpd_product_version: 4.5.0 + cpd_product_version: 5.0.0 cpd_service_storage_class: ibmc-file-gold-gid cpd_service_name: wsl roles: diff --git a/ibm/mas_devops/roles/cp4d_service/tasks/determine-storage-classes.yml b/ibm/mas_devops/roles/cp4d_service/tasks/determine-storage-classes.yml index 63e966622..7d193bdc5 100644 --- a/ibm/mas_devops/roles/cp4d_service/tasks/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/cp4d_service/tasks/determine-storage-classes.yml @@ -1,48 +1,38 @@ --- -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" - -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" -# 2. Set Storage (Required) +# 2. Debug storage class configuration # ----------------------------------------------------------------------------- -# - name: Default Metadata Storage if not set by user -# when: -# # - cpd_service_name not in cpd_services_supporting_block_storage_class # if not installing one of the services, then we just need a file storage -# - cpd_service_storage_class is not defined or cpd_service_storage_class == "" -# set_fact: -# cpd_service_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwx) }}" - -- name: Set default File and Block Storage if not set by user +- name: "determine-storage-classes : Lookup & use default file storage class (if needed)" when: - # - cpd_service_name in cpd_services_supporting_block_storage_class # if installing one of the services, then we need both block and file storage + - defaultStorageClasses.success - cpd_service_storage_class is not defined or cpd_service_storage_class == "" + set_fact: + cpd_service_storage_class: "{{ defaultStorageClasses.rwx }}" + +- name: "determine-storage-classes : Lookup & use default block storage class (if needed)" + when: + - defaultStorageClasses.success - cpd_service_block_storage_class is not defined or cpd_service_block_storage_class == "" set_fact: - cpd_service_storage_class: "{{ (cpd_minor_version is version_compare('4.6', '>=')) | ternary(lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwx), lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo)) }}" # if cpd 4.6+ then we need RWX as SC, otherwise it will be RWO. - cpd_service_block_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + cpd_service_block_storage_class: "{{ defaultStorageClasses.rwo }}" -- name: Assert that service storage class has been defined +- name: Assert that service storage class has been defined (RWX) assert: that: cpd_service_storage_class is defined and cpd_service_storage_class != "" fail_msg: "cpd_service_storage_class must be defined" -# 3. Debug storage class configuration -# ----------------------------------------------------------------------------- +- name: Assert that service storage class has been defined (RWO) + assert: + that: cpd_service_block_storage_class is defined and cpd_service_block_storage_class != "" + fail_msg: "cpd_service_block_storage_class must be defined" + - name: "Debug CP4D service {{ cpd_service_name }} storage class configuration" debug: msg: - - "Storage class (CP4D service {{ cpd_service_name }}) ............................ {{ cpd_service_storage_class }}" - - "Block Storage class (CP4D service {{ cpd_service_name }}) ...................... {{ cpd_service_block_storage_class | default('N/A',true) }}" + - "Storage Class (RWX) .................... {{ cpd_service_storage_class }}" + - "Block Storage Class (RWO) .............. {{ cpd_service_block_storage_class }}" diff --git a/ibm/mas_devops/roles/cp4d_service/tasks/wait/wait-ccs.yml b/ibm/mas_devops/roles/cp4d_service/tasks/wait/wait-ccs.yml index cd7146570..f304fa5be 100644 --- a/ibm/mas_devops/roles/cp4d_service/tasks/wait/wait-ccs.yml +++ b/ibm/mas_devops/roles/cp4d_service/tasks/wait/wait-ccs.yml @@ -109,16 +109,7 @@ - cpd_48_or_higher # elastic search operator was just introduced with cpd 4.8 - not skip_ibm_entitlement_injection # eventually we hope to be able to skip patching the elastic search cr with image pull secret, but not for now -# 5. Wait for CouchDB Stateful Set to be ready -# ----------------------------------------------------------------------------- -# There have been issues with CouchDB not starting due to Persistent Storage, -# This task restarts any failing pods -- include_tasks: "tasks/wait/wait-couchdb.yml" - when: - - cpd_48_or_higher - - -# 6. Wait for CCS CR to be ready +# 5. Wait for CCS CR to be ready # ----------------------------------------------------------------------------- # Note: We can't fail early when we see Failed status, as the operator will # report failed multiple times during initial reconcile. diff --git a/ibm/mas_devops/roles/cp4d_service/tasks/wait/wait-couchdb.yml b/ibm/mas_devops/roles/cp4d_service/tasks/wait/wait-couchdb.yml deleted file mode 100644 index 8b7cf0939..000000000 --- a/ibm/mas_devops/roles/cp4d_service/tasks/wait/wait-couchdb.yml +++ /dev/null @@ -1,108 +0,0 @@ ---- -# 1. Wait for couch-db stateful set to start all the replica pods -# ----------------------------------------------------------------------------- -- name: "wait-couchdb: Wait for CouchDB pods to be created" - k8s_info: - kind: StatefulSet - namespace: "{{ cpd_instance_namespace }}" - name: "wdp-couchdb" - register: couchdbStatefulSet - retries: 40 # Give 20 minutes for the ccs Operator to start CouchDB Pods (Logs show this taking ~7 minutes in a good run) - delay: 30 - until: >- - (( couchdbStatefulSet.resources[0].status is defined - and couchdbStatefulSet.resources[0].status.replicas is defined - and couchdbStatefulSet.resources[0].status.replicas == 0 ) - or ( couchdbStatefulSet.resources[0].status is defined - and couchdbStatefulSet.resources[0].status.updatedReplicas is defined - and couchdbStatefulSet.resources[0].status.replicas == couchdbStatefulSet.resources[0].status.updatedReplicas )) - - -# 2. Wait for couchdb replica pods to become ready -# ----------------------------------------------------------------------------- -- name: "wait-couchdb: Wait for CouchDB pods to be become ready" - k8s_info: - kind: StatefulSet - namespace: "{{ cpd_instance_namespace }}" - name: "wdp-couchdb" - register: couchdbStatefulSet - retries: 10 # Give 5 minutes for the pods to become ready - delay: 30 - until: >- - couchdbStatefulSet.resources[0].status.readyReplicas is defined - and couchdbStatefulSet.resources[0].status.replicas == couchdbStatefulSet.resources[0].status.readyReplicas - #ignore-errors: true # If this fails then we restart pending pods below - failed_when: false - -# 2. Restart any couchDB pods that are still Pending -# ----------------------------------------------------------------------------- -- set_fact: - is_couchdb_ready: true - when: - couchdbStatefulSet.resources[0].status.readyReplicas is defined - and couchdbStatefulSet.resources[0].status.replicas == couchdbStatefulSet.resources[0].status.readyReplicas - -- name: "wait-couchdb: Detecting and restarting pending CouchDB Pods" - block: - - name: "install-cp4d : Get pending CouchDB Pods" - kubernetes.core.k8s_info: - api_version: v1 - kind: Pod - label_selectors: - - "app=couchdb" - field_selectors: - - "status.phase=Pending" - namespace: "{{ cpd_instance_namespace }}" - register: pending_pod_lookup - - - set_fact: - pending_pod_names: "{{ pending_pod_lookup.resources | map(attribute='metadata.name') }}" - - - debug: - msg: "Restarting pending CouchDB Pods: {{ pending_pod_names }}" - - - name: "wait-couchdb: Restarting pending CouchDB Pods" - kubernetes.core.k8s: - state: absent - api_version: v1 - kind: Pod - namespace: "{{ cpd_instance_namespace }}" - name: "{{ item }}" - loop: "{{ pending_pod_names }}" - - # 3. Wait again couchdb replica pods to become ready - # ----------------------------------------------------------------------------- - - name: "wait-couchdb: Wait for CouchDB pods to be become ready" - k8s_info: - kind: StatefulSet - namespace: "{{ cpd_instance_namespace }}" - name: "wdp-couchdb" - register: couchdbStatefulSet - retries: 10 # Give another 5 minutes for the pods to become ready - delay: 30 - until: >- - couchdbStatefulSet.resources[0].status.readyReplicas is defined - and couchdbStatefulSet.resources[0].status.replicas == couchdbStatefulSet.resources[0].status.readyReplicas - failed_when: false # We handle and log the failure below. - - - name: "wait-couchdb: Fail if CouchDB pods are not ready" - block: - - name: "install-cp4d : Get Pending CouchDB Pods" - kubernetes.core.k8s_info: - api_version: v1 - kind: Pod - label_selectors: - - "app=couchdb" - field_selectors: - - "status.phase=Pending" - namespace: "{{ cpd_instance_namespace }}" - register: pending_pod_lookup - - - fail: - msg: - - "CouchDB pods are not ready {{ couchdbStatefulSet.resources[0].status }}" - - "Pending CouchDB Pods: {{ pending_pod_lookup.resources | map(attribute='metadata.name') }}" - when: - couchdbStatefulSet.resources[0].status.replicas != couchdbStatefulSet.resources[0].status.readyReplicas - - when: is_couchdb_ready is not defined diff --git a/ibm/mas_devops/roles/db2/README.md b/ibm/mas_devops/roles/db2/README.md index 5312ddc6c..7691c626e 100644 --- a/ibm/mas_devops/roles/db2/README.md +++ b/ibm/mas_devops/roles/db2/README.md @@ -442,82 +442,13 @@ Set the [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - Environment Variable: `MASBR_JOB_TIMEZONE` - Default: None -### masbr_storage_type -Set `local` or `cloud` to indicate this role to save the backup files to local file system or cloud object storage. - -- **Required** -- Environment Variable: `MASBR_STORAGE_TYPE` -- Default: None - ### masbr_storage_local_folder Set local path to save the backup files. -- **Required** only when `MASBR_STORAGE_TYPE=local` +- **Required** - Environment Variable: `MASBR_STORAGE_LOCAL_FOLDER` - Default: None -### masbr_storage_cloud_rclone_file -Set the path of `rclone.conf` file. - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_RCLONE_FILE` -- Default: None - -### masbr_storage_cloud_rclone_name -Set the configuration name defined in `rclone.conf` file. - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_RCLONE_NAME` -- Default: None - -### masbr_storage_cloud_bucket -Set the object storage bucket name for saving the backup files - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_BUCKET` -- Default: None - -### masbr_slack_enabled -Set `true` or `false` to indicate whether this role will send Slack notification messages of the backup and restore progress. - -- Optional -- Environment Variable: `MASBR_SLACK_ENABLED` -- Default: `false` - -### masbr_slack_level -Set `failure`, `info` or `verbose` to indicate this role to send Slack notification messages in which backup and resore phases: - -| Slack level | Backup/Restore phases | -| ----------- | ------------------------------------------------------- | -| failure | `Failed`, `PartiallyFailed` | -| info | `Completed`, `Failed`, `PartiallyFailed` | -| verbose | `InProgress`, `Completed`, `Failed`, `PartiallyFailed` | - -- Optional -- Environment Variable: `MASBR_SLACK_LEVEL` -- Default: `info` - -### masbr_slack_token -The Slack integration token. - -- **Required** only when `MASBR_SLACK_ENABLED=true` -- Environment Variable: `MASBR_SLACK_TOKEN` -- Default: None - -### masbr_slack_channel -The Slack channel to send the notification messages to. - -- **Required** only when `MASBR_SLACK_ENABLED=true` -- Environment Variable: `MASBR_SLACK_CHANNEL` -- Default: None - -### masbr_slack_user -The sender of the Slack notification message. - -- Optional -- Environment Variable: `MASBR_SLACK_USER` -- Default: `MASBR` - ### masbr_backup_type Set `full` or `incr` to indicate the role to create a full backup or incremental backup. @@ -580,7 +511,6 @@ Example Playbook vars: db2_action: backup db2_instance_name: db2u-db01 - masbr_storage_type: local masbr_storage_local_folder: /tmp/masbr roles: - ibm.mas_devops.db2 @@ -594,7 +524,6 @@ Example Playbook db2_action: restore db2_instance_name: db2u-db01 masbr_restore_from_version: 20240621021316 - masbr_storage_type: local masbr_storage_local_folder: /tmp/masbr roles: - ibm.mas_devops.db2 diff --git a/ibm/mas_devops/roles/db2/tasks/backup/main.yml b/ibm/mas_devops/roles/db2/tasks/backup/main.yml index 522767844..e25acad2e 100644 --- a/ibm/mas_devops/roles/db2/tasks/backup/main.yml +++ b/ibm/mas_devops/roles/db2/tasks/backup/main.yml @@ -30,28 +30,7 @@ _component_before_task_path: "{{ role_path }}/tasks/before-backup-restore.yml" -# Create k8s Job to run backup tasks -# ----------------------------------------------------------------------------- -- name: "Create k8s Job to run backup tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" - vars: - _rt_role_name: "db2" - _rt_env: - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "DB2_ACTION" - value: "{{ db2_action }}" - - name: "DB2_INSTANCE_NAME" - value: "{{ db2_instance_name }}" - - name: "DB2_NAMESPACE" - value: "{{ db2_namespace }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - - name: "Run backup tasks" - when: not masbr_create_task_job block: # Update backup job status: New # ------------------------------------------------------------------------- diff --git a/ibm/mas_devops/roles/db2/tasks/install/determine-storage-classes.yml b/ibm/mas_devops/roles/db2/tasks/install/determine-storage-classes.yml index ba98fb985..5f74a94bf 100644 --- a/ibm/mas_devops/roles/db2/tasks/install/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/db2/tasks/install/determine-storage-classes.yml @@ -1,30 +1,19 @@ --- - -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" - -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses - -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" # 2. Data Storage (Required) # ----------------------------------------------------------------------------- - name: Default Data Storage for ROKS if not set by user (ReadWriteOnce) - when: db2_data_storage_class is not defined or db2_data_storage_class == "" + when: + - db2_data_storage_class is not defined or db2_data_storage_class == "" + - defaultStorageClasses.success vars: set_fact: - db2_data_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + db2_data_storage_class: "{{ defaultStorageClasses.rwo }}" - name: Assert that a data storage class has been defined assert: @@ -35,9 +24,11 @@ # 3. Meta Storage (Required) # ----------------------------------------------------------------------------- - name: Default Meta Storage for ROKS if not set by user (ReadWriteMany) - when: db2_meta_storage_class is not defined or db2_meta_storage_class == "" + when: + - db2_meta_storage_class is not defined or db2_meta_storage_class == "" + - defaultStorageClasses.success set_fact: - db2_meta_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwx) }}" + db2_meta_storage_class: "{{ defaultStorageClasses.rwx }}" - name: Assert that a meta storage class has been defined assert: @@ -48,9 +39,11 @@ # 4. Logs Storage (Optional) # ----------------------------------------------------------------------------- - name: Default Logs Storage for ROKS if not set by user (ReadWriteOnce) - when: db2_logs_storage_class is not defined or db2_logs_storage_class == "" + when: + - db2_logs_storage_class is not defined or db2_logs_storage_class == "" + - defaultStorageClasses.success set_fact: - db2_logs_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + db2_logs_storage_class: "{{ defaultStorageClasses.rwo }}" # 5. Backup Storage (Optional) @@ -58,15 +51,17 @@ - name: Default Backup Storage for ROKS if not set by user (ReadWriteMany) when: db2_backup_storage_class is not defined or db2_backup_storage_class == "" set_fact: - db2_backup_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwx) }}" + db2_backup_storage_class: "{{ defaultStorageClasses.rwx }}" # 6. Temp Storage (Optional) # ----------------------------------------------------------------------------- - name: Default Temp Storage for ROKS if not set by user (ReadWriteOnce) - when: db2_temp_storage_class is not defined or db2_temp_storage_class == "" + when: + - db2_temp_storage_class is not defined or db2_temp_storage_class == "" + - defaultStorageClasses.success set_fact: - db2_temp_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + db2_temp_storage_class: "{{ defaultStorageClasses.rwo }}" # 7. Debug storage class configuration @@ -74,8 +69,8 @@ - name: "Debug DB2U storage class configuration" debug: msg: - - "Storage class (meta) ......... {{ db2_meta_storage_class }}" - - "Storage class (data) ......... {{ db2_data_storage_class }}" - - "Storage class (backup) ....... {{ db2_backup_storage_class }}" - - "Storage class (logs) ......... {{ db2_logs_storage_class }}" - - "Storage class (temp) ......... {{ db2_temp_storage_class }}" + - "Storage class (meta) ................... {{ db2_meta_storage_class }}" + - "Storage class (data) ................... {{ db2_data_storage_class }}" + - "Storage class (backup) ................. {{ db2_backup_storage_class | default('', true) }}" + - "Storage class (logs) ................... {{ db2_logs_storage_class | default('', true) }}" + - "Storage class (temp) ................... {{ db2_temp_storage_class | default('', true) }}" diff --git a/ibm/mas_devops/roles/db2/tasks/install/main.yml b/ibm/mas_devops/roles/db2/tasks/install/main.yml index 25908b7b9..345d7bf2b 100644 --- a/ibm/mas_devops/roles/db2/tasks/install/main.yml +++ b/ibm/mas_devops/roles/db2/tasks/install/main.yml @@ -157,12 +157,14 @@ - name: "Delete old db2 subscription, operand request and csv from {{ ibm_common_services_namespace }}" include_tasks: "tasks/delete_db2_operand_request.yml" + - name: "Create Db2 Universal Operator Subscription in {{ db2_namespace }} namespace" - include_tasks: "{{ role_path }}/../../common_tasks/create_subscription.yml" - vars: - subscription_namespace: "{{ db2_namespace }}" + ibm.mas_devops.apply_subscription: + namespace: "{{ db2_namespace }}" package_name: db2u-operator - channel_name: "{{ db2_channel }}" + package_channel: "{{ db2_channel }}" + register: subscription + # 7. Get the cluster subdomain to be used for the certificate and route creation # ----------------------------------------------------------------------------- @@ -317,7 +319,7 @@ kubernetes.core.k8s_info: api_version: v1 kind: Secret - name: "db2u-certificate" + name: "db2u-certificate-{{db2_instance_name}}" namespace: "{{db2_namespace}}" register: _db2_instance_certificates diff --git a/ibm/mas_devops/roles/db2/tasks/restore/main.yml b/ibm/mas_devops/roles/db2/tasks/restore/main.yml index a9f526398..a6a1b18a2 100644 --- a/ibm/mas_devops/roles/db2/tasks/restore/main.yml +++ b/ibm/mas_devops/roles/db2/tasks/restore/main.yml @@ -29,28 +29,7 @@ _component_before_task_path: "{{ role_path }}/tasks/before-backup-restore.yml" -# Create k8s Job to run restore tasks -# ----------------------------------------------------------------------------- -- name: "Create k8s Job to run restore tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" - vars: - _rt_role_name: "db2" - _rt_env: - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "DB2_ACTION" - value: "{{ db2_action }}" - - name: "DB2_INSTANCE_NAME" - value: "{{ db2_instance_name }}" - - name: "DB2_NAMESPACE" - value: "{{ db2_namespace }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - - name: "Run restore tasks" - when: not masbr_create_task_job block: # Update restore job status: New # ------------------------------------------------------------------------- diff --git a/ibm/mas_devops/roles/db2/tasks/upgrade/run-db2-subscription-upgrade.yml b/ibm/mas_devops/roles/db2/tasks/upgrade/run-db2-subscription-upgrade.yml index 4160d3483..3c25639e0 100644 --- a/ibm/mas_devops/roles/db2/tasks/upgrade/run-db2-subscription-upgrade.yml +++ b/ibm/mas_devops/roles/db2/tasks/upgrade/run-db2-subscription-upgrade.yml @@ -22,11 +22,11 @@ # Leverage that we're upgrading DB2 and check if need to migrate db2 operator from ibm-common-services namespace - name: "Update Db2 Universal Operator Subscription in {{ db2_namespace }} namespace" - include_tasks: "{{ role_path }}/../../common_tasks/create_subscription.yml" - vars: - subscription_namespace: "{{ db2_namespace }}" + ibm.mas_devops.apply_subscription: + namespace: "{{ db2_namespace }}" package_name: db2u-operator - channel_name: "{{ db2_channel }}" + package_channel: "{{ db2_channel }}" + register: subscription - name: "Pause for a minute before checking subscription status..." pause: diff --git a/ibm/mas_devops/roles/db2/templates/certs/certificate.yml.j2 b/ibm/mas_devops/roles/db2/templates/certs/certificate.yml.j2 index bf9676c4c..d17754d2a 100644 --- a/ibm/mas_devops/roles/db2/templates/certs/certificate.yml.j2 +++ b/ibm/mas_devops/roles/db2/templates/certs/certificate.yml.j2 @@ -1,7 +1,7 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: - name: "db2u-certificate" + name: "db2u-certificate-{{db2_instance_name}}" namespace: "{{ db2_namespace }}" {% if custom_labels is defined and custom_labels.items() %} labels: @@ -10,7 +10,7 @@ metadata: {% endfor %} {% endif %} spec: - secretName: "db2u-certificate" + secretName: "db2u-certificate-{{db2_instance_name}}" duration: "175200h0m0s" renewBefore: "2160h0m0s" issuerRef: diff --git a/ibm/mas_devops/roles/db2/templates/db2ucluster.yml.j2 b/ibm/mas_devops/roles/db2/templates/db2ucluster.yml.j2 index 867c3838b..563c84658 100644 --- a/ibm/mas_devops/roles/db2/templates/db2ucluster.yml.j2 +++ b/ibm/mas_devops/roles/db2/templates/db2ucluster.yml.j2 @@ -57,7 +57,7 @@ spec: settings: dftTableOrg: "{{db2_table_org }}" ssl: - secretName: "db2u-certificate" + secretName: "db2u-certificate-{{db2_instance_name}}" certLabel: "CN=db2u" instance: {% if db2_instance_registry is defined and db2_instance_registry != "" %} diff --git a/ibm/mas_devops/roles/dro/tasks/install-dro/determine-storage-classes.yml b/ibm/mas_devops/roles/dro/tasks/install-dro/determine-storage-classes.yml index 933866710..2ca02915a 100644 --- a/ibm/mas_devops/roles/dro/tasks/install-dro/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/dro/tasks/install-dro/determine-storage-classes.yml @@ -1,22 +1,8 @@ --- - -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" - -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses - -- name: "Debug available storage classes" - debug: - msg: - - "Available storage classes .................. {{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" # 2. Set Storage (Required) @@ -24,7 +10,7 @@ - name: Default Storage for ROKS if not set by user when: dro_storage_class is not defined or dro_storage_class == "" set_fact: - dro_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + dro_storage_class: "{{ defaultStorageClasses.rwo }}" - name: Assert that storage class has been defined assert: @@ -37,4 +23,4 @@ - name: "Debug DRO storage class configuration" debug: msg: - - "Auto Detected Storage class for DRO .................... {{ dro_storage_class }}" + - "Auto Detected Storage class for DRO .... {{ dro_storage_class }}" diff --git a/ibm/mas_devops/roles/grafana/tasks/install/determine-storage-classes.yml b/ibm/mas_devops/roles/grafana/tasks/install/determine-storage-classes.yml index c74bfdd6b..d429a9e20 100644 --- a/ibm/mas_devops/roles/grafana/tasks/install/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/grafana/tasks/install/determine-storage-classes.yml @@ -1,17 +1,8 @@ --- - -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "install : determine-storage-classes : Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" - -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" # 2. Grafana Instance Storage (Required) @@ -19,7 +10,7 @@ - name: "install : determine-storage-classes : Default Grafana Instance Storage if not set by user" when: grafana_instance_storage_class is not defined or grafana_instance_storage_class == "" set_fact: - grafana_instance_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + grafana_instance_storage_class: "{{ defaultStorageClasses.rwo }}" - name: "install : determine-storage-classes : Assert that Grafana Instance storage class has been defined" assert: diff --git a/ibm/mas_devops/roles/grafana/tasks/install/main.yml b/ibm/mas_devops/roles/grafana/tasks/install/main.yml index 410920345..fbdf94f04 100644 --- a/ibm/mas_devops/roles/grafana/tasks/install/main.yml +++ b/ibm/mas_devops/roles/grafana/tasks/install/main.yml @@ -60,17 +60,18 @@ # 4. Create Grafana Subscription # ----------------------------------------------------------------------------- - name: "install : Create Grafana v{{grafana_major_version}} Subscription" - include_tasks: "{{ role_path }}/../../common_tasks/create_subscription.yml" - vars: + ibm.mas_devops.apply_subscription: + namespace: "{{ grafana_namespace }}" package_name: grafana-operator - channel_name: "v{{grafana_major_version}}" - subscription_namespace: "{{ grafana_namespace }}" - subscription_config: + package_channel: "v{{grafana_major_version}}" + config: env: - name: "WATCH_NAMESPACE" value: "" - name: "DASHBOARD_NAMESPACES_ALL" value: "true" + register: subscription + # 5. Configure Grafana Operator so it can scan all namespaces for dashboards # ------------------------------------------------------------------------------------- diff --git a/ibm/mas_devops/roles/grafana/tasks/update/determine-storage-config.yml b/ibm/mas_devops/roles/grafana/tasks/update/determine-storage-config.yml index d7c545778..e8178d450 100644 --- a/ibm/mas_devops/roles/grafana/tasks/update/determine-storage-config.yml +++ b/ibm/mas_devops/roles/grafana/tasks/update/determine-storage-config.yml @@ -3,7 +3,7 @@ # 1. Set Grafana Instance Storage Class and Size from existing V5 Operator # ----------------------------------------------------------------------------- -- name: "update : determine-storage-classes : Get V5 Grafana Instance" +- name: "update : determine-storage-config : Get V5 Grafana Instance" kubernetes.core.k8s_info: api_version: grafana.integreatly.org/v1beta1 name: mas-grafana @@ -11,7 +11,7 @@ kind: Grafana register: grafana_cr_result -- name: "update : determine-storage-classes : Set the Grafana storage class and size" +- name: "update : determine-storage-config : Set the Grafana storage class and size" when: grafana_cr_result.resources[0].spec.persistentVolumeClaim is defined set_fact: grafana_instance_storage_class: "{{ grafana_cr_result.resources[0].spec.persistentVolumeClaim.spec.storageClassName }}" @@ -20,7 +20,7 @@ # 2. Set Grafana Instance Storage Class and Size from existing V4 Operator # ----------------------------------------------------------------------------- -- name: "update : determine-storage-classes : Get V4 Grafana Instance" +- name: "update : determine-storage-config : Get V4 Grafana Instance" when: grafana_instance_storage_class is not defined or grafana_instance_storage_class == "" kubernetes.core.k8s_info: api_version: integreatly.org/v1alpha1 @@ -29,7 +29,7 @@ kind: Grafana register: grafana_cr_result -- name: "update : determine-storage-classes : Set the Grafana storage class and size" +- name: "update : determine-storage-config : Set the Grafana storage class and size" when: - grafana_instance_storage_class is not defined or grafana_instance_storage_class == "" - grafana_cr_result.resources[0].spec.dataStorage is defined @@ -40,26 +40,18 @@ # 3. Set Default Grafana Instance Storage Class if not already determined # ----------------------------------------------------------------------------- -- name: "update : determine-storage-classes : Load default storage class information" - when: grafana_instance_storage_class is not defined or grafana_instance_storage_class == "" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" - -- name: "update : Lookup storage classes" - when: grafana_instance_storage_class is not defined or grafana_instance_storage_class == "" - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses +- name: "update : determine-storage-config : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" -- name: "update : determine-storage-classes : Default Grafana Instance Storage if still not set" +- name: "update : determine-storage-config : Default Grafana Instance Storage if still not set" when: grafana_instance_storage_class is not defined or grafana_instance_storage_class == "" set_fact: - grafana_instance_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + grafana_instance_storage_class: "{{ defaultStorageClasses.rwo }}" # 4. Fail if Grafana Storage Class has not been set # ----------------------------------------------------------------------------- -- name: "update : determine-storage-classes : Assert that Grafana Instance storage class has been defined" +- name: "update : determine-storage-config : Assert that Grafana Instance storage class has been defined" assert: that: grafana_instance_storage_class is defined and grafana_instance_storage_class != "" fail_msg: "grafana_instance_storage_class cannot be determined" @@ -67,7 +59,7 @@ # 5. Debug storage class configuration # ----------------------------------------------------------------------------- -- name: "update : determine-storage-classes : Debug grafana storage class configuration" +- name: "update : determine-storage-config : Debug grafana storage class configuration" debug: msg: - "Storage class (grafana instance) ....... {{ grafana_instance_storage_class }}" diff --git a/ibm/mas_devops/roles/ibm_catalogs/tasks/install/main.yml b/ibm/mas_devops/roles/ibm_catalogs/tasks/install/main.yml index 9ded0007f..602310508 100644 --- a/ibm/mas_devops/roles/ibm_catalogs/tasks/install/main.yml +++ b/ibm/mas_devops/roles/ibm_catalogs/tasks/install/main.yml @@ -26,10 +26,10 @@ - artifactory_token is not defined or artifactory_token == "" - airgap_install block: - - name: "Load CASE bundle versions for the offline catalog" - include_vars: - file: "{{ role_path }}/../../common_vars/casebundles/{{ mas_catalog_version }}.yml" - + - name: "Load Catalog Metadata" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ mas_catalog_version }}" + register: mas_catalog_metadata - name: "Create IBM offline catalog" kubernetes.core.k8s: template: templates/offline-catalog.yml.j2 diff --git a/ibm/mas_devops/roles/ibm_catalogs/templates/offline-catalog.yml.j2 b/ibm/mas_devops/roles/ibm_catalogs/templates/offline-catalog.yml.j2 index 6513d3310..df82b5d9c 100644 --- a/ibm/mas_devops/roles/ibm_catalogs/templates/offline-catalog.yml.j2 +++ b/ibm/mas_devops/roles/ibm_catalogs/templates/offline-catalog.yml.j2 @@ -9,5 +9,5 @@ spec: publisher: IBM description: Offline Catalog Source for IBM Maximo Application Suite sourceType: grpc - image: icr.io/cpopen/ibm-maximo-operator-catalog@{{ catalog_digest }} + image: icr.io/cpopen/ibm-maximo-operator-catalog@{{ mas_catalog_metadata.catalog_digest }} priority: 90 diff --git a/ibm/mas_devops/roles/install_operator/README.md b/ibm/mas_devops/roles/install_operator/README.md deleted file mode 100644 index 56f3d05ac..000000000 --- a/ibm/mas_devops/roles/install_operator/README.md +++ /dev/null @@ -1,30 +0,0 @@ -install_operator -================ - -TODO: Summarize role - -Role Variables --------------- - -### custom_labels -List of comma separated key=value pairs for setting custom labels on instance specific resources. - -- Optional -- Environment Variable: `CUSTOM_LABELS` -- Default Value: None - - -TODO: Finish documentation - - -Example Playbook ----------------- - -```yaml -TODO: Add example -``` - -License -------- - -EPL-2.0 diff --git a/ibm/mas_devops/roles/install_operator/defaults/main.yml b/ibm/mas_devops/roles/install_operator/defaults/main.yml deleted file mode 100644 index 2573b2561..000000000 --- a/ibm/mas_devops/roles/install_operator/defaults/main.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -# Dev Catalog Settings -# ----------------------------------------------------------------------------- -# Only required when using the development catalog sources for pre-release installation -# These are used to set up image pull secret in the openshift-marketplace namespace -# -# They will also be added to the ibm-entitlement image pull secret, this allows released -# versions of operators to be mixed with development versions of dependencies (e.g. truststore manager) -artifactory_username: "{{ lookup('env', 'ARTIFACTORY_USERNAME') | lower }}" -artifactory_token: "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}" - -# Custom Labels -# ----------------------------------------------------------------------------- -custom_labels: "{{ lookup('env', 'CUSTOM_LABELS') | default(None, true) | string | ibm.mas_devops.string2dict() }}" diff --git a/ibm/mas_devops/roles/install_operator/meta/main.yml b/ibm/mas_devops/roles/install_operator/meta/main.yml deleted file mode 100644 index 75c062f8f..000000000 --- a/ibm/mas_devops/roles/install_operator/meta/main.yml +++ /dev/null @@ -1,21 +0,0 @@ -galaxy_info: - author: David Parker (@durera) - description: Install an operator, supports both pre-release and released operator installation (access to pre-release operator builds is limited) - company: IBM - - license: EPL-2.0 - - min_ansible_version: 2.10 - - platforms: - - name: GenericLinux - versions: - - all - - galaxy_tags: - - ibm - - mas - - devops - -dependencies: - - role: ibm.mas_devops.ansible_version_check diff --git a/ibm/mas_devops/roles/install_operator/tasks/main.yml b/ibm/mas_devops/roles/install_operator/tasks/main.yml deleted file mode 100644 index b83f2b74a..000000000 --- a/ibm/mas_devops/roles/install_operator/tasks/main.yml +++ /dev/null @@ -1,91 +0,0 @@ ---- -# 1. Check artifactory_username/icr_username combination -# ----------------------------------------------------------------------------- -- name: "Fail if icr_username is provided but not icr_password" - ansible.builtin.assert: - that: icr_password is defined and icr_password != "" - fail_msg: "icr_password property has not been set" - when: icr_username is defined and icr_username != "" - -- name: "Fail if artifactory_username is provided but not artifactory_token" - ansible.builtin.assert: - that: artifactory_token is defined and artifactory_token != "" - fail_msg: "artifactory_token property has not been set" - when: artifactory_username is defined and artifactory_username != "" - -# 2. Create namespace we will deploy to -# ----------------------------------------------------------------------------- -- name: "Create namespace" - kubernetes.core.k8s: - api_version: v1 - kind: Namespace - name: "{{ namespace }}" - -- name: Add custom labels to namespace - when: custom_labels is defined and custom_labels | length > 0 - kubernetes.core.k8s: - state: patched - kind: Namespace - name: "{{ namespace }}" - definition: "{{ lookup('template', 'templates/custom_labels.json.j2') }}" - -# 3. Create an image pull secret for the pre-release catalog -# ----------------------------------------------------------------------------- -- name: "Debug Entitlement Secret Creation" - debug: - msg: - - "Target Namespace ....................... {{ namespace }}" - - "Artifactory Username ................... {{ artifactory_username | default('', true) }}" - - "Artifactory Password ................... {{ (artifactory_token is defined and artifactory_token != '') | ternary('************', '') }}" - - "ICR Username ........................... {{ icr_username | default('', true) }}" - - "ICR Password ........................... {{ (icr_password is defined and icr_password != '') | ternary('************', '') }}" - -- name: "Create ibm-entitlement secret" - kubernetes.core.k8s: - definition: - apiVersion: v1 - kind: Secret - type: kubernetes.io/dockerconfigjson - metadata: - name: ibm-entitlement - namespace: "{{ namespace }}" - data: - .dockerconfigjson: "{{ lookup('template', 'templates/ibm-entitlement-with-artifactory.json.j2') | to_nice_json | b64encode }}" - when: (icr_username is defined and icr_username != "") or (artifactory_username is defined and artifactory_username != "") - -# 4. Patch the default service account for pre-release build access -# ----------------------------------------------------------------------------- -# If we don't do this then we won't be able to pull the operator image from -# Artifactory -- name: "Patch default SA" - when: - - artifactory_username != "" - - artifactory_token != "" - kubernetes.core.k8s: - definition: - apiVersion: v1 - kind: ServiceAccount - metadata: - name: default - namespace: "{{ namespace }}" - imagePullSecrets: - - name: ibm-entitlement - -# 5. Create the operator group that will scope the operator -# ----------------------------------------------------------------------------- -- name: "Create operator group" - kubernetes.core.k8s: - definition: "{{ operator_group }}" - wait: yes - wait_timeout: 60 # subsequent tasks will fail if the group isn't fully created - -# 6. Create the subscription for the operator -# ----------------------------------------------------------------------------- -- name: "Create subscription" - kubernetes.core.k8s: - definition: "{{ subscription }}" - wait: yes - wait_timeout: 300 - wait_condition: - type: "CatalogSourcesUnhealthy" - status: "False" diff --git a/ibm/mas_devops/roles/install_operator/templates/custom_labels.json.j2 b/ibm/mas_devops/roles/install_operator/templates/custom_labels.json.j2 deleted file mode 100644 index 0ed9e4f9b..000000000 --- a/ibm/mas_devops/roles/install_operator/templates/custom_labels.json.j2 +++ /dev/null @@ -1,7 +0,0 @@ -metadata: -{% if custom_labels is defined and custom_labels.items() %} - labels: -{% for key, value in custom_labels.items() %} - "{{ key }}": "{{ value }}" -{% endfor %} -{% endif %} \ No newline at end of file diff --git a/ibm/mas_devops/roles/install_operator/templates/ibm-entitlement-with-artifactory.json.j2 b/ibm/mas_devops/roles/install_operator/templates/ibm-entitlement-with-artifactory.json.j2 deleted file mode 100644 index 0c9513373..000000000 --- a/ibm/mas_devops/roles/install_operator/templates/ibm-entitlement-with-artifactory.json.j2 +++ /dev/null @@ -1,32 +0,0 @@ -{ - "auths": { -{% if artifactory_username is defined and artifactory_username != "" %} - "docker-na-public.artifactory.swg-devops.com/wiotp-docker-local": { - "username": "{{ artifactory_username }}", - "password": "{{ artifactory_token }}", - "auth": "{{ (artifactory_username ~ ':' ~ artifactory_token) | b64encode }}" - }, - "docker-na-proxy-svl.artifactory.swg-devops.com/wiotp-docker-local": { - "username": "{{ artifactory_username }}", - "password": "{{ artifactory_token }}", - "auth": "{{ (artifactory_username ~ ':' ~ artifactory_token) | b64encode }}" - }, - "docker-na-proxy-rtp.artifactory.swg-devops.com/wiotp-docker-local": { - "username": "{{ artifactory_username }}", - "password": "{{ artifactory_token }}", - "auth": "{{ (artifactory_username ~ ':' ~ artifactory_token) | b64encode }}" - {% if icr_username is defined and icr_username != "" %} - }, - {% else %} - } - {% endif %} -{% endif %} -{% if icr_username is defined and icr_username != "" %} - "cp.icr.io/cp": { - "username": "{{ icr_username }}", - "password": "{{ icr_password }}", - "auth": "{{ (icr_username ~ ':' ~ icr_password) | b64encode }}" - } -{% endif %} - } -} diff --git a/ibm/mas_devops/roles/kafka/tasks/determine-storage-classes.yml b/ibm/mas_devops/roles/kafka/tasks/determine-storage-classes.yml index efaed6774..773a76686 100644 --- a/ibm/mas_devops/roles/kafka/tasks/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/kafka/tasks/determine-storage-classes.yml @@ -1,21 +1,8 @@ --- - -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" - -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses - -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" # 2. Set Storage (Required) @@ -23,7 +10,7 @@ - name: Default Kafka Storage for ROKS if not set by user when: kafka_storage_class is not defined or kafka_storage_class == "" set_fact: - kafka_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + kafka_storage_class: "{{ defaultStorageClasses.rwo }}" - name: Assert that kafka storage class has been defined assert: @@ -33,17 +20,18 @@ - name: Default Zookeeper Storage for ROKS if not set by user when: zookeeper_storage_class is not defined or zookeeper_storage_class == "" set_fact: - zookeeper_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + zookeeper_storage_class: "{{ defaultStorageClasses.rwo }}" - name: Assert that zookeeper storage class has been defined assert: that: zookeeper_storage_class is defined and zookeeper_storage_class != "" fail_msg: "zookeeper_storage_class must be defined" + # 3. Debug storage class configuration # ----------------------------------------------------------------------------- - name: "Debug Kafka storage classes configuration" debug: msg: - - "Storage class (kafka) ...... {{ kafka_storage_class }}" - - "Storage class (zookeeper) .. {{ zookeeper_storage_class }}" + - "Storage class (kafka) .................. {{ kafka_storage_class }}" + - "Storage class (zookeeper) .............. {{ zookeeper_storage_class }}" diff --git a/ibm/mas_devops/roles/kmodels/tasks/determine-storage-classes.yml b/ibm/mas_devops/roles/kmodels/tasks/determine-storage-classes.yml index 5ab4d0275..1bfe8994a 100644 --- a/ibm/mas_devops/roles/kmodels/tasks/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/kmodels/tasks/determine-storage-classes.yml @@ -1,24 +1,16 @@ -# Lookup storage class availabiity +--- +# 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" -- name: "determine-storage-classes : Lookup storage classes" - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" - -# Set Primary Storage (Required) +# 2. Set Primary Storage (Required) # ----------------------------------------------------------------------------- - name: "determine-storage-classes : Default Primary Storage if not set by user" when: cpd_primary_storage_class is not defined or cpd_primary_storage_class == "" set_fact: - cpd_primary_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwx) }}" + cpd_primary_storage_class: "{{ defaultStorageClasses.rwx }}" - name: "determine-storage-classes : Assert that primary storage class has been defined" assert: @@ -27,4 +19,4 @@ - name: Set primary StorageClass debug: - msg: "Primary storage class ...... {{ cpd_primary_storage_class }}" + msg: "Primary storage class ................. {{ cpd_primary_storage_class }}" diff --git a/ibm/mas_devops/roles/mongodb/README.md b/ibm/mas_devops/roles/mongodb/README.md index 6cf436e27..7a6023c6f 100644 --- a/ibm/mas_devops/roles/mongodb/README.md +++ b/ibm/mas_devops/roles/mongodb/README.md @@ -192,82 +192,13 @@ Set the [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - Environment Variable: `MASBR_JOB_TIMEZONE` - Default: None -### masbr_storage_type -Set `local` or `cloud` to indicate this role to save the backup files to local file system or cloud object storage. - -- **Required** -- Environment Variable: `MASBR_STORAGE_TYPE` -- Default: None - ### masbr_storage_local_folder Set local path to save the backup files. -- **Required** only when `MASBR_STORAGE_TYPE=local` +- **Required** - Environment Variable: `MASBR_STORAGE_LOCAL_FOLDER` - Default: None -### masbr_storage_cloud_rclone_file -Set the path of `rclone.conf` file. - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_RCLONE_FILE` -- Default: None - -### masbr_storage_cloud_rclone_name -Set the configuration name defined in `rclone.conf` file. - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_RCLONE_NAME` -- Default: None - -### masbr_storage_cloud_bucket -Set the object storage bucket name for saving the backup files - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_BUCKET` -- Default: None - -### masbr_slack_enabled -Set `true` or `false` to indicate whether this role will send Slack notification messages of the backup and restore progress. - -- Optional -- Environment Variable: `MASBR_SLACK_ENABLED` -- Default: `false` - -### masbr_slack_level -Set `failure`, `info` or `verbose` to indicate this role to send Slack notification messages in which backup and resore phases: - -| Slack level | Backup/Restore phases | -| ----------- | ------------------------------------------------------- | -| failure | `Failed`, `PartiallyFailed` | -| info | `Completed`, `Failed`, `PartiallyFailed` | -| verbose | `InProgress`, `Completed`, `Failed`, `PartiallyFailed` | - -- Optional -- Environment Variable: `MASBR_SLACK_LEVEL` -- Default: `info` - -### masbr_slack_token -The Slack integration token. - -- **Required** only when `MASBR_SLACK_ENABLED=true` -- Environment Variable: `MASBR_SLACK_TOKEN` -- Default: None - -### masbr_slack_channel -The Slack channel to send the notification messages to. - -- **Required** only when `MASBR_SLACK_ENABLED=true` -- Environment Variable: `MASBR_SLACK_CHANNEL` -- Default: None - -### masbr_slack_user -The sender of the Slack notification message. - -- Optional -- Environment Variable: `MASBR_SLACK_USER` -- Default: `MASBR` - ### masbr_backup_type Set `full` or `incr` to indicate the role to create a full backup or incremental backup. @@ -602,7 +533,6 @@ Example Playbooks vars: mongodb_action: backup mas_instance_id: masinst1 - masbr_storage_type: local masbr_storage_local_folder: /tmp/masbr roles: - ibm.mas_devops.mongodb @@ -616,7 +546,6 @@ Example Playbooks mongodb_action: restore mas_instance_id: masinst1 masbr_restore_from_version: 20240621021316 - masbr_storage_type: local masbr_storage_local_folder: /tmp/masbr roles: - ibm.mas_devops.mongodb @@ -745,7 +674,7 @@ If `avx` is not found in the available `flags` then either the physical processo ### LDAP Authentication -If authenticating via LDAP with PLAIN specified for `authMechanism` then `configDb` must be set to `$external` in the MongoCfg. The field `configDb` in the MongoCfg refers to the authentication database. +If authenticating via LDAP with PLAIN specified for `authMechanism` then `configDb` must be set to `$external` in the MongoCfg. The field `configDb` in the MongoCfg refers to the authentication database. ### CA Certificate Renewal diff --git a/ibm/mas_devops/roles/mongodb/tasks/determine-ibmcatalog-tag.yml b/ibm/mas_devops/roles/mongodb/tasks/determine-ibmcatalog-tag.yml index ce99d8b69..ebcc2dd79 100644 --- a/ibm/mas_devops/roles/mongodb/tasks/determine-ibmcatalog-tag.yml +++ b/ibm/mas_devops/roles/mongodb/tasks/determine-ibmcatalog-tag.yml @@ -2,49 +2,38 @@ # The MongoDB version is based on the chosen ibm-operator-catalog. However the # ibm-operator-catalog does not explicitly include information about the mongo version. # -# The configuration files in common_vars/casebundles do specify the MongoDB -# version for each of the MAS published ibm-operator-catalog catalogs. -# -# To determine which common_vars/casebundles configuration file to use, this role +# To determine which catalog metadata to use, this role # extracts the catalog_tag from the ibm-operator-catalog's displayName. # # For example: # displayName: IBM Maximo Operators (v9-240625-amd64) # # catalog_tag is v9-240625-amd64 -# MongoDB version will be determined by loading common_vars/casebundles/v9-240625-amd64.yml +# MongoDB version will be determined from the catalog metadata (get_catalog_info.py) # # And FINALLY... # If the MongoDB version cannot be determined from the above logic, -# the MongoDB version will be determined by the last configuration file in -# common_vars/casebundles/ +# the MongoDB version will be determined by the most recent catalog data +# available (get_newest_catalog_tag.py) # # And if still it cannot be determined because perhaps its not specified in the # configuration file, a default value will be used. -# List the common_vars/casebundle configuration files if last_catalog_tag is not defined -- block: - - name: "List yml files in common_vars/casebundles folder" - find: - paths: "{{ role_path }}/../../common_vars/casebundles" - patterns: "*.yml" - file_type: "file" - register: find_result - - - debug: - var: find_result - - # Determine the last configuration file in the list just in case we need it later - - set_fact: - last_catalog_tag: "{{ find_result['files'] | map(attribute='path') | map('regex_replace', '^.*/(.*).yml$', '\\1') | sort |last }}" - when: find_result is defined +- name: "Lookup the latest version of the Maximo Operator Catalog" when: last_catalog_tag is not defined or last_catalog_tag == "" + block: + - name: "Get newest operator catalog tag" + ibm.mas_devops.get_newest_catalog_tag: + arch: amd64 + register: _newest_catalog + - name: "Store tag in last_catalog_tag" + set_fact: + last_catalog_tag: "{{ _newest_catalog.result }}" -# Display the Last Catalog Version - name: "Display the Last Catalog Version" debug: - msg: - - "Last Catalog Version ............................ {{ last_catalog_tag }}" + msg: "Last Catalog Version ................... {{ last_catalog_tag | default('') }}" + # 1. Get the IBM Catalog if available # ----------------------------------------------------------------------------- @@ -57,49 +46,32 @@ register: catalog_lookup - name: "Determine catalog version from catalog displayName" - block: - # extract the catalog tag from displayName - - set_fact: - catalog_tag: "{{ catalog_lookup.resources[0].spec.displayName.split('(')[1].split(')')[0].split(' ')[0] }}" - when: - - catalog_lookup is defined - - catalog_lookup.resources is defined - - catalog_lookup.resources | length > 0 - - catalog_lookup.resources[0].spec is defined - - catalog_lookup.resources[0].spec.displayName is defined - - '"(" in catalog_lookup.resources[0].spec.displayName' - - - name: Check if file exists in casebundles - stat: - path: "{{ role_path }}/../../common_vars/casebundles/{{ catalog_tag }}.yml" - register: file_exists_result - when: catalog_tag is defined and catalog_tag != "" + when: + - catalog_lookup is defined + - catalog_lookup.resources is defined + - catalog_lookup.resources | length > 0 + - catalog_lookup.resources[0].spec is defined + - catalog_lookup.resources[0].spec.displayName is defined + - '"(" in catalog_lookup.resources[0].spec.displayName' + set_fact: + catalog_tag: "{{ catalog_lookup.resources[0].spec.displayName.split('(')[1].split(')')[0].split(' ')[0] }}" - # use last_catalog_tag if the casebundles file does not exist - - set_fact: - catalog_tag: "{{ last_catalog_tag }}" - when: - - file_exists_result is defined - - file_exists_result.stat is defined - - file_exists_result.stat.exists is defined - - not file_exists_result.stat.exists - - last_catalog_tag is defined and last_catalog_tag != "" +- name: "Lookup catalog metadata" + when: catalog_tag is defined and catalog_tag != "" + ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: catalog_metadata - # use last_catalog_tag if unable to get catalog_tag from displayName - - set_fact: - catalog_tag: "{{ last_catalog_tag }}" - when: - - catalog_tag is not defined - - last_catalog_tag is defined and last_catalog_tag != "" - rescue: - # use the last_catalog_tag when the catalog_tag cannot be determined from the displayName - - set_fact: - catalog_tag: "{{ last_catalog_tag }}" - when: last_catalog_tag is defined and last_catalog_tag != "" +# 2. Fallback to the most recent catalog tag +# ----------------------------------------------------------------------------- +- name: "Default to the newest catalog metadata" + when: + - catalog_tag is not defined or catalog_tag == "" or not catalog_metadata.success + - last_catalog_tag is defined and last_catalog_tag != "" + set_fact: + catalog_tag: "{{ last_catalog_tag }}" -- name: "Catalog Version" +- name: "Catalog Version (Final)" debug: - msg: - - "Catalog Version ............................ {{ catalog_tag }}" - when: catalog_tag is defined and catalog_tag != "" + msg: "Catalog Version ........................ {{ catalog_tag | default('')}}" diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/after-backup-restore.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/after-backup-restore.yml similarity index 100% rename from ibm/mas_devops/roles/mongodb/tasks/providers/community/after-backup-restore.yml rename to ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/after-backup-restore.yml diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-database.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/backup-database.yml similarity index 98% rename from ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-database.yml rename to ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/backup-database.yml index 04a85787a..d2504bc3d 100644 --- a/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-database.yml +++ b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/backup-database.yml @@ -14,7 +14,7 @@ # Create mongodb role and user for backing up databases # ------------------------------------------------------------------------- - name: "Create mongodb role and user for backing up databases" - include_tasks: "tasks/providers/{{ mongodb_provider }}/create-role-user.yml" + include_tasks: "tasks/providers/{{ mongodb_provider }}/backup-restore/create-role-user.yml" # Prepare mongodb database backup folder @@ -96,6 +96,7 @@ }))" | tee -a {{ mongodb_backup_log }} {{ exec_in_pod_end }} register: _mongodb_db_names_output + no_log: true - name: "Set fact: database names" set_fact: @@ -132,6 +133,7 @@ {{ exec_in_pod_end }} loop: "{{ mongodb_db_names }}" register: _mongodump_output + no_log: true - name: "Debug: mongodump output" debug: @@ -191,6 +193,7 @@ |& tee -a {{ mongodb_backup_log }} {{ exec_in_pod_end }} register: _mongodump_output + no_log: true - name: "Debug: mongodump output" debug: @@ -254,7 +257,7 @@ content: "{{ mongodb_query | from_yaml | to_json }}" mode: preserve vars: - mongodb_query: "{{ lookup('template', '../../../templates/community/mongo-query.yml.j2') }}" + mongodb_query: "{{ lookup('template', 'templates/community/mongo-query.yml.j2') }}" - name: "Get query file content" changed_when: false diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/before-backup-restore.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/before-backup-restore.yml similarity index 98% rename from ibm/mas_devops/roles/mongodb/tasks/providers/community/before-backup-restore.yml rename to ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/before-backup-restore.yml index 28e69b025..8911d6443 100644 --- a/ibm/mas_devops/roles/mongodb/tasks/providers/community/before-backup-restore.yml +++ b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/before-backup-restore.yml @@ -38,6 +38,7 @@ name: mas-mongo-ce-admin-password namespace: "{{ mongodb_namespace }}" register: _mongodb_password_output + no_log: true - name: "Set fact: mongodb admin password" set_fact: @@ -46,6 +47,7 @@ - _mongodb_password_output is defined - _mongodb_password_output.resources[0] is defined - _mongodb_password_output.resources[0].data.password is defined + no_log: true # Get mongodb ca file location @@ -72,12 +74,13 @@ changed_when: false shell: > {{ exec_in_pod_begin }} - {{ mongodb_shell }} --quiet --host={{ mongodb_pod_name }}.mas-mongo-ce-svc.mongoce.svc.cluster.local:27017 + {{ mongodb_shell }} --quiet --host={{ mongodb_pod_name }}.mas-mongo-ce-svc.{{ mongodb_namespace }}.svc.cluster.local:27017 --username=admin --password={{ mongodb_password }} --authenticationDatabase=admin --tls --tlsCAFile={{ mongodb_ca_file }} admin --eval="print(JSON.stringify(db.runCommand({hello:1})))" {{ exec_in_pod_end }} register: _mongodb_info_output + no_log: true - name: "Set fact: mongodb primary host" set_fact: diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/create-role-user.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/create-role-user.yml similarity index 95% rename from ibm/mas_devops/roles/mongodb/tasks/providers/community/create-role-user.yml rename to ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/create-role-user.yml index bf5044416..c6f7379ff 100644 --- a/ibm/mas_devops/roles/mongodb/tasks/providers/community/create-role-user.yml +++ b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/create-role-user.yml @@ -15,6 +15,7 @@ --authenticationDatabase=admin --tls --tlsCAFile={{ mongodb_ca_file }} admin --eval="db.getRole( \"{{ mongodb_role }}\" )"' register: _mongodb_get_role_output + no_log: true - name: "Debug: get mongodb role result" debug: @@ -31,6 +32,7 @@ --authenticationDatabase=admin --tls --tlsCAFile={{ mongodb_ca_file }} admin --eval="db.createRole({ role: \"{{ mongodb_role }}\", roles: [], privileges: [{ resource: {anyResource: true}, actions: [\"anyAction\"] }]})"' register: _mongodb_create_role_output + no_log: true - name: "Debug: create mongodb role result" debug: @@ -47,10 +49,7 @@ --authenticationDatabase=admin --tls --tlsCAFile={{ mongodb_ca_file }} admin --eval="db.getUser( \"{{ mongodb_user }}\" )"' register: _mongodb_get_user_output - -- name: "Debug: get mongodb user result" - debug: - msg: "Get mongodb user result ............... {{ _mongodb_get_user_output.stdout_lines }}" + no_log: true - name: "Create mongodb user '{{ mongodb_user }}'" when: _mongodb_get_user_output.stdout_lines[-1] == "null" @@ -63,6 +62,7 @@ --authenticationDatabase=admin --tls --tlsCAFile={{ mongodb_ca_file }} admin --eval="db.createUser({ user: \"{{ mongodb_user }}\", pwd: \"{{ mongodb_password }}\", roles: [ \"{{ mongodb_role }}\" ]})"' register: _mongodb_create_user_output + no_log: true - name: "Debug: create mongodb user result" debug: diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/get-mongo-info.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/get-mongo-info.yml similarity index 100% rename from ibm/mas_devops/roles/mongodb/tasks/providers/community/get-mongo-info.yml rename to ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/get-mongo-info.yml diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/restore-database-patch.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/restore-database-patch.yml similarity index 100% rename from ibm/mas_devops/roles/mongodb/tasks/providers/community/restore-database-patch.yml rename to ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/restore-database-patch.yml diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/restore-database-perform.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/restore-database-perform.yml similarity index 99% rename from ibm/mas_devops/roles/mongodb/tasks/providers/community/restore-database-perform.yml rename to ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/restore-database-perform.yml index 98570d181..5651e725c 100644 --- a/ibm/mas_devops/roles/mongodb/tasks/providers/community/restore-database-perform.yml +++ b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/restore-database-perform.yml @@ -100,6 +100,7 @@ |& tee -a {{ mongodb_restore_log }} {{ exec_in_pod_end }} register: _mongorestore_output + no_log: true - name: "Debug: mongorestore output" debug: diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/restore-database.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/restore-database.yml similarity index 95% rename from ibm/mas_devops/roles/mongodb/tasks/providers/community/restore-database.yml rename to ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/restore-database.yml index 52251a21c..46941268b 100644 --- a/ibm/mas_devops/roles/mongodb/tasks/providers/community/restore-database.yml +++ b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup-restore/restore-database.yml @@ -14,7 +14,7 @@ # Create mongodb role and user for backing up databases # ------------------------------------------------------------------------- - name: "Create mongodb role and user for backing up databases" - include_tasks: "tasks/providers/{{ mongodb_provider }}/create-role-user.yml" + include_tasks: "tasks/providers/{{ mongodb_provider }}/backup-restore/create-role-user.yml" # Prepare mongodb database restore folders @@ -48,7 +48,7 @@ when: masbr_restore_from_incr block: - name: "Copy based on full backup file from specified storage location to pod" - include_tasks: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/restore-database-perform.yml" + include_tasks: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/backup-restore/restore-database-perform.yml" vars: _job_type: "full" _job_name: "{{ masbr_restore_basedon }}" @@ -57,7 +57,7 @@ # Restore databases from the specified Full or Incremental backup # ------------------------------------------------------------------------- - name: "Restore databases from the specified {{ 'Incremental' if masbr_restore_from_incr else 'Full' }} backup" - include_tasks: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/restore-database-perform.yml" + include_tasks: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/backup-restore/restore-database-perform.yml" vars: _job_type: "{{ 'incr' if masbr_restore_from_incr else 'full' }}" _job_name: "{{ masbr_restore_from }}" @@ -66,7 +66,7 @@ # Do some post restoration tasks # ------------------------------------------------------------------------- - name: "Do some post restoration tasks " - include_tasks: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/restore-database-patch.yml" + include_tasks: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/backup-restore/restore-database-patch.yml" # Update database restore status: Completed diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup.yml index 59f137279..fd50a9696 100644 --- a/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup.yml +++ b/ibm/mas_devops/roles/mongodb/tasks/providers/community/backup.yml @@ -10,7 +10,7 @@ # Get mongodb information # ------------------------------------------------------------------------- - name: "Get mongodb information" - include_tasks: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/get-mongo-info.yml" + include_tasks: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/backup-restore/get-mongo-info.yml" # Set common backup job variables @@ -36,31 +36,10 @@ vars: _ignore_masbr_backup_data: true _job_type: "backup" - _component_before_task_path: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/before-backup-restore.yml" + _component_before_task_path: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/backup-restore/before-backup-restore.yml" -# Create k8s Job to run backup tasks -# ----------------------------------------------------------------------------- -- name: "Create k8s Job to run backup tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" - vars: - _rt_role_name: "mongodb" - _rt_env: - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MONGODB_PROVIDER" - value: "{{ mongodb_provider }}" - - name: "MONGODB_ACTION" - value: "{{ mongodb_action }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - name: "MAS_APP_ID" - value: "{{ mas_app_id }}" - - -- name: "Run backup tasks" - when: not masbr_create_task_job +- name: "Perform backup" block: # Update backup job status: New # ------------------------------------------------------------------------- @@ -71,11 +50,10 @@ - seq: "1" phase: "New" - # Run backup tasks for each data type # ------------------------------------------------------------------------- - name: "Run backup tasks for each data type" - include_tasks: "tasks/providers/{{ mongodb_provider }}/backup-{{ job_data_item.type }}.yml" + include_tasks: "tasks/providers/{{ mongodb_provider }}/backup-restore/backup-{{ job_data_item.type }}.yml" vars: masbr_job_data_seq: "{{ job_data_item.seq }}" masbr_job_data_type: "{{ job_data_item.type }}" @@ -98,4 +76,4 @@ - name: "After run tasks" include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/after_run_tasks.yml" vars: - _component_after_task_path: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/after-backup-restore.yml" + _component_after_task_path: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/backup-restore/after-backup-restore.yml" diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/determine-storage-classes.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/determine-storage-classes.yml index e66d41797..54d6c7103 100644 --- a/ibm/mas_devops/roles/mongodb/tasks/providers/community/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/mongodb/tasks/providers/community/determine-storage-classes.yml @@ -1,21 +1,11 @@ --- - # Provide intelligent storage class selection to minimize required user knowledge + # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- - name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" - -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses - -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" # 2. Set Storage (Required) @@ -23,7 +13,7 @@ - name: Default Storage if not set by user when: mongodb_storage_class is not defined or mongodb_storage_class == "" set_fact: - mongodb_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + mongodb_storage_class: "{{ defaultStorageClasses.rwo }}" - name: Assert that storage class has been defined assert: @@ -36,4 +26,4 @@ - name: "Debug MongoDb storage class configuration" debug: msg: - - "Storage class (mongodb) ...... {{ mongodb_storage_class }}" + - "Storage class (mongodb) ................ {{ mongodb_storage_class }}" diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/install-mongo.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/install-mongo.yml index 770e2b80e..3a11c92d7 100644 --- a/ibm/mas_devops/roles/mongodb/tasks/providers/community/install-mongo.yml +++ b/ibm/mas_devops/roles/mongodb/tasks/providers/community/install-mongo.yml @@ -1,53 +1,27 @@ --- -# The MongoDB version is based on the chosen ibm-operator-catalog. However the -# ibm-operator-catalog does not explicitly include information about the mongo version. -# -# The configuration files in common_vars/casebundles do specify the MongoDB -# version for each of the MAS published ibm-operator-catalog catalogs. -# -# To determine which common_vars/casebundles configuration file to use, this role -# extracts the catalog_tag from the ibm-operator-catalog's displayName. -# -# For example: -# displayName: IBM Maximo Operators (v9-240625-amd64) -# -# catalog_tag is v9-240625-amd64 -# MongoDB version will be determined by loading common_vars/casebundles/v9-240625-amd64.yml -# -# And FINALLY... -# If the MongoDB version cannot be determined from the above logic, -# the MongoDB version will be determined by the last configuration file in -# common_vars/casebundles/ -# -# And if still it cannot be determined because perhaps its not specified in the -# configuration file, a default value will be used. - -# 1. Get the IBM Catalog if available +# 1. Load default settings # ----------------------------------------------------------------------------- +- name: "Determine Version of Maximo Operator Catalog" + include_tasks: tasks/determine-ibmcatalog-tag.yml -- include_tasks: tasks/determine-ibmcatalog-tag.yml - -# 2. Load default settings -# ----------------------------------------------------------------------------- -- name: Check again if file exists in casebundles - stat: - path: "{{ role_path }}/../../common_vars/casebundles/{{ catalog_tag }}.yml" - register: stat_result - when: catalog_tag is defined and catalog_tag != "" - -- name: Load CASE bundle versions - include_vars: - file: "{{ role_path }}/../../common_vars/casebundles/{{ catalog_tag }}.yml" - when: stat_result is defined and stat_result.stat.exists - -- name: Set mongo version to default value when no catalog - set_fact: - mongo_extras_version: "{{ mongo_extras_version_default }}" - when: mongo_extras_version is not defined +- name: Load Catalog Metadata + when: + - mongo_extras_version is not defined or mongo_extras_version == "" + - catalog_tag is defined and catalog_tag != "" + block: + - ibm.mas_devops.get_catalog_info: + mas_catalog_version: "{{ catalog_tag }}" + register: _mas_catalog + - debug: + var: _mas_catalog + - name: "Set mongo version to default value if not explicitly set" + set_fact: + mongo_extras_version: "{{ _mas_catalog.mongo_extras_version_default }}" - name: "Mongo Version" debug: msg: + - "Maximo Operator Catalog .................. {{ catalog_tag }}" - "Mongo Version ............................ {{ mongo_extras_version }}" - name: Load mongo defaults @@ -84,7 +58,8 @@ target_mongodb_readinessprobe_image: "{{ mongodb_readinessprobe_image_registry }}/{{ mongodb_readinessprobe_image_name }}@{{ mongodb_readinessprobe_image_digest }}" target_mongodb_image: "{{ mongodb_image_registry }}/{{ mongodb_image_name }}@{{ mongodb_image_digest }}" -# 3. Debug Properties + +# 2. Debug Properties # ----------------------------------------------------------------------------- - name: "community : install : Debug properties" debug: @@ -125,21 +100,24 @@ - existing_mongo_operator.resources[0] is defined - existing_mongo_operator.resources[0].spec.containers[0].image != target_mongodb_operator_image -# 5. Install the CRD + +# 3. Install the CRD # ----------------------------------------------------------------------------- - name: "community : install : Install MongoDBCommunity CRD" kubernetes.core.k8s: apply: yes definition: "{{ lookup('template', 'templates/community/{{ mongodb_ce_version }}/crd.yml.j2') }}" -# 6. Create namespace & install RBAC + +# 4. Create namespace & install RBAC # ----------------------------------------------------------------------------- - name: "community : install : Create namespace & install RBAC" kubernetes.core.k8s: apply: yes definition: "{{ lookup('template', 'templates/community/{{ mongodb_ce_version }}/rbac.yml.j2') }}" -# 7. Configure anyuid permissions in the MongoDb namespace + +# 5. Configure anyuid permissions in the MongoDb namespace # ----------------------------------------------------------------------------- - name: "community : install : Configure anyuid permissions in the MongoDb namespace" shell: | @@ -151,7 +129,8 @@ shell: | oc adm policy add-scc-to-user anyuid system:serviceaccount:{{ mongodb_namespace }}:mongodb-database -# 8. Install the operator + +# 6. Install the operator # ----------------------------------------------------------------------------- - name: "community : install : Install the MongoDb Operator" kubernetes.core.k8s: @@ -162,7 +141,8 @@ status: "True" type: Available -# 9. Configure TLS using cert manager + +# 7. Configure TLS using cert manager # ----------------------------------------------------------------------------- - name: "Create a issuer in '{{ mongodb_namespace }}' namespace" kubernetes.core.k8s: @@ -230,7 +210,8 @@ apply: yes definition: "{{ lookup('template', 'templates/community/tls.yml') }}" -# 10. Create MongoDb admin user credentials secret + +# 8. Create MongoDb admin user credentials secret # ----------------------------------------------------------------------------- - name: "community : install : Check for existing user password secret" kubernetes.core.k8s_info: @@ -248,7 +229,8 @@ apply: yes definition: "{{ lookup('template', 'templates/community/admin-password.yml') }}" -# 10.1 Create MongoDb metrics endpoint secret + +# 9. Create MongoDb metrics endpoint secret # ----------------------------------------------------------------------------- - name: "community : install : Check for existing metrics endpoint secret" kubernetes.core.k8s_info: @@ -269,7 +251,8 @@ apply: yes definition: "{{ lookup('template', 'templates/community/metrics-endpoint-secret.yml.j2') }}" -# 11. Deploy the cluster + +# 10. Deploy the cluster # ----------------------------------------------------------------------------- - name: "community : install : Install new MongoDB cluster CR" kubernetes.core.k8s: @@ -314,7 +297,8 @@ - not controlled_upgrade - mongodb_ce_version is version('0.7.0', '==') -# 12. Wait for the cluster to be ready + +# 11. Wait for the cluster to be ready # status.version on the mongo cr is not available with older mongo operators # ----------------------------------------------------------------------------- - name: Delete existing mongo statefulsets if running mongo upgrade @@ -404,7 +388,8 @@ - (mongodb_ce_version is version('0.7.8', '>=') and mongodb_cr.resources[0].status.version is defined) or mongodb_ce_version is version('0.7.0', '==') - (mongodb_ce_version is version('0.7.8', '>=') and mongodb_cr.resources[0].status.version == expected_mongodb_version) or mongodb_ce_version is version('0.7.0', '==') -# 12.1 Create MongoDb service monitor + +# 12. Create MongoDb service monitor # ----------------------------------------------------------------------------- - name: "community : install : Check for existing service monitor" kubernetes.core.k8s_info: @@ -425,7 +410,8 @@ apply: yes definition: "{{ lookup('template', 'templates/community/servicemonitor.yml.j2') }}" -# 12.2 Create MongoDb Grafana dashboard + +# 13. Create MongoDb Grafana dashboard # ----------------------------------------------------------------------------- - name: Get cluster info kubernetes.core.k8s_cluster_info: @@ -491,7 +477,8 @@ apply: yes definition: "{{ lookup('template', 'templates/community/dashboards/mongodb-overview-v5.yml.j2') }}" -# 13. Create MAS MongoCfg + +# 14. Create MAS MongoCfg # ----------------------------------------------------------------------------- # Lookup the mongo pods - name: Create the MAS MongoCfg only if we are not in a controlled-upgrade flow diff --git a/ibm/mas_devops/roles/mongodb/tasks/providers/community/restore.yml b/ibm/mas_devops/roles/mongodb/tasks/providers/community/restore.yml index fcab35e09..38800a9ef 100644 --- a/ibm/mas_devops/roles/mongodb/tasks/providers/community/restore.yml +++ b/ibm/mas_devops/roles/mongodb/tasks/providers/community/restore.yml @@ -14,7 +14,7 @@ # Get mongodb information # ------------------------------------------------------------------------- - name: "Get mongodb information" - include_tasks: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/get-mongo-info.yml" + include_tasks: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/backup-restore/get-mongo-info.yml" # Set common restore job variables @@ -38,31 +38,10 @@ include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/before_run_tasks.yml" vars: _job_type: "restore" - _component_before_task_path: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/before-backup-restore.yml" + _component_before_task_path: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/backup-restore/before-backup-restore.yml" -# Create k8s Job to run restore tasks -# ----------------------------------------------------------------------------- -- name: "Create k8s Job to run restore tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" - vars: - _rt_role_name: "mongodb" - _rt_env: - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MONGODB_PROVIDER" - value: "{{ mongodb_provider }}" - - name: "MONGODB_ACTION" - value: "{{ mongodb_action }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - name: "MAS_APP_ID" - value: "{{ mas_app_id }}" - - -- name: "Run restore tasks" - when: not masbr_create_task_job +- name: "Perform restore" block: # Update restore job status: New # ------------------------------------------------------------------------- @@ -73,11 +52,10 @@ - seq: "1" phase: "New" - # Run restore tasks for each data type # ------------------------------------------------------------------------- - name: "Run restore tasks for each data type" - include_tasks: "tasks/providers/{{ mongodb_provider }}/restore-{{ job_data_item.type }}.yml" + include_tasks: "tasks/providers/{{ mongodb_provider }}/backup-restore/restore-{{ job_data_item.type }}.yml" vars: masbr_job_data_seq: "{{ job_data_item.seq }}" masbr_job_data_type: "{{ job_data_item.type }}" @@ -100,4 +78,4 @@ - name: "After run tasks" include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/after_run_tasks.yml" vars: - _component_after_task_path: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/after-backup-restore.yml" + _component_after_task_path: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/backup-restore/after-backup-restore.yml" diff --git a/ibm/mas_devops/roles/ocp_cluster_monitoring/tasks/determine-storage-classes.yml b/ibm/mas_devops/roles/ocp_cluster_monitoring/tasks/determine-storage-classes.yml index a14180d6f..01bde77fb 100644 --- a/ibm/mas_devops/roles/ocp_cluster_monitoring/tasks/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/ocp_cluster_monitoring/tasks/determine-storage-classes.yml @@ -1,17 +1,8 @@ --- - -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "install : determine-storage-classes : Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" - -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses +- name: "Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" # 2. Prometheus Storage (Required) @@ -19,7 +10,7 @@ - name: "install : determine-storage-classes : Default Prometheus Storage if not set by user" when: prometheus_storage_class is not defined or prometheus_storage_class == "" set_fact: - prometheus_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + prometheus_storage_class: "{{ defaultStorageClasses.rwo }}" - name: Assert that Prometheus storage class has been defined assert: @@ -32,7 +23,7 @@ - name: "install : determine-storage-classes : Default Prometheus Alert Manager Storage if not set by user" when: prometheus_alertmgr_storage_class is not defined or prometheus_alertmgr_storage_class == "" set_fact: - prometheus_alertmgr_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwx) }}" + prometheus_alertmgr_storage_class: "{{ defaultStorageClasses.rwx }}" - name: "install : determine-storage-classes : Assert that Prometheus Alert Manager storage class has been defined" assert: @@ -45,7 +36,7 @@ - name: "install : determine-storage-classes : Default Prometheus User Workload Monitoring Storage if not set by user" when: prometheus_userworkload_storage_class is not defined or prometheus_userworkload_storage_class == "" set_fact: - prometheus_userworkload_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + prometheus_userworkload_storage_class: "{{ defaultStorageClasses.rwo }}" - name: "install : determine-storage-classes : Assert that Prometheus User Workload Monitoring storage class has been defined" assert: diff --git a/ibm/mas_devops/roles/ocp_simulate_disconnected_network/README.md b/ibm/mas_devops/roles/ocp_simulate_disconnected_network/README.md index 80bca5e14..40f9a3455 100644 --- a/ibm/mas_devops/roles/ocp_simulate_disconnected_network/README.md +++ b/ibm/mas_devops/roles/ocp_simulate_disconnected_network/README.md @@ -17,6 +17,7 @@ sh-4.4# more /host/etc/hosts The default exclusions are: + - quay.io - registry.redhat.io - registry.connect.redhat.com diff --git a/ibm/mas_devops/roles/ocp_verify/tasks/main.yml b/ibm/mas_devops/roles/ocp_verify/tasks/main.yml index 50a806e4f..64f98f993 100644 --- a/ibm/mas_devops/roles/ocp_verify/tasks/main.yml +++ b/ibm/mas_devops/roles/ocp_verify/tasks/main.yml @@ -14,79 +14,6 @@ - ocp_info.resources is defined - ocp_info.resources | json_query('[*].status.conditions[?type==`Available`][].status') | select ('match','True') | list | length == 1 -# 1b. Patch the ibmcloud-block-storage-driver DaemonSet image if necessary -# fix for issue https://github.ibm.com/alchemy-containers/armada-storage/issues/6503 -# v2.5.12 needs updating to v2.5.14 -# v2.4.23 needs updating to v2.4.25 -# This task can be removed once OCP provision no longer installs ibmcloud-block-storage-driver v2.5.12 or v2.4.23 -# ------------------------------------------------------------------------------------- -- name: Lookup ibmcloud-block-storage-driver image - kubernetes.core.k8s_info: - api_version: apps/v1 - kind: DaemonSet - name: ibmcloud-block-storage-driver - namespace: kube-system - register: lookup_storage_driver - -- name: "Get Driver Image" - set_fact: - driver_image: "{{ lookup_storage_driver.resources[0].spec.template.spec.containers[0].image }}" - when: - - lookup_storage_driver.resources is defined - - lookup_storage_driver.resources | length == 1 - - lookup_storage_driver.resources[0].spec.template.spec.containers[0].image is defined - -- name: "Determine New Driver Image" - set_fact: - new_driver_image: "{{ upgrade_image[driver_image] }}" - when: - - driver_image is defined - - upgrade_image[driver_image] is defined - -- debug: - msg: "Storage Driver {{ driver_image }} doesn't need to be replaced." - when: - - driver_image is defined - - new_driver_image is not defined - -- name: Update ibmcloud-block-storage-driver image - when: new_driver_image is defined - block: - - debug: - msg: "Driver {{ driver_image }} to be replaced with {{ new_driver_image }}." - - - name: Update ibmcloud-block-storage-driver image - kubernetes.core.k8s: - api_version: apps/v1 - kind: DaemonSet - name: ibmcloud-block-storage-driver - namespace: kube-system - definition: - spec: - template: - spec: - containers: - - name: ibmcloud-block-storage-driver-container - image: "{{ new_driver_image }}" - - - - name: Wait for the ibmcloud-block-storage-driver DaemonSet to update - kubernetes.core.k8s_info: - api_version: apps/v1 - kind: DaemonSet - name: ibmcloud-block-storage-driver - namespace: kube-system - register: lookup_storage_driver - until: - - lookup_storage_driver.resources is defined - - lookup_storage_driver.resources | length > 0 - - lookup_storage_driver.resources[0].status is defined - - lookup_storage_driver.resources[0].status.updatedNumberScheduled is defined - - lookup_storage_driver.resources[0].status.desiredNumberScheduled is defined - - lookup_storage_driver.resources[0].status.updatedNumberScheduled == lookup_storage_driver.resources[0].status.desiredNumberScheduled - retries: 30 # approx 10 minutes before we give up - delay: 20 # 1 minute - # 2. Wait for all catalogsources to be healthy # ----------------------------------------------------------------------------- - name: Check CatalogSource Status diff --git a/ibm/mas_devops/roles/odh/tasks/authorino-operator.yml b/ibm/mas_devops/roles/odh/tasks/authorino-operator.yml index f6bb60219..a79ef9cbd 100644 --- a/ibm/mas_devops/roles/odh/tasks/authorino-operator.yml +++ b/ibm/mas_devops/roles/odh/tasks/authorino-operator.yml @@ -1,18 +1,16 @@ --- -# Install Operator & create entitlement openshift-authorino +# 1. Install Operator & create entitlement openshift-authorino # ----------------------------------------------------------------------------- - name: "Install Openshift authorino Operator" - ansible.builtin.include_role: - name: ibm.mas_devops.install_operator - vars: + ibm.mas_devops.apply_subscription: namespace: "{{ openshift_namespace }}" - icr_username: "{{ mas_entitlement_username }}" - icr_password: "{{ mas_entitlement_key }}" - catalog_source: "{{ serverless_catalog_source }}" - operator_group: "{{ lookup('template', 'templates/authorino/operator-group.yml.j2') }}" - subscription: "{{ lookup('template', 'templates/authorino/subscription.yml.j2') }}" + package_name: "authorino-operator" + package_channel: "{{ serverless_channel }}" # This looks wrong, but that's what was in the original template + catalog_source: "{{ authorino_catalog_source }}" + register: subscription + -# Wait until the Authorino CRD is available +# 2. Wait until the Authorino CRD is available # ----------------------------------------------------------------------------- - name: "Wait until the Authorino CRD is available" include_tasks: "{{ role_path }}/../../common_tasks/wait_for_crd.yml" diff --git a/ibm/mas_devops/roles/odh/tasks/determine-storage-classes.yml b/ibm/mas_devops/roles/odh/tasks/determine-storage-classes.yml index 945c3f5a2..44919a213 100644 --- a/ibm/mas_devops/roles/odh/tasks/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/odh/tasks/determine-storage-classes.yml @@ -1,30 +1,22 @@ -# Lookup storage class availabiity +--- +# 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" -- name: "determine-storage-classes : Lookup storage classes" - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" - -# Set Primary Storage (Required) +# 2. Set Primary Storage (Required) # ----------------------------------------------------------------------------- - name: "determine-storage-classes : Default Primary Storage if not set by user" when: primary_storage_class is not defined or primary_storage_class == "" set_fact: - primary_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwx) }}" + primary_storage_class: "{{ defaultStorageClasses.rwx }}" - name: "determine-storage-classes : Assert that primary storage class has been defined" assert: that: primary_storage_class is defined and primary_storage_class != "" fail_msg: "primary_storage_class must be defined" -- name: Set primary StorageClass +- name: "determine-storage-classes : Debug" debug: - msg: "Primary storage class ...... {{ primary_storage_class }}" + msg: "Primary storage class ................. {{ primary_storage_class }}" diff --git a/ibm/mas_devops/roles/odh/tasks/odh-operator.yml b/ibm/mas_devops/roles/odh/tasks/odh-operator.yml index a51a2fe38..cd75ca52a 100644 --- a/ibm/mas_devops/roles/odh/tasks/odh-operator.yml +++ b/ibm/mas_devops/roles/odh/tasks/odh-operator.yml @@ -2,15 +2,13 @@ # Install Operator & create entitlement openshift-odh # ----------------------------------------------------------------------------- - name: "Install Openshift odh Operator" - ansible.builtin.include_role: - name: ibm.mas_devops.install_operator - vars: + ibm.mas_devops.apply_subscription: namespace: "{{ openshift_namespace }}" - icr_username: "{{ mas_entitlement_username }}" - icr_password: "{{ mas_entitlement_key }}" + package_name: "opendatahub-operator" + package_channel: "{{ odh_channel }}" catalog_source: "{{ odh_catalog_source }}" - operator_group: "{{ lookup('template', 'templates/odh/operator-group.yml.j2') }}" - subscription: "{{ lookup('template', 'templates/odh/subscription.yml.j2') }}" + register: subscription + # Wait until the Opendata Hub CRD is available # ----------------------------------------------------------------------------- diff --git a/ibm/mas_devops/roles/odh/tasks/pipeline-operator.yml b/ibm/mas_devops/roles/odh/tasks/pipeline-operator.yml index 1a8050818..7fa054424 100644 --- a/ibm/mas_devops/roles/odh/tasks/pipeline-operator.yml +++ b/ibm/mas_devops/roles/odh/tasks/pipeline-operator.yml @@ -22,17 +22,14 @@ # Install Operator Openshift-pipelines # ----------------------------------------------------------------------------- - name: "Install Openshift pipelines" - ansible.builtin.include_role: - name: ibm.mas_devops.install_operator - vars: + when: not has_subscription + ibm.mas_devops.apply_subscription: namespace: "{{ openshift_namespace }}" - icr_username: "{{ mas_entitlement_username }}" - icr_password: "{{ mas_entitlement_key }}" + package_name: "openshift-pipelines-operator-rh" + package_channel: "{{ pipeline_channel }}" catalog_source: "{{ pipeline_catalog_source }}" - operator_group: "{{ lookup('template', 'templates/pipelines/operator-group.yml.j2') }}" - subscription: "{{ lookup('template', 'templates/pipelines/subscription.yml.j2') }}" - when: - - not has_subscription + register: subscription + # Wait until the Openshift-pipelines CRD is available # ----------------------------------------------------------------------------- diff --git a/ibm/mas_devops/roles/odh/tasks/serverless-operator.yml b/ibm/mas_devops/roles/odh/tasks/serverless-operator.yml index 10e2c967f..727860b11 100644 --- a/ibm/mas_devops/roles/odh/tasks/serverless-operator.yml +++ b/ibm/mas_devops/roles/odh/tasks/serverless-operator.yml @@ -1,18 +1,16 @@ --- -# Install Operator & create entitlement openshift-serverless +# 1. Install Operator & create entitlement openshift-serverless # ----------------------------------------------------------------------------- - name: "Install Openshift Serverless Operator" - ansible.builtin.include_role: - name: ibm.mas_devops.install_operator - vars: + ibm.mas_devops.apply_subscription: namespace: "{{ serverless_namespace }}" - icr_username: "{{ mas_entitlement_username }}" - icr_password: "{{ mas_entitlement_key }}" + package_name: "serverless-operator" + package_channel: "{{ serverless_channel }}" catalog_source: "{{ serverless_catalog_source }}" - operator_group: "{{ lookup('template', 'templates/serverless/operator-group.yml.j2') }}" - subscription: "{{ lookup('template', 'templates/serverless/subscription.yml.j2') }}" + register: subscription + -# Wait until the Serverless CRD is available +# 2. Wait until the Serverless CRD is available # ----------------------------------------------------------------------------- - name: "Wait until the Serverless CRD is available" include_tasks: "{{ role_path }}/../../common_tasks/wait_for_crd.yml" diff --git a/ibm/mas_devops/roles/odh/tasks/servicemesh-operator.yml b/ibm/mas_devops/roles/odh/tasks/servicemesh-operator.yml index baca08eac..ff24d1d24 100644 --- a/ibm/mas_devops/roles/odh/tasks/servicemesh-operator.yml +++ b/ibm/mas_devops/roles/odh/tasks/servicemesh-operator.yml @@ -1,25 +1,23 @@ --- -# Install Operator & create entitlement openshift-service-mesh +# 1. Install Operator & create entitlement openshift-service-mesh # ----------------------------------------------------------------------------- - name: "Install Openshift ServiceMesh Operator" - ansible.builtin.include_role: - name: ibm.mas_devops.install_operator - vars: + ibm.mas_devops.apply_subscription: namespace: "{{ service_mesh_namespace }}" - icr_username: "{{ mas_entitlement_username }}" - icr_password: "{{ mas_entitlement_key }}" + package_name: "servicemeshoperator" + package_channel: "{{ service_mesh_channel }}" catalog_source: "{{ service_mesh_catalog_source }}" - operator_group: "{{ lookup('template', 'templates/servicemesh/operator-group.yml.j2') }}" - subscription: "{{ lookup('template', 'templates/servicemesh/subscription.yml.j2') }}" + register: subscription + -# Wait until the ServiceMesh CRD is available +# 2. Wait until the ServiceMesh CRD is available # ----------------------------------------------------------------------------- - name: "Wait until the ServiceMesh CRD is available" include_tasks: "{{ role_path }}/../../common_tasks/wait_for_crd.yml" vars: crd_name: servicemeshcontrolplanes.maistra.io -# Create Service account +# 3. Create Service account # ----------------------------------------------------------------------------- - name: "Create Service account" kubernetes.core.k8s: diff --git a/ibm/mas_devops/roles/odh/templates/authorino/operator-group.yml.j2 b/ibm/mas_devops/roles/odh/templates/authorino/operator-group.yml.j2 deleted file mode 100644 index 81bd25659..000000000 --- a/ibm/mas_devops/roles/odh/templates/authorino/operator-group.yml.j2 +++ /dev/null @@ -1,7 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: global-operators - namespace: "{{ openshift_namespace }}" -spec: {} diff --git a/ibm/mas_devops/roles/odh/templates/authorino/subscription.yml.j2 b/ibm/mas_devops/roles/odh/templates/authorino/subscription.yml.j2 deleted file mode 100644 index c3ed424ca..000000000 --- a/ibm/mas_devops/roles/odh/templates/authorino/subscription.yml.j2 +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: authorino-operator - namespace: "{{ openshift_namespace }}" -spec: - channel: "{{ serverless_channel }}" - installPlanApproval: Automatic - name: authorino-operator - source: "{{ authorino_catalog_source }}" - sourceNamespace: openshift-marketplace diff --git a/ibm/mas_devops/roles/odh/templates/odh/operator-group.yml.j2 b/ibm/mas_devops/roles/odh/templates/odh/operator-group.yml.j2 deleted file mode 100644 index 81bd25659..000000000 --- a/ibm/mas_devops/roles/odh/templates/odh/operator-group.yml.j2 +++ /dev/null @@ -1,7 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: global-operators - namespace: "{{ openshift_namespace }}" -spec: {} diff --git a/ibm/mas_devops/roles/odh/templates/odh/subscription.yml.j2 b/ibm/mas_devops/roles/odh/templates/odh/subscription.yml.j2 deleted file mode 100644 index 0576745b4..000000000 --- a/ibm/mas_devops/roles/odh/templates/odh/subscription.yml.j2 +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: opendatahub-operator - namespace: "{{ openshift_namespace }}" -spec: - channel: "{{ odh_channel }}" - installPlanApproval: Manual - name: opendatahub-operator - source: "{{ odh_catalog_source }}" - sourceNamespace: openshift-marketplace - startingCSV: "{{ odh_operator_version }}" diff --git a/ibm/mas_devops/roles/odh/templates/pipelines/operator-group.yml.j2 b/ibm/mas_devops/roles/odh/templates/pipelines/operator-group.yml.j2 deleted file mode 100644 index 81bd25659..000000000 --- a/ibm/mas_devops/roles/odh/templates/pipelines/operator-group.yml.j2 +++ /dev/null @@ -1,7 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: global-operators - namespace: "{{ openshift_namespace }}" -spec: {} diff --git a/ibm/mas_devops/roles/odh/templates/pipelines/subscription.yml.j2 b/ibm/mas_devops/roles/odh/templates/pipelines/subscription.yml.j2 deleted file mode 100644 index 9fb7b51cf..000000000 --- a/ibm/mas_devops/roles/odh/templates/pipelines/subscription.yml.j2 +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: openshift-pipelines-operator - namespace: {{ openshift_namespace }} -spec: - channel: "{{ pipeline_channel }}" - installPlanApproval: Automatic - name: openshift-pipelines-operator-rh - source: "{{ pipeline_catalog_source }}" - sourceNamespace: openshift-marketplace diff --git a/ibm/mas_devops/roles/odh/templates/serverless/operator-group.yml.j2 b/ibm/mas_devops/roles/odh/templates/serverless/operator-group.yml.j2 deleted file mode 100644 index 2bbbd0ca3..000000000 --- a/ibm/mas_devops/roles/odh/templates/serverless/operator-group.yml.j2 +++ /dev/null @@ -1,7 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: serverless-operators - namespace: "{{ serverless_namespace }}" -spec: {} diff --git a/ibm/mas_devops/roles/odh/templates/serverless/subscription.yml.j2 b/ibm/mas_devops/roles/odh/templates/serverless/subscription.yml.j2 deleted file mode 100644 index c6f79bd99..000000000 --- a/ibm/mas_devops/roles/odh/templates/serverless/subscription.yml.j2 +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: serverless-operator - namespace: "{{ serverless_namespace }}" -spec: - channel: "{{ serverless_channel }}" - installPlanApproval: Automatic - name: serverless-operator - source: "{{ serverless_catalog_source }}" - sourceNamespace: openshift-marketplace diff --git a/ibm/mas_devops/roles/odh/templates/servicemesh/operator-group.yml.j2 b/ibm/mas_devops/roles/odh/templates/servicemesh/operator-group.yml.j2 deleted file mode 100644 index 81bd25659..000000000 --- a/ibm/mas_devops/roles/odh/templates/servicemesh/operator-group.yml.j2 +++ /dev/null @@ -1,7 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: global-operators - namespace: "{{ openshift_namespace }}" -spec: {} diff --git a/ibm/mas_devops/roles/odh/templates/servicemesh/subscription.yml.j2 b/ibm/mas_devops/roles/odh/templates/servicemesh/subscription.yml.j2 deleted file mode 100644 index 0b5334d13..000000000 --- a/ibm/mas_devops/roles/odh/templates/servicemesh/subscription.yml.j2 +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: servicemeshoperator - namespace: "{{ service_mesh_namespace }}" -spec: - channel: "{{ service_mesh_channel }}" - installPlanApproval: Automatic - name: servicemeshoperator - source: "{{ service_mesh_catalog_source }}" - sourceNamespace: openshift-marketplace diff --git a/ibm/mas_devops/roles/opentelemetry/tasks/install.yml b/ibm/mas_devops/roles/opentelemetry/tasks/install.yml index 4ab1822d4..c96fba8de 100644 --- a/ibm/mas_devops/roles/opentelemetry/tasks/install.yml +++ b/ibm/mas_devops/roles/opentelemetry/tasks/install.yml @@ -3,11 +3,11 @@ # 1. Create OpenTelemetry Subscription # ----------------------------------------------------------------------------- - name: "install : opentelemetry : Create OpenTelemetry Subscription" - include_tasks: "{{ role_path }}/../../common_tasks/create_subscription.yml" - vars: + ibm.mas_devops.apply_subscription: + namespace: openshift-operators package_name: opentelemetry-operator - channel_name: alpha - subscription_namespace: openshift-operators + package_channel: alpha + register: subscription # 2. Wait until the OpenTelemetryCollector CRD is available diff --git a/ibm/mas_devops/roles/registry/tasks/setup/determine-storage-classes.yml b/ibm/mas_devops/roles/registry/tasks/setup/determine-storage-classes.yml index 19020b23f..389cd0ed8 100644 --- a/ibm/mas_devops/roles/registry/tasks/setup/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/registry/tasks/setup/determine-storage-classes.yml @@ -1,31 +1,18 @@ --- - -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses - -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" # 2. Set Storage (Required) # ----------------------------------------------------------------------------- -- name: Default Storage if not set by user +- name: "determine-storage-classes : Default Storage if not set by user" when: registry_storage_class is not defined or registry_storage_class == "" - vars: - # ROKS - supported_storage_classes: [ibmc-block-gold] set_fact: - registry_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(supported_storage_classes) }}" + registry_storage_class: "{{ defaultStorageClasses.rwo }}" -- name: Assert that storage class has been defined +- name: "determine-storage-classes : Assert that storage class has been defined" assert: that: registry_storage_class is defined and registry_storage_class != "" fail_msg: "registry_storage_class must be defined" @@ -33,7 +20,7 @@ # 3. Debug storage class configuration # ----------------------------------------------------------------------------- -- name: "Debug registry storage class configuration" +- name: "determine-storage-classes : Debug registry storage class configuration" debug: msg: - - "Storage class (registry) ...... {{ registry_storage_class }}" + - "Storage class (registry) ............... {{ registry_storage_class }}" diff --git a/ibm/mas_devops/roles/sls/defaults/main.yml b/ibm/mas_devops/roles/sls/defaults/main.yml index 5907d608f..6ffdc3e97 100644 --- a/ibm/mas_devops/roles/sls/defaults/main.yml +++ b/ibm/mas_devops/roles/sls/defaults/main.yml @@ -17,6 +17,10 @@ sls_entitlement_username: "{{ lookup('env', 'SLS_ENTITLEMENT_USERNAME') | defaul ibm_entitlement_key: "{{ lookup('env', 'IBM_ENTITLEMENT_KEY') }}" sls_entitlement_key: "{{ lookup('env', 'SLS_ENTITLEMENT_KEY') | default(ibm_entitlement_key, true) }}" +# Development Registry Entitlement +artifactory_username: "{{ lookup('env', 'ARTIFACTORY_USERNAME') | lower }}" +artifactory_token: "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}" + db_provider: "{{ lookup('env', 'DB_PROVIDER') | default('community', true) }}" # SLS settings diff --git a/ibm/mas_devops/roles/sls/tasks/install/main.yml b/ibm/mas_devops/roles/sls/tasks/install/main.yml index fdeb7ec10..693948944 100644 --- a/ibm/mas_devops/roles/sls/tasks/install/main.yml +++ b/ibm/mas_devops/roles/sls/tasks/install/main.yml @@ -183,16 +183,22 @@ # 7. Install Operator & create entitlement # ----------------------------------------------------------------------------- -- name: "Install SLS Operator" - ansible.builtin.include_role: - name: ibm.mas_devops.install_operator - vars: +- name: "Create IBM Entitlement Key" + when: before_sls_380 or (artifactory_username is defined and artifactory_username != "") + ibm.mas_devops.update_ibm_entitlement: + namespace: "{{ sls_namespace }}" + icr_username: "{{ sls_entitlement_username }}" + icr_password: "{{ sls_entitlement_key }}" + artifactory_username: "{{ artifactory_username }}" + artifactory_password: "{{ artifactory_token }}" + +- name: "Create ibm-mas Subscription" + ibm.mas_devops.apply_subscription: namespace: "{{ sls_namespace }}" - icr_username: "{{ before_sls_380 | ternary(sls_entitlement_username, '') }}" - icr_password: "{{ before_sls_380 | ternary(sls_entitlement_key, '') }}" + package_name: "ibm-sls" + package_channel: "{{ sls_channel }}" catalog_source: "{{ sls_catalog_source }}" - operator_group: "{{ lookup('template', 'templates/operator-group.yml.j2') }}" - subscription: "{{ lookup('template', 'templates/subscription.yml.j2') }}" + register: subscription # 8. Wait until the LicenseService CRD is available diff --git a/ibm/mas_devops/roles/sls/templates/operator-group.yml.j2 b/ibm/mas_devops/roles/sls/templates/operator-group.yml.j2 deleted file mode 100644 index 8c400e933..000000000 --- a/ibm/mas_devops/roles/sls/templates/operator-group.yml.j2 +++ /dev/null @@ -1,9 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: ibm-sls-operator-group - namespace: "{{ sls_namespace }}" -spec: - targetNamespaces: - - "{{ sls_namespace }}" diff --git a/ibm/mas_devops/roles/sls/templates/subscription.yml.j2 b/ibm/mas_devops/roles/sls/templates/subscription.yml.j2 deleted file mode 100644 index 25185851f..000000000 --- a/ibm/mas_devops/roles/sls/templates/subscription.yml.j2 +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: ibm-sls - namespace: "{{ sls_namespace }}" -spec: - channel: "{{ sls_channel }}" - installPlanApproval: Automatic - name: ibm-sls - source: "{{sls_catalog_source}}" - sourceNamespace: openshift-marketplace diff --git a/ibm/mas_devops/roles/suite_app_backup_restore/README.md b/ibm/mas_devops/roles/suite_app_backup_restore/README.md index 6807471c0..6b4826ed1 100644 --- a/ibm/mas_devops/roles/suite_app_backup_restore/README.md +++ b/ibm/mas_devops/roles/suite_app_backup_restore/README.md @@ -70,82 +70,13 @@ Set the [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - Environment Variable: `MASBR_JOB_TIMEZONE` - Default: None -### masbr_storage_type -Set `local` or `cloud` to indicate this role to save the backup files to local file system or cloud object storage. - -- **Required** -- Environment Variable: `MASBR_STORAGE_TYPE` -- Default: None - ### masbr_storage_local_folder Set local path to save the backup files. -- **Required** only when `MASBR_STORAGE_TYPE=local` +- **Required** - Environment Variable: `MASBR_STORAGE_LOCAL_FOLDER` - Default: None -### masbr_storage_cloud_rclone_file -Set the path of `rclone.conf` file. - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_RCLONE_FILE` -- Default: None - -### masbr_storage_cloud_rclone_name -Set the configuration name defined in `rclone.conf` file. - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_RCLONE_NAME` -- Default: None - -### masbr_storage_cloud_bucket -Set the object storage bucket name for saving the backup files - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_BUCKET` -- Default: None - -### masbr_slack_enabled -Set `true` or `false` to indicate whether this role will send Slack notification messages of the backup and restore progress. - -- Optional -- Environment Variable: `MASBR_SLACK_ENABLED` -- Default: `false` - -### masbr_slack_level -Set `failure`, `info` or `verbose` to indicate this role to send Slack notification messages in which backup and resore phases: - -| Slack level | Backup/Restore phases | -| ----------- | ------------------------------------------------------- | -| failure | `Failed`, `PartiallyFailed` | -| info | `Completed`, `Failed`, `PartiallyFailed` | -| verbose | `InProgress`, `Completed`, `Failed`, `PartiallyFailed` | - -- Optional -- Environment Variable: `MASBR_SLACK_LEVEL` -- Default: `info` - -### masbr_slack_token -The Slack integration token. - -- **Required** only when `MASBR_SLACK_ENABLED=true` -- Environment Variable: `MASBR_SLACK_TOKEN` -- Default: None - -### masbr_slack_channel -The Slack channel to send the notification messages to. - -- **Required** only when `MASBR_SLACK_ENABLED=true` -- Environment Variable: `MASBR_SLACK_CHANNEL` -- Default: None - -### masbr_slack_user -The sender of the Slack notification message. - -- Optional -- Environment Variable: `MASBR_SLACK_USER` -- Default: `MASBR` - Role Variables - Backup ------------------------------------------------------------------------------- @@ -216,7 +147,7 @@ Set the types of data to be restored, multiple data types are separated by comma Role Variables - Manage ------------------------------------------------------------------------------- ### masbr_manage_pvc_paths -Set the Manage PVC paths to use in backup and restore. The PVC path is in the format of `:/`. Multiple PVC paths are separated by commas (e.g. `manage-doclinks1-pvc:/mnt/doclinks1/attachments,manage-doclinks2-pvc:/mnt/doclinks2`). +Set the Manage PVC paths to use in backup and restore. The PVC path is in the format of `:/`. Multiple PVC paths are separated by commas (e.g. `manage-doclinks1-pvc:/mnt/doclinks1/attachments,manage-doclinks2-pvc:/mnt/doclinks2`). The `` and `` are defined in the `ManageWorkspace` CRD instance `spec.settings.deployment.persistentVolumes`: ``` @@ -261,7 +192,6 @@ Backup Manage attachments, note that this does not include backup of any data in mas_app_id: manage masbr_backup_data: pv masbr_manage_pvc_paths: "manage-doclinks1-pvc:/mnt/doclinks1" - masbr_storage_type: local masbr_storage_local_folder: /tmp/masbr roles: - ibm.mas_devops.suite_app_backup_restore @@ -281,7 +211,6 @@ Restore Manage attachments, note that this does not include restore of any data mas_app_id: manage masbr_backup_data: pv masbr_manage_pvc_paths: "manage-doclinks1-pvc:/mnt/doclinks1" - masbr_storage_type: local masbr_storage_local_folder: /tmp/masbr roles: - ibm.mas_devops.suite_app_backup_restore diff --git a/ibm/mas_devops/roles/suite_app_backup_restore/tasks/get-app-info.yml b/ibm/mas_devops/roles/suite_app_backup_restore/tasks/get-app-info.yml index cf73e2e53..ae61fac2a 100644 --- a/ibm/mas_devops/roles/suite_app_backup_restore/tasks/get-app-info.yml +++ b/ibm/mas_devops/roles/suite_app_backup_restore/tasks/get-app-info.yml @@ -40,6 +40,7 @@ assert: that: mas_app_version is defined fail_msg: "{{ mas_app_kind }}/{{ mas_app_cr_name }} does not exists!" + when: masbr_action is defined and masbr_action == "backup" - name: "Set fact: {{ mas_app_kind }}/{{ mas_app_cr_name }} status" set_fact: @@ -51,7 +52,7 @@ # When performing restore, we shouldn't care about the status of app. - name: "Fail if {{ mas_app_kind }}/{{ mas_app_cr_name }} is not ready" - when: false + when: masbr_action is defined and masbr_action == "backup" assert: that: mas_app_ready is defined and mas_app_ready fail_msg: "{{ mas_app_kind }}/{{ mas_app_cr_name }} is not ready!" @@ -83,6 +84,7 @@ assert: that: mas_ws_version is defined fail_msg: "{{ mas_ws_kind }}/{{ mas_ws_cr_name }} does not exists!" + when: masbr_action is defined and masbr_action == "backup" - name: "Set fact: {{ mas_ws_kind }}/{{ mas_ws_cr_name }} status" set_fact: @@ -94,7 +96,7 @@ # When performing restore, we shouldn't care about the status of app. - name: "Fail if {{ mas_ws_kind }}/{{ mas_ws_cr_name }} is not ready" - when: false + when: masbr_action is defined and masbr_action == "backup" assert: that: mas_ws_ready is defined and mas_ws_ready fail_msg: "{{ mas_ws_kind }}/{{ mas_ws_cr_name }} is not ready!" @@ -103,6 +105,7 @@ # Output app information # ----------------------------------------------------------------------------- - name: "Debug: {{ mas_app_id | capitalize }} information" + when: masbr_action is defined and masbr_action == "backup" debug: msg: - "{{ mas_app_kind }}/{{ mas_app_cr_name }} version ............ {{ mas_app_version }}" diff --git a/ibm/mas_devops/roles/suite_app_backup_restore/tasks/main.yml b/ibm/mas_devops/roles/suite_app_backup_restore/tasks/main.yml index 72a88f31c..6722ca867 100644 --- a/ibm/mas_devops/roles/suite_app_backup_restore/tasks/main.yml +++ b/ibm/mas_devops/roles/suite_app_backup_restore/tasks/main.yml @@ -54,26 +54,7 @@ _job_type: "{{ masbr_action }}" -# Create k8s Job to run backup/restore tasks -# ----------------------------------------------------------------------------- -- name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" - vars: - _rt_role_name: "suite_app_backup_restore" - _rt_env: - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - name: "MAS_WORKSPACE_ID" - value: "{{ mas_workspace_id }}" - - name: "MAS_APP_ID" - value: "{{ mas_app_id }}" - - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job block: # Update job status: New # ------------------------------------------------------------------------- diff --git a/ibm/mas_devops/roles/suite_app_backup_restore/tasks/manage/pv-info.yml b/ibm/mas_devops/roles/suite_app_backup_restore/tasks/manage/pv-info.yml index adfd96484..cb5971a04 100644 --- a/ibm/mas_devops/roles/suite_app_backup_restore/tasks/manage/pv-info.yml +++ b/ibm/mas_devops/roles/suite_app_backup_restore/tasks/manage/pv-info.yml @@ -22,16 +22,18 @@ - name: "Set fact: workspace pv spec" set_fact: manage_ws_pvs: "{{ _ws_output.resources[0].spec.settings.deployment.persistentVolumes }}" + when: masbr_manage_pvc_paths is defined and masbr_manage_pvc_paths | length > 0 - name: "Debug: workspace pv spec" debug: msg: "{{ manage_ws_pvs }}" + when: manage_ws_pvs is defined # Only go on processing when manage has pv defined # ----------------------------------------------------------------------------- - name: "Only go on processing when manage has pv defined" - when: manage_ws_pvs | length > 0 + when: manage_ws_pvs is defined and manage_ws_pvs | length > 0 block: # Get maxinst pod information - name: "Get maxinst pod information" diff --git a/ibm/mas_devops/roles/suite_app_backup_restore/tasks/manage/restore-namespace.yml b/ibm/mas_devops/roles/suite_app_backup_restore/tasks/manage/restore-namespace.yml index 72c342cff..c39f755c5 100644 --- a/ibm/mas_devops/roles/suite_app_backup_restore/tasks/manage/restore-namespace.yml +++ b/ibm/mas_devops/roles/suite_app_backup_restore/tasks/manage/restore-namespace.yml @@ -17,12 +17,29 @@ .name="{{ mas_workspace_id }}-manage-encryptionsecret-operator" )' {{ masbr_ns_restore_folder }}/Secret-{{ masbr_restore_from_workspace }}-manage-encryptionsecret-operator.yaml; -- name: "Apply encryption secret yaml files" +# Restore namespace resoruces +# ------------------------------------------------------------------------- +# Loop through the folder +- name: "Get the list of files from restore directory" + find: + paths: "{{ masbr_ns_restore_folder }}" + patterns: '*.yml,*.yaml' + recurse: no + register: find_result + +- name: "Apply configs" kubernetes.core.k8s: - apply: true - src: "{{ masbr_ns_restore_folder }}/{{ _ns_resource_file_name }}" - loop: - - "Secret-{{ masbr_restore_from_workspace }}-manage-encryptionsecret.yaml" - - "Secret-{{ masbr_restore_from_workspace }}-manage-encryptionsecret-operator.yaml" - loop_control: - loop_var: _ns_resource_file_name + state: present + definition: "{{ lookup('template', item.path) }}" + with_items: "{{ find_result.files }}" + when: find_result is defined + +# - name: "Apply encryption secret yaml files" +# kubernetes.core.k8s: +# apply: true +# src: "{{ masbr_ns_restore_folder }}/{{ _ns_resource_file_name }}" +# loop: +# - "Secret-{{ masbr_restore_from_workspace }}-manage-encryptionsecret.yaml" +# - "Secret-{{ masbr_restore_from_workspace }}-manage-encryptionsecret-operator.yaml" +# loop_control: +# loop_var: _ns_resource_file_name diff --git a/ibm/mas_devops/roles/suite_app_config/tasks/determine-storage-classes.yml b/ibm/mas_devops/roles/suite_app_config/tasks/determine-storage-classes.yml index de49def62..d670c3e93 100644 --- a/ibm/mas_devops/roles/suite_app_config/tasks/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/suite_app_config/tasks/determine-storage-classes.yml @@ -1,54 +1,43 @@ --- - -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "determine-storage-classes : Lookup storage classes" - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" - -# 2. Set Primary Storage (Required) +# 2. Set Default Manage Storage Class # ----------------------------------------------------------------------------- -- name: "determine-storage-classes : Default Manage PVC Storage if not set by user" +- name: "determine-storage-classes : Set Default Manage PVC StorageClass (RWX)" set_fact: - mas_app_settings_default_pvc_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(mas_app_settings_default_manage_supported_storage_classes) }}" + mas_app_settings_default_pvc_storage_class: "{{ defaultStorageClasses.rwx }}" -# 3. Debug storage class configuration -# ----------------------------------------------------------------------------- -- name: "determine-storage-classes : Debug Manage PVC storage class configuration" +- name: "determine-storage-classes : Debug Manage PVC storage class" debug: msg: - - "Manage Default PVC Storage class .......... {{ mas_app_settings_default_pvc_storage_class }}" + - "Manage Default PVC Storage class ....... {{ mas_app_settings_default_pvc_storage_class }}" -# 4. Auto define storage classes when required + +# 3. Auto define storage classes when required # ----------------------------------------------------------------------------- -- name: Set doclinks default pvc storage class +- name: "determine-storage-classes : Set doclinks default pvc storage class" + when: mas_app_settings_doclinks_pvc_storage_class is not defined or mas_app_settings_doclinks_pvc_storage_class == "" set_fact: mas_app_settings_doclinks_pvc_storage_class: "{{ mas_app_settings_default_pvc_storage_class }}" - when: - - mas_app_settings_doclinks_pvc_storage_class is not defined or mas_app_settings_doclinks_pvc_storage_class == "" -- name: Set bim default pvc storage class +- name: "determine-storage-classes : Set bim default pvc storage class" + when: mas_app_settings_bim_pvc_storage_class is not defined or mas_app_settings_bim_pvc_storage_class == "" set_fact: mas_app_settings_bim_pvc_storage_class: "{{ mas_app_settings_default_pvc_storage_class }}" - when: - - mas_app_settings_bim_pvc_storage_class is not defined or mas_app_settings_bim_pvc_storage_class == "" -- name: Set jms queue default pvc storage class +- name: "determine-storage-classes : Set jms queue default pvc storage class" + when: mas_app_settings_jms_queue_pvc_storage_class is not defined or mas_app_settings_jms_queue_pvc_storage_class == "" set_fact: mas_app_settings_jms_queue_pvc_storage_class: "{{ mas_app_settings_default_pvc_storage_class }}" - when: - - mas_app_settings_jms_queue_pvc_storage_class is not defined or mas_app_settings_jms_queue_pvc_storage_class == "" -- name: Assert Manage related storage classes are defined + +# 4. Check that all storage classes are defined +# ----------------------------------------------------------------------------- +- name: "determine-storage-classes : Assert Manage related storage classes are defined" assert: that: - mas_app_settings_doclinks_pvc_storage_class is defined @@ -58,12 +47,8 @@ - mas_app_settings_jms_queue_pvc_storage_class is defined - mas_app_settings_jms_queue_pvc_storage_class != '' fail_msg: - - "Failed! One of more storage classes are not defined for Manage!" - - "It was not possible to auto detect a valid storage class as none of the defaulted options were found ....................... {{ mas_app_settings_default_manage_supported_storage_classes }}" - - "Storage Classes available in your cluster .................................................................................. {{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" - - "" - - "Please, ensure you define a valid storage class for the following:" + - "Failed: One of more storage classes are not defined for Manage" - "" - - "mas_app_settings_doclinks_pvc_storage_class' property ...................................................................... {{ mas_app_settings_doclinks_pvc_storage_class | default('Undefined!', true )}}" - - "mas_app_settings_bim_pvc_storage_class' property ........................................................................... {{ mas_app_settings_bim_pvc_storage_class | default('Undefined!', true )}}" - - "mas_app_settings_jms_queue_pvc_storage_class' property ..................................................................... {{ mas_app_settings_jms_queue_pvc_storage_class | default('Undefined!', true )}}" + - Doclinks PVC Storage Class .............. {{ mas_app_settings_doclinks_pvc_storage_class | default('', true) }}" + - BIM PVC Storage Class .................. {{ mas_app_settings_bim_pvc_storage_class | default('', true) }}" + - JMS Queue Storage Class ................. {{ mas_app_settings_jms_queue_pvc_storage_class | default('', true) }}" diff --git a/ibm/mas_devops/roles/suite_app_config/vars/health.yml b/ibm/mas_devops/roles/suite_app_config/vars/health.yml index e18a57c49..159b04d88 100644 --- a/ibm/mas_devops/roles/suite_app_config/vars/health.yml +++ b/ibm/mas_devops/roles/suite_app_config/vars/health.yml @@ -19,12 +19,6 @@ mas_app_settings_indexspace: "{{ lookup('env', 'MAS_APP_SETTINGS_INDEXSPACE') | # otherwise no persistent storage will be configured at all mas_app_settings_persistent_volumes_flag: "{{ lookup('env', 'MAS_APP_SETTINGS_PERSISTENT_VOLUMES_FLAG') | default(False, true) | bool }}" mas_app_settings_persistent_volumes_default_accessmode: "ReadWriteMany" -mas_app_settings_default_manage_supported_storage_classes: - - ibmc-file-gold-gid - - ocs-storagecluster-cephfs - - azurefiles-premium - - efs - - nfs-client # properties to configure persistent volumes for doclinks i.e attachments mas_app_settings_doclinks_pvc_storage_class: "{{ lookup('env', 'MAS_APP_SETTINGS_DOCLINKS_PVC_STORAGE_CLASS') }}" # if not defined by user, it will be automatically defined while setting persistent storage diff --git a/ibm/mas_devops/roles/suite_app_config/vars/manage.yml b/ibm/mas_devops/roles/suite_app_config/vars/manage.yml index 6404bdc37..f90379c46 100644 --- a/ibm/mas_devops/roles/suite_app_config/vars/manage.yml +++ b/ibm/mas_devops/roles/suite_app_config/vars/manage.yml @@ -20,12 +20,6 @@ mas_app_settings_indexspace: "{{ lookup('env', 'MAS_APP_SETTINGS_INDEXSPACE') | # otherwise no persistent storage will be configured at all mas_app_settings_persistent_volumes_flag: "{{ lookup('env', 'MAS_APP_SETTINGS_PERSISTENT_VOLUMES_FLAG') | default(False, true) | bool }}" mas_app_settings_persistent_volumes_default_accessmode: "ReadWriteMany" -mas_app_settings_default_manage_supported_storage_classes: - - ibmc-file-gold-gid - - ocs-storagecluster-cephfs - - azurefiles-premium - - efs - - nfs-client # properties to configure persistent volumes for doclinks i.e attachments mas_app_settings_doclinks_pvc_storage_class: "{{ lookup('env', 'MAS_APP_SETTINGS_DOCLINKS_PVC_STORAGE_CLASS') }}" # if not defined by user, it will be automatically defined while setting persistent storage diff --git a/ibm/mas_devops/roles/suite_app_install/defaults/main.yml b/ibm/mas_devops/roles/suite_app_install/defaults/main.yml index 8154a71de..a74ba103c 100644 --- a/ibm/mas_devops/roles/suite_app_install/defaults/main.yml +++ b/ibm/mas_devops/roles/suite_app_install/defaults/main.yml @@ -14,6 +14,10 @@ mas_entitlement_username: "{{ lookup('env', 'MAS_ENTITLEMENT_USERNAME') | defaul ibm_entitlement_key: "{{ lookup('env', 'IBM_ENTITLEMENT_KEY') }}" mas_entitlement_key: "{{ lookup('env', 'MAS_ENTITLEMENT_KEY') | default(ibm_entitlement_key, true) }}" +# Development Registry Entitlement +artifactory_username: "{{ lookup('env', 'ARTIFACTORY_USERNAME') | lower }}" +artifactory_token: "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}" + # MAS application configuration mas_app_id: "{{ lookup('env', 'MAS_APP_ID') }}" mas_app_plan: "{{ lookup('env', 'MAS_APP_PLAN') }}" diff --git a/ibm/mas_devops/roles/suite_app_install/tasks/iot.yml b/ibm/mas_devops/roles/suite_app_install/tasks/iot.yml index ea499b8c1..881d44925 100644 --- a/ibm/mas_devops/roles/suite_app_install/tasks/iot.yml +++ b/ibm/mas_devops/roles/suite_app_install/tasks/iot.yml @@ -1,18 +1,8 @@ --- - -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "determine-storage-classes : Lookup storage classes" - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses - -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" # 2. Set FPL Storage (Required) @@ -21,11 +11,8 @@ when: - mas_app_settings_iot_fpl_pvc_storage_class is not defined or mas_app_settings_iot_fpl_pvc_storage_class == "" - mas_app_settings_iot_deployment_size != "dev" - vars: - # ROKS, OCS, AWS, Azure - supported_storage_classes: [ibmc-block-gold, ocs-storagecluster-ceph-rbd, gp3-csi, managed-premium] set_fact: - mas_app_settings_iot_fpl_pvc_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(supported_storage_classes) }}" + mas_app_settings_iot_fpl_pvc_storage_class: "{{ defaultStorageClasses.rwo }}" # 3. Set MQTT Broker Storage (Required) @@ -34,11 +21,8 @@ when: - mas_app_settings_iot_mqttbroker_pvc_storage_class is not defined or mas_app_settings_iot_mqttbroker_pvc_storage_class == "" - mas_app_settings_iot_deployment_size != "dev" - vars: - # ROKS, OCS, AWS, Azure - supported_storage_classes: [ibmc-block-gold, ocs-storagecluster-ceph-rbd, gp3-csi, managed-premium] set_fact: - mas_app_settings_iot_mqttbroker_pvc_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(supported_storage_classes) }}" + mas_app_settings_iot_mqttbroker_pvc_storage_class: "{{ defaultStorageClasses.rwo }}" - name: Assert IoT FPL PVC Storage is defined when: mas_app_settings_iot_deployment_size != "dev" @@ -57,20 +41,20 @@ fail_msg: "IoT MQTT Broker Storage for MessageSight (mas_app_settings_iot_mqttbroker_pvc_storage_class property) must be defined when IoT deployment size = '{{ mas_app_settings_iot_deployment_size }}'." -# 3. Debug storage class configuration +# 4. Debug storage class configuration # ----------------------------------------------------------------------------- - name: "determine-storage-classes : Debug IoT PVC storage class configuration" debug: msg: - - "IoT Deployment Size ............... {{ mas_app_settings_iot_deployment_size }}" - - "IoT FPL PVC Storage Class ......... {{ mas_app_settings_iot_fpl_pvc_storage_class }}" - - "IoT FPL PVC Router Size ........... {{ mas_app_settings_iot_fpl_router_pvc_size }}" - - "IoT FPL PVC Executor Size ......... {{ mas_app_settings_iot_fpl_executor_pvc_size }}" - - "IoT MQTT Broker PVC Storage Class . {{ mas_app_settings_iot_mqttbroker_pvc_storage_class }}" - - "IoT MQTT Broker PVC Size .......... {{ mas_app_settings_iot_mqttbroker_pvc_size }}" + - "IoT Deployment Size .................... {{ mas_app_settings_iot_deployment_size }}" + - "IoT FPL PVC Storage Class .............. {{ mas_app_settings_iot_fpl_pvc_storage_class }}" + - "IoT FPL PVC Router Size ................ {{ mas_app_settings_iot_fpl_router_pvc_size }}" + - "IoT FPL PVC Executor Size .............. {{ mas_app_settings_iot_fpl_executor_pvc_size }}" + - "IoT MQTT Broker PVC Storage Class ...... {{ mas_app_settings_iot_mqttbroker_pvc_storage_class }}" + - "IoT MQTT Broker PVC Size ............... {{ mas_app_settings_iot_mqttbroker_pvc_size }}" -# 4. Load PodTemplates configuration +# 5. Load PodTemplates configuration # ----------------------------------------------------------------------------- - name: "Load podTemplates configuration" include_tasks: "{{ role_path }}/../../common_tasks/pod_templates/main.yml" diff --git a/ibm/mas_devops/roles/suite_app_install/tasks/main.yml b/ibm/mas_devops/roles/suite_app_install/tasks/main.yml index cf5bfe6bc..c0b665abe 100644 --- a/ibm/mas_devops/roles/suite_app_install/tasks/main.yml +++ b/ibm/mas_devops/roles/suite_app_install/tasks/main.yml @@ -57,18 +57,23 @@ oc adm policy add-scc-to-user anyuid system:serviceaccount:{{ mas_app_namespace }}:ibm-mas-visualinspection-operator -# 5. Install the operator +# 5. Create entitlement secret and install the operator # ----------------------------------------------------------------------------- -- name: "Install Operator" - include_role: - name: ibm.mas_devops.install_operator - vars: +- name: "Create IBM Entitlement Key" + ibm.mas_devops.update_ibm_entitlement: namespace: "{{ mas_app_namespace }}" icr_username: "{{ mas_entitlement_username }}" icr_password: "{{ mas_entitlement_key }}" + artifactory_username: "{{ artifactory_username }}" + artifactory_password: "{{ artifactory_token }}" + +- name: "Create ibm-mas Subscription" + ibm.mas_devops.apply_subscription: + namespace: "{{ mas_app_namespace }}" + package_name: "ibm-mas-{{ 'manage' if (mas_app_id == 'health') else mas_app_id }}" + package_channel: "{{ mas_app_channel }}" catalog_source: "{{ mas_app_catalog_source }}" - operator_group: "{{ lookup('template', 'templates/operator-group.yml.j2') }}" - subscription: "{{ lookup('template', 'templates/subscription.yml.j2') }}" + register: subscription # 6. Wait until the Application's CRD is available diff --git a/ibm/mas_devops/roles/suite_app_install/tasks/visualinspection.yml b/ibm/mas_devops/roles/suite_app_install/tasks/visualinspection.yml index 9ba601d50..7a065d9f5 100644 --- a/ibm/mas_devops/roles/suite_app_install/tasks/visualinspection.yml +++ b/ibm/mas_devops/roles/suite_app_install/tasks/visualinspection.yml @@ -1,20 +1,8 @@ --- -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" - -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses - -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" +- name: "visualinspection : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" # 2. Set Storage (Required) @@ -22,7 +10,7 @@ - name: Default Storage if not set by user when: mas_app_settings_visualinspection_storage_class is not defined or mas_app_settings_visualinspection_storage_class == "" set_fact: - mas_app_settings_visualinspection_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwx) }}" + mas_app_settings_visualinspection_storage_class: "{{ defaultStorageClasses.rwx }}" - name: Assert that storage class has been defined assert: @@ -42,4 +30,4 @@ - name: "Debug visualinspection storage class configuration" debug: msg: - - "Storage class (visualinspection) ...... {{ mas_app_settings_visualinspection_storage_class }}" + - "Storage class (visualinspection) ....... {{ mas_app_settings_visualinspection_storage_class }}" diff --git a/ibm/mas_devops/roles/suite_app_install/templates/operator-group.yml.j2 b/ibm/mas_devops/roles/suite_app_install/templates/operator-group.yml.j2 deleted file mode 100644 index 6e27d27f4..000000000 --- a/ibm/mas_devops/roles/suite_app_install/templates/operator-group.yml.j2 +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: {{ mas_app_namespace }}-operator-group - namespace: {{ mas_app_namespace }} -{% if custom_labels is defined and custom_labels.items() %} - labels: -{% for key, value in custom_labels.items() %} - "{{ key }}": "{{ value }}" -{% endfor %} -{% endif %} -spec: - targetNamespaces: - - {{ mas_app_namespace }} diff --git a/ibm/mas_devops/roles/suite_app_install/templates/subscription.yml.j2 b/ibm/mas_devops/roles/suite_app_install/templates/subscription.yml.j2 deleted file mode 100644 index 55c92d3e4..000000000 --- a/ibm/mas_devops/roles/suite_app_install/templates/subscription.yml.j2 +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: ibm-mas-{{ mas_app_id }} - namespace: {{ mas_app_namespace }} -{% if custom_labels is defined and custom_labels.items() %} - labels: -{% for key, value in custom_labels.items() %} - "{{ key }}": "{{ value }}" -{% endfor %} -{% endif %} -spec: - channel: {{ mas_app_channel }} - installPlanApproval: Automatic - name: ibm-mas-{{ 'manage' if (mas_app_id == 'health') else mas_app_id }} - source: {{ mas_app_catalog_source }} - sourceNamespace: openshift-marketplace diff --git a/ibm/mas_devops/roles/suite_backup_restore/README.md b/ibm/mas_devops/roles/suite_backup_restore/README.md index eeb928012..35792f40b 100644 --- a/ibm/mas_devops/roles/suite_backup_restore/README.md +++ b/ibm/mas_devops/roles/suite_backup_restore/README.md @@ -46,82 +46,13 @@ Set the [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - Environment Variable: `MASBR_JOB_TIMEZONE` - Default: None -### masbr_storage_type -Set `local` or `cloud` to indicate this role to save the backup files to local file system or cloud object storage. - -- **Required** -- Environment Variable: `MASBR_STORAGE_TYPE` -- Default: None - ### masbr_storage_local_folder Set local path to save the backup files. -- **Required** only when `MASBR_STORAGE_TYPE=local` +- **Required** - Environment Variable: `MASBR_STORAGE_LOCAL_FOLDER` - Default: None -### masbr_storage_cloud_rclone_file -Set the path of `rclone.conf` file. - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_RCLONE_FILE` -- Default: None - -### masbr_storage_cloud_rclone_name -Set the configuration name defined in `rclone.conf` file. - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_RCLONE_NAME` -- Default: None - -### masbr_storage_cloud_bucket -Set the object storage bucket name for saving the backup files - -- **Required** only when `MASBR_STORAGE_TYPE=cloud` -- Environment Variable: `MASBR_STORAGE_CLOUD_BUCKET` -- Default: None - -### masbr_slack_enabled -Set `true` or `false` to indicate whether this role will send Slack notification messages of the backup and restore progress. - -- Optional -- Environment Variable: `MASBR_SLACK_ENABLED` -- Default: `false` - -### masbr_slack_level -Set `failure`, `info` or `verbose` to indicate this role to send Slack notification messages in which backup and resore phases: - -| Slack level | Backup/Restore phases | -| ----------- | ------------------------------------------------------- | -| failure | `Failed`, `PartiallyFailed` | -| info | `Completed`, `Failed`, `PartiallyFailed` | -| verbose | `InProgress`, `Completed`, `Failed`, `PartiallyFailed` | - -- Optional -- Environment Variable: `MASBR_SLACK_LEVEL` -- Default: `info` - -### masbr_slack_token -The Slack integration token. - -- **Required** only when `MASBR_SLACK_ENABLED=true` -- Environment Variable: `MASBR_SLACK_TOKEN` -- Default: None - -### masbr_slack_channel -The Slack channel to send the notification messages to. - -- **Required** only when `MASBR_SLACK_ENABLED=true` -- Environment Variable: `MASBR_SLACK_CHANNEL` -- Default: None - -### masbr_slack_user -The sender of the Slack notification message. - -- Optional -- Environment Variable: `MASBR_SLACK_USER` -- Default: `MASBR` - Role Variables - Backup ------------------------------------------------------------------------------- @@ -155,7 +86,6 @@ Backup MAS Core namespace resources, note that this does not include backup of a vars: masbr_action: backup mas_instance_id: main - masbr_storage_type: local masbr_storage_local_folder: /tmp/masbr roles: - ibm.mas_devops.suite_backup_restore @@ -171,7 +101,6 @@ Restore MAS Core namespace resources, note that this does not include backup of masbr_action: restore masbr_restore_from_version: 20240621021316 mas_instance_id: main - masbr_storage_type: local masbr_storage_local_folder: /tmp/masbr roles: - ibm.mas_devops.suite_backup_restore diff --git a/ibm/mas_devops/roles/suite_backup_restore/tasks/main.yml b/ibm/mas_devops/roles/suite_backup_restore/tasks/main.yml index abcc0a21a..d22d41f04 100644 --- a/ibm/mas_devops/roles/suite_backup_restore/tasks/main.yml +++ b/ibm/mas_devops/roles/suite_backup_restore/tasks/main.yml @@ -38,22 +38,7 @@ _component_before_task_path: "{{ role_path }}/tasks/get-suite-info.yml" -# Create k8s Job to run backup/restore tasks -# ----------------------------------------------------------------------------- -- name: "Create k8s Job to run {{ masbr_action }} tasks" - when: masbr_create_task_job - include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/create_run_tasks_job.yml" - vars: - _rt_role_name: "suite_backup_restore" - _rt_env: - - name: "MASBR_JOB_VERSION" - value: "{{ masbr_job_version }}" - - name: "MAS_INSTANCE_ID" - value: "{{ mas_instance_id }}" - - - name: "Run {{ masbr_action }} tasks" - when: not masbr_create_task_job block: # Update job status: New # ------------------------------------------------------------------------- diff --git a/ibm/mas_devops/roles/suite_db2_setup_for_manage/tasks/apply-db2-config-version.yml b/ibm/mas_devops/roles/suite_db2_setup_for_manage/tasks/apply-db2-config-version.yml index 601ef8035..23bd024d0 100644 --- a/ibm/mas_devops/roles/suite_db2_setup_for_manage/tasks/apply-db2-config-version.yml +++ b/ibm/mas_devops/roles/suite_db2_setup_for_manage/tasks/apply-db2-config-version.yml @@ -23,15 +23,6 @@ msg: - "Pod name ............................... {{ db2_pod_name }}" -- name: "Creating MIRRORLOGPATH folder in {{ db2_pod_name }}" - shell: | - oc exec -it -n {{ db2_namespace }} {{ db2_pod_name }} -- su -lc "mkdir -p /mnt/backup/MIRRORLOGPATH" db2inst1 - register: creating_mirrorlog_folder_output - -- fail: msg="Failed to create path for MIRRORLOGPATH" - when: - - creating_mirrorlog_folder_output.rc != 0 - - name: "Creating LOGARCHMETH1 folder in {{ db2_pod_name }}" shell: | oc exec -it -n {{ db2_namespace }} {{ db2_pod_name }} -- su -lc "mkdir -p /mnt/bludata0/db2/archive_log/" db2inst1 diff --git a/ibm/mas_devops/roles/suite_db2_setup_for_manage/vars/main.yml b/ibm/mas_devops/roles/suite_db2_setup_for_manage/vars/main.yml index 74364cb72..22659bd19 100644 --- a/ibm/mas_devops/roles/suite_db2_setup_for_manage/vars/main.yml +++ b/ibm/mas_devops/roles/suite_db2_setup_for_manage/vars/main.yml @@ -27,7 +27,7 @@ db2_configs: LOGSECOND: '156' LOGFILSIZ: '32768' LOGARCHMETH1: 'DISK:/mnt/bludata0/db2/archive_log/' - MIRRORLOGPATH: '/mnt/backup/MIRRORLOGPATH' + MIRRORLOGPATH: '/mnt/backup' STMT_CONC: 'LITERALS' DDL_CONSTRAINT_DEF: 'YES' TRACKMOD: 'YES' @@ -41,8 +41,6 @@ db2_configs: AUTO_REORG: 'OFF' AUTO_DB_BACKUP: 'OFF' WLM_ADMISSION_CTRL: 'NO' - SHEAPTHRES_SHR: 'automatic' - SORTHEAP: 'automatic' AUTHN_CACHE_USERS: '100' AUTHN_CACHE_DURATION: '10' instance: diff --git a/ibm/mas_devops/roles/suite_install/defaults/main.yml b/ibm/mas_devops/roles/suite_install/defaults/main.yml index 8a7408cce..7d227722a 100644 --- a/ibm/mas_devops/roles/suite_install/defaults/main.yml +++ b/ibm/mas_devops/roles/suite_install/defaults/main.yml @@ -54,6 +54,10 @@ mas_entitlement_username: "{{ lookup('env', 'MAS_ENTITLEMENT_USERNAME') | defaul ibm_entitlement_key: "{{ lookup('env', 'IBM_ENTITLEMENT_KEY') }}" mas_entitlement_key: "{{ lookup('env', 'MAS_ENTITLEMENT_KEY') | default(ibm_entitlement_key, true) }}" +# Development Registry Entitlement +artifactory_username: "{{ lookup('env', 'ARTIFACTORY_USERNAME') | lower }}" +artifactory_token: "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}" + # Data Dictionary # ----------------------------------------------------------------------------- mas_add_catalog: "{{ lookup('env', 'MAS_ADD_CATALOG') | default('ibm-operator-catalog', true) }}" diff --git a/ibm/mas_devops/roles/suite_install/tasks/main.yml b/ibm/mas_devops/roles/suite_install/tasks/main.yml index c699062a0..3d36c16f6 100644 --- a/ibm/mas_devops/roles/suite_install/tasks/main.yml +++ b/ibm/mas_devops/roles/suite_install/tasks/main.yml @@ -176,18 +176,23 @@ - "IPv6 Enabled .................. {{ enable_ipv6 }}" -# 11. Install the operator & create entitlement secret +# 11. Create entitlement secret and install the operator # ----------------------------------------------------------------------------- -- name: "Install MAS Operator" - include_role: - name: ibm.mas_devops.install_operator - vars: +- name: "Create IBM Entitlement Key" + ibm.mas_devops.update_ibm_entitlement: namespace: "{{ mas_namespace }}" icr_username: "{{ mas_entitlement_username }}" icr_password: "{{ mas_entitlement_key }}" + artifactory_username: "{{ artifactory_username }}" + artifactory_password: "{{ artifactory_token }}" + +- name: "Create ibm-mas Subscription" + ibm.mas_devops.apply_subscription: + namespace: "{{ mas_namespace }}" + package_name: ibm-mas + package_channel: "{{ mas_channel }}" catalog_source: "{{ mas_catalog_source }}" - operator_group: "{{ lookup('template', 'templates/operator-group.yml.j2') }}" - subscription: "{{ lookup('template', 'templates/subscription.yml.j2') }}" + register: subscription # 12. Wait until the Suite CRD is available diff --git a/ibm/mas_devops/roles/suite_install/templates/operator-group.yml.j2 b/ibm/mas_devops/roles/suite_install/templates/operator-group.yml.j2 deleted file mode 100644 index e462e6ed1..000000000 --- a/ibm/mas_devops/roles/suite_install/templates/operator-group.yml.j2 +++ /dev/null @@ -1,15 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: ibm-mas-operator-group - namespace: "{{ mas_namespace }}" -{% if custom_labels is defined and custom_labels.items() %} - labels: -{% for key, value in custom_labels.items() %} - "{{ key }}": "{{ value }}" -{% endfor %} -{% endif %} -spec: - targetNamespaces: - - "{{ mas_namespace }}" diff --git a/ibm/mas_devops/roles/suite_install/templates/subscription.yml.j2 b/ibm/mas_devops/roles/suite_install/templates/subscription.yml.j2 deleted file mode 100644 index d6274123f..000000000 --- a/ibm/mas_devops/roles/suite_install/templates/subscription.yml.j2 +++ /dev/null @@ -1,18 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: ibm-mas-operator - namespace: "{{ mas_namespace }}" -{% if custom_labels is defined and custom_labels.items() %} - labels: -{% for key, value in custom_labels.items() %} - "{{ key }}": "{{ value }}" -{% endfor %} -{% endif %} -spec: - channel: "{{ mas_channel }}" - installPlanApproval: Automatic - name: ibm-mas - source: "{{ mas_catalog_source }}" - sourceNamespace: openshift-marketplace diff --git a/ibm/mas_devops/roles/suite_manage_imagestitching_config/tasks/configure-stitching.yml b/ibm/mas_devops/roles/suite_manage_imagestitching_config/tasks/configure-stitching.yml index c75bd0dab..5063bce5f 100644 --- a/ibm/mas_devops/roles/suite_manage_imagestitching_config/tasks/configure-stitching.yml +++ b/ibm/mas_devops/roles/suite_manage_imagestitching_config/tasks/configure-stitching.yml @@ -1,22 +1,16 @@ --- -- name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" +# 1. Lookup storage class availabiity +# ----------------------------------------------------------------------------- +- name: "configure-stitching : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses - -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" +# 2. Set Defaults +# ----------------------------------------------------------------------------- - name: Storage class if not set by user (ReadWriteMany) when: stitching_storage_class is not defined or stitching_storage_class == "" - vars: set_fact: - stitching_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwx) }}" + stitching_storage_class: "{{ defaultStorageClasses.rwx }}" - name: Assert that a storage class has been defined assert: @@ -64,16 +58,16 @@ - name: "Run Manage image stitching post-configuration: Debug" debug: msg: - - "Stitching PVC name ......................... {{ stitching_pvcname }}" - - "Stitching storage class .................... {{ stitching_storage_class }}" - - "Stitching storage size ..................... {{ stitching_storage_size }}" - - "Stitching storage mode ..................... {{ stitching_storage_mode }}" - - "Stitching storage mountpath ................ {{ stitching_storage_mountpath }}" - - "Instance ID ................................ {{ mas_instance_id }}" - - "Workspace ID ............................... {{ mas_workspace_id }}" - - "Manage namespace ........................... {{ manage_namespace }}" - - "MAS domain ................................. {{ mas_domain }}" - - "MAS workspace CR name ...................... {{ mas_ws_cr_name }}" + - "Stitching PVC name ..................... {{ stitching_pvcname }}" + - "Stitching storage class ................ {{ stitching_storage_class }}" + - "Stitching storage size ................. {{ stitching_storage_size }}" + - "Stitching storage mode ................. {{ stitching_storage_mode }}" + - "Stitching storage mountpath ............ {{ stitching_storage_mountpath }}" + - "Instance ID ............................ {{ mas_instance_id }}" + - "Workspace ID ........................... {{ mas_workspace_id }}" + - "Manage namespace ....................... {{ manage_namespace }}" + - "MAS domain ............................. {{ mas_domain }}" + - "MAS workspace CR name .................. {{ mas_ws_cr_name }}" - name: Retrieve Manage workspace CR kubernetes.core.k8s_info: diff --git a/ibm/mas_devops/roles/suite_manage_pvc_config/tasks/determine-storage-classes.yml b/ibm/mas_devops/roles/suite_manage_pvc_config/tasks/determine-storage-classes.yml index d40e2e5d2..c5e15de25 100644 --- a/ibm/mas_devops/roles/suite_manage_pvc_config/tasks/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/suite_manage_pvc_config/tasks/determine-storage-classes.yml @@ -1,29 +1,17 @@ --- - -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "determine-storage-classes : Lookup storage classes" - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" -- name: "Debug available storage classes" - debug: - msg: "{{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" # 2. Set Primary Storage (Required) # ----------------------------------------------------------------------------- - name: "determine-storage-classes : Default Manage PVC Storage if not set by user" when: - mas_app_settings_custom_persistent_volume_sc_name is not defined or mas_app_settings_custom_persistent_volume_sc_name == "" - vars: - # ROKS, OCS, Azure - supported_storage_classes: [ibmc-file-gold-gid, ocs-storagecluster-cephfs, nfs-client, azurefiles-premium] set_fact: - mas_app_settings_custom_persistent_volume_sc_name: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(supported_storage_classes) }}" + mas_app_settings_custom_persistent_volume_sc_name: "{{ defaultStorageClasses.rwx }}" - name: "determine-storage-classes : Assert that Manage PVC storage class has been defined" assert: diff --git a/ibm/mas_devops/roles/uds/tasks/install/determine-storage-classes.yml b/ibm/mas_devops/roles/uds/tasks/install/determine-storage-classes.yml index f82c4cf7a..2fced6b73 100644 --- a/ibm/mas_devops/roles/uds/tasks/install/determine-storage-classes.yml +++ b/ibm/mas_devops/roles/uds/tasks/install/determine-storage-classes.yml @@ -1,22 +1,8 @@ --- - -# Provide intelligent storage class selection to minimize required user knowledge - # 1. Lookup storage class availabiity # ----------------------------------------------------------------------------- -- name: "Load default storage class information" - include_vars: "{{ role_path }}/../../common_vars/default_storage_classes.yml" - -- name: Lookup storage classes - kubernetes.core.k8s_info: - api_version: storage.k8s.io/v1 - kind: StorageClass - register: lookup_storageclasses - -- name: "Debug available storage classes" - debug: - msg: - - "Available storage classes .................... {{ lookup_storageclasses | ibm.mas_devops.getResourceNames }}" +- name: "determine-storage-classes : Load default storage class information" + include_tasks: "{{ role_path }}/../../common_tasks/default_storage_classes.yml" # 2. Set Storage (Required) @@ -24,7 +10,7 @@ - name: Default Storage for ROKS if not set by user when: uds_storage_class is not defined or uds_storage_class == "" set_fact: - uds_storage_class: "{{ lookup_storageclasses | ibm.mas_devops.defaultStorageClass(default_storage_classes_rwo) }}" + uds_storage_class: "{{ defaultStorageClasses.rwo }}" - name: Assert that storage class has been defined assert: diff --git a/mkdocs.yml b/mkdocs.yml index 280eb231f..1fad7b80f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -107,7 +107,6 @@ nav: - "gencfg_jdbc": roles/gencfg_jdbc.md - "gencfg_watsonstudio": roles/gencfg_watsonstudio.md - "gencfg_workspace": roles/gencfg_workspace.md - - "install_operator": roles/install_operator.md - "gencfg_mongo": roles/gencfg_mongo.md theme: