Skip to content

Commit c4d0db0

Browse files
committed
split idms for aiservice
1 parent 1e9c6b2 commit c4d0db0

File tree

18 files changed

+368
-17
lines changed

18 files changed

+368
-17
lines changed

ibm/mas_devops/common_tasks/detect_airgap.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,21 @@
1818
- mas.ibm.com/idmsContent=ibm
1919
register: idms_lookup
2020

21+
# 3. Look for the new aiservice IDMS
22+
# -----------------------------------------------------------------------------
23+
- name: "detect-airgap : Look for the MAS ImageDigestMirrorSet"
24+
kubernetes.core.k8s_info:
25+
api_version: config.openshift.io/v1
26+
kind: ImageDigestMirrorSet
27+
label_selectors:
28+
- aiservice.ibm.com/idmsContent=ibm
29+
register: aiservice_idms_lookup
30+
2131
# 3. Set the airgap boolena and print debug
2232
# -----------------------------------------------------------------------------
2333
- name: "detect-airgap : Set airgap_install property"
2434
set_fact:
25-
airgap_install: "{{ idms_lookup.resources | length == 1 | bool }}"
35+
airgap_install: "{{ ( idms_lookup.resources | length == 1 or aiservice_idms_lookup.resources | length == 1 ) | bool }}"
2636

2737
- name: "detect-airgap : Debug Airgap detection"
2838
debug:

ibm/mas_devops/roles/aiservice_odh/tasks/authorino-operator.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,35 @@
11
---
2+
3+
- name: Get authorino operator package manifest
4+
kubernetes.core.k8s_info:
5+
api_version: packages.operators.coreos.com/v1
6+
kind: PackageManifest
7+
name: authorino-operator
8+
namespace: openshift-marketplace # Note: A namespace must be provided when calling packages.operators.coreos.com/v1
9+
register: authorino_operator_manifest
10+
11+
- name: Assert that PackageManifest exists
12+
ansible.builtin.assert:
13+
that:
14+
- authorino_operator_manifest is defined
15+
- authorino_operator_manifest.resources is defined
16+
- authorino_operator_manifest.resources | length == 1
17+
fail_msg: "PackageManifest not found: authorino-operator"
18+
19+
- name: Set the subscription information
20+
set_fact:
21+
authorino_operator_source: "{{ authorino_operator_manifest.resources[0].status.catalogSource }}"
22+
authorino_operator_source_namespace: "{{ authorino_operator_manifest.resources[0].status.catalogSourceNamespace }}"
23+
authorino_operator_default_channel: "{{ authorino_operator_manifest.resources[0].status.defaultChannel }}"
24+
225
# 1. Install Operator & create entitlement openshift-authorino
326
# -----------------------------------------------------------------------------
427
- name: "Install Openshift authorino Operator"
528
ibm.mas_devops.apply_subscription:
629
namespace: "{{ openshift_namespace }}"
730
package_name: "authorino-operator"
8-
package_channel: "{{ serverless_channel }}" # This looks wrong, but that's what was in the original template
9-
catalog_source: "{{ authorino_catalog_source }}"
31+
package_channel: "{{ authorino_operator_default_channel }}"
32+
catalog_source: "{{ authorino_operator_source }}"
1033
register: subscription
1134

1235

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
11
---
2+
- name: Get service mesh operator package manifest
3+
kubernetes.core.k8s_info:
4+
api_version: packages.operators.coreos.com/v1
5+
kind: PackageManifest
6+
name: serverless-operator
7+
namespace: openshift-marketplace # Note: A namespace must be provided when calling packages.operators.coreos.com/v1
8+
register: serverless_operator_manifest
9+
10+
- name: Assert that PackageManifest exists
11+
ansible.builtin.assert:
12+
that:
13+
- serverless_operator_manifest is defined
14+
- serverless_operator_manifest.resources is defined
15+
- serverless_operator_manifest.resources | length == 1
16+
fail_msg: "PackageManifest not found: serverless-operator"
17+
18+
- name: Set the subscription information
19+
set_fact:
20+
serverless_operator_source: "{{ serverless_operator_manifest.resources[0].status.catalogSource }}"
21+
serverless_operator_source_namespace: "{{ serverless_operator_manifest.resources[0].status.catalogSourceNamespace }}"
22+
serverless_operator_default_channel: "{{ serverless_operator_manifest.resources[0].status.defaultChannel }}"
23+
24+
# 1. Install Operator & create entitlement serverless
25+
# -----------------------------------------------------------------------------
226
- name: "install : Create Serverless Subscription"
327
ibm.mas_devops.apply_subscription:
4-
namespace: openshift-serverless
5-
package_name: serverless-operator
6-
package_channel: stable
7-
catalog_source: redhat-operators
8-
catalog_source_namespace: openshift-marketplace
28+
namespace: "{{ serverless_namespace }}"
29+
package_name: "serverless-operator"
30+
package_channel: "{{ serverless_operator_default_channel }}"
31+
catalog_source: "{{ serverless_operator_source }}"
932
register: serverless_subscription

