Skip to content
This repository has been archived by the owner on Nov 13, 2022. It is now read-only.

Commit

Permalink
[major] Support for MAS 8.8 & Maximo Curated Operator Catalog (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
durera authored Aug 2, 2022
1 parent 2c6619e commit 8b76109
Show file tree
Hide file tree
Showing 61 changed files with 761 additions and 708 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/ansible-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,3 @@ jobs:
- name: Publish Collection
run: |
ansible-galaxy collection publish ${{ github.workspace }}/ibm/mas_airgap/ibm-mas_airgap-${{ env.VERSION }}.tar.gz --token=${{ secrets.ANSIBLE_GALAXY_TOKEN }}
- name: Install the Ansible collection in the container image
run: cp $GITHUB_WORKSPACE/ibm/mas_airgap/ibm-mas_airgap-${{ env.VERSION }}.tar.gz $GITHUB_WORKSPACE/image/ansible-airgap/ibm-mas_airgap.tar.gz

# Docker build
- name: Build the docker image
run: |
$GITHUB_WORKSPACE/build/bin/docker-build.sh -n ibmmas -i ansible-airgap
docker tag ibmmas/ansible-airgap ibmmas/ansible-airgap:${{ env.DOCKER_TAG }}
docker tag ibmmas/ansible-airgap quay.io/ibmmas/ansible-airgap:${{ env.DOCKER_TAG }}
docker tag ibmmas/ansible-airgap quay.io/ibmmas/ansible-airgap:latest
# https://github.com/marketplace/actions/push-to-registry
- name: Push the docker image
id: push_to_quay
uses: redhat-actions/push-to-registry@v2
with:
tags: quay.io/ibmmas/ansible-airgap:${{ env.DOCKER_TAG }} quay.io/ibmmas/ansible-airgap:latest
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}
18 changes: 0 additions & 18 deletions .github/workflows/ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,3 @@ jobs:
name: ibm-mas_airgap-${{ env.VERSION }}.tar.gz
path: ${{ github.workspace }}/ibm/mas_airgap/ibm-mas_airgap-${{ env.VERSION }}.tar.gz
retention-days: 30

- name: Install the Ansible collection in the container image
run: cp $GITHUB_WORKSPACE/ibm/mas_airgap/ibm-mas_airgap-${{ env.VERSION }}.tar.gz $GITHUB_WORKSPACE/image/ansible-airgap/ibm-mas_airgap.tar.gz

- name: Build the docker image
run: |
$GITHUB_WORKSPACE/build/bin/docker-build.sh -n ibmmas -i ansible-airgap
docker tag ibmmas/ansible-airgap ibmmas/ansible-airgap:${{ env.DOCKER_TAG }}
docker tag ibmmas/ansible-airgap quay.io/ibmmas/ansible-airgap:${{ env.DOCKER_TAG }}
# https://github.com/marketplace/actions/push-to-registry
- name: Push the docker image
id: push_to_quay
uses: redhat-actions/push-to-registry@v2
with:
tags: quay.io/ibmmas/ansible-airgap:${{ env.DOCKER_TAG }}
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

*.DS_Store*
site
ibm/mas_airgap/ibm-mas_airgap-*.tar.gz
build/bin/downloads
build/bin/digests
ibm/mas_airgap/dev-*.yml
image/ansible-airgap/ibm-mas_airgap.tar.gz
ibm-mas_airgap-*.tar.gz
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

.PHONY: build install clean all

.DEFAULT_GOAL := all

build:
ansible-galaxy collection build --output-path . ibm/mas_airgap --force
install:
ansible-galaxy collection install ibm-mas_airgap-2.0.0.tar.gz --force --no-deps
clean:
rm ibm-mas_airgap-2.0.0.tar.gz

