From f4030c64b8dbfeba17a36c32ce805349a9a83a32 Mon Sep 17 00:00:00 2001 From: Derek Waters Date: Wed, 12 Jun 2024 14:56:33 +1000 Subject: [PATCH 01/16] Add EDA deployment on OCP --- roles/aap_ocp_install/defaults/main.yml | 5 ++ roles/aap_ocp_install/tasks/install-eda.yml | 49 +++++++++++++++++++ roles/aap_ocp_install/tasks/main.yml | 10 ++++ .../tasks/pre-validate-eda.yml | 14 ++++++ roles/aap_ocp_install/tasks/pre-validate.yml | 6 +++ .../templates/eda/consolelink.yaml.j2 | 17 +++++++ .../templates/eda/instance.yaml.j2 | 10 ++++ 7 files changed, 111 insertions(+) create mode 100644 roles/aap_ocp_install/tasks/install-eda.yml create mode 100644 roles/aap_ocp_install/tasks/pre-validate-eda.yml create mode 100644 roles/aap_ocp_install/templates/eda/consolelink.yaml.j2 create mode 100644 roles/aap_ocp_install/templates/eda/instance.yaml.j2 diff --git a/roles/aap_ocp_install/defaults/main.yml b/roles/aap_ocp_install/defaults/main.yml index f1316ae..622ccb6 100644 --- a/roles/aap_ocp_install/defaults/main.yml +++ b/roles/aap_ocp_install/defaults/main.yml @@ -24,4 +24,9 @@ # aap_ocp_install_hub: # instance_name: # link_text: + +# Variable applicable to the EDA installation +# aap_ocp_install_eda: +# instance_name: +# link_text: ... diff --git a/roles/aap_ocp_install/tasks/install-eda.yml b/roles/aap_ocp_install/tasks/install-eda.yml new file mode 100644 index 0000000..025a04e --- /dev/null +++ b/roles/aap_ocp_install/tasks/install-eda.yml @@ -0,0 +1,49 @@ +--- +- name: Create EDA instance + kubernetes.core.k8s: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + state: present + resource_definition: "{{ lookup('template', 'eda/instance.yaml.j2') | from_yaml }}" + apply: true + +- name: Wait for operator to create the EDA route + kubernetes.core.k8s_info: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + kind: Route + name: "{{ aap_ocp_install_eda['instance_name'] | mandatory }}" + api_version: route.openshift.io/v1 + namespace: "{{ aap_ocp_install_namespace | mandatory }}" + register: __aap_ocp_install_eda_route_result + until: __aap_ocp_install_eda_route_result['resources'] + retries: 60 # Wait for 15 minutes (60*15/60) + delay: 15 + +- name: Store EDA route + ansible.builtin.set_fact: + __aap_ocp_install_eda_route: "{{ __aap_ocp_install_eda_route_result['resources'][0]['status']['ingress'][0]['host'] }}" + +- name: Ensure EDA login is available + ansible.builtin.uri: + url: "https://{{ __aap_ocp_install_eda_route }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + method: GET + status_code: + - 200 + register: __aap_ocp_install_eda_available + until: __aap_ocp_install_eda_available['status'] == 200 + retries: 120 # Wait for 30 minutes (120*15/60) + delay: 15 + +- name: Create EDA console link + kubernetes.core.k8s: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + state: present + resource_definition: "{{ lookup('template', 'eda/consolelink.yaml.j2') | from_yaml }}" + apply: true +... diff --git a/roles/aap_ocp_install/tasks/main.yml b/roles/aap_ocp_install/tasks/main.yml index 4841dfc..67df8f6 100644 --- a/roles/aap_ocp_install/tasks/main.yml +++ b/roles/aap_ocp_install/tasks/main.yml @@ -50,6 +50,16 @@ tags: - hub + - name: Include Ansible Automation Platform EDA install tasks + ansible.builtin.include_tasks: + file: install-eda.yml + apply: + tags: + - eda + when: aap_ocp_install_eda is defined + tags: + - eda + always: - name: Include OpenShift finalization tasks diff --git a/roles/aap_ocp_install/tasks/pre-validate-eda.yml b/roles/aap_ocp_install/tasks/pre-validate-eda.yml new file mode 100644 index 0000000..016bbb5 --- /dev/null +++ b/roles/aap_ocp_install/tasks/pre-validate-eda.yml @@ -0,0 +1,14 @@ +--- +- name: Ensure eda instance name variable is set (block) + block: + - name: Ensure eda instance name variable is set + ansible.builtin.assert: + that: + - aap_ocp_install_eda['instance_name'] | default('', true) | length > 0 + quiet: true + rescue: + - name: Update validation errors fact - eda instance_name + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['instance_name'] must be set"] }} +... diff --git a/roles/aap_ocp_install/tasks/pre-validate.yml b/roles/aap_ocp_install/tasks/pre-validate.yml index ad1ea00..b634a7b 100644 --- a/roles/aap_ocp_install/tasks/pre-validate.yml +++ b/roles/aap_ocp_install/tasks/pre-validate.yml @@ -104,6 +104,12 @@ when: - ( 'hub' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_hub is defined ) +- name: Ensure eda variables are set + ansible.builtin.include_tasks: + file: pre-validate-eda.yml + when: + - ( 'eda' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_eda is defined ) + - name: Ensure no validation errors found ansible.builtin.debug: msg: diff --git a/roles/aap_ocp_install/templates/eda/consolelink.yaml.j2 b/roles/aap_ocp_install/templates/eda/consolelink.yaml.j2 new file mode 100644 index 0000000..a15aa88 --- /dev/null +++ b/roles/aap_ocp_install/templates/eda/consolelink.yaml.j2 @@ -0,0 +1,17 @@ +--- +apiVersion: console.openshift.io/v1 +kind: ConsoleLink +metadata: + name: {{ aap_ocp_install_eda['instance_name'] }} +spec: + applicationMenu: + section: Red Hat applications + imageURL: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAc1klEQVR42u2deXAUZfrH++3uuTP3JCFAEnJBQBSQQ1jW6LIJAkYMRwgG5IgskUWMFVJsbYm4/sBdZSFldBVhFQrQaOIVMIAhuFJZEeQQEA8gdzhCJjOTzEzm7uP3By6FS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QAWhmEYw7guXLiyejWKl79dyqlTY998U3bvvXyOmuQ3WDfpcjiM27YZi4t9ra0DHClRTExUYWHUqlU86WwobLAwDGNp2nXu3NWioq6amoGZVw1wPCItbeiWLbKxY4EQbleFAdYvS5fLZSktvbF5s6e2FhPOz+Z+mpGkpAxat06Xmxv+bob9EqybzghPc3P7tm2m7dsHgo+eUKsN+fmRq1ZJ4uN5ePTrR2D9z6h3njnTVlJirazsr3gRarU6MzO6oEA+frwQU5uECdbNxcvrdX73XVtxse3gQRrSx1twSCkUqlmzogsL5fffL1xPnoDB+gUvj8dx6lT7G29YjxwR+iUjodOp09Mj16xRTJwYjLqgCKze40VRnoYG086dnRUV3vr6YHS7DOIckKQ4KUmTlWXIy5MkJvaP8KF+AtYt28tnNNqqq03vvOM4cYLxevls7rIYhovFismTDStWqDIyRFFR/SlNvH+BdWvOaNpz6VJHRYWtutp1/jzd0cGvLU+rlY0Zo8rI0GZlSUaMAP0x6r9/gnXLN8E4na6ffrLX1Fj373dfuEBZrWGLmMBxUq2W3nuvevZsZVqabNQoXC4XlgcBgXV3I8zb3Ow8ftx+8qTr7Fl3UxPd1varWsXBGFyRiIiOlg4bJhs3TjlpknzKFHF8/ACJwB4oYN1uhzFOp89kcl+86Pz5Z/fp0+7GRl9jI93ZyVAUxsXqJ0mcJAmNRpSQIE1IkE6YIB85UpqaKjIYcLl8oJXZGXhg/XqvZBmG9Xqp9nbKaPS1tHgaGrxXr1JmM2U202Yz7XAwPh9L0yzD3BwoAADAcUAQuEhEKBSEXk/q9aReLx46VJKYKIqLI6OiyMhIIBYDHO/HOx0Cq6/AURRLURhNswyDseyvriYBwAAAOI4RBCBJQJIDGSAEFlJozypoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTP8PYtUOifNZCQcAAAAASUVORK5CYII= + href: 'https://{{ __aap_ocp_install_eda_route }}/' + location: ApplicationMenu +{% if aap_ocp_install_eda['link_text'] is defined %} + text: {{ aap_ocp_install_eda['link_text'] }} +{% else %} + text: EDA Controller ({{ aap_ocp_install_eda['instance_name'] }}) +{% endif%} +... diff --git a/roles/aap_ocp_install/templates/eda/instance.yaml.j2 b/roles/aap_ocp_install/templates/eda/instance.yaml.j2 new file mode 100644 index 0000000..b4958cf --- /dev/null +++ b/roles/aap_ocp_install/templates/eda/instance.yaml.j2 @@ -0,0 +1,10 @@ +--- +apiVersion: eda.ansible.com/v1alpha1 +kind: EDA +metadata: + name: {{ aap_ocp_install_eda['instance_name'] }} + namespace: {{ aap_ocp_install_eda['namespace'] | default(aap_ocp_install_namespace) }} +spec: + replicas: {{ aap_ocp_install_eda['replicas'] | default(1) | int }} + automation_server_url: 'https://{{ __aap_ocp_install_controller_route }}/' +... From 42322b0148f2eb2a67454ffaed783e9b2a1924b3 Mon Sep 17 00:00:00 2001 From: Derek Date: Tue, 18 Jun 2024 22:01:27 +1000 Subject: [PATCH 02/16] Update documentation for role change --- changelogs/fragments/add_eda_install_on_ocp.yaml | 2 ++ roles/aap_ocp_install/README.md | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/add_eda_install_on_ocp.yaml diff --git a/changelogs/fragments/add_eda_install_on_ocp.yaml b/changelogs/fragments/add_eda_install_on_ocp.yaml new file mode 100644 index 0000000..a82d97e --- /dev/null +++ b/changelogs/fragments/add_eda_install_on_ocp.yaml @@ -0,0 +1,2 @@ +minor_changes: + - Added ability to install EDA Controller on OCP \ No newline at end of file diff --git a/roles/aap_ocp_install/README.md b/roles/aap_ocp_install/README.md index c00fa42..1574d92 100644 --- a/roles/aap_ocp_install/README.md +++ b/roles/aap_ocp_install/README.md @@ -60,13 +60,20 @@ If the variable is omitted the corresponding component will not be installed (e. | projects_storage_size | | 8Gi | Size of /var/lib/projects persistent volume claim (PVC) | | link_text | | Automation Controller () | Text used for creating the OCP application link | -| ### aap_ocp_install_hub keys |### aap_ocp_install_hub keys +### aap_ocp_install_hub keys | Key Name | Required | Default Value | Description | |---------------|:--------:|----------------------------------|-------------------------------------------------| | instance_name | Yes | None | Name of the hub instance to create | | link_text | | Automation Hub () | Text used for creating the OCP application link | +### aap_ocp_install_eda keys + +| Key Name | Required | Default Value | Description | +|---------------|:--------:|----------------------------------|-------------------------------------------------| +| instance_name | Yes | None | Name of the EDA instance to create | +| link_text | | EDA Controller () | Text used for creating the OCP application link | + ## Dependencies This role depends on the redhat.openshift and kubernetes.core collections. @@ -94,6 +101,8 @@ Including an example of how to use your role (for instance, with variables passe instance_name: automationcontroller aap_ocp_install_hub: instance_name: automationhub + aap_ocp_install_eda: + instance_name: edacontroller roles: - infra.aap_utilities.aap_ocp_install @@ -107,3 +116,4 @@ Including an example of how to use your role (for instance, with variables passe ## Author Information Brant Evans +Derek Waters From 792b8997fd1e42b30616d897f2845b78f1723cf1 Mon Sep 17 00:00:00 2001 From: Derek Date: Tue, 18 Jun 2024 22:14:05 +1000 Subject: [PATCH 03/16] Additional checks for EDA variables, and ability to use custom EDA namespace --- roles/aap_ocp_install/defaults/main.yml | 2 + roles/aap_ocp_install/tasks/install-eda.yml | 16 ++++++- .../tasks/pre-validate-eda.yml | 42 +++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/roles/aap_ocp_install/defaults/main.yml b/roles/aap_ocp_install/defaults/main.yml index 622ccb6..7252f3d 100644 --- a/roles/aap_ocp_install/defaults/main.yml +++ b/roles/aap_ocp_install/defaults/main.yml @@ -27,6 +27,8 @@ # Variable applicable to the EDA installation # aap_ocp_install_eda: +# namespace: # instance_name: +# replicas: # link_text: ... diff --git a/roles/aap_ocp_install/tasks/install-eda.yml b/roles/aap_ocp_install/tasks/install-eda.yml index 025a04e..00c651d 100644 --- a/roles/aap_ocp_install/tasks/install-eda.yml +++ b/roles/aap_ocp_install/tasks/install-eda.yml @@ -1,4 +1,18 @@ --- +- name: Create EDA controller namespace + kubernetes.core.k8s: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + state: present + resource_definition: "{{ lookup('ansible.builtin.template', 'namespace.yaml.j2', template_vars=ns_vars) | from_yaml }}" + apply: true + vars: + ns_vars: + ns_name: "{{ aap_ocp_install_eda['namespace'] }}" + when: + - aap_ocp_install_eda['namespace'] is defined + - name: Create EDA instance kubernetes.core.k8s: host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" @@ -16,7 +30,7 @@ kind: Route name: "{{ aap_ocp_install_eda['instance_name'] | mandatory }}" api_version: route.openshift.io/v1 - namespace: "{{ aap_ocp_install_namespace | mandatory }}" + namespace: "{{ aap_ocp_install_eda['namespace'] | default(aap_ocp_install_namespace) }}" register: __aap_ocp_install_eda_route_result until: __aap_ocp_install_eda_route_result['resources'] retries: 60 # Wait for 15 minutes (60*15/60) diff --git a/roles/aap_ocp_install/tasks/pre-validate-eda.yml b/roles/aap_ocp_install/tasks/pre-validate-eda.yml index 016bbb5..4b4d0b7 100644 --- a/roles/aap_ocp_install/tasks/pre-validate-eda.yml +++ b/roles/aap_ocp_install/tasks/pre-validate-eda.yml @@ -11,4 +11,46 @@ ansible.builtin.set_fact: __aap_ocp_install_prevalidate_errors: > {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['instance_name'] must be set"] }} + +- name: Ensure EDA namespace variable is set (block) + when: aap_ocp_install_eda['namespace'] is defined + block: + - name: Ensure EDA namespace variable is set + ansible.builtin.assert: + that: + - aap_ocp_install_eda['namespace'] | default("", true) | regex_search('^[a-z0-9]([-a-z0-9]*[a-z0-9])?$') + quiet: true + rescue: + - name: Update validation errors fact - namespace + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['namespace'] must be a lowercase RFC 1123 label consisting of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc'"] }} + +- name: Ensure EDA link text variable is set (block) + when: aap_ocp_install_eda['link_text'] is defined + block: + - name: Ensure EDA link text variable is set + ansible.builtin.assert: + that: + - aap_ocp_install_eda['link_text'] | default('', true) | length > 0 + quiet: true + rescue: + - name: Update validation errors fact - EDA link_text + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['link_text'] must be a non-empty string"] }} + +- name: Ensure EDA replicas is valid (block) + when: aap_ocp_install_eda['replicas'] is defined + block: + - name: Ensure EDA replicas is valid + ansible.builtin.assert: + that: + - (aap_ocp_install_eda['replicas'] | int) > 0 + quiet: true + rescue: + - name: Update validation errors fact - EDA replicas + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['replicas'] must be a number greater than 0"] }} ... From 00064d77ce735595362b2bb149fe18fcd9a6743e Mon Sep 17 00:00:00 2001 From: Derek Date: Wed, 19 Jun 2024 07:28:14 +1000 Subject: [PATCH 04/16] Correct linting formatting errors --- roles/aap_ocp_install/defaults/main.yml | 2 +- roles/aap_ocp_install/tasks/install-eda.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/aap_ocp_install/defaults/main.yml b/roles/aap_ocp_install/defaults/main.yml index 7252f3d..69e5bac 100644 --- a/roles/aap_ocp_install/defaults/main.yml +++ b/roles/aap_ocp_install/defaults/main.yml @@ -29,6 +29,6 @@ # aap_ocp_install_eda: # namespace: # instance_name: -# replicas: +# replicas: # link_text: ... diff --git a/roles/aap_ocp_install/tasks/install-eda.yml b/roles/aap_ocp_install/tasks/install-eda.yml index 00c651d..833a506 100644 --- a/roles/aap_ocp_install/tasks/install-eda.yml +++ b/roles/aap_ocp_install/tasks/install-eda.yml @@ -12,7 +12,7 @@ ns_name: "{{ aap_ocp_install_eda['namespace'] }}" when: - aap_ocp_install_eda['namespace'] is defined - + - name: Create EDA instance kubernetes.core.k8s: host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" From 789df97be3fae84c11ffb86fd555525d45e685c5 Mon Sep 17 00:00:00 2001 From: Derek Date: Wed, 19 Jun 2024 07:39:34 +1000 Subject: [PATCH 05/16] Add endline on changelog fragment --- changelogs/fragments/add_eda_install_on_ocp.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/add_eda_install_on_ocp.yaml b/changelogs/fragments/add_eda_install_on_ocp.yaml index a82d97e..a13b9fa 100644 --- a/changelogs/fragments/add_eda_install_on_ocp.yaml +++ b/changelogs/fragments/add_eda_install_on_ocp.yaml @@ -1,2 +1,2 @@ minor_changes: - - Added ability to install EDA Controller on OCP \ No newline at end of file + - Added ability to install EDA Controller on OCP From 594f02d8b28fe036e090368190de83c74bb25b63 Mon Sep 17 00:00:00 2001 From: Derek Waters Date: Fri, 1 Nov 2024 16:00:39 +1100 Subject: [PATCH 06/16] Modifications to support the new OCP deployment method for AAP 2.5 --- roles/aap_ocp_install/defaults/main.yml | 11 ++++ roles/aap_ocp_install/tasks/install-eda.yml | 63 ------------------- roles/aap_ocp_install/tasks/install-hub.yml | 49 --------------- ...ll-controller.yml => install-platform.yml} | 34 +++++----- roles/aap_ocp_install/tasks/main.yml | 30 ++------- .../tasks/pre-validate-eda.yml | 56 ----------------- .../tasks/pre-validate-hub.yml | 14 ----- ...ntroller.yml => pre-validate-platform.yml} | 10 +-- roles/aap_ocp_install/tasks/pre-validate.yml | 18 +----- .../templates/controller/consolelink.yaml.j2 | 17 ----- .../templates/controller/instance.yaml.j2 | 15 ----- .../templates/eda/instance.yaml.j2 | 10 --- .../templates/hub/consolelink.yaml.j2 | 17 ----- .../templates/hub/instance.yaml.j2 | 42 ------------- .../{eda => platform}/consolelink.yaml.j2 | 10 +-- .../templates/platform/instance.yaml.j2 | 39 ++++++++++++ 16 files changed, 85 insertions(+), 350 deletions(-) delete mode 100644 roles/aap_ocp_install/tasks/install-eda.yml delete mode 100644 roles/aap_ocp_install/tasks/install-hub.yml rename roles/aap_ocp_install/tasks/{install-controller.yml => install-platform.yml} (58%) delete mode 100644 roles/aap_ocp_install/tasks/pre-validate-eda.yml delete mode 100644 roles/aap_ocp_install/tasks/pre-validate-hub.yml rename roles/aap_ocp_install/tasks/{pre-validate-controller.yml => pre-validate-platform.yml} (95%) delete mode 100644 roles/aap_ocp_install/templates/controller/consolelink.yaml.j2 delete mode 100644 roles/aap_ocp_install/templates/controller/instance.yaml.j2 delete mode 100644 roles/aap_ocp_install/templates/eda/instance.yaml.j2 delete mode 100644 roles/aap_ocp_install/templates/hub/consolelink.yaml.j2 delete mode 100644 roles/aap_ocp_install/templates/hub/instance.yaml.j2 rename roles/aap_ocp_install/templates/{eda => platform}/consolelink.yaml.j2 (97%) create mode 100644 roles/aap_ocp_install/templates/platform/instance.yaml.j2 diff --git a/roles/aap_ocp_install/defaults/main.yml b/roles/aap_ocp_install/defaults/main.yml index 69e5bac..2f64e54 100644 --- a/roles/aap_ocp_install/defaults/main.yml +++ b/roles/aap_ocp_install/defaults/main.yml @@ -14,6 +14,10 @@ # aap_ocp_install_operator: # channel: +# Variables applicable to the Ansible platform installation +# aap_ocp_install_platform: +# instance_name: + # Variable applicable to the controller installation # aap_ocp_install_controller: # instance_name: @@ -24,6 +28,9 @@ # aap_ocp_install_hub: # instance_name: # link_text: +# storage_type: +# storage_class: +# storage_size: # Variable applicable to the EDA installation # aap_ocp_install_eda: @@ -31,4 +38,8 @@ # instance_name: # replicas: # link_text: + +# Variables applicable to the Lightspeed installation +# aap_ocp_install_lightspeed +# ... diff --git a/roles/aap_ocp_install/tasks/install-eda.yml b/roles/aap_ocp_install/tasks/install-eda.yml deleted file mode 100644 index 833a506..0000000 --- a/roles/aap_ocp_install/tasks/install-eda.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -- name: Create EDA controller namespace - kubernetes.core.k8s: - host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" - api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - state: present - resource_definition: "{{ lookup('ansible.builtin.template', 'namespace.yaml.j2', template_vars=ns_vars) | from_yaml }}" - apply: true - vars: - ns_vars: - ns_name: "{{ aap_ocp_install_eda['namespace'] }}" - when: - - aap_ocp_install_eda['namespace'] is defined - -- name: Create EDA instance - kubernetes.core.k8s: - host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" - api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - state: present - resource_definition: "{{ lookup('template', 'eda/instance.yaml.j2') | from_yaml }}" - apply: true - -- name: Wait for operator to create the EDA route - kubernetes.core.k8s_info: - host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" - api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - kind: Route - name: "{{ aap_ocp_install_eda['instance_name'] | mandatory }}" - api_version: route.openshift.io/v1 - namespace: "{{ aap_ocp_install_eda['namespace'] | default(aap_ocp_install_namespace) }}" - register: __aap_ocp_install_eda_route_result - until: __aap_ocp_install_eda_route_result['resources'] - retries: 60 # Wait for 15 minutes (60*15/60) - delay: 15 - -- name: Store EDA route - ansible.builtin.set_fact: - __aap_ocp_install_eda_route: "{{ __aap_ocp_install_eda_route_result['resources'][0]['status']['ingress'][0]['host'] }}" - -- name: Ensure EDA login is available - ansible.builtin.uri: - url: "https://{{ __aap_ocp_install_eda_route }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - method: GET - status_code: - - 200 - register: __aap_ocp_install_eda_available - until: __aap_ocp_install_eda_available['status'] == 200 - retries: 120 # Wait for 30 minutes (120*15/60) - delay: 15 - -- name: Create EDA console link - kubernetes.core.k8s: - host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" - api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - state: present - resource_definition: "{{ lookup('template', 'eda/consolelink.yaml.j2') | from_yaml }}" - apply: true -... diff --git a/roles/aap_ocp_install/tasks/install-hub.yml b/roles/aap_ocp_install/tasks/install-hub.yml deleted file mode 100644 index 509809d..0000000 --- a/roles/aap_ocp_install/tasks/install-hub.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -- name: Create automation hub instance - kubernetes.core.k8s: - host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" - api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - state: present - resource_definition: "{{ lookup('template', 'hub/instance.yaml.j2') | from_yaml }}" - apply: true - -- name: Wait for operator to create the automation hub route - kubernetes.core.k8s_info: - host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" - api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - kind: Route - name: "{{ aap_ocp_install_hub['instance_name'] | mandatory }}" - api_version: route.openshift.io/v1 - namespace: "{{ aap_ocp_install_namespace | mandatory }}" - register: __aap_ocp_install_hub_route_result - until: __aap_ocp_install_hub_route_result['resources'] - retries: 60 # Wait for 15 minutes (60*15/60) - delay: 15 - -- name: Store automation hub route - ansible.builtin.set_fact: - __aap_ocp_install_hub_route: "{{ __aap_ocp_install_hub_route_result['resources'][0]['status']['ingress'][0]['host'] }}" - -- name: Ensure automation hub login is available - ansible.builtin.uri: - url: "https://{{ __aap_ocp_install_hub_route }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - method: GET - status_code: - - 200 - register: __aap_ocp_install_hub_available - until: __aap_ocp_install_hub_available['status'] == 200 - retries: 120 # Wait for 30 minutes (120*15/60) - delay: 15 - -- name: Create automation hub console link - kubernetes.core.k8s: - host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" - api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - state: present - resource_definition: "{{ lookup('template', 'hub/consolelink.yaml.j2') | from_yaml }}" - apply: true -... diff --git a/roles/aap_ocp_install/tasks/install-controller.yml b/roles/aap_ocp_install/tasks/install-platform.yml similarity index 58% rename from roles/aap_ocp_install/tasks/install-controller.yml rename to roles/aap_ocp_install/tasks/install-platform.yml index cf21ae7..859f3f3 100644 --- a/roles/aap_ocp_install/tasks/install-controller.yml +++ b/roles/aap_ocp_install/tasks/install-platform.yml @@ -1,5 +1,5 @@ --- -- name: Create controller namespace +- name: Create platform namespace kubernetes.core.k8s: host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" @@ -9,55 +9,55 @@ apply: true vars: ns_vars: - ns_name: "{{ aap_ocp_install_controller['namespace'] }}" + ns_name: "{{ aap_ocp_install_platform['namespace'] }}" when: - - aap_ocp_install_controller['namespace'] is defined + - aap_ocp_install_platform['namespace'] is defined -- name: Create automation controller instance +- name: Create automation platform instance kubernetes.core.k8s: host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" state: present - resource_definition: "{{ lookup('template', 'controller/instance.yaml.j2') | from_yaml }}" + resource_definition: "{{ lookup('template', 'platform/instance.yaml.j2') | from_yaml }}" apply: true -- name: Wait for operator to create the automation controller route +- name: Wait for operator to create the automation platform route kubernetes.core.k8s_info: host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" kind: Route - name: "{{ aap_ocp_install_controller['instance_name'] | mandatory }}" + name: "{{ aap_ocp_install_platform['instance_name'] | mandatory }}" api_version: route.openshift.io/v1 - namespace: "{{ aap_ocp_install_controller['namespace'] | default(aap_ocp_install_namespace) | mandatory }}" - register: __aap_ocp_install_controller_route_result - until: __aap_ocp_install_controller_route_result['resources'] + namespace: "{{ aap_ocp_install_platform['namespace'] | default(aap_ocp_install_namespace) | mandatory }}" + register: __aap_ocp_install_platform_route_result + until: __aap_ocp_install_platform_route_result['resources'] retries: 60 # Wait for 15 minutes (60*15/60) delay: 15 -- name: Store automation controller route +- name: Store automation platform route ansible.builtin.set_fact: - __aap_ocp_install_controller_route: "{{ __aap_ocp_install_controller_route_result['resources'][0]['status']['ingress'][0]['host'] }}" + __aap_ocp_install_platform_route: "{{ __aap_ocp_install_platform_route_result['resources'][0]['status']['ingress'][0]['host'] }}" - name: Ensure automation controller login is available ansible.builtin.uri: - url: "https://{{ __aap_ocp_install_controller_route }}" + url: "https://{{ __aap_ocp_install_platform_route }}" validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" method: GET status_code: - 200 - register: __aap_ocp_install_controller_available - until: (__aap_ocp_install_controller_available['status'] == 200) and ('migrations_notran' not in __aap_ocp_install_controller_available['url']) + register: _aap_ocp_install_platform_available + until: (_aap_ocp_install_platform_available['status'] == 200) and ('migrations_notran' not in _aap_ocp_install_platform_available['url']) retries: 120 # Wait for 30 minutes (120*15/60) delay: 15 -- name: Create automation controller console link +- name: Create automation platform console link kubernetes.core.k8s: host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" state: present - resource_definition: "{{ lookup('template', 'controller/consolelink.yaml.j2') | from_yaml }}" + resource_definition: "{{ lookup('template', 'platform/consolelink.yaml.j2') | from_yaml }}" apply: true ... diff --git a/roles/aap_ocp_install/tasks/main.yml b/roles/aap_ocp_install/tasks/main.yml index 67df8f6..7218acc 100644 --- a/roles/aap_ocp_install/tasks/main.yml +++ b/roles/aap_ocp_install/tasks/main.yml @@ -30,35 +30,15 @@ tags: - operator - - name: Include Ansible Automation Platform controller install tasks + - name: Include Ansible Automation Platform platform install tasks ansible.builtin.include_tasks: - file: install-controller.yml + file: install-platform.yml apply: tags: - - controller - when: aap_ocp_install_controller is defined + - platform + when: aap_ocp_install_platform is defined tags: - - controller - - - name: Include Ansible Automation Platform hub install tasks - ansible.builtin.include_tasks: - file: install-hub.yml - apply: - tags: - - hub - when: aap_ocp_install_hub is defined - tags: - - hub - - - name: Include Ansible Automation Platform EDA install tasks - ansible.builtin.include_tasks: - file: install-eda.yml - apply: - tags: - - eda - when: aap_ocp_install_eda is defined - tags: - - eda + - platform always: diff --git a/roles/aap_ocp_install/tasks/pre-validate-eda.yml b/roles/aap_ocp_install/tasks/pre-validate-eda.yml deleted file mode 100644 index 4b4d0b7..0000000 --- a/roles/aap_ocp_install/tasks/pre-validate-eda.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -- name: Ensure eda instance name variable is set (block) - block: - - name: Ensure eda instance name variable is set - ansible.builtin.assert: - that: - - aap_ocp_install_eda['instance_name'] | default('', true) | length > 0 - quiet: true - rescue: - - name: Update validation errors fact - eda instance_name - ansible.builtin.set_fact: - __aap_ocp_install_prevalidate_errors: > - {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['instance_name'] must be set"] }} - -- name: Ensure EDA namespace variable is set (block) - when: aap_ocp_install_eda['namespace'] is defined - block: - - name: Ensure EDA namespace variable is set - ansible.builtin.assert: - that: - - aap_ocp_install_eda['namespace'] | default("", true) | regex_search('^[a-z0-9]([-a-z0-9]*[a-z0-9])?$') - quiet: true - rescue: - - name: Update validation errors fact - namespace - ansible.builtin.set_fact: - __aap_ocp_install_prevalidate_errors: > - {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['namespace'] must be a lowercase RFC 1123 label consisting of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc'"] }} - -- name: Ensure EDA link text variable is set (block) - when: aap_ocp_install_eda['link_text'] is defined - block: - - name: Ensure EDA link text variable is set - ansible.builtin.assert: - that: - - aap_ocp_install_eda['link_text'] | default('', true) | length > 0 - quiet: true - rescue: - - name: Update validation errors fact - EDA link_text - ansible.builtin.set_fact: - __aap_ocp_install_prevalidate_errors: > - {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['link_text'] must be a non-empty string"] }} - -- name: Ensure EDA replicas is valid (block) - when: aap_ocp_install_eda['replicas'] is defined - block: - - name: Ensure EDA replicas is valid - ansible.builtin.assert: - that: - - (aap_ocp_install_eda['replicas'] | int) > 0 - quiet: true - rescue: - - name: Update validation errors fact - EDA replicas - ansible.builtin.set_fact: - __aap_ocp_install_prevalidate_errors: > - {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['replicas'] must be a number greater than 0"] }} -... diff --git a/roles/aap_ocp_install/tasks/pre-validate-hub.yml b/roles/aap_ocp_install/tasks/pre-validate-hub.yml deleted file mode 100644 index 2d19679..0000000 --- a/roles/aap_ocp_install/tasks/pre-validate-hub.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: Ensure hub instance name variable is set (block) - block: - - name: Ensure hub instance name variable is set - ansible.builtin.assert: - that: - - aap_ocp_install_hub['instance_name'] | default('', true) | length > 0 - quiet: true - rescue: - - name: Update validation errors fact - hub instance_name - ansible.builtin.set_fact: - __aap_ocp_install_prevalidate_errors: > - {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_hub['instance_name'] must be set"] }} -... diff --git a/roles/aap_ocp_install/tasks/pre-validate-controller.yml b/roles/aap_ocp_install/tasks/pre-validate-platform.yml similarity index 95% rename from roles/aap_ocp_install/tasks/pre-validate-controller.yml rename to roles/aap_ocp_install/tasks/pre-validate-platform.yml index 26f025c..58782c9 100644 --- a/roles/aap_ocp_install/tasks/pre-validate-controller.yml +++ b/roles/aap_ocp_install/tasks/pre-validate-platform.yml @@ -1,16 +1,16 @@ --- -- name: Ensure controller instance name variable is set (block) +- name: Ensure platform instance name variable is set (block) block: - - name: Ensure controller instance name variable is set + - name: Ensure paltform instance name variable is set ansible.builtin.assert: that: - - aap_ocp_install_controller['instance_name'] | default('', true) | length > 0 + - aap_ocp_install_platform['instance_name'] | default('', true) | length > 0 quiet: true rescue: - - name: Update validation errors fact - controller instance_name + - name: Update validation errors fact - platform instance_name ansible.builtin.set_fact: __aap_ocp_install_prevalidate_errors: > - {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['instance_name'] must be set"] }} + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_platform['instance_name'] must be set"] }} - name: Ensure controller admin username variable is set (block) when: aap_ocp_install_controller['admin_user'] is defined diff --git a/roles/aap_ocp_install/tasks/pre-validate.yml b/roles/aap_ocp_install/tasks/pre-validate.yml index b634a7b..70b94fa 100644 --- a/roles/aap_ocp_install/tasks/pre-validate.yml +++ b/roles/aap_ocp_install/tasks/pre-validate.yml @@ -92,23 +92,11 @@ when: - ( 'operator' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_operator is defined ) -- name: Ensure controller variables are set +- name: Ensure platform variables are set ansible.builtin.include_tasks: - file: pre-validate-controller.yml + file: pre-validate-platform.yml when: - - ( 'controller' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_controller is defined ) - -- name: Ensure hub variables are set - ansible.builtin.include_tasks: - file: pre-validate-hub.yml - when: - - ( 'hub' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_hub is defined ) - -- name: Ensure eda variables are set - ansible.builtin.include_tasks: - file: pre-validate-eda.yml - when: - - ( 'eda' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_eda is defined ) + - ( 'platform' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_platform is defined ) - name: Ensure no validation errors found ansible.builtin.debug: diff --git a/roles/aap_ocp_install/templates/controller/consolelink.yaml.j2 b/roles/aap_ocp_install/templates/controller/consolelink.yaml.j2 deleted file mode 100644 index a167b5b..0000000 --- a/roles/aap_ocp_install/templates/controller/consolelink.yaml.j2 +++ /dev/null @@ -1,17 +0,0 @@ ---- -apiVersion: console.openshift.io/v1 -kind: ConsoleLink -metadata: - name: {{ aap_ocp_install_controller['instance_name'] }} -spec: - applicationMenu: - section: Red Hat applications - imageURL: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAc1klEQVR42u2deXAUZfrH++3uuTP3JCFAEnJBQBSQQ1jW6LIJAkYMRwgG5IgskUWMFVJsbYm4/sBdZSFldBVhFQrQaOIVMIAhuFJZEeQQEA8gdzhCJjOTzEzm7uP3By6FSN5M0nN0J++39g/LHSfT7/vp933e530OwLIshoQUaOFoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTCQagruIZVmKYmkaoyiWYTCWxW4P4AYAAwDgOEaSgCAASWIAoDFDYP0aIIZhvV6qvZ1qb/e1tHjq671Xr1JmM2U202Yz7XAwPh9L0yzD3EwOAAAAHAcEgYtEhEJB6PWkXk/q9eKhQyVJSaK4ODIykoyMBGIxwPGBDNzAA4thGKfTZzK5L150XrzoPn3a3dDga2ykOzsZnw+j6b5/803aNBpRQoI0MVE6YYI8NVWamioyGHC5HMMHltUBBkiWDktR3uZm5/Hj9pMnXWfPupua6LY21ucL7uCKRER0tHTYMNm4ccpJk+RTpojj4wFJIrAEv9MxTqfrp5/sNTXW/fvdFy5QVivGMGE6JuGkWi2991717NnKtDTZqFG4XN6P98r+CRZL055LlzoqKmzV1a7z5+mODl79PEKrlY0Zo8rI0GZlSUaMAASBwOK7/eQzGm3V1eZ33u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3nuvevZsZVqabNQoXC4XlgcBgXV3I8zb3Ow8ftx+8qTr7Fl3UxPd1varWsXBGFyRiIiOlg4bJhs3TjlpknzKFHF8/ACJwB4oYN1uhzFOp89kcl+86Pz5Z/fp0+7GRl9jI93ZyVAUxsXqJ0mcJAmNRpSQIE1IkE6YIB85UpqaKjIYcLl8oJXZGXhg/XqvZBmG9Xqp9nbKaPS1tHgaGrxXr1JmM2U202Yz7XAwPh9L0yzD3BwoAADAcUAQuEhEKBSEXk/q9aReLx46VJKYKIqLI6OiyMhIIBYDHO/HOx0Cq6/AURRLURhNswyDseyvriYBwAAAOI4RBCBJQJIDGSAEFlJozypoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTP8PYtUOifNZCQcAAAAASUVORK5CYII= - href: 'https://{{ __aap_ocp_install_controller_route }}/' - location: ApplicationMenu -{% if aap_ocp_install_controller['link_text'] is defined %} - text: {{ aap_ocp_install_controller['link_text'] }} -{% else %} - text: Automation Controller ({{ aap_ocp_install_controller['instance_name'] }}) -{% endif%} -... diff --git a/roles/aap_ocp_install/templates/controller/instance.yaml.j2 b/roles/aap_ocp_install/templates/controller/instance.yaml.j2 deleted file mode 100644 index 0be4032..0000000 --- a/roles/aap_ocp_install/templates/controller/instance.yaml.j2 +++ /dev/null @@ -1,15 +0,0 @@ ---- -apiVersion: automationcontroller.ansible.com/v1beta1 -kind: AutomationController -metadata: - name: {{ aap_ocp_install_controller['instance_name'] }} - namespace: {{ aap_ocp_install_controller['namespace'] | default(aap_ocp_install_namespace) }} -spec: - create_preload_data: {{ aap_ocp_install_controller['create_preload_data'] | default(true) | bool }} - garbage_collect_secrets: {{ aap_ocp_install_controller['garbage_collect_secrets'] | default(false) | bool }} - image_pull_policy: {{ aap_ocp_install_controller['image_pull_policy'] | default('IfNotPresent') }} - projects_persistence: {{ aap_ocp_install_controller['projects_persistence'] | default(false) | bool }} - projects_storage_size: {{ aap_ocp_install_controller['projects_storage_size'] | default('8Gi') }} - replicas: {{ aap_ocp_install_controller['replicas'] | default(1) | int }} - admin_user: {{ aap_ocp_install_controller['admin_user'] | default('admin') }} -... diff --git a/roles/aap_ocp_install/templates/eda/instance.yaml.j2 b/roles/aap_ocp_install/templates/eda/instance.yaml.j2 deleted file mode 100644 index b4958cf..0000000 --- a/roles/aap_ocp_install/templates/eda/instance.yaml.j2 +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: eda.ansible.com/v1alpha1 -kind: EDA -metadata: - name: {{ aap_ocp_install_eda['instance_name'] }} - namespace: {{ aap_ocp_install_eda['namespace'] | default(aap_ocp_install_namespace) }} -spec: - replicas: {{ aap_ocp_install_eda['replicas'] | default(1) | int }} - automation_server_url: 'https://{{ __aap_ocp_install_controller_route }}/' -... diff --git a/roles/aap_ocp_install/templates/hub/consolelink.yaml.j2 b/roles/aap_ocp_install/templates/hub/consolelink.yaml.j2 deleted file mode 100644 index 431830b..0000000 --- a/roles/aap_ocp_install/templates/hub/consolelink.yaml.j2 +++ /dev/null @@ -1,17 +0,0 @@ ---- -apiVersion: console.openshift.io/v1 -kind: ConsoleLink -metadata: - name: {{ aap_ocp_install_hub['instance_name'] }} -spec: - applicationMenu: - section: Red Hat applications - imageURL: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAc1klEQVR42u2deXAUZfrH++3uuTP3JCFAEnJBQBSQQ1jW6LIJAkYMRwgG5IgskUWMFVJsbYm4/sBdZSFldBVhFQrQaOIVMIAhuFJZEeQQEA8gdzhCJjOTzEzm7uP3By6FSN5M0nN0J++39g/LHSfT7/vp933e530OwLIshoQUaOFoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTCQagruIZVmKYmkaoyiWYTCWxW4P4AYAAwDgOEaSgCAASWIAoDFDYP0aIIZhvV6qvZ1qb/e1tHjq671Xr1JmM2U202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mRq1ZJ4uN5ePTrR2D9z6h3njnTVlJirazsr3gRarU6MzO6oEA+frwQU5uECdbNxcvrdX73XVtxse3gQRrSx1twSCkUqlmzogsL5fffL1xPnoDB+gUvj8dx6lT7G29YjxwR+iUjodOp09Mj16xRTJwYjLqgCKze40VRnoYG086dnRUV3vr6YHS7DOIckKQ4KUmTlWXIy5MkJvaP8KF+AtYt28tnNNqqq03vvOM4cYLxevls7rIYhovFismTDStWqDIyRFFR/SlNvH+BdWvOaNpz6VJHRYWtutp1/jzd0cGvLU+rlY0Zo8rI0GZlSUaMAP0x6r9/gnXLN8E4na6ffrLX1Fj373dfuEBZrWGLmMBxUq2W3nuvevZsZVqabNQoXC4XlgcBgXV3I8zb3Ow8ftx+8qTr7Fl3UxPd1varWsXBGFyRiIiOlg4bJhs3TjlpknzKFHF8/ACJwB4oYN1uhzFOp89kcl+86Pz5Z/fp0+7GRl9jI93ZyVAUxsXqJ0mcJAmNRpSQIE1IkE6YIB85UpqaKjIYcLl8oJXZGXhg/XqvZBmG9Xqp9nbKaPS1tHgaGrxXr1JmM2U202Yz7XAwPh9L0yzD3BwoAADAcUAQuEhEKBSEXk/q9aReLx46VJKYKIqLI6OiyMhIIBYDHO/HOx0Cq6/AURRLURhNswyDseyvriYBwAAAOI4RBCBJQJIDGSAEFlJozypoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTP8PYtUOifNZCQcAAAAASUVORK5CYII= - href: 'https://{{ __aap_ocp_install_hub_route }}/' - location: ApplicationMenu -{% if aap_ocp_install_hub['link_text'] is defined %} - text: {{ aap_ocp_install_hub['link_text'] }} -{% else %} - text: Automation Hub ({{ aap_ocp_install_hub['instance_name'] }}) -{% endif%} -... diff --git a/roles/aap_ocp_install/templates/hub/instance.yaml.j2 b/roles/aap_ocp_install/templates/hub/instance.yaml.j2 deleted file mode 100644 index 4e801d4..0000000 --- a/roles/aap_ocp_install/templates/hub/instance.yaml.j2 +++ /dev/null @@ -1,42 +0,0 @@ ---- -apiVersion: automationhub.ansible.com/v1beta1 -kind: AutomationHub -metadata: - name: {{ aap_ocp_install_hub['instance_name'] }} - namespace: {{ aap_ocp_install_namespace }} -spec: -# sso_secret: automation-hub-sso -# pulp_settings: -# verify_ssl: false - route_tls_termination_mechanism: Edge - ingress_type: Route - loadbalancer_port: 80 - file_storage_size: 100Gi - image_pull_policy: IfNotPresent - web: - replicas: 1 - file_storage_access_mode: ReadWriteMany - content: - log_level: INFO - replicas: 2 - postgres_storage_requirements: - limits: - storage: 50Gi - requests: - storage: 8Gi - api: - log_level: INFO - replicas: 1 - postgres_resource_requirements: - limits: - cpu: 1000m - memory: 8Gi - requests: - cpu: 500m - memory: 2Gi - loadbalancer_protocol: http - resource_manager: - replicas: 1 - worker: - replicas: 2 -... diff --git a/roles/aap_ocp_install/templates/eda/consolelink.yaml.j2 b/roles/aap_ocp_install/templates/platform/consolelink.yaml.j2 similarity index 97% rename from roles/aap_ocp_install/templates/eda/consolelink.yaml.j2 rename to roles/aap_ocp_install/templates/platform/consolelink.yaml.j2 index a15aa88..1f2d3ab 100644 --- a/roles/aap_ocp_install/templates/eda/consolelink.yaml.j2 +++ b/roles/aap_ocp_install/templates/platform/consolelink.yaml.j2 @@ -2,16 +2,16 @@ apiVersion: console.openshift.io/v1 kind: ConsoleLink metadata: - name: {{ aap_ocp_install_eda['instance_name'] }} + name: {{ aap_ocp_install_platform['instance_name'] }} spec: applicationMenu: section: Red Hat applications imageURL: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAc1klEQVR42u2deXAUZfrH++3uuTP3JCFAEnJBQBSQQ1jW6LIJAkYMRwgG5IgskUWMFVJsbYm4/sBdZSFldBVhFQrQaOIVMIAhuFJZEeQQEA8gdzhCJjOTzEzm7uP3By6FSN5M0nN0J++39g/LHSfT7/vp933e530OwLIshoQUaOFoCJAQWEgILCQEFhISAgsJgYWEwEJCQmA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WHUqlU86WwobLAwDGNp2nXu3NWioq6amoGZVw1wPCItbeiWLbKxY4EQbleFAdYvS5fLZSktvbF5s6e2FhPOz+Z+mpGkpAxat06Xmxv+bob9EqybzghPc3P7tm2m7dsHgo+eUKsN+fmRq1ZJ4uN5ePTrR2D9z6h3njnTVlJirazsr3gRarU6MzO6oEA+frwQU5uECdbNxcvrdX73XVtxse3gQRrSx1twSCkUqlmzogsL5fffL1xPnoDB+gUvj8dx6lT7G29YjxwR+iUjodOp09Mj16xRTJwYjLqgCKze40VRnoYG086dnRUV3vr6YHS7DOIckKQ4KUmTlWXIy5MkJvaP8KF+AtYt28tnNNqqq03vvOM4cYLxevls7rIYhovFismTDStWqDIyRFFR/SlNvH+BdWvOaNpz6VJHRYWtutp1/jzd0cGvLU+rlY0Zo8rI0GZlSUaMAP0x6r9/gnXLN8E4na6ffrLX1Fj373dfuEBZrWGLmMBxUq2W3nuvevZsZVqabNQoXC4XlgcBgXV3I8zb3Ow8ftx+8qTr7Fl3UxPd1varWsXBGFyRiIiOlg4bJhs3TjlpknzKFHF8/ACJwB4oYN1uhzFOp89kcl+86Pz5Z/fp0+7GRl9jI93ZyVAUxsXqJ0mcJAmNRpSQIE1IkE6YIB85UpqaKjIYcLl8oJXZGXhg/XqvZBmG9Xqp9nbKaPS1tHgaGrxXr1JmM2U202Yz7XAwPh9L0yzD3BwoAADAcUAQuEhEKBSEXk/q9aReLx46VJKYKIqLI6OiyMhIIBYDHO/HOx0Cq6/AURRLURhNswyDseyvriYBwAAAOI4RBCBJQJIDGSAEFlJozypoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTP8PYtUOifNZCQcAAAAASUVORK5CYII= - href: 'https://{{ __aap_ocp_install_eda_route }}/' + href: 'https://{{ __aap_ocp_install_platform_route }}/' location: ApplicationMenu -{% if aap_ocp_install_eda['link_text'] is defined %} - text: {{ aap_ocp_install_eda['link_text'] }} +{% if aap_ocp_install_platform['link_text'] is defined %} + text: {{ aap_ocp_install_platform['link_text'] }} {% else %} - text: EDA Controller ({{ aap_ocp_install_eda['instance_name'] }}) + text: Ansible Automation Platform ({{ aap_ocp_install_platform['instance_name'] }}) {% endif%} ... diff --git a/roles/aap_ocp_install/templates/platform/instance.yaml.j2 b/roles/aap_ocp_install/templates/platform/instance.yaml.j2 new file mode 100644 index 0000000..3254ed1 --- /dev/null +++ b/roles/aap_ocp_install/templates/platform/instance.yaml.j2 @@ -0,0 +1,39 @@ +--- +apiVersion: automationhub.ansible.com/v1beta1 +kind: AnsibleAutomationPlatform +metadata: + name: {{ aap_ocp_install_platform['instance_name'] }} + namespace: {{ aap_ocp_install_namespace }} +spec: + # Platform + image_pull_policy: IfNotPresent + # Components + controller: + disabled: {{ aap_ocp_install_controller is not defined | bool }} + create_preload_data: {{ aap_ocp_install_controller['create_preload_data'] | default(true) | bool }} + garbage_collect_secrets: {{ aap_ocp_install_controller['garbage_collect_secrets'] | default(false) | bool }} + image_pull_policy: {{ aap_ocp_install_controller['image_pull_policy'] | default('IfNotPresent') }} + projects_persistence: {{ aap_ocp_install_controller['projects_persistence'] | default(false) | bool }} + projects_storage_size: {{ aap_ocp_install_controller['projects_storage_size'] | default('8Gi') }} + replicas: {{ aap_ocp_install_controller['replicas'] | default(1) | int }} + admin_user: {{ aap_ocp_install_controller['admin_user'] | default('admin') }} + + eda: + disabled: {{ aap_ocp_install_eda is not defined | bool }} + replicas: {{ aap_ocp_install_eda['replicas'] | default(1) | int }} + hub: + disabled: {{ aap_ocp_install_hub is not defined | bool }} + + ## Modify to contain your RWM storage class name + storage_type: {{ aap_ocp_install_hub['storage_type'] | default('file') }} + {% if aap_ocp_install_hub['storage_type'] == 'file' %} + file_storage_storage_class: {{ aap_ocp_install_hub['storage_class'] }} + file_storage_size: {{ aap_ocp_install_hub['storage_size'] | default('10Gi') }} + {% elif aap_ocp_install_hub['storage_type'] == 'S3' %} + object_storage_s3_secret: {{ aap_ocp_install_hub['storage_s3_secret'] }} + {% elif aap_ocp_install_hub['storage_type'] == 'azure' %} + object_storage_azure_secret: {{ aap_ocp_install_hub['storage_azure_secret'] }} + {% endif %} + + lightspeed: + disabled: {{ aap_ocp_install_lightspeed is not defined | bool }} From 4aab621cda35600af0b74807099e065fef200d19 Mon Sep 17 00:00:00 2001 From: Derek Waters Date: Fri, 1 Nov 2024 16:31:57 +1100 Subject: [PATCH 07/16] Template fixes identified during testing --- .../templates/platform/instance.yaml.j2 | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/roles/aap_ocp_install/templates/platform/instance.yaml.j2 b/roles/aap_ocp_install/templates/platform/instance.yaml.j2 index 3254ed1..0bcb6eb 100644 --- a/roles/aap_ocp_install/templates/platform/instance.yaml.j2 +++ b/roles/aap_ocp_install/templates/platform/instance.yaml.j2 @@ -1,5 +1,5 @@ --- -apiVersion: automationhub.ansible.com/v1beta1 +apiVersion: aap.ansible.com/v1alpha1 kind: AnsibleAutomationPlatform metadata: name: {{ aap_ocp_install_platform['instance_name'] }} @@ -7,9 +7,11 @@ metadata: spec: # Platform image_pull_policy: IfNotPresent + # Components +{% if aap_ocp_install_controller is defined %} controller: - disabled: {{ aap_ocp_install_controller is not defined | bool }} + disabled: false create_preload_data: {{ aap_ocp_install_controller['create_preload_data'] | default(true) | bool }} garbage_collect_secrets: {{ aap_ocp_install_controller['garbage_collect_secrets'] | default(false) | bool }} image_pull_policy: {{ aap_ocp_install_controller['image_pull_policy'] | default('IfNotPresent') }} @@ -17,13 +19,23 @@ spec: projects_storage_size: {{ aap_ocp_install_controller['projects_storage_size'] | default('8Gi') }} replicas: {{ aap_ocp_install_controller['replicas'] | default(1) | int }} admin_user: {{ aap_ocp_install_controller['admin_user'] | default('admin') }} - +{% else %} + controller: + disabled: true +{% endif %} + +{% if aap_ocp_install_eda is defined %} eda: - disabled: {{ aap_ocp_install_eda is not defined | bool }} + disabled: false replicas: {{ aap_ocp_install_eda['replicas'] | default(1) | int }} - hub: - disabled: {{ aap_ocp_install_hub is not defined | bool }} +{% else %} + eda: + disabled: true +{% endif %} +{% if aap_ocp_install_hub is defined %} + hub: + disabled: false ## Modify to contain your RWM storage class name storage_type: {{ aap_ocp_install_hub['storage_type'] | default('file') }} {% if aap_ocp_install_hub['storage_type'] == 'file' %} @@ -34,6 +46,10 @@ spec: {% elif aap_ocp_install_hub['storage_type'] == 'azure' %} object_storage_azure_secret: {{ aap_ocp_install_hub['storage_azure_secret'] }} {% endif %} +{% else %} + hub: + disabled: true +{% endif %} lightspeed: disabled: {{ aap_ocp_install_lightspeed is not defined | bool }} From e75000440a0ef04f4565a7fd4ff543090d27c329 Mon Sep 17 00:00:00 2001 From: Derek Waters Date: Wed, 6 Nov 2024 15:44:46 +1100 Subject: [PATCH 08/16] Make the AAP OCP Deployment backward compatible with pre AAP2.5 --- .../tasks/install-controller.yml | 63 ++++++++ roles/aap_ocp_install/tasks/install-eda.yml | 63 ++++++++ roles/aap_ocp_install/tasks/install-hub.yml | 49 ++++++ roles/aap_ocp_install/tasks/main.yml | 32 +++- .../tasks/pre-validate-controller.yml | 144 ++++++++++++++++++ .../tasks/pre-validate-eda.yml | 57 +++++++ .../tasks/pre-validate-hub.yml | 14 ++ roles/aap_ocp_install/tasks/pre-validate.yml | 34 ++++- 8 files changed, 454 insertions(+), 2 deletions(-) create mode 100644 roles/aap_ocp_install/tasks/install-controller.yml create mode 100644 roles/aap_ocp_install/tasks/install-eda.yml create mode 100644 roles/aap_ocp_install/tasks/install-hub.yml create mode 100644 roles/aap_ocp_install/tasks/pre-validate-controller.yml create mode 100644 roles/aap_ocp_install/tasks/pre-validate-eda.yml create mode 100644 roles/aap_ocp_install/tasks/pre-validate-hub.yml diff --git a/roles/aap_ocp_install/tasks/install-controller.yml b/roles/aap_ocp_install/tasks/install-controller.yml new file mode 100644 index 0000000..b52ada5 --- /dev/null +++ b/roles/aap_ocp_install/tasks/install-controller.yml @@ -0,0 +1,63 @@ +--- +- name: Create controller namespace + kubernetes.core.k8s: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + state: present + resource_definition: "{{ lookup('ansible.builtin.template', 'namespace.yaml.j2', template_vars=ns_vars) | from_yaml | ansible.builtin.combine(aap_ocp_install_controller['namespace_manifest_overrides'] | default({}), recursive=true) }}" + apply: true + vars: + ns_vars: + ns_name: "{{ aap_ocp_install_controller['namespace'] }}" + when: + - aap_ocp_install_controller['namespace'] is defined + +- name: Create automation controller instance + kubernetes.core.k8s: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + state: present + resource_definition: "{{ lookup('template', 'controller/instance.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_controller['controller_manifest_overrides'] | default({}), recursive=true) }}" + apply: true + +- name: Wait for operator to create the automation controller route + kubernetes.core.k8s_info: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + kind: Route + name: "{{ aap_ocp_install_controller['instance_name'] | mandatory }}" + api_version: route.openshift.io/v1 + namespace: "{{ aap_ocp_install_controller['namespace'] | default(aap_ocp_install_namespace) | mandatory }}" + register: __aap_ocp_install_controller_route_result + until: __aap_ocp_install_controller_route_result['resources'] + retries: 60 # Wait for 15 minutes (60*15/60) + delay: 15 + +- name: Store automation controller route + ansible.builtin.set_fact: + __aap_ocp_install_controller_route: "{{ __aap_ocp_install_controller_route_result['resources'][0]['status']['ingress'][0]['host'] }}" + +- name: Ensure automation controller login is available + ansible.builtin.uri: + url: https://{{ __aap_ocp_install_controller_route }} + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + method: GET + status_code: + - 200 + register: __aap_ocp_install_controller_available + until: (__aap_ocp_install_controller_available['status'] == 200) and ('migrations_notran' not in __aap_ocp_install_controller_available['url']) + retries: 120 # Wait for 30 minutes (120*15/60) + delay: 15 + +- name: Create automation controller console link + kubernetes.core.k8s: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + state: present + resource_definition: "{{ lookup('template', 'controller/consolelink.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_controller['consolelink_manifest_overrides'] | default({}), recursive=true) }}" + apply: true +... \ No newline at end of file diff --git a/roles/aap_ocp_install/tasks/install-eda.yml b/roles/aap_ocp_install/tasks/install-eda.yml new file mode 100644 index 0000000..615ce8d --- /dev/null +++ b/roles/aap_ocp_install/tasks/install-eda.yml @@ -0,0 +1,63 @@ +--- +- name: Create EDA controller namespace + kubernetes.core.k8s: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + state: present + resource_definition: "{{ lookup('ansible.builtin.template', 'namespace.yaml.j2', template_vars=ns_vars) | from_yaml | ansible.builtin.combine(aap_ocp_install_eda['namespace_manifest_overrides'] | default({}), recursive=true) }}" + apply: true + vars: + ns_vars: + ns_name: "{{ aap_ocp_install_eda['namespace'] }}" + when: + - aap_ocp_install_eda['namespace'] is defined + +- name: Create EDA instance + kubernetes.core.k8s: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + state: present + resource_definition: "{{ lookup('template', 'eda/instance.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_eda['eda_manifest_overrides'] | default({}), recursive=true) }}" + apply: true + +- name: Wait for operator to create the EDA route + kubernetes.core.k8s_info: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + kind: Route + name: "{{ aap_ocp_install_eda['instance_name'] | mandatory }}" + api_version: route.openshift.io/v1 + namespace: "{{ aap_ocp_install_eda['namespace'] | default(aap_ocp_install_namespace) }}" + register: __aap_ocp_install_eda_route_result + until: __aap_ocp_install_eda_route_result['resources'] + retries: 60 # Wait for 15 minutes (60*15/60) + delay: 15 + +- name: Store EDA route + ansible.builtin.set_fact: + __aap_ocp_install_eda_route: "{{ __aap_ocp_install_eda_route_result['resources'][0]['status']['ingress'][0]['host'] }}" + +- name: Ensure EDA login is available + ansible.builtin.uri: + url: https://{{ __aap_ocp_install_eda_route }} + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + method: GET + status_code: + - 200 + register: __aap_ocp_install_eda_available + until: __aap_ocp_install_eda_available['status'] == 200 + retries: 120 # Wait for 30 minutes (120*15/60) + delay: 15 + +- name: Create EDA console link + kubernetes.core.k8s: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + state: present + resource_definition: "{{ lookup('template', 'eda/consolelink.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_eda['consolelink_manifest_overrides'] | default({}), recursive=true) }}" + apply: true +... \ No newline at end of file diff --git a/roles/aap_ocp_install/tasks/install-hub.yml b/roles/aap_ocp_install/tasks/install-hub.yml new file mode 100644 index 0000000..531aa10 --- /dev/null +++ b/roles/aap_ocp_install/tasks/install-hub.yml @@ -0,0 +1,49 @@ +--- +- name: Create automation hub instance + kubernetes.core.k8s: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + state: present + resource_definition: "{{ lookup('template', 'hub/instance.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_hub['namespace_manifest_overrides'] | default({}), recursive=true) }}" + apply: true + +- name: Wait for operator to create the automation hub route + kubernetes.core.k8s_info: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + kind: Route + name: "{{ aap_ocp_install_hub['instance_name'] | mandatory }}" + api_version: route.openshift.io/v1 + namespace: "{{ aap_ocp_install_namespace | mandatory }}" + register: __aap_ocp_install_hub_route_result + until: __aap_ocp_install_hub_route_result['resources'] + retries: 60 # Wait for 15 minutes (60*15/60) + delay: 15 + +- name: Store automation hub route + ansible.builtin.set_fact: + __aap_ocp_install_hub_route: "{{ __aap_ocp_install_hub_route_result['resources'][0]['status']['ingress'][0]['host'] }}" + +- name: Ensure automation hub login is available + ansible.builtin.uri: + url: https://{{ __aap_ocp_install_hub_route }} + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + method: GET + status_code: + - 200 + register: __aap_ocp_install_hub_available + until: __aap_ocp_install_hub_available['status'] == 200 + retries: 120 # Wait for 30 minutes (120*15/60) + delay: 15 + +- name: Create automation hub console link + kubernetes.core.k8s: + host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" + api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" + validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" + state: present + resource_definition: "{{ lookup('template', 'hub/consolelink.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_hub['hub_manifest_overrides'] | default({}), recursive=true) }}" + apply: true +... \ No newline at end of file diff --git a/roles/aap_ocp_install/tasks/main.yml b/roles/aap_ocp_install/tasks/main.yml index 7218acc..0d079e6 100644 --- a/roles/aap_ocp_install/tasks/main.yml +++ b/roles/aap_ocp_install/tasks/main.yml @@ -36,10 +36,40 @@ apply: tags: - platform - when: aap_ocp_install_platform is defined + when: aap_ocp_install_platform is defined and __aap_ocp_install_25_install tags: - platform + - name: Include Ansible Automation Platform controller install tasks + ansible.builtin.include_tasks: + file: install-controller.yml + apply: + tags: + - controller + when: aap_ocp_install_controller is defined and not __aap_ocp_install_25_install + tags: + - controller + + - name: Include Ansible Automation Platform hub install tasks + ansible.builtin.include_tasks: + file: install-hub.yml + apply: + tags: + - hub + when: aap_ocp_install_hub is defined and not __aap_ocp_install_25_install + tags: + - hub + + - name: Include Ansible Automation Platform EDA install tasks + ansible.builtin.include_tasks: + file: install-eda.yml + apply: + tags: + - eda + when: aap_ocp_install_eda is defined and not __aap_ocp_install_25_install + tags: + - eda + always: - name: Include OpenShift finalization tasks diff --git a/roles/aap_ocp_install/tasks/pre-validate-controller.yml b/roles/aap_ocp_install/tasks/pre-validate-controller.yml new file mode 100644 index 0000000..da9045e --- /dev/null +++ b/roles/aap_ocp_install/tasks/pre-validate-controller.yml @@ -0,0 +1,144 @@ +--- +- name: Ensure controller instance name variable is set (block) + block: + - name: Ensure controller instance name variable is set + ansible.builtin.assert: + that: + - aap_ocp_install_controller['instance_name'] | default('', true) | length > 0 + quiet: true + rescue: + - name: Update validation errors fact - controller instance_name + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['instance_name'] must be set"] }} + +- name: Ensure controller admin username variable is set (block) + when: aap_ocp_install_controller['admin_user'] is defined + block: + - name: Ensure controller admin username variable is set + ansible.builtin.assert: + that: + - aap_ocp_install_controller['admin_user'] | default('', true) | length > 0 + quiet: true + rescue: + - name: Update validation errors fact - controller admin_user + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['admin_user'] must be a non-empty string"] }} + +- name: Ensure controller namespace variable is set (block) + when: aap_ocp_install_controller['namespace'] is defined + block: + - name: Ensure controller namespace variable is set + ansible.builtin.assert: + that: + - aap_ocp_install_controller['namespace'] | default("", true) | regex_search('^[a-z0-9]([-a-z0-9]*[a-z0-9])?$') + quiet: true + rescue: + - name: Update validation errors fact - namespace + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['namespace'] must be a lowercase RFC 1123 label consisting of lower case alphanumeric + characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc'"] }} + +- name: Ensure controller link text variable is set (block) + when: aap_ocp_install_controller['link_text'] is defined + block: + - name: Ensure controller link text variable is set + ansible.builtin.assert: + that: + - aap_ocp_install_controller['link_text'] | default('', true) | length > 0 + quiet: true + rescue: + - name: Update validation errors fact - controller link_text + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['link_text'] must be a non-empty string"] }} + +- name: Ensure controller image pull policy is valid (block) + when: aap_ocp_install_controller['image_pull_policy'] is defined + block: + - name: Ensure controller image pull policy is valid + ansible.builtin.assert: + that: + - aap_ocp_install_controller['image_pull_policy'] is in ['IfNotPresent', 'Always', 'Never'] + quiet: true + rescue: + - name: Update validation errors fact - controller image_pull_policy + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['image_pull_policy'] must be one of: IfNotPresent, Always, or Never"] }} + +- name: Ensure controller create preload data is valid (block) + when: aap_ocp_install_controller['create_preload_data'] is defined + block: + - name: Ensure controller create preload data is valid + ansible.builtin.assert: + that: + - (aap_ocp_install_controller['create_preload_data'] | string | lower) is in ['true', 'false'] + quiet: true + rescue: + - name: Update validation errors fact - controller create_preload_data + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['create_preload_data'] must be one of: true or false"] }} + +- name: Ensure controller garbage collect secrets is valid (block) + when: aap_ocp_install_controller['garbage_collect_secrets'] is defined + block: + - name: Ensure controller garbage collect secrets is valid + ansible.builtin.assert: + that: + - (aap_ocp_install_controller['garbage_collect_secrets'] | string | lower) is in ['true', 'false'] + quiet: true + rescue: + - name: Update validation errors fact - controller garbage_collect_secrets + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['garbage_collect_secrets'] must be one of: true or false"] }} + +- name: Ensure controller projects persistence is valid (block) + when: aap_ocp_install_controller['projects_persistence'] is defined + block: + - name: Ensure controller projects persistence is valid + ansible.builtin.assert: + that: + - (aap_ocp_install_controller['projects_persistence'] | string | lower) is in ['true', 'false'] + quiet: true + rescue: + - name: Update validation errors fact - controller projects_persistence + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['projects_persistence'] must be one of: true or false"] }} + +- name: Ensure controller replicas is valid (block) + when: aap_ocp_install_controller['replicas'] is defined + block: + - name: Ensure controller replicas is valid + ansible.builtin.assert: + that: + - (aap_ocp_install_controller['replicas'] | int) > 0 + quiet: true + rescue: + - name: Update validation errors fact - controller replicas + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['replicas'] must be a number greater than 0"] }} + +- name: Ensure controller projects storage size is valid (block) + when: aap_ocp_install_controller['projects_storage_size'] is defined + block: + - name: Ensure controller projects storage size is valid + ansible.builtin.assert: + that: + - (aap_ocp_install_controller['projects_storage_size'] | regex_replace('^(?P[0-9]+)(?PKi|K|Mi|M|Gi|G|Ti|T|Pi|P|Ei|E)$', '\\g') | int) > + 0 + - (aap_ocp_install_controller['projects_storage_size'] | regex_replace('^(?P[0-9]+)(?PKi|K|Mi|M|Gi|G|Ti|T|Pi|P|Ei|E)$', '\\g')) is in ['Ki','K','Mi','M','Gi','G','Ti','T','Pi','P','Ei','E'] + quiet: true + rescue: + - name: Update validation errors fact - projects_storage_size replicas + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['projects_storage_size'] must be a number greater than 0 with a size (e.g. 12Gi or + 10000M)"] }} +... \ No newline at end of file diff --git a/roles/aap_ocp_install/tasks/pre-validate-eda.yml b/roles/aap_ocp_install/tasks/pre-validate-eda.yml new file mode 100644 index 0000000..6246e0f --- /dev/null +++ b/roles/aap_ocp_install/tasks/pre-validate-eda.yml @@ -0,0 +1,57 @@ +--- +- name: Ensure eda instance name variable is set (block) + block: + - name: Ensure eda instance name variable is set + ansible.builtin.assert: + that: + - aap_ocp_install_eda['instance_name'] | default('', true) | length > 0 + quiet: true + rescue: + - name: Update validation errors fact - eda instance_name + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['instance_name'] must be set"] }} + +- name: Ensure EDA namespace variable is set (block) + when: aap_ocp_install_eda['namespace'] is defined + block: + - name: Ensure EDA namespace variable is set + ansible.builtin.assert: + that: + - aap_ocp_install_eda['namespace'] | default("", true) | regex_search('^[a-z0-9]([-a-z0-9]*[a-z0-9])?$') + quiet: true + rescue: + - name: Update validation errors fact - namespace + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['namespace'] must be a lowercase RFC 1123 label consisting of lower case alphanumeric characters + or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc'"] }} + +- name: Ensure EDA link text variable is set (block) + when: aap_ocp_install_eda['link_text'] is defined + block: + - name: Ensure EDA link text variable is set + ansible.builtin.assert: + that: + - aap_ocp_install_eda['link_text'] | default('', true) | length > 0 + quiet: true + rescue: + - name: Update validation errors fact - EDA link_text + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['link_text'] must be a non-empty string"] }} + +- name: Ensure EDA replicas is valid (block) + when: aap_ocp_install_eda['replicas'] is defined + block: + - name: Ensure EDA replicas is valid + ansible.builtin.assert: + that: + - (aap_ocp_install_eda['replicas'] | int) > 0 + quiet: true + rescue: + - name: Update validation errors fact - EDA replicas + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_eda['replicas'] must be a number greater than 0"] }} +... \ No newline at end of file diff --git a/roles/aap_ocp_install/tasks/pre-validate-hub.yml b/roles/aap_ocp_install/tasks/pre-validate-hub.yml new file mode 100644 index 0000000..39769d8 --- /dev/null +++ b/roles/aap_ocp_install/tasks/pre-validate-hub.yml @@ -0,0 +1,14 @@ +--- +- name: Ensure hub instance name variable is set (block) + block: + - name: Ensure hub instance name variable is set + ansible.builtin.assert: + that: + - aap_ocp_install_hub['instance_name'] | default('', true) | length > 0 + quiet: true + rescue: + - name: Update validation errors fact - hub instance_name + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_hub['instance_name'] must be set"] }} +... \ No newline at end of file diff --git a/roles/aap_ocp_install/tasks/pre-validate.yml b/roles/aap_ocp_install/tasks/pre-validate.yml index 70b94fa..6da4234 100644 --- a/roles/aap_ocp_install/tasks/pre-validate.yml +++ b/roles/aap_ocp_install/tasks/pre-validate.yml @@ -92,11 +92,43 @@ when: - ( 'operator' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_operator is defined ) +- name: Retrieve the requested operator channel version numbers + ansible.builtin.set_fact: + __aap_ocp_install_major_version: "{{ aap_ocp_install_operator['channel'] | regex_search(__aap_ocp_install_major_version_re, '\\1') | first }}" + __aap_ocp_install_minor_version: "{{ aap_ocp_install_operator['channel'] | regex_search(__aap_ocp_install_minor_version_re, '\\1') | first }}" + vars: + __aap_ocp_install_major_version_re: '(\d+)\.\d+' + __aap_ocp_install_minor_version_re: '\d+\.(\d+)' + +- name: Set a flag indicating whether to use the new (AAP 2.5+) operator installation method + ansible.builtin.set_fact: + __aap_ocp_install_25_install: "{{ (__aap_ocp_install_major_version | int) > 2 \ + or (( __aap_ocp_install_major_version | int) == 2 \ + and ( __aap_ocp_install_minor_version | int) >= 5) }}" + - name: Ensure platform variables are set ansible.builtin.include_tasks: file: pre-validate-platform.yml when: - - ( 'platform' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_platform is defined ) + - (( 'platform' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_platform is defined )) and __aap_ocp_install_25_install + +- name: Ensure controller variables are set + ansible.builtin.include_tasks: + file: pre-validate-controller.yml + when: + - (( 'controller' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_controller is defined )) and not __aap_ocp_install_25_install + +- name: Ensure hub variables are set + ansible.builtin.include_tasks: + file: pre-validate-hub.yml + when: + - (( 'hub' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_hub is defined )) and not __aap_ocp_install_25_install + +- name: Ensure eda variables are set + ansible.builtin.include_tasks: + file: pre-validate-eda.yml + when: + - (( 'eda' in ansible_run_tags ) or ( 'all' in ansible_run_tags and aap_ocp_install_eda is defined )) and not __aap_ocp_install_25_install - name: Ensure no validation errors found ansible.builtin.debug: From 421f65085fbf095644e3a750e324b85bdf6e38cc Mon Sep 17 00:00:00 2001 From: Derek Waters Date: Wed, 6 Nov 2024 16:41:36 +1100 Subject: [PATCH 09/16] Restore missing files --- .../templates/controller/consolelink.yaml.j2 | 17 ++++++++ .../templates/controller/instance.yaml.j2 | 15 +++++++ .../templates/eda/consolelink.yaml.j2 | 17 ++++++++ .../templates/eda/instance.yaml.j2 | 10 +++++ .../templates/hub/consolelink.yaml.j2 | 17 ++++++++ .../templates/hub/instance.yaml.j2 | 42 +++++++++++++++++++ 6 files changed, 118 insertions(+) create mode 100644 roles/aap_ocp_install/templates/controller/consolelink.yaml.j2 create mode 100644 roles/aap_ocp_install/templates/controller/instance.yaml.j2 create mode 100644 roles/aap_ocp_install/templates/eda/consolelink.yaml.j2 create mode 100644 roles/aap_ocp_install/templates/eda/instance.yaml.j2 create mode 100644 roles/aap_ocp_install/templates/hub/consolelink.yaml.j2 create mode 100644 roles/aap_ocp_install/templates/hub/instance.yaml.j2 diff --git a/roles/aap_ocp_install/templates/controller/consolelink.yaml.j2 b/roles/aap_ocp_install/templates/controller/consolelink.yaml.j2 new file mode 100644 index 0000000..a167b5b --- /dev/null +++ b/roles/aap_ocp_install/templates/controller/consolelink.yaml.j2 @@ -0,0 +1,17 @@ +--- +apiVersion: console.openshift.io/v1 +kind: ConsoleLink +metadata: + name: {{ aap_ocp_install_controller['instance_name'] }} +spec: + applicationMenu: + section: Red Hat applications + imageURL: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAc1klEQVR42u2deXAUZfrH++3uuTP3JCFAEnJBQBSQQ1jW6LIJAkYMRwgG5IgskUWMFVJsbYm4/sBdZSFldBVhFQrQaOIVMIAhuFJZEeQQEA8gdzhCJjOTzEzm7uP3By6FSN5M0nN0J++39g/LHSfT7/vp933e530OwLIshoQUaOFoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTCQagruIZVmKYmkaoyiWYTCWxW4P4AYAAwDgOEaSgCAASWIAoDFDYP0aIIZhvV6qvZ1qb/e1tHjq671Xr1JmM2U202Yz7XAwPh9L0yzD3EwOAAAAHAcEgYtEhEJB6PWkXk/q9eKhQyVJSaK4ODIykoyMBGIxw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txse3gQRrSx1twSCkUqlmzogsL5fffL1xPnoDB+gUvj8dx6lT7G29YjxwR+iUjodOp09Mj16xRTJwYjLqgCKze40VRnoYG086dnRUV3vr6YHS7DOIckKQ4KUmTlWXIy5MkJvaP8KF+AtYt28tnNNqqq03vvOM4cYLxevls7rIYhovFismTDStWqDIyRFFR/SlNvH+BdWvOaNpz6VJHRYWtutp1/jzd0cGvLU+rlY0Zo8rI0GZlSUaMAP0x6r9/gnXLN8E4na6ffrLX1Fj373dfuEBZrWGLmMBxUq2W3nuvevZsZVqabNQoXC4XlgcBgXV3I8zb3Ow8ftx+8qTr7Fl3UxPd1varWsXBGFyRiIiOlg4bJhs3TjlpknzKFHF8/ACJwB4oYN1uhzFOp89kcl+86Pz5Z/fp0+7GRl9jI93ZyVAUxsXqJ0mcJAmNRpSQIE1IkE6YIB85UpqaKjIYcLl8oJXZGXhg/XqvZBmG9Xqp9nbKaPS1tHgaGrxXr1JmM2U202Yz7XAwPh9L0yzD3BwoAADAcUAQuEhEKBSEXk/q9aReLx46VJKYKIqLI6OiyMhIIBYDHO/HOx0Cq6/AURRLURhNswyDseyvriYBwAAAOI4RBCBJQJIDGSAEFlJozypoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTP8PYtUOifNZCQcAAAAASUVORK5CYII= + href: 'https://{{ __aap_ocp_install_controller_route }}/' + location: ApplicationMenu +{% if aap_ocp_install_controller['link_text'] is defined %} + text: {{ aap_ocp_install_controller['link_text'] }} +{% else %} + text: Automation Controller ({{ aap_ocp_install_controller['instance_name'] }}) +{% endif%} +... diff --git a/roles/aap_ocp_install/templates/controller/instance.yaml.j2 b/roles/aap_ocp_install/templates/controller/instance.yaml.j2 new file mode 100644 index 0000000..0be4032 --- /dev/null +++ b/roles/aap_ocp_install/templates/controller/instance.yaml.j2 @@ -0,0 +1,15 @@ +--- +apiVersion: automationcontroller.ansible.com/v1beta1 +kind: AutomationController +metadata: + name: {{ aap_ocp_install_controller['instance_name'] }} + namespace: {{ aap_ocp_install_controller['namespace'] | default(aap_ocp_install_namespace) }} +spec: + create_preload_data: {{ aap_ocp_install_controller['create_preload_data'] | default(true) | bool }} + garbage_collect_secrets: {{ aap_ocp_install_controller['garbage_collect_secrets'] | default(false) | bool }} + image_pull_policy: {{ aap_ocp_install_controller['image_pull_policy'] | default('IfNotPresent') }} + projects_persistence: {{ aap_ocp_install_controller['projects_persistence'] | default(false) | bool }} + projects_storage_size: {{ aap_ocp_install_controller['projects_storage_size'] | default('8Gi') }} + replicas: {{ aap_ocp_install_controller['replicas'] | default(1) | int }} + admin_user: {{ aap_ocp_install_controller['admin_user'] | default('admin') }} +... diff --git a/roles/aap_ocp_install/templates/eda/consolelink.yaml.j2 b/roles/aap_ocp_install/templates/eda/consolelink.yaml.j2 new file mode 100644 index 0000000..a15aa88 --- /dev/null +++ b/roles/aap_ocp_install/templates/eda/consolelink.yaml.j2 @@ -0,0 +1,17 @@ +--- +apiVersion: console.openshift.io/v1 +kind: ConsoleLink +metadata: + name: {{ aap_ocp_install_eda['instance_name'] }} +spec: + applicationMenu: + section: Red Hat applications + imageURL: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAc1klEQVR42u2deXAUZfrH++3uuTP3JCFAEnJBQBSQQ1jW6LIJAkYMRwgG5IgskUWMFVJsbYm4/sBdZSFldBVhFQrQaOIVMIAhuFJZEeQQEA8gdzhCJjOTzEzm7uP3By6FSN5M0nN0J++39g/LHSfT7/vp933e530OwLIshoQUaOFoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTCQagruIZVmKYmkaoyiWYTCWxW4P4AYAAwDgOEaSgCAASWIAoDFDYP0aIIZhvV6qvZ1qb/e1tHjq671Xr1JmM2U202Yz7XAwPh9L0yzD3EwOAAAAHAcEgYtEhEJB6PWkXk/q9eKhQyV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QU5uECdbNxcvrdX73XVtxse3gQRrSx1twSCkUqlmzogsL5fffL1xPnoDB+gUvj8dx6lT7G29YjxwR+iUjodOp09Mj16xRTJwYjLqgCKze40VRnoYG086dnRUV3vr6YHS7DOIckKQ4KUmTlWXIy5MkJvaP8KF+AtYt28tnNNqqq03vvOM4cYLxevls7rIYhovFismTDStWqDIyRFFR/SlNvH+BdWvOaNpz6VJHRYWtutp1/jzd0cGvLU+rlY0Zo8rI0GZlSUaMAP0x6r9/gnXLN8E4na6ffrLX1Fj373dfuEBZrWGLmMBxUq2W3nuvevZsZVqabNQoXC4XlgcBgXV3I8zb3Ow8ftx+8qTr7Fl3UxPd1varWsXBGFyRiIiOlg4bJhs3TjlpknzKFHF8/ACJwB4oYN1uhzFOp89kcl+86Pz5Z/fp0+7GRl9jI93ZyVAUxsXqJ0mcJAmNRpSQIE1IkE6YIB85UpqaKjIYcLl8oJXZGXhg/XqvZBmG9Xqp9nbKaPS1tHgaGrxXr1JmM2U202Yz7XAwPh9L0yzD3BwoAADAcUAQuEhEKBSEXk/q9aReLx46VJKYKIqLI6OiyMhIIBYDHO/HOx0Cq6/AURRLURhNswyDseyvriYBwAAAOI4RBCBJQJIDGSAEFlJozypoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTP8PYtUOifNZCQcAAAAASUVORK5CYII= + href: 'https://{{ __aap_ocp_install_eda_route }}/' + location: ApplicationMenu +{% if aap_ocp_install_eda['link_text'] is defined %} + text: {{ aap_ocp_install_eda['link_text'] }} +{% else %} + text: EDA Controller ({{ aap_ocp_install_eda['instance_name'] }}) +{% endif%} +... diff --git a/roles/aap_ocp_install/templates/eda/instance.yaml.j2 b/roles/aap_ocp_install/templates/eda/instance.yaml.j2 new file mode 100644 index 0000000..b4958cf --- /dev/null +++ b/roles/aap_ocp_install/templates/eda/instance.yaml.j2 @@ -0,0 +1,10 @@ +--- +apiVersion: eda.ansible.com/v1alpha1 +kind: EDA +metadata: + name: {{ aap_ocp_install_eda['instance_name'] }} + namespace: {{ aap_ocp_install_eda['namespace'] | default(aap_ocp_install_namespace) }} +spec: + replicas: {{ aap_ocp_install_eda['replicas'] | default(1) | int }} + automation_server_url: 'https://{{ __aap_ocp_install_controller_route }}/' +... diff --git a/roles/aap_ocp_install/templates/hub/consolelink.yaml.j2 b/roles/aap_ocp_install/templates/hub/consolelink.yaml.j2 new file mode 100644 index 0000000..431830b --- /dev/null +++ b/roles/aap_ocp_install/templates/hub/consolelink.yaml.j2 @@ -0,0 +1,17 @@ +--- +apiVersion: console.openshift.io/v1 +kind: ConsoleLink +metadata: + name: {{ aap_ocp_install_hub['instance_name'] }} +spec: + applicationMenu: + section: Red Hat applications + imageURL: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAc1klEQVR42u2deXAUZfrH++3uuTP3JCFAEnJBQBSQQ1jW6LIJAkYMRwgG5IgskUWMFVJsbYm4/sBdZSFldBVhFQrQaOIVMIAhuFJZEeQQEA8gdzhCJjOTzEzm7uP3By6FSN5M0nN0J++39g/LHSfT7/vp933e530OwLIshoQUaOFoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTCQagruIZVmKYmkaoyiWYTCWxW4P4AYAAwDgOEaSgCAASWIAoDFDYP0aIIZhvV6qvZ1qb/e1tHjq671Xr1JmM2U202Yz7XAwPh9L0yzD3EwOAAAAHAcEgYtEhEJB6PWkXk/q9eKhQyVJSaK4ODIykoyMBGIxwPGBDNzAA4thGKfTZzK5L150XrzoPn3a3dDga2ykOzsZnw+j6b5/803aNBpRQoI0MVE6YYI8NVWamioyGHC5HMMHltUBBkiWDktR3uZm5/Hj9pMnXWfPupua6LY21ucL7uCKRER0tHTYMNm4ccpJk+RTpojj4wFJIrAEv9MxTqfrp5/sNTXW/fvdFy5QVivGMGE6JuGkWi2991717NnKtDTZ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p1/jzd0cGvLU+rlY0Zo8rI0GZlSUaMAP0x6r9/gnXLN8E4na6ffrLX1Fj373dfuEBZrWGLmMBxUq2W3nuvevZsZVqabNQoXC4XlgcBgXV3I8zb3Ow8ftx+8qTr7Fl3UxPd1varWsXBGFyRiIiOlg4bJhs3TjlpknzKFHF8/ACJwB4oYN1uhzFOp89kcl+86Pz5Z/fp0+7GRl9jI93ZyVAUxsXqJ0mcJAmNRpSQIE1IkE6YIB85UpqaKjIYcLl8oJXZGXhg/XqvZBmG9Xqp9nbKaPS1tHgaGrxXr1JmM2U202Yz7XAwPh9L0yzD3BwoAADAcUAQuEhEKBSEXk/q9aReLx46VJKYKIqLI6OiyMhIIBYDHO/HOx0Cq6/AURRLURhNswyDseyvriYBwAAAOI4RBCBJQJIDGSAEFlJozypoCJAQWEgILCQEFhISAgsJgYWEwEJCQmAhIbCQEFhISAgsJAQWEgILCQmBhYTAQkJgISEhsJAQWEgDTP8PYtUOifNZCQcAAAAASUVORK5CYII= + href: 'https://{{ __aap_ocp_install_hub_route }}/' + location: ApplicationMenu +{% if aap_ocp_install_hub['link_text'] is defined %} + text: {{ aap_ocp_install_hub['link_text'] }} +{% else %} + text: Automation Hub ({{ aap_ocp_install_hub['instance_name'] }}) +{% endif%} +... diff --git a/roles/aap_ocp_install/templates/hub/instance.yaml.j2 b/roles/aap_ocp_install/templates/hub/instance.yaml.j2 new file mode 100644 index 0000000..4e801d4 --- /dev/null +++ b/roles/aap_ocp_install/templates/hub/instance.yaml.j2 @@ -0,0 +1,42 @@ +--- +apiVersion: automationhub.ansible.com/v1beta1 +kind: AutomationHub +metadata: + name: {{ aap_ocp_install_hub['instance_name'] }} + namespace: {{ aap_ocp_install_namespace }} +spec: +# sso_secret: automation-hub-sso +# pulp_settings: +# verify_ssl: false + route_tls_termination_mechanism: Edge + ingress_type: Route + loadbalancer_port: 80 + file_storage_size: 100Gi + image_pull_policy: IfNotPresent + web: + replicas: 1 + file_storage_access_mode: ReadWriteMany + content: + log_level: INFO + replicas: 2 + postgres_storage_requirements: + limits: + storage: 50Gi + requests: + storage: 8Gi + api: + log_level: INFO + replicas: 1 + postgres_resource_requirements: + limits: + cpu: 1000m + memory: 8Gi + requests: + cpu: 500m + memory: 2Gi + loadbalancer_protocol: http + resource_manager: + replicas: 1 + worker: + replicas: 2 +... From acf412ed955e5d40a2b9d34fabc2caeb38821517 Mon Sep 17 00:00:00 2001 From: Derek Waters Date: Fri, 8 Nov 2024 08:54:14 +1100 Subject: [PATCH 10/16] Ensure Hub settings are correct --- .../tasks/pre-validate-platform.yml | 60 +++++++++++++++++++ .../templates/platform/instance.yaml.j2 | 18 +++--- 2 files changed, 70 insertions(+), 8 deletions(-) diff --git a/roles/aap_ocp_install/tasks/pre-validate-platform.yml b/roles/aap_ocp_install/tasks/pre-validate-platform.yml index 58782c9..a62e3bb 100644 --- a/roles/aap_ocp_install/tasks/pre-validate-platform.yml +++ b/roles/aap_ocp_install/tasks/pre-validate-platform.yml @@ -138,4 +138,64 @@ ansible.builtin.set_fact: __aap_ocp_install_prevalidate_errors: > {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['projects_storage_size'] must be a number greater than 0 with a size (e.g. 12Gi or 10000M)"] }} + + + + +- name: Ensure hub storage type is valid (block) + when: aap_ocp_install_hub is defined + block: + - name: Ensure hub storage type is valid + ansible.builtin.assert: + that: + - (aap_ocp_install_hub['storage_type']) is in ['file', 'S3', 'azure'] + quiet: true + rescue: + - name: Update validation errors fact - storage_type + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_hub['storage_type'] must be 'file', 'S3' or 'azure'"] }} + +- name: Ensure hub file storage settings are valid (block) + when: aap_ocp_install_hub['storage_type'] is defined and aap_ocp_install_hub['storage_type'] == 'file' + block: + - name: Ensure hub file storage settings are valid + ansible.builtin.assert: + that: + - (aap_ocp_install_hub['file_storage_size'] is not defined) or (aap_ocp_install_hub['file_storage_size'] | regex_replace('^(?P[0-9]+)(?PKi|K|Mi|M|Gi|G|Ti|T|Pi|P|Ei|E)$', '\\g') | int) > 0 + - (aap_ocp_install_hub['file_storage_size'] is not defined) or (aap_ocp_install_hub['file_storage_size'] | regex_replace('^(?P[0-9]+)(?PKi|K|Mi|M|Gi|G|Ti|T|Pi|P|Ei|E)$', '\\g')) is in ['Ki','K','Mi','M','Gi','G','Ti','T','Pi','P','Ei','E'] + quiet: true + rescue: + - name: Update validation errors fact - file storage_type + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_hub['file_storage_size'] must be a number greater than 0 with a size (e.g. 12Gi or 10000M)"] }} + +- name: Ensure hub S3 storage settings are valid (block) + when: aap_ocp_install_hub['storage_type'] is defined and aap_ocp_install_hub['storage_type'] == 'S3' + block: + - name: Ensure hub S3 storage settings are valid + ansible.builtin.assert: + that: + - (aap_ocp_install_hub['object_storage_s3_secret']) is defined + quiet: true + rescue: + - name: Update validation errors fact - S3 secret + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_hub['object_storage_s3_secret'] must be the name of a valid S3 storage secret name" }} + +- name: Ensure hub Azure storage settings are valid (block) + when: aap_ocp_install_hub['storage_type'] is defined and aap_ocp_install_hub['storage_type'] == 'azure' + block: + - name: Ensure hub Azure storage settings are valid + ansible.builtin.assert: + that: + - (aap_ocp_install_hub['object_storage_azure_secret']) is defined + quiet: true + rescue: + - name: Update validation errors fact - Azure secret + ansible.builtin.set_fact: + __aap_ocp_install_prevalidate_errors: > + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_hub['object_storage_azure_secret'] must be the name of a valid Azure storage secret name" }} ... diff --git a/roles/aap_ocp_install/templates/platform/instance.yaml.j2 b/roles/aap_ocp_install/templates/platform/instance.yaml.j2 index 0bcb6eb..35ad22d 100644 --- a/roles/aap_ocp_install/templates/platform/instance.yaml.j2 +++ b/roles/aap_ocp_install/templates/platform/instance.yaml.j2 @@ -38,14 +38,16 @@ spec: disabled: false ## Modify to contain your RWM storage class name storage_type: {{ aap_ocp_install_hub['storage_type'] | default('file') }} - {% if aap_ocp_install_hub['storage_type'] == 'file' %} - file_storage_storage_class: {{ aap_ocp_install_hub['storage_class'] }} - file_storage_size: {{ aap_ocp_install_hub['storage_size'] | default('10Gi') }} - {% elif aap_ocp_install_hub['storage_type'] == 'S3' %} - object_storage_s3_secret: {{ aap_ocp_install_hub['storage_s3_secret'] }} - {% elif aap_ocp_install_hub['storage_type'] == 'azure' %} - object_storage_azure_secret: {{ aap_ocp_install_hub['storage_azure_secret'] }} - {% endif %} +{% if aap_ocp_install_hub['storage_type'] is defined and aap_ocp_install_hub['storage_type'] == 'file' %} +{% if aap_ocp_install_hub['file_storage_storage_class'] is defined %} + file_storage_storage_class: {{ aap_ocp_install_hub['file_storage_storage_class'] | default('default') }} +{% endif %} + file_storage_size: {{ aap_ocp_install_hub['file_storage_size'] | default('10Gi') }} +{% elif aap_ocp_install_hub['storage_type'] is defined and aap_ocp_install_hub['storage_type'] == 'S3' %} + object_storage_s3_secret: {{ aap_ocp_install_hub['object_storage_s3_secret'] }} +{% elif aap_ocp_install_hub['storage_type'] is defined and aap_ocp_install_hub['storage_type'] == 'azure' %} + object_storage_azure_secret: {{ aap_ocp_install_hub['object_storage_azure_secret'] }} +{% endif %} {% else %} hub: disabled: true From e1b9439982e43712a1a2fa7b9d8575448046b0d1 Mon Sep 17 00:00:00 2001 From: Derek Waters Date: Thu, 21 Nov 2024 13:39:03 +1100 Subject: [PATCH 11/16] Update documentation for OCP Installation AAP 2.5+ --- roles/aap_ocp_install/README.md | 24 +++++++++++++++++++++++- roles/aap_ocp_install/defaults/main.yml | 8 +++++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/roles/aap_ocp_install/README.md b/roles/aap_ocp_install/README.md index 9edcaec..95fe9ce 100644 --- a/roles/aap_ocp_install/README.md +++ b/roles/aap_ocp_install/README.md @@ -20,6 +20,9 @@ A description of the settable variables for this role should go here, including | aap_ocp_install_operator | Yes* | None | YAML Manifest to override the generated operator `Namespace` resource | | aap_ocp_install_controller | Yes* | None | Dictionary containing keys defined in the `controller variables table` | | aap_ocp_install_hub | Yes* | None | Dictionary containing keys defined in the `hub variables table` | +| aap_ocp_install_eda | Yes* | None | Dictionary containing keys defined in the `eda variables table` | +| aap_ocp_install_platform | Yes* | None | Dictionary containing keys defined in the `platform variables table` | +| aap_ocp_install_lightspeed | No | None | Indicates whether to install the Lightspeed component in an AAP platform installation | \* Variable and required keys must be defined when the type of tag is specified (e.g. `--tags controller` requires the aap_ocp_install_controller variable be defined). If the variable is omitted the corresponding component will not be installed (e.g. if only aap_ocp_install_hub variable is defined then the operator and controller installation will be skipped) @@ -40,12 +43,14 @@ If the variable is omitted the corresponding component will not be installed (e. | Key Name | Required | Default Value | Description | |----------------------------------|:---------:|---------------|---------------------------------------------------------------------| -| channel | Yes | None | Channel to subscribe (e.g. stable-2.2 or stable-2.2-cluster-scoped) | +| channel | Yes | None | Channel to subscribe (e.g. stable-2.2 or stable-2.2-cluster-scoped)*| | approval | | Automatic | Update approval method. Valid values are Automatic or Manual. | | operatorgroup_create | | true | Create the `OperatorGroup` for the Operator | | operatorgroup_manifest_overrides | | | YAML Manifest to override the generated `OperatorGroup` resource | | subscription_manifest_overrides | | | YAML Manifest to override the generated `Subscription` resource | +\* If the channel indicates version 2.5 or above of AAP, then the new AAP operator platform installation method will be used. + > ℹ️ **NOTE** > > When `approval` is set to `Manual` the operator will be installed with `Automatic` approval and then after installation the approval will be updated to Manual. @@ -78,6 +83,13 @@ If the variable is omitted the corresponding component will not be installed (e. | link_text | | Automation Hub () | Text used for creating the OCP application link | | hub_manifest_overrides | | None | YAML Manifest to override the generated `AutomationHub` resource | | consolelink_manifest_overrides | | None | YAML Manifest to override the generated `ConsoleLink` resource | +| storage_type | | file | Hub storage type (file, S3 or azure)* | +| file_storage_storage_class | | None | OpenShift StorageClass to use for file storage type for hub* | +| file_storage_size | | 10Gi | Storage size for file storage type for hub* | +| object_storage_s3_secret | | None | Name of an OpenShift Secret used to access S3 storage for hub* | +| object_storage_azure_secret | | None | Name of an OpenShift Secret used to access Azure storage for hub* | + +\* These settings are only used for installing AAP 2.5 or later. ### aap_ocp_install_eda keys @@ -90,6 +102,16 @@ If the variable is omitted the corresponding component will not be installed (e. | eda_manifest_overrides | | None | YAML Manifest to override the generated `EDA` resource | | consolelink_manifest_overrides | | None | YAML Manifest to override the generated `ConsoleLink` resource | +### aap_ocp_install_platform keys + +| Key Name | Required | Default Value | Description | +|---------------|:--------:|----------------------------------|-------------------------------------------------| +| instance_name | Yes | None | Name of the AAP Platform instance to create | + +> ℹ️ **NOTE** +> +> These settings are only used when installing AAP 2.5 or later. instance_name and link_text values for individual components (hub, controller, eda) will be ignored when using the platform installation method. + ## Dependencies This role depends on the redhat.openshift and kubernetes.core collections. diff --git a/roles/aap_ocp_install/defaults/main.yml b/roles/aap_ocp_install/defaults/main.yml index 2f64e54..1ebec31 100644 --- a/roles/aap_ocp_install/defaults/main.yml +++ b/roles/aap_ocp_install/defaults/main.yml @@ -29,8 +29,10 @@ # instance_name: # link_text: # storage_type: -# storage_class: -# storage_size: +# file_storage_storage_class: +# file_storage_size: +# object_storage_s3_secret: +# object_storage_azure_secret: # Variable applicable to the EDA installation # aap_ocp_install_eda: @@ -40,6 +42,6 @@ # link_text: # Variables applicable to the Lightspeed installation -# aap_ocp_install_lightspeed +# aap_ocp_install_lightspeed: # ... From 09bc565790646c8a6d2134f3dd6c45241f8abbde Mon Sep 17 00:00:00 2001 From: Derek Waters Date: Thu, 21 Nov 2024 14:44:37 +1100 Subject: [PATCH 12/16] Corrected trailing whitespace and line feed errors --- roles/aap_ocp_install/defaults/main.yml | 2 +- roles/aap_ocp_install/tasks/install-controller.yml | 2 +- roles/aap_ocp_install/tasks/install-eda.yml | 2 +- roles/aap_ocp_install/tasks/install-hub.yml | 2 +- roles/aap_ocp_install/tasks/pre-validate-controller.yml | 2 +- roles/aap_ocp_install/tasks/pre-validate-hub.yml | 2 +- roles/aap_ocp_install/tasks/pre-validate-platform.yml | 3 --- roles/aap_ocp_install/tasks/pre-validate.yml | 2 +- roles/aap_ocp_install/templates/platform/instance.yaml.j2 | 2 +- 9 files changed, 8 insertions(+), 11 deletions(-) diff --git a/roles/aap_ocp_install/defaults/main.yml b/roles/aap_ocp_install/defaults/main.yml index 1ebec31..7d04fbb 100644 --- a/roles/aap_ocp_install/defaults/main.yml +++ b/roles/aap_ocp_install/defaults/main.yml @@ -43,5 +43,5 @@ # Variables applicable to the Lightspeed installation # aap_ocp_install_lightspeed: -# +# ... diff --git a/roles/aap_ocp_install/tasks/install-controller.yml b/roles/aap_ocp_install/tasks/install-controller.yml index b52ada5..6740dc9 100644 --- a/roles/aap_ocp_install/tasks/install-controller.yml +++ b/roles/aap_ocp_install/tasks/install-controller.yml @@ -60,4 +60,4 @@ state: present resource_definition: "{{ lookup('template', 'controller/consolelink.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_controller['consolelink_manifest_overrides'] | default({}), recursive=true) }}" apply: true -... \ No newline at end of file +... diff --git a/roles/aap_ocp_install/tasks/install-eda.yml b/roles/aap_ocp_install/tasks/install-eda.yml index a13ecff..89ecf5b 100644 --- a/roles/aap_ocp_install/tasks/install-eda.yml +++ b/roles/aap_ocp_install/tasks/install-eda.yml @@ -123,4 +123,4 @@ state: present resource_definition: "{{ lookup('template', 'eda/consolelink.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_eda['consolelink_manifest_overrides'] | default({}), recursive=true) }}" apply: true -... \ No newline at end of file +... diff --git a/roles/aap_ocp_install/tasks/install-hub.yml b/roles/aap_ocp_install/tasks/install-hub.yml index 531aa10..5d2ecf2 100644 --- a/roles/aap_ocp_install/tasks/install-hub.yml +++ b/roles/aap_ocp_install/tasks/install-hub.yml @@ -46,4 +46,4 @@ state: present resource_definition: "{{ lookup('template', 'hub/consolelink.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_hub['hub_manifest_overrides'] | default({}), recursive=true) }}" apply: true -... \ No newline at end of file +... diff --git a/roles/aap_ocp_install/tasks/pre-validate-controller.yml b/roles/aap_ocp_install/tasks/pre-validate-controller.yml index da9045e..85bd57c 100644 --- a/roles/aap_ocp_install/tasks/pre-validate-controller.yml +++ b/roles/aap_ocp_install/tasks/pre-validate-controller.yml @@ -141,4 +141,4 @@ __aap_ocp_install_prevalidate_errors: > {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['projects_storage_size'] must be a number greater than 0 with a size (e.g. 12Gi or 10000M)"] }} -... \ No newline at end of file +... diff --git a/roles/aap_ocp_install/tasks/pre-validate-hub.yml b/roles/aap_ocp_install/tasks/pre-validate-hub.yml index 39769d8..2d19679 100644 --- a/roles/aap_ocp_install/tasks/pre-validate-hub.yml +++ b/roles/aap_ocp_install/tasks/pre-validate-hub.yml @@ -11,4 +11,4 @@ ansible.builtin.set_fact: __aap_ocp_install_prevalidate_errors: > {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_hub['instance_name'] must be set"] }} -... \ No newline at end of file +... diff --git a/roles/aap_ocp_install/tasks/pre-validate-platform.yml b/roles/aap_ocp_install/tasks/pre-validate-platform.yml index a62e3bb..a8f0afa 100644 --- a/roles/aap_ocp_install/tasks/pre-validate-platform.yml +++ b/roles/aap_ocp_install/tasks/pre-validate-platform.yml @@ -139,9 +139,6 @@ __aap_ocp_install_prevalidate_errors: > {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_controller['projects_storage_size'] must be a number greater than 0 with a size (e.g. 12Gi or 10000M)"] }} - - - - name: Ensure hub storage type is valid (block) when: aap_ocp_install_hub is defined block: diff --git a/roles/aap_ocp_install/tasks/pre-validate.yml b/roles/aap_ocp_install/tasks/pre-validate.yml index 1abd09b..ccb183b 100644 --- a/roles/aap_ocp_install/tasks/pre-validate.yml +++ b/roles/aap_ocp_install/tasks/pre-validate.yml @@ -107,7 +107,7 @@ __aap_ocp_install_25_install: "{{ (__aap_ocp_install_major_version | int) > 2 \ or (( __aap_ocp_install_major_version | int) == 2 \ and ( __aap_ocp_install_minor_version | int) >= 5) }}" - + - name: Ensure platform variables are set ansible.builtin.include_tasks: file: pre-validate-platform.yml diff --git a/roles/aap_ocp_install/templates/platform/instance.yaml.j2 b/roles/aap_ocp_install/templates/platform/instance.yaml.j2 index 35ad22d..16f767b 100644 --- a/roles/aap_ocp_install/templates/platform/instance.yaml.j2 +++ b/roles/aap_ocp_install/templates/platform/instance.yaml.j2 @@ -44,7 +44,7 @@ spec: {% endif %} file_storage_size: {{ aap_ocp_install_hub['file_storage_size'] | default('10Gi') }} {% elif aap_ocp_install_hub['storage_type'] is defined and aap_ocp_install_hub['storage_type'] == 'S3' %} - object_storage_s3_secret: {{ aap_ocp_install_hub['object_storage_s3_secret'] }} + object_storage_s3_secret: {{ aap_ocp_install_hub['object_storage_s3_secret'] }} {% elif aap_ocp_install_hub['storage_type'] is defined and aap_ocp_install_hub['storage_type'] == 'azure' %} object_storage_azure_secret: {{ aap_ocp_install_hub['object_storage_azure_secret'] }} {% endif %} From 1051592c99b6d5972c04332a6556b0dd9ca4fa24 Mon Sep 17 00:00:00 2001 From: Derek Waters Date: Thu, 21 Nov 2024 14:50:01 +1100 Subject: [PATCH 13/16] Remove duplication in yml file --- roles/aap_ocp_install/tasks/install-eda.yml | 65 +-------------------- 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/roles/aap_ocp_install/tasks/install-eda.yml b/roles/aap_ocp_install/tasks/install-eda.yml index 89ecf5b..615ce8d 100644 --- a/roles/aap_ocp_install/tasks/install-eda.yml +++ b/roles/aap_ocp_install/tasks/install-eda.yml @@ -60,67 +60,4 @@ state: present resource_definition: "{{ lookup('template', 'eda/consolelink.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_eda['consolelink_manifest_overrides'] | default({}), recursive=true) }}" apply: true -... ---- -- name: Create EDA controller namespace - kubernetes.core.k8s: - host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" - api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - state: present - resource_definition: "{{ lookup('ansible.builtin.template', 'namespace.yaml.j2', template_vars=ns_vars) | from_yaml | ansible.builtin.combine(aap_ocp_install_eda['namespace_manifest_overrides'] | default({}), recursive=true) }}" - apply: true - vars: - ns_vars: - ns_name: "{{ aap_ocp_install_eda['namespace'] }}" - when: - - aap_ocp_install_eda['namespace'] is defined - -- name: Create EDA instance - kubernetes.core.k8s: - host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" - api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - state: present - resource_definition: "{{ lookup('template', 'eda/instance.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_eda['eda_manifest_overrides'] | default({}), recursive=true) }}" - apply: true - -- name: Wait for operator to create the EDA route - kubernetes.core.k8s_info: - host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" - api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - kind: Route - name: "{{ aap_ocp_install_eda['instance_name'] | mandatory }}" - api_version: route.openshift.io/v1 - namespace: "{{ aap_ocp_install_eda['namespace'] | default(aap_ocp_install_namespace) }}" - register: __aap_ocp_install_eda_route_result - until: __aap_ocp_install_eda_route_result['resources'] - retries: 60 # Wait for 15 minutes (60*15/60) - delay: 15 - -- name: Store EDA route - ansible.builtin.set_fact: - __aap_ocp_install_eda_route: "{{ __aap_ocp_install_eda_route_result['resources'][0]['status']['ingress'][0]['host'] }}" - -- name: Ensure EDA login is available - ansible.builtin.uri: - url: https://{{ __aap_ocp_install_eda_route }} - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - method: GET - status_code: - - 200 - register: __aap_ocp_install_eda_available - until: __aap_ocp_install_eda_available['status'] == 200 - retries: 120 # Wait for 30 minutes (120*15/60) - delay: 15 - -- name: Create EDA console link - kubernetes.core.k8s: - host: "{{ __aap_ocp_install_auth_results['openshift_auth']['host'] }}" - api_key: "{{ __aap_ocp_install_auth_results['openshift_auth']['api_key'] }}" - validate_certs: "{{ aap_ocp_install_connection['validate_certs'] | default(omit) }}" - state: present - resource_definition: "{{ lookup('template', 'eda/consolelink.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_eda['consolelink_manifest_overrides'] | default({}), recursive=true) }}" - apply: true -... +... \ No newline at end of file From de251f963350c0760d1438d99e943f514bbc17c2 Mon Sep 17 00:00:00 2001 From: derek Date: Fri, 22 Nov 2024 06:46:42 +1100 Subject: [PATCH 14/16] Pre-commit fixes (EOF and github-actions-bot changes) --- galaxy.yml | 2 +- roles/aap_ocp_install/tasks/install-eda.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/galaxy.yml b/galaxy.yml index f10dc8e..459bbec 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: infra name: aap_utilities -version: 2.5.2-devel +version: 1.0.0 description: A collection of utility roles for usage with Ansible Automation Platform readme: README.md authors: diff --git a/roles/aap_ocp_install/tasks/install-eda.yml b/roles/aap_ocp_install/tasks/install-eda.yml index 615ce8d..ed39150 100644 --- a/roles/aap_ocp_install/tasks/install-eda.yml +++ b/roles/aap_ocp_install/tasks/install-eda.yml @@ -60,4 +60,4 @@ state: present resource_definition: "{{ lookup('template', 'eda/consolelink.yaml.j2') | from_yaml | ansible.builtin.combine(aap_ocp_install_eda['consolelink_manifest_overrides'] | default({}), recursive=true) }}" apply: true -... \ No newline at end of file +... From c6b4e08e39bebd381ec63025f163a3387ff6ec06 Mon Sep 17 00:00:00 2001 From: derek Date: Fri, 22 Nov 2024 06:48:48 +1100 Subject: [PATCH 15/16] Fix Jinja templating errors --- roles/aap_ocp_install/tasks/pre-validate-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/aap_ocp_install/tasks/pre-validate-platform.yml b/roles/aap_ocp_install/tasks/pre-validate-platform.yml index a8f0afa..b98fce5 100644 --- a/roles/aap_ocp_install/tasks/pre-validate-platform.yml +++ b/roles/aap_ocp_install/tasks/pre-validate-platform.yml @@ -180,7 +180,7 @@ - name: Update validation errors fact - S3 secret ansible.builtin.set_fact: __aap_ocp_install_prevalidate_errors: > - {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_hub['object_storage_s3_secret'] must be the name of a valid S3 storage secret name" }} + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_hub['object_storage_s3_secret'] must be the name of a valid S3 storage secret name"] }} - name: Ensure hub Azure storage settings are valid (block) when: aap_ocp_install_hub['storage_type'] is defined and aap_ocp_install_hub['storage_type'] == 'azure' @@ -194,5 +194,5 @@ - name: Update validation errors fact - Azure secret ansible.builtin.set_fact: __aap_ocp_install_prevalidate_errors: > - {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_hub['object_storage_azure_secret'] must be the name of a valid Azure storage secret name" }} + {{ __aap_ocp_install_prevalidate_errors + ["aap_ocp_install_hub['object_storage_azure_secret'] must be the name of a valid Azure storage secret name"] }} ... From 61d0efb690304e77f3f6c4922d9fe999276dc1b0 Mon Sep 17 00:00:00 2001 From: derek Date: Fri, 22 Nov 2024 08:36:26 +1100 Subject: [PATCH 16/16] Revert galaxy version definition --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 459bbec..f10dc8e 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: infra name: aap_utilities -version: 1.0.0 +version: 2.5.2-devel description: A collection of utility roles for usage with Ansible Automation Platform readme: README.md authors: