-
Notifications
You must be signed in to change notification settings - Fork 71
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 #861 from IBM/fk-misc
#853 Do not install OperatorGroup if already existing
- Loading branch information
Showing
11 changed files
with
170 additions
and
122 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
10 changes: 10 additions & 0 deletions
10
automation-roles/40-configure-infra/nfd-operator/templates/nfd-operator-group.j2
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,10 @@ | ||
--- | ||
apiVersion: operators.coreos.com/v1 | ||
kind: OperatorGroup | ||
metadata: | ||
name: openshift-nfd-og | ||
namespace: openshift-nfd | ||
spec: | ||
targetNamespaces: | ||
- openshift-nfd | ||
upgradeStrategy: Default |
10 changes: 0 additions & 10 deletions
10
automation-roles/40-configure-infra/nfd-operator/templates/nfd-operator.j2
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
10 changes: 10 additions & 0 deletions
10
automation-roles/40-configure-infra/nvidia-operator/templates/nvidia-operator-group.j2
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,10 @@ | ||
--- | ||
apiVersion: operators.coreos.com/v1 | ||
kind: OperatorGroup | ||
metadata: | ||
name: nvidia-gpu-operator-og | ||
namespace: nvidia-gpu-operator | ||
spec: | ||
targetNamespaces: | ||
- nvidia-gpu-operator | ||
upgradeStrategy: Default |
10 changes: 0 additions & 10 deletions
10
automation-roles/40-configure-infra/nvidia-operator/templates/nvidia-operator.j2
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
73 changes: 0 additions & 73 deletions
73
automation-roles/40-configure-infra/openshift-ai/tasks/install-opernshift-ai.yml
This file was deleted.
Oops, something went wrong.
95 changes: 94 additions & 1 deletion
95
automation-roles/40-configure-infra/openshift-ai/tasks/main.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 |
---|---|---|
@@ -1,2 +1,95 @@ | ||
--- | ||
- include_tasks: install-opernshift-ai.yml | ||
|
||
- include_role: | ||
name: generate-apply-yaml | ||
vars: | ||
_p_apply_yaml_description: Create OpenShift AI namespaces | ||
_p_apply_yaml_template: openshift-ai-ns.j2 | ||
_p_apply_yaml_output_file: "{{ status_dir }}/openshift/openshift-{{ _p_openshift_cluster.name }}-openshift-ai-ns.yaml" | ||
|
||
- name: Check if OpenShift AI OperatorGroup already exists, to avoid creating another one | ||
shell: | | ||
oc get operatorgroups.operators.coreos.com -n redhat-ods-operator \ | ||
--no-headers | wc -l | ||
register: _openshift_ai_og | ||
|
||
- include_role: | ||
name: generate-apply-yaml | ||
vars: | ||
_p_apply_yaml_description: Create OpenShift AI operator group | ||
_p_apply_yaml_template: openshift-ai-operator-group.j2 | ||
_p_apply_yaml_output_file: "{{ status_dir }}/openshift/{{ _p_openshift_cluster.name }}-openshift-ai-operator-group.yaml" | ||
when: _openshift_ai_og.stdout == "0" | ||
|
||
- include_role: | ||
name: generate-apply-yaml | ||
vars: | ||
_p_apply_yaml_description: Create OpenShift AI operator | ||
_p_apply_yaml_template: openshift-ai-operator.j2 | ||
_p_apply_yaml_output_file: "{{ status_dir }}/openshift/{{ _p_openshift_cluster.name }}-openshift-ai-operator.yaml" | ||
|
||
- name: Wait until OpenShift AI operator CSV has status Succeeded | ||
shell: | | ||
oc get csv -n redhat-ods-operator \ | ||
-l operators.coreos.com/rhods-operator.redhat-ods-operator \ | ||
--no-headers \ | ||
-o custom-columns='name:metadata.name,phase:status.phase' | \ | ||
grep -i succeeded | wc -l | ||
register: _openshift_ai_csv_status | ||
retries: 30 | ||
delay: 30 | ||
until: _openshift_ai_csv_status.stdout == "1" | ||
vars: | ||
ansible_callback_diy_runner_retry_msg: >- | ||
{%- set result = ansible_callback_diy.result.output -%} | ||
{%- set retries_left = result.retries - result.attempts -%} | ||
Retrying: {{ ansible_callback_diy.task.name }} ({{ retries_left }} Retries left) ... | ||
when: not cpd_dry_run | ||
|
||
- include_role: | ||
name: generate-apply-yaml | ||
vars: | ||
_p_apply_yaml_description: Create OpenShift AI DSCInitialization | ||
_p_apply_yaml_template: dscinitialization.j2 | ||
_p_apply_yaml_output_file: "{{ status_dir }}/openshift/openshift-{{ _p_openshift_cluster.name }}-openshift-ai-dsc-init.yaml" | ||
|
||
- name: Wait until OpenShift AI DSCInitialization default-dsci is ready | ||
shell: | | ||
oc get DSCInitialization default-dsci \ | ||
--no-headers \ | ||
-o custom-columns='name:metadata.name,phase:status.phase' | \ | ||
grep -i ready | wc -l | ||
register: _openshift_ai_dsc_init_status | ||
retries: 30 | ||
delay: 30 | ||
until: _openshift_ai_dsc_init_status.stdout == "1" | ||
vars: | ||
ansible_callback_diy_runner_retry_msg: >- | ||
{%- set result = ansible_callback_diy.result.output -%} | ||
{%- set retries_left = result.retries - result.attempts -%} | ||
Retrying: {{ ansible_callback_diy.task.name }} ({{ retries_left }} Retries left) ... | ||
when: not cpd_dry_run | ||
|
||
- include_role: | ||
name: generate-apply-yaml | ||
vars: | ||
_p_apply_yaml_description: Create OpenShift AI DataScienceCluster | ||
_p_apply_yaml_template: datasciencecluster.j2 | ||
_p_apply_yaml_output_file: "{{ status_dir }}/openshift/openshift-{{ _p_openshift_cluster.name }}-openshift-ai-dsc.yaml" | ||
|
||
- name: Wait until OpenShift AI DataScienceCluster default-dsc is ready | ||
shell: | | ||
oc get DataScienceCluster default-dsc \ | ||
--no-headers \ | ||
-o custom-columns='name:metadata.name,phase:status.phase' | \ | ||
grep -i ready | wc -l | ||
register: _openshift_ai_dsc_status | ||
retries: 30 | ||
delay: 30 | ||
until: _openshift_ai_dsc_status.stdout == "1" | ||
vars: | ||
ansible_callback_diy_runner_retry_msg: >- | ||
{%- set result = ansible_callback_diy.result.output -%} | ||
{%- set retries_left = result.retries - result.attempts -%} | ||
Retrying: {{ ansible_callback_diy.task.name }} ({{ retries_left }} Retries left) ... | ||
when: not cpd_dry_run |
20 changes: 20 additions & 0 deletions
20
automation-roles/40-configure-infra/openshift-ai/templates/openshift-ai-ns.j2
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,20 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: redhat-ods-operator | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: redhat-ods-monitoring | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: redhat-ods-applications | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: rhods-notebooks |
8 changes: 8 additions & 0 deletions
8
automation-roles/40-configure-infra/openshift-ai/templates/openshift-ai-operator-group.j2
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,8 @@ | ||
--- | ||
apiVersion: operators.coreos.com/v1 | ||
kind: OperatorGroup | ||
metadata: | ||
name: redhat-ods-operator | ||
namespace: redhat-ods-operator | ||
spec: | ||
upgradeStrategy: Default |
28 changes: 0 additions & 28 deletions
28
automation-roles/40-configure-infra/openshift-ai/templates/openshift-ai-operator.j2
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