Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform engineering workshop #9006

Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
05af191
workload platform engineering workshop
btison Nov 8, 2024
e227373
no defined users
btison Nov 8, 2024
e8f8cf0
fix: increase retry count for argo applications to prevent install fa…
evanshortiss Nov 12, 2024
773c833
Merge branch 'redhat-cop:development' into platform-engineering-workshop
jayachristina Nov 14, 2024
90c22ef
Merge branch 'redhat-cop:development' into platform-engineering-workshop
jayachristina Nov 15, 2024
ce58fd2
Merge branch 'redhat-cop:development' into platform-engineering-workshop
jayachristina Nov 18, 2024
20c95e8
Merge branch 'redhat-cop:development' into platform-engineering-workshop
jayachristina Nov 20, 2024
6a991ae
switching to OIDC
jayachristina Nov 20, 2024
4cf733f
fetching openshift_gitops_password for showroom.yaml
jayachristina Nov 20, 2024
07cdf2c
remove openshift_gitops_password for showroom.yaml
jayachristina Nov 20, 2024
b41876e
turning noobaa ON
jayachristina Nov 21, 2024
da04b22
pause between Argo App creation
jayachristina Nov 22, 2024
e673aa0
Merge branch 'redhat-cop:development' into platform-engineering-workshop
jayachristina Nov 23, 2024
8906d4b
Kind:ArgoCD to v1beta1
jayachristina Nov 23, 2024
7bafb25
Merge pull request #2 from redhat-pe-workshop/pe-workshop-argocd-v1beta1
jayachristina Nov 25, 2024
c832cd4
Merge branch 'redhat-cop:development' into platform-engineering-workshop
jayachristina Nov 25, 2024
c7e5460
Merge branch 'redhat-cop:development' into platform-engineering-workshop
jayachristina Dec 3, 2024
4895d80
wait for openshift-gitops-cluster to be available
jayachristina Dec 4, 2024
737c6cf
Merge branch 'redhat-cop:development' into platform-engineering-workshop
jayachristina Dec 11, 2024
04fc76b
typos corrections
jayachristina Dec 11, 2024
67d9cf3
Merge branch 'redhat-cop:development' into platform-engineering-workshop
jayachristina Dec 11, 2024
b576b93
remove extra lines
jayachristina Dec 11, 2024
c13cd1a
trailing spaces
jayachristina Dec 11, 2024
2814fde
Trailing space
jayachristina Dec 11, 2024
6d937a9
Lint fix
jayachristina Dec 11, 2024
f670d2a
Merge branch 'redhat-cop:development' into platform-engineering-workshop
jayachristina Jan 15, 2025
942f3c0
removed pauses and added retries to points with most failures
jayachristina Jan 16, 2025
ea35fe3
chore: test retries on gitops patch
evanshortiss Jan 16, 2025
08f08ef
retries for all kubernetes.core.k8s call + debug result
jayachristina Jan 17, 2025
6dd1959
fix: add retries to other kube api calls
evanshortiss Jan 17, 2025
6e3920c
retries for PE Workshop
jayachristina Jan 21, 2025
08e9a30
yamllint openshift_gitops.yml
jayachristina Jan 21, 2025
b050301
yamllint config to avoid false key-duplicates
jayachristina Jan 21, 2025
0625325
fix for lint
jayachristina Jan 21, 2025
c2e2c10
yamllint - basit PE workshop's from static folder
jayachristina Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
extends: default

rules:
key-duplicates: disable
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'external-secrets/external-secrets-application.yml.j2') | from_yaml }}"
retries: 10
delay: 30
ignore_errors: true
register: secrets_result
until: secrets_result is not failed

- name: Print secrets_result from the previous task
ansible.builtin.debug:
var: secrets_result
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'gitlab/gitlab-application.yml.j2') | from_yaml }}"
retries: 10
delay: 30
ignore_errors: true
register: gitlab_result
until: gitlab_result is not failed