ibm/mas_devops/roles/aiservice_odh/tasks/servicemesh-operator.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,35 @@
11
---
2+
3+
- name: Get service mesh operator package manifest
4+
kubernetes.core.k8s_info:
5+
api_version: packages.operators.coreos.com/v1
6+
kind: PackageManifest
7+
name: servicemeshoperator
8+
namespace: openshift-marketplace # Note: A namespace must be provided when calling packages.operators.coreos.com/v1
9+
register: service_mesh_operator_manifest
10+
11+
- name: Assert that PackageManifest exists
12+
ansible.builtin.assert:
13+
that:
14+
- service_mesh_operator_manifest is defined
15+
- service_mesh_operator_manifest.resources is defined
16+
- service_mesh_operator_manifest.resources | length == 1
17+
fail_msg: "PackageManifest not found: servicemeshoperator"
18+
19+
- name: Set the subscription information
20+
set_fact:
21+
service_mesh_operator_source: "{{ service_mesh_operator_manifest.resources[0].status.catalogSource }}"
22+
service_mesh_operator_source_namespace: "{{ service_mesh_operator_manifest.resources[0].status.catalogSourceNamespace }}"
23+
service_mesh_operator_default_channel: "{{ service_mesh_operator_manifest.resources[0].status.defaultChannel }}"
24+
225
# 1. Install Operator & create entitlement openshift-service-mesh
326
# -----------------------------------------------------------------------------
427
- name: "Install Openshift ServiceMesh Operator"
528
ibm.mas_devops.apply_subscription:
629
namespace: "{{ service_mesh_namespace }}"
730
package_name: "servicemeshoperator"
8-
package_channel: "{{ service_mesh_channel }}"
9-
catalog_source: "{{ service_mesh_catalog_source }}"
31+
package_channel: "{{ service_mesh_operator_default_channel }}"
32+
catalog_source: "{{ service_mesh_operator_source }}"
1033
register: subscription
1134

1235

ibm/mas_devops/roles/minio/defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ minio_namespace: "{{ lookup('env', 'MINIO_NAMESPACE') | default('minio', True) }
2323
minio_instance_name: "{{ lookup('env', 'MINIO_INSTANCE_NAME') | default('minio', True) }}"
2424
minio_root_user: "{{ lookup('env', 'MINIO_ROOT_USER') | default('minio', True) }}"
2525
minio_root_password: "{{ lookup('env', 'MINIO_ROOT_PASSWORD') | default('', True) }}"
26-
minio_version: "quay.io/minio/minio:latest"
26+
# needs to move to catalog
27+
minio_version: "RELEASE.2025-06-13T11-33-47Z"

ibm/mas_devops/roles/minio/tasks/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66
# -----------------------------------------------------------------------------
77
- include_tasks: tasks/determine-storage-classes.yml
88

9+
- name: Load minio defaults
10+
include_vars:
11+
file: "{{ role_path }}/../mirror_extras_prepare/vars/minio_{{ minio_version }}.yml"
12+
13+
- name: Retrieve image setting parts
14+
set_fact:
15+
minio_image_name: "{{ extra_images | selectattr('name', 'match', '.*/minio$') | map(attribute='name') | first }}"
16+
minio_image_registry: "{{ extra_images | selectattr('name', 'match', '.*/minio$') | map(attribute='registry') | first }}"
17+
minio_image_digest: "{{ extra_images | selectattr('name', 'match', '.*/minio$') | map(attribute='digest') | first }}"
18+
minio_image_tag: "{{ extra_images | selectattr('name', 'match', '.*/minio$') | map(attribute='tag') | first }}"
19+
920
# create minio namespace
1021
- name: 'Create minio namespace'
1122
kubernetes.core.k8s:

