Skip to content

Commit

Permalink
Add install AAP during post install
Browse files Browse the repository at this point in the history
  • Loading branch information
akrzos committed Oct 17, 2023
1 parent af7a175 commit afd5d99
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ansible/roles/bm-post-cluster-install/defaults/main/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ registry_port: 5000
# Deploy performance-dashboards
setup_performance_dashboards: false

# Deploy ansible-automation-platform operator
setup_ansible_automation_platform: false
aap_channel: stable-2.4-cluster-scoped

# Deploy openshift-gitops-operator
setup_openshift_gitops: false
gitops_channel: stable
Expand Down
8 changes: 8 additions & 0 deletions ansible/roles/bm-post-cluster-install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
state: directory
with_items:
- "{{ bastion_cluster_config_dir }}"
- "{{ bastion_cluster_config_dir }}/aap"
- "{{ bastion_cluster_config_dir }}/gitops"
- "{{ bastion_cluster_config_dir }}/localstorage"
- "{{ bastion_cluster_config_dir }}/minio"
Expand Down Expand Up @@ -46,6 +47,8 @@
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- src: ansible-automation-platform-operator.yml.j2
dest: "{{ bastion_cluster_config_dir }}/aap/ansible-automation-platform-operator.yml"
- src: openshift-gitops-operator.yml.j2
dest: "{{ bastion_cluster_config_dir }}/gitops/openshift-gitops-operator.yml"
- src: localstorage.yml.j2
Expand Down Expand Up @@ -127,6 +130,11 @@
shell: |
KUBECONFIG={{ bastion_cluster_config_dir }}/kubeconfig oc patch provisionings provisioning-configuration -p '{"spec":{"provisioningOSDownloadURL":"http://{{ http_store_host }}:{{ http_store_port }}/{{ metal3_download_url | basename }}" }}' --type=merge
- name: Install Ansible-Automation-Platform-operator
shell: |
KUBECONFIG={{ bastion_cluster_config_dir }}/kubeconfig oc apply -f {{ bastion_cluster_config_dir }}/aap/ansible-automation-platform-operator.yml
when: setup_ansible_automation_platform

- name: Install OpenShift-gitops-operator
shell: |
KUBECONFIG={{ bastion_cluster_config_dir }}/kubeconfig oc apply -f {{ bastion_cluster_config_dir }}/gitops/openshift-gitops-operator.yml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
apiVersion: v1
kind: Namespace
metadata:
labels:
openshift.io/cluster-monitoring: "true"
name: ansible-automation-platform
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: ansible-automation-platform-operator-group
namespace: ansible-automation-platform
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: ansible-automation-platform-operator
namespace: ansible-automation-platform
spec:
installPlanApproval: Automatic
name: ansible-automation-platform-operator
channel: {{ aap_channel }}
{% if use_bastion_registry | default(false) %}
source: {{ operator_index_name }}
{% else %}
source: redhat-operators
{% endif %}
sourceNamespace: openshift-marketplace
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ imageContentSources:
- mirrors:
- {{ registry_host }}:{{ registry_port }}/edge-infrastructure
source: quay.io/edge-infrastructure
- mirrors:
- {{ registry_host }}:{{ registry_port }}/ansible-automation-platform
source: registry.redhat.io/ansible-automation-platform
- mirrors:
- {{ registry_host }}:{{ registry_port }}/ansible-automation-platform-24
source: registry.redhat.io/ansible-automation-platform-24
additionalTrustBundle: |
{{ mirror_cert.content | b64decode | indent(width=2) }}
{% endif %}

0 comments on commit afd5d99

Please sign in to comment.