- name: Print gitlab_result from the previous task
ansible.builtin.debug:
var: gitlab_result
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
_backstage_redirect_url: "https://backstage-{{ ocp4_workload_platform_engineering_workshop_rhdh_namespace }}.{{ r_openshift_subdomain }}/api/auth/oidc/handler/frame" # yamllint disable-line rule:line-length
_backstage_web_origin: "https://backstage-{{ ocp4_workload_platform_engineering_workshop_rhdh_namespace }}.{{ r_openshift_subdomain }}" # yamllint disable-line rule:line-length

- name: Pause for 5 minutes to finish setting up
ansible.builtin.pause:
minutes: 5

- name: Create RHBK application
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'keycloak/keycloak-application.yaml.j2') | from_yaml }}"
retries: 10
delay: 30
ignore_errors: true
register: rhbh_result
until: rhbh_result is not failed

- name: Pause for 5 minutes to finish setting up
ansible.builtin.pause:
minutes: 5
- name: Print rhbh_result from the previous task
ansible.builtin.debug:
var: rhbh_result
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'noobaa/noobaa-application.yaml.j2') | from_yaml }}"
retries: 10
delay: 30
ignore_errors: true
register: noobaa_result
until: noobaa_result is not failed

- name: Print noobaa_result from the previous task
ansible.builtin.debug:
var: noobaa_result
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
kubernetes.core.k8s:
state: present
definition: "{{ lookup('file', 'openshift_gitops_clusterrolebinding.yaml') | from_yaml }}"
retries: 10
delay: 30
ignore_errors: true
register: git_sa_result
until: git_sa_result is not failed

- name: Print git_sa_result from the previous task
ansible.builtin.debug:
var: git_sa_result

- name: Wait until openshift-gitops ArgoCD instance has been created
kubernetes.core.k8s_info:
Expand All @@ -42,12 +51,28 @@
- r_openshift_gitops is defined
- r_openshift_gitops.resources is defined
- r_openshift_gitops.resources | length == 1
ignore_errors: true
retries: 10
delay: 30

- name: Print r_openshift_gitops from the previous task
ansible.builtin.debug:
var: r_openshift_gitops

- name: Update resources for openshift-gitops ArgoCD instance
when: ocp4_workload_platform_engineering_workshop_openshift_gitops_update_resources | bool
kubernetes.core.k8s:
state: patched
definition: "{{ lookup('template', 'openshift-gitops/openshift-gitops.yaml.j2') | from_yaml }}"
register: openshift_gitops_result
retries: 10
delay: 30
ignore_errors: true
until: openshift_gitops_result is not failed

- name: Print result openshift_gitops_result from the previous task
ansible.builtin.debug:
var: openshift_gitops_result

- name: Remove memory limit for ArgoCD controller
when: ocp4_workload_platform_engineering_workshop_openshift_gitops_controller_remove_memory_limits | bool
Expand All @@ -59,6 +84,11 @@
patch:
- op: remove
path: /spec/controller/resources/limits/memory
retries: 10
delay: 30
ignore_errors: true
register: openshift_gitops_rm_mem_result
until: openshift_gitops_rm_mem_result is not failed


- name: Retrieve openshift-gitops-cluster secret
Expand All @@ -72,6 +102,8 @@
- r_secret is defined
- r_openshift_gitops.resources is defined
- r_openshift_gitops.resources | length == 1
retries: 10
delay: 30

- name: Get openshift_gitops_admin_password
ansible.builtin.set_fact:
Expand All @@ -81,4 +113,4 @@
agnosticd_user_info:
data:
openshift_gitops_user: "admin"
openshift_gitops_password: "{{ openshift_gitops_admin_password }}"
openshift_gitops_password: "{{ openshift_gitops_admin_password }}"
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@
- name: Create OpenShift Pipeliness application
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'openshift-pipelines/openshift-pipelines-application.yaml.j2') | from_yaml }}"
definition: "{{ lookup('template', 'openshift-pipelines/openshift-pipelines-application.yaml.j2') | from_yaml }}"
retries: 10
delay: 30
ignore_errors: true
register: pipelines_result
until: pipelines_result is not failed