all: build install
7 changes: 5 additions & 2 deletions build/bin/copy-role-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ function copyDoc() {

copyDoc case_mirror
copyDoc case_prepare
copyDoc catalogs
copyDoc install_digest_cm
copyDoc mirror_images
copyDoc ocp_contentsourcepolicy
copyDoc ocp_operators_mirror
copyDoc ocp_release_mirror
copyDoc registry
copyDoc thirdparty_mirror
copyDoc simulate_network
42 changes: 42 additions & 0 deletions build/bin/download-digestmaps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# We can't access the image maps from the case bundles at install time, because we're likely running in
# and environment with limited connectivity, so everything needs to be self-contained.
#
# Soon, we will improve our airgap implemention to not need these seperate digests, they were a
# tactical solution to accelerate airgap delivery.

function download_case() {
case_name=$1
case_version=$2
inventory_name=$3

mkdir -p downloads
if [[ ! -e "downloads/${case_name}-${case_version}.tgz" ]]; then
wget -k https://github.com/IBM/cloud-pak/blob/master/repo/case/${case_name}/${case_version}/${case_name}-${case_version}.tgz?raw=true -O downloads/${case_name}-${case_version}.tgz
fi

mkdir -p digests/${case_name}
tar -xvf downloads/${case_name}-${case_version}.tgz -C digests/${case_name} ${case_name}/inventory/${inventory_name}/files/image-map.yaml --strip-components 4
mv digests/${case_name}/image-map.yaml digests/${case_name}/${case_version}.yaml
}

# SLS
# -----------------------------------------------------------------------------
download_case ibm-sls 3.4.0 ibmSlsSetup

# Truststore Manager
# -----------------------------------------------------------------------------
download_case ibm-truststore-mgr 1.3.0 ibmTrustStoreMgrSetup

# MAS Core
# -----------------------------------------------------------------------------
download_case ibm-mas 8.8.0 ibmMasSetup

# MAS IoT
# -----------------------------------------------------------------------------
download_case ibm-mas-iot 8.5.0 ibmMasIotSetup

# MAS Manage
# -----------------------------------------------------------------------------
download_case ibm-mas-manage 8.4.0 ibmMasManageSetup
18 changes: 7 additions & 11 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Extension to **ibm.mas_devops** providing support for air gap deployments.
!!! important
This collection and automation around air gap support is currently a work in progress and is incomplete!


## 1. Deploy private registry

There are multiple options for setting up your private registry:
Expand All @@ -21,7 +22,7 @@ We have provided automation to deploy a private registry inside an OpenShift clu
The easiest way drive the automation is to use the MAS command line container image and run `mas setup-registry` at the prompt:

```bash
$ docker run quay.io/ibmmas/installer:1.0.0-pre.master
$ docker run -ti --rm quay.io/ibmmas/cli
```

![](images/setup-airgap-registry.png)
Expand All @@ -41,7 +42,7 @@ ansible-playbook ibm.mas_airgap.run_role
The easiest way drive the automation is to use the MAS command line container image and run `mas mirror-images` at the prompt:

```bash
$ docker run quay.io/ibmmas/installer:1.0.0-pre.master
$ docker run -ti --rm quay.io/ibmmas/cli mirror-images
```

This will mirror all (or a subset) container images needed for a MAS installation to your private registry
Expand All @@ -51,18 +52,15 @@ Alternatively you can run the following Ansible playbooks directly if your local
```bash
export REGISTRY_PUBLIC_HOST=xxx
export REGISTRY_PUBLIC_PORT=xxx
ansible-playbook ibm.mas_airgap.mirror_common_services
ansible-playbook ibm.mas_airgap.mirror_sls
ansible-playbook ibm.mas_airgap.mirror_truststore_mgr
ansible-playbook ibm.mas_airgap.mirror_mas_core
ROLE_NAME=thirdparty_mirror ansible-playbook ibm.mas_airgap.run_role
ansible-playbook ibm.mas_airgap.mirror_core
ansible-playbook ibm.mas_airgap.mirror_add_iot
```

## 3. Configure the target OCP cluster
The easiest way drive the automation is to use the MAS command line container image and run `mas configure-airgap` at the prompt:

```bash
$ docker run quay.io/ibmmas/installer:1.0.0-pre.master
$ docker run -ti --rm quay.io/ibmmas/cli
```

This will configure your target OCP cluster to use a private docker register, install the operator catalogs required by MAS from that mirror, and install the necessary configmaps to instruct a MAS instance to use image digests instead of image tags so that image mirroring works.
Expand All @@ -75,12 +73,10 @@ export REGISTRY_PRIVATE_PORT=xxx
export REGISTRY_PRIVATE_CA_FILE=xxx
export MAS_INSTANCE_ID=xxx
ROLE_NAME=ocp_contentsourcepolicy ansible-playbook ibm.mas_airgap.run_role
ROLE_NAME=catalogs ansible-playbook ibm.mas_airgap.run_role
ROLE_NAME=install_digest_cm ansible-playbook ibm.mas_airgap.run_role
```


## 4. Install Maximo Application Suite
`mas install` will install MAS, deploying the OpenShift Pipelines operator into your cluster & using it to launch the suite installation pipeline.
Running `mas install` will install MAS, deploying the OpenShift Pipelines operator into your cluster & using it to launch the suite installation pipeline.

Alternatively, review the [ibm.mas_devops documentation](https://ibm-mas.github.io/ansible-devops/) for full details of the options available for installing MAS using Ansible.
23 changes: 23 additions & 0 deletions ibm/mas_airgap/common_vars/casebundles/v8-220717.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# Case bundle configuration for IBM Maximo Operator Catalog v20220727
# -----------------------------------------------------------------------------
# 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:1222697802a54640bbfd5e5cc86716319ef5c440902da8227599c9a5fe28d7b8

# Dependencies
# -----------------------------------------------------------------------------
common_svcs_version: 1.15.1 # Operator version 3.19.1
db2u_version: 4.0.11 # Operator version 1.1.13
events_version: 4.2.0 # Operator version 4.2.0
uds_version: 2.0.8 # Operator version 2.0.8
sls_version: 3.4.0 # Operator version 3.4.0
tsm_version: 1.3.0 # Operator version 1.3.0

# Maximo Application Suite
# -----------------------------------------------------------------------------
mas_core_version: 8.8.0 # Operator version 8.8.0
mas_iot_version: 8.5.0 # Operator version 8.5.0
mas_manage_version: 8.4.0 # Operator version 8.4.0
Loading

0 comments on commit 8b76109

Please sign in to comment.