-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #681 from IBM/cp4i-2023.4.1
Cp4i 2023.4.1
- Loading branch information
Showing
48 changed files
with
1,215 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
automation-roles/50-install-cloud-pak/cp4i/cp4i-cluster/tasks/apply-template.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
# Paramteres: | ||
# - _p_template | ||
# - _p_dest_name | ||
# | ||
# The other parameters, as they are defined in the template, | ||
# must be provided when invoking this task | ||
|
||
- name: "Prepare yaml file" | ||
template: | ||
src: "{{ _p_template }}" | ||
dest: "{{ status_dir }}/cp4i/{{ _p_dest_name }}" | ||
|
||
- name: "Apply {{ status_dir }}/cp4i/{{ _p_dest_name }}" | ||
shell: | | ||
oc apply -f {{ status_dir }}/cp4i/{{ _p_dest_name }} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...on-roles/50-install-cloud-pak/cp4i/cp4i-cluster/tasks/create-foundational-svc-catalog.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
# Global variables: | ||
# - _use_entitled_registry | ||
|
||
# Paramaters: | ||
# - _p_case_file_name | ||
# - _p_catalog_source_yaml | ||
# - _p_case_version | ||
|
||
- name: "Create Foundational Services catalog source when entitled registry is used" | ||
shell: | | ||
oc apply -f ~/.ibm-pak/data/mirror/{{ _p_case_file_name }}/{{ _p_case_version }}/{{ _p_catalog_source_yaml }} | ||
when: _use_entitled_registry | ||
|
||
- name: "Create Foundational Services catalog source when private registry is used" | ||
shell: | | ||
oc apply -f {{ status_dir }}/ibm-pak/data/mirror/{{ {{ _p_case_file_name }} }}/{{ _p_case_version }}/{{ _p_catalog_source_yaml }} | ||
when: not _use_entitled_registry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
automation-roles/50-install-cloud-pak/cp4i/cp4i-cluster/tasks/create-project.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# Parameters: | ||
# - _p_project_name | ||
|
||
- name: "Validate if OpenShift project {{ _p_project_name }} exists" | ||
shell: "oc get projects | grep -i '^{{ _p_project_name }}' | wc -l" | ||
register: _project_exists | ||
|
||
- name: "Create OpenShift Project {{ _p_project_name }} if it does not exist" | ||
command: "oc new-project {{ _p_project_name }}" | ||
when: "_project_exists.stdout | trim == '0'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
...ion-roles/50-install-cloud-pak/cp4i/cp4i-cluster/tasks/download-foundational-svc-case.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
|
||
# Global variables: | ||
# - current_cp4i_cluster | ||
# - _use_entitled_registry | ||
|
||
# Returns: | ||
# - _fs_case_file_name | ||
# - _fs_catalog_source_yaml | ||
# - _fs_case_version | ||
# - _fs_channel | ||
|
||
- name: "Find Foundational Services instance type" | ||
set_fact: | ||
_instance_type_details: "{{ instance_types | json_query(query) | first | default({}) }}" | ||
vars: | ||
query: >- | ||
[?type=='foundational-services'] | ||
- fail: | ||
msg: "An instance type foundational-services was not found" | ||
when: _instance_type_details == {} | ||
|
||
- name: "Include version details variables" | ||
include_vars: versions.yml | ||
|
||
- name: "Select cloud pak version" | ||
set_fact: | ||
_cloud_pak_ver: "{{ version_specific_properties | json_query(query) | first | default({}) }}" | ||
vars: | ||
query: >- | ||
[?cp4i_version=='{{ current_cp4i_cluster.cp4i_version }}'] | ||
- fail: | ||
msg: "Cloud Pak version {{ current_cp4i_cluster.cp4i_version }} not defined" | ||
when: _cloud_pak_ver == {} | ||
|
||
- name: "Get Foundational Services version specific details" | ||
set_fact: | ||
_foundational_services_details: "{{ _cloud_pak_ver.instance_types | json_query(query) | first | default({}) }}" | ||
vars: | ||
query: >- | ||
[?type=='foundational-services'] | ||
- fail: | ||
msg: "Foundational Services not defined in CP4I version {{ current_cp4i_cluster.cp4i_version }}" | ||
when: _foundational_services_details == {} | ||
|
||
- name: "Get Foundational Services CASE name, CASE version and channel" | ||
set_fact: | ||
_fs_case_file_name: "{{ _instance_type_details.case_file_name }}" | ||
_fs_catalog_source_yaml: "{{ _instance_type_details.catalog_source_yaml_name }}" | ||
_fs_case_version: "{{ _foundational_services_details.case_version }}" | ||
_fs_channel: "{{ _foundational_services_details.channel }}" | ||
|
||
- name: "Save Foundational Services CASE file" | ||
shell: | | ||
oc ibm-pak get {{ _fs_case_file_name }} --version {{ _fs_case_version }} | ||
- name: "Create Foundational Services mirror manifest when Entitled registry is used" | ||
shell: | | ||
oc ibm-pak generate mirror-manifests {{ _fs_case_file_name }} --version {{ _fs_case_version }} icr.io | ||
when: _use_entitled_registry | ||
|
||
- name: "Create Foundational Services mirror manifest when private registry is used" | ||
shell: | | ||
oc ibm-pak generate mirror-manifests {{ _fs_case_file_name }} --version {{ _fs_case_version }} {{ current_cp4i_cluster.image_registry_url }} | ||
when: not _use_entitled_registry | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...tion-roles/50-install-cloud-pak/cp4i/cp4i-cluster/tasks/install-cert-manager-operator.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
|
||
- name: "Create project cert-manager-operator" | ||
include_tasks: create-project.yml | ||
vars: | ||
_p_project_name: "cert-manager-operator" | ||
|
||
- name: "Create operator group for cert-manager-operator" | ||
include_tasks: apply-template.yml | ||
vars: | ||
_p_template: "operator-group.j2" | ||
_p_dest_name: "cert-manager-operator-group.yml" | ||
operator_group_name: "cert-manager-operator-group" | ||
operator_group_namespace: "cert-manager-operator" | ||
|
||
- name: "Install cert manager operator" | ||
# Note: this step is architecture dependent | ||
# In case of installing on Power or Z an IBM operator | ||
# should be used instead of one provided by RedHat | ||
include_tasks: install-operator.yml | ||
vars: | ||
_p_subscr_name: "openshift-cert-manager-operator" | ||
_p_namespace: "cert-manager-operator" | ||
_p_channel: "stable-v1" | ||
_p_subscr_source: "redhat-operators" | ||
|
||
- name: "Return default project back to {{ current_cp4i_cluster.project }}" | ||
include_tasks: set-default-project.yml | ||
vars: | ||
_p_project_name: "{{ current_cp4i_cluster.project }}" |
Oops, something went wrong.