- name: Print pipelines_result from the previous task
ansible.builtin.debug:
var: pipelines_result
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'parasol/parasol-application.yml.j2') | from_yaml }}"
retries: 10
delay: 30
ignore_errors: true
register: parasol_app_result
until: parasol_app_result is not failed

- name: Print parasol_app_result from the previous task
ansible.builtin.debug:
var: parasol_app_result
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'quay/quay-application.yaml.j2') | from_yaml }}"
retries: 10
delay: 60
ignore_errors: true
register: quay_result
until: quay_result is not failed

- name: Print quay_result from the previous task
ansible.builtin.debug:
var: quay_result
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
register: r_root_token
retries: 120
delay: 10
ignore_errors: true
until:
- r_root_token is defined
- r_root_token.resources is defined
Expand All @@ -26,6 +27,15 @@
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'developer-hub/secret-default-sa-token.yaml.j2') | from_yaml }}"
retries: 10
delay: 30
ignore_errors: true
register: def_token_result
until: def_token_result is not failed

- name: Print def_token_result from the previous task
ansible.builtin.debug:
var: def_token_result

- name: Get default token
kubernetes.core.k8s_info:
Expand All @@ -36,6 +46,7 @@
register: r_default_token
retries: 120
delay: 10
ignore_errors: true
until:
- r_default_token is defined
- r_default_token.resources is defined
Expand All @@ -53,3 +64,12 @@
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'developer-hub/developer-hub-application.yaml.j2') }}"
retries: 10
delay: 30
ignore_errors: true
register: rhdh_app_result
until: rhdh_app_result is not failed

- name: Print rhdh_app_result from the previous task
ansible.builtin.debug:
var: rhdh_app_result
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'rhdh-gitops/rhdh-gitops-application.yaml.j2') | from_yaml }}"
retries: 10
delay: 30
ignore_errors: true
register: rhdh_gitops_result
until: rhdh_gitops_result is not failed

- name: Print rhdh_gitops_result from the previous task
ansible.builtin.debug:
var: rhdh_gitops_result
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'vault/vault-application.yml.j2') | from_yaml }}"
retries: 10
delay: 30
ignore_errors: true
register: vault_result
until: vault_result is not failed

- name: Print vault_result from the previous task
ansible.builtin.debug:
var: vault_result
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,9 @@
- name: Install OpenShift Gitops
ansible.builtin.include_tasks: openshift_gitops.yml

- name: Pause for 3 minutes to finish setting up
ansible.builtin.pause:
minutes: 3

- name: Install OpenShift Pipelines
ansible.builtin.include_tasks: openshift_pipelines.yml

- name: Pause for 3 minutes to finish setting up
ansible.builtin.pause:
minutes: 3

- name: Install NooBaa
ansible.builtin.include_tasks: noobaa.yml

Expand All @@ -23,51 +15,23 @@
- name: Install External Secrets
ansible.builtin.include_tasks: external_secrets.yml

- name: Pause for 3 minutes to finish setting up
ansible.builtin.pause:
minutes: 3

- name: Install Gitlab
ansible.builtin.include_tasks: gitlab.yml

- name: Pause for 3 minutes to finish setting up
ansible.builtin.pause:
minutes: 3

- name: Install RHBK
ansible.builtin.include_tasks: keycloak.yml

- name: Pause for 3 minutes to finish setting up
ansible.builtin.pause:
minutes: 3

- name: Install Quay
ansible.builtin.include_tasks: quay.yml

- name: Pause for 3 minutes to finish setting up
ansible.builtin.pause:
minutes: 3

- name: Install RHDH GitOps
ansible.builtin.include_tasks: rhdh_gitops.yml

- name: Pause for 3 minutes to finish setting up
ansible.builtin.pause:
minutes: 3

- name: Install Red Hat Developer Hub
ansible.builtin.include_tasks: redhat_developer_hub.yml

- name: Pause for 3 minutes to finish setting up
ansible.builtin.pause:
minutes: 3

- name: Install Parasol
ansible.builtin.include_tasks: parasol.yml

- name: Pause for 3 minutes to finish setting up
ansible.builtin.pause:
minutes: 3

- name: Install Showroom
ansible.builtin.include_tasks: showroom.yml
Loading