ibm/mas_devops/roles/minio/templates/minio/minio-deployment.yml.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ spec:
1919
claimName: minio-pvc
2020
containers:
2121
- name: "{{ minio_instance_name }}"
22-
image: "{{ minio_version }}"
22+
image: "{{ minio_image_registry }}/{{ minio_image_name}}@{{ minio_image_digest}}"
23+
metadata:
24+
labels:
25+
tag: "{{ minio_image_tag }}"
2326
command:
2427
- /bin/bash
2528
- -c

ibm/mas_devops/roles/ocp_idms/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
ocp_idms
22
===============================================================================
3-
Installs an **ImageDigestMirrorSet** (IDMS)for IBM Maximo Application Suite's Maximo Operator Catalog. Optionally can also install a second IDMS suitable for the Red Hat Operator Catalogs created by [mirror_ocp](mirror_ocp.md). If there are legacy **ImageContentSourcePolicies** installed by previous versions of this role, they will be deleted.
3+
Installs an **ImageDigestMirrorSet** (IDMS)for IBM Maximo Application Suite's Maximo Operator Catalog.
4+
Also install IDMS suitable for the Red Hat Operator Catalogs created by [mirror_ocp](mirror_ocp.md).
5+
If there are legacy **ImageContentSourcePolicies** installed by previous versions of this role, they will be deleted.
6+
7+
If PRODUCT_FAMILY is aiservice then it will install an **ImageTagMirrorSet** for OpenDataHub
48

59
!!! warning
610
This role doesn't work on IBMCloud ROKS. IBM Cloud RedHat OpenShift Service does not implement support for `ImageDigestMirrorSet`. If you want to use image mirroring you must manually configure each worker node individually using the IBM Cloud command line tool.
@@ -59,6 +63,14 @@ If you are managing the Red Hat Operator Catalogs yourself the content therein m
5963

6064
Role Variables
6165
-------------------------------------------------------------------------------
66+
### product_family
67+
Creates the **ImageDigestMirrorSet** for the respective product family
68+
69+
- **Required**
70+
- Environment Variable: `PRODUCT_FAMILY`
71+
- Default: `mas`
72+
- Values: `mas` | `aiservice`
73+
6274
### setup_redhat_release
6375
Instruct the role to setup **ImageDigestMirrorSet** for the mirrored release content generated by [mirror_ocp](mirror_ocp.md). This will create an additional policy named `ibm-mas-redhat-release`.
6476

ibm/mas_devops/roles/ocp_idms/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ artifactory_auth: "{{ artifactory_username }}:{{ artifactory_token }}"
2626
registry_prefix: "{{ lookup('env', 'REGISTRY_PREFIX') | default('', true) }}"
2727
registry_private_url_with_path: "{{ registry_private_url }}{% if registry_prefix | length > 0 %}/{{ registry_prefix }}{% endif %}"
2828
idms_suffix: "{% if registry_prefix | length > 0 %}-{{ registry_prefix }}{% endif %}"
29+
itms_suffix: "{% if registry_prefix | length > 0 %}-{{ registry_prefix }}{% endif %}"
2930

3031

3132
# Optional Registry Prefix - Red Hat Content
@@ -40,3 +41,5 @@ idms_suffix_redhat: "{% if registry_prefix_redhat | length > 0 %}-{{ registry_pr
4041
redhat_catalogs_prefix: "{{ lookup('env', 'REDHAT_CATALOGS_PREFIX') | default('', true) }}"
4142

4243
machine_config_multiupdate: "{{ lookup('env','MACHINE_CONFIG_MULTIUPDATE') | default('False',true) | bool}}"
44+
45+
product_family: "{{ lookup('env','PRODUCT_FAMILY') | default('mas',true) }}"

ibm/mas_devops/roles/ocp_idms/meta/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ galaxy_info:
2020
- devops
2121
- rhocp
2222
- airgap
23+
- aiservice
2324

2425
dependencies: []

0 commit comments

Comments
 (0)