Skip to content

Commit

Permalink
Updated automation (#58)
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Vazquez <[email protected]>
  • Loading branch information
mvazquezc authored Aug 24, 2023
1 parent 468a47a commit 87f16e4
Show file tree
Hide file tree
Showing 22 changed files with 271 additions and 58 deletions.
34 changes: 33 additions & 1 deletion lab-materials/hub-config/operators-config/00_rhacm_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,36 @@ metadata:
name: multiclusterhub
namespace: open-cluster-management
spec:
availabilityConfig: "Basic"
availabilityConfig: Basic
enableClusterBackup: false
ingress:
sslCiphers:
- ECDHE-ECDSA-AES256-GCM-SHA384
- ECDHE-RSA-AES256-GCM-SHA384
- ECDHE-ECDSA-AES128-GCM-SHA256
- ECDHE-RSA-AES128-GCM-SHA256
overrides:
components:
- enabled: true
name: console
- enabled: true
name: insights
- enabled: true
name: grc
- enabled: true
name: cluster-lifecycle
- enabled: true
name: volsync
- enabled: true
name: multicluster-engine
- enabled: true
name: search
- enabled: true
name: app-lifecycle
- enabled: false
name: cluster-backup
- enabled: true
name: cluster-proxy-addon
- enabled: true
name: managedserviceaccount-preview
separateCertificateManagement: false
43 changes: 1 addition & 42 deletions lab-materials/hub-config/operators-config/04_aap_config.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,11 @@
---
apiVersion: automationhub.ansible.com/v1beta1
kind: AutomationHub
metadata:
name: automation-hub
namespace: aap
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
spec:
route_tls_termination_mechanism: Edge
ingress_type: Route
loadbalancer_port: 80
file_storage_size: 10Gi
image_pull_policy: IfNotPresent
web:
replicas: 1
file_storage_access_mode: ReadWriteOnce
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
storage_type: File
worker:
replicas: 2
---
apiVersion: automationcontroller.ansible.com/v1beta1
kind: AutomationController
metadata:
name: automation
namespace: aap
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
argocd.argoproj.io/sync-wave: "0"
spec:
create_preload_data: true
route_tls_termination_mechanism: Edge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ kind: Namespace
metadata:
annotations:
argocd.argoproj.io/sync-wave: "0"
workload.openshift.io/allowed: management
name: open-cluster-management
labels:
openshift.io/cluster-monitoring: "true"
annotations:
workload.openshift.io/allowed: management
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ kind: Namespace
metadata:
annotations:
argocd.argoproj.io/sync-wave: "0"
name: multicluster-engine
workload.openshift.io/allowed: management
labels:
openshift.io/cluster-monitoring: "true"
annotations:
workload.openshift.io/allowed: management
name: multicluster-engine
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,30 @@
apiVersion: v1
kind: Namespace
metadata:
annotations:
argocd.argoproj.io/sync-wave: "0"
workload.openshift.io/allowed: management
labels:
openshift.io/cluster-monitoring: "true"
name: aap
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: aap-gp
annotations:
argocd.argoproj.io/sync-wave: "0"
name: ansible-automation-platform-operator-operatorgroup
namespace: aap
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: aap-sub
annotations:
argocd.argoproj.io/sync-wave: "0"
name: ansible-automation-platform-operator
namespace: aap
spec:
channel: stable-2.4-cluster-scoped
installPlanApproval: Automatic
name: ansible-automation-platform-operator
source: redhat-operator-index
sourceNamespace: openshift-marketplace
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
controller_credentials:
- name: "Gitea Credentials"
description: ""
credential_type: "Source Control"
organization: "Lab"
inputs:
password: "{{ gitea_pwd }}"
username: "{{ gitea_user }}"

...
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
controller_credentials:
- name: "HUB Cluster Kubeconfig"
description: ""
credential_type: "Kubeconfig"
organization: "Lab"
inputs:
kube_config: "{{ hub_kubeconfig_file_content }}"

...
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
controller_credentials:
- name: "Lab Disconnected Registry"
description: ""
credential_type: "Container Registry"
organization: "Lab"
inputs:
host: "{{ disconnected_registry_host }}"
password: "{{ disconnected_registry_pwd }}"
username: "{{ disconnected_registry_user }}"
verify_ssl: false

...
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
controller_organizations:
- name: "Lab"
description: "Organization for the 5G RAN Lab"
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
controller_inventories:
- name: "Lab Inventory"
description: ""
organization: "Lab"
variables:
ansible_python_interpreter: /usr/bin/python3.9
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
controller_inventory_sources:
- name: "ACM Lab Inventory Source"
description: ""
organization: "Lab"
source: "scm"
source_project: "5G RAN Lab Project"
source_path: "{{ inventory_source_path }}"
inventory: "Lab Inventory"
update_on_launch: "False"
overwrite: "True"
credential: "HUB Cluster Kubeconfig"
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
controller_inventories:
- name: "ZTP Done Clusters"
description: ""
organization: "Lab"
kind: "constructed"
variables:
ansible_python_interpreter: /usr/bin/python3.9
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
controller_groups:
- name: "all-managed-clusters"
description: "imported"
inventory: "ZTP Done Clusters"
variables:
{}
hosts:
- sno1
- sno2
- name: "all-ztp-done-clusters"
description: "imported"
inventory: "ZTP Done Clusters"
variables:
{}
hosts:
- sno1
- sno2
- name: "amazon"
description: "imported"
inventory: "ZTP Done Clusters"
variables:
{}
hosts:
[]
- name: "azure"
description: "imported"
inventory: "ZTP Done Clusters"
variables:
{}
hosts:
[]
- name: "baremetal"
description: "imported"
inventory: "ZTP Done Clusters"
variables:
{}
hosts:
[]
- name: "hub"
description: "imported"
inventory: "ZTP Done Clusters"
variables:
{}
hosts:
[]
- name: "kind-clusters"
description: "imported"
inventory: "ZTP Done Clusters"
variables:
{}
hosts:
[]
- name: "vmware"
description: "imported"
inventory: "ZTP Done Clusters"
variables:
{}
hosts:
[]
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
controller_hosts:
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
controller_templates:
- name: "ZTP Done Automation"
description: ""
organization: "Lab"
project: "5G RAN Lab Project"
inventory: "ZTP Done Clusters"
playbook: "{{ playbook_source_path }}"
job_type: "run"
fact_caching_enabled: "False"
credentials:
- "HUB Cluster Kubeconfig"
concurrent_jobs_enabled: "False"
ask_scm_branch_on_launch: "False"
ask_tags_on_launch: "False"
ask_verbosity_on_launch: "False"
ask_variables_on_launch: "False"
extra_vars:
namespace_to_add: ztp-day2-automation-with-aap
state: present
execution_environment: "5G RAN Lab"
survey_enabled: False
survey_spec: {}
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
controller_projects:
- name: "5G RAN Lab Project"
description: ""
organization: "Lab"
scm_type: "git"
scm_url: "{{ aap_repository_url }}"
scm_credential: "Gitea Credentials"
scm_branch: ""
scm_clean: "True"
scm_delete_on_update: "True"
scm_update_on_launch: "False"
scm_update_cache_timeout: "0"
allow_override: "False"
timeout: 0
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
controller_user_accounts:
- username: "student"
password: "{{ student_aap_pwd }}"
email: ""
first_name: "Student"
last_name: ""
auditor: "False"
superuser: "False"
update_secrets: False
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
controller_credential_types:
- name: "Kubeconfig"
description: ""
kind: "cloud"
inputs:
fields:
- id: kube_config
label: kubeconfig
multiline: true
secret: true
type: string
required:
- kube_config

injectors:
env:
K8S_AUTH_KUBECONFIG: !unsafe '{{ tower.filename.kubeconfig }}'
file:
template.kubeconfig: !unsafe '{{ kube_config }}'
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
controller_execution_environments:
- name: "5G RAN Lab"
description: ""
image: "{{ execution_environment_img }}"
pull: "missing"
credential: "Lab Disconnected Registry"
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
controller_roles:
- user: "student"
organizations:
- "Lab"
role: "admin"
- user: "student"
organizations:
- "Lab"
role: "member"
...
Loading

0 comments on commit 87f16e4

Please sign in to comment.