From db20772d7c1ebbb319b976e57b451e702927b311 Mon Sep 17 00:00:00 2001 From: Martin Jackson Date: Tue, 17 Nov 2026 13:51:07 -0600 Subject: [PATCH] Remove some dead code from AEG docs --- .../ansible-automation-platform.adoc | 19 ++---- .../installation-details.adoc | 65 +------------------ 2 files changed, 7 insertions(+), 77 deletions(-) diff --git a/content/patterns/ansible-edge-gitops/ansible-automation-platform.adoc b/content/patterns/ansible-edge-gitops/ansible-automation-platform.adoc index 80813c496d..f97bed3828 100644 --- a/content/patterns/ansible-edge-gitops/ansible-automation-platform.adoc +++ b/content/patterns/ansible-edge-gitops/ansible-automation-platform.adoc @@ -89,21 +89,14 @@ ok: [localhost] => { } PLAY RECAP ******************************************************************************* -localhost : ok=7 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 +localhost : ok=7 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ---- == Pattern AAP Configuration Details -This section describes the AAP configuration during the pattern installation. All of the configuration discussed in this section is applied by the -https://github.com/validatedpatterns/ansible-edge-gitops/blob/main/scripts/ansible_load_controller.sh[ansible_load_controller.sh] -script. +This section describes the AAP configuration during the pattern installation. All of the configuration discussed in this section is applied by the https://charts.validatedpatterns.io/charts/aap-config[aap-config] chart. This chart embeds +https://validatedpatterns.io/patterns/ansible-gitops-framework/[AGOF] v3 to apply an AAP Config-as-Code (CaC) configuration to the AAP instance in the cluster. -The `ansible_load_controller.sh` script automates the configuration of the Ansible Automation Platform (AAP) by executing a series of Ansible playbooks. These playbooks perform tasks such as retrieving credentials, parsing secrets, and configuring the AAP instance. - -Key components of the configuration process: - -* Retrieving AAP Credentials: The script runs the `ansible_get_credentials.yml` playbook to obtain necessary credentials for accessing and managing the AAP instance. - -* Parsing Secrets: It then executes the `parse_secrets_from_values_secret.yml` playbook to extract and process sensitive information stored in the `values_secret.yaml` file, which includes passwords, tokens, or other confidential data required for configuration. - -* Configuring the AAP Instance: Finally, the script runs the `ansible_configure_controller.yml` playbook to set up and configure the AAP controller based on the retrieved credentials and parsed secrets. +The chart automates the configuration of the Ansible Automation Platform (AAP) by executing a series of Ansible playbooks. These playbooks perform tasks such as retrieving credentials, parsing secrets, and configuring the AAP instance. The +chart also runs a Kubernetes CronJob to re-apply the config-as-code repository periodically, so if the repository is +updated the config in AAP will be updated. diff --git a/content/patterns/ansible-edge-gitops/installation-details.adoc b/content/patterns/ansible-edge-gitops/installation-details.adoc index 6843adcdec..0f165e3641 100644 --- a/content/patterns/ansible-edge-gitops/installation-details.adoc +++ b/content/patterns/ansible-edge-gitops/installation-details.adoc @@ -19,69 +19,6 @@ The `operator-deploy` task installs the Validated Patterns Operator, which in tu The `install` and `upgrade` targets are interchangeable and handle both initial installation and updates. These targets ensure that the necessary components, including OpenShift GitOps and the `clustergroup` application, are deployed and updated as needed. -==== Imperative section - -Part of the operator-deploy process is creating and running the https://github.com/validatedpatterns/ansible-edge-gitops/blob/main/values-hub.yaml[imperative] file as defined in the hub values file. This pattern includes running the playbook to deploy the metal worker. - -The playbook code is https://github.com/validatedpatterns/ansible-edge-gitops/blob/main/ansible/deploy_kubevirt_worker.yml[here]. - -This Ansible Playbook deploys a node to run the Virtual Machines for the demo. The playbook uses the OpenShift machineset API to provision the node in the first availability zone it finds. Currently, AWS is the only major public cloud provider that offers the deployment of a metal node through the normal provisioning process. We hope that Azure and GCP will support this functionality soon. - -[NOTE] -==== -Metal nodes are more expensive than standard AWS instances. However, running the demo without hardware acceleration can take about ~4x as long. It usually takes 20-30 minutes for the metal node to become available to run VMs. -==== - -Assuming your `kubeconfig` is currently set up to point to your cluster, list all MachineSets across all namespaces in an OpenShift cluster, using the following command: -[source,shell] ----- -$ oc get -A machineset ----- - -You are looking for a machineset with `metal-worker` in its name: - -[source,text] ----- -NAMESPACE NAME DESIRED CURRENT READY AVAILABLE AGE -openshift-machine-api mhjacks-aeg-qx25w-metal-worker-us-west-2a 1 1 1 1 19m -openshift-machine-api mhjacks-aeg-qx25w-worker-us-west-2a 1 1 1 1 47m -openshift-machine-api mhjacks-aeg-qx25w-worker-us-west-2b 1 1 1 1 47m -openshift-machine-api mhjacks-aeg-qx25w-worker-us-west-2c 1 1 1 1 47m -openshift-machine-api mhjacks-aeg-qx25w-worker-us-west-2d 0 0 47m ----- - -When the `metal-worker` is showing `READY` and `AVAILABLE`, the virtual machines will begin provisioning on it. - -The metal node is destroyed when the cluster is destroyed. The script is idempotent and creates at most one metal node per cluster. - -=== https://github.com/validatedpatterns/common/blob/main/Makefile[post-install] - -All the steps of `post-install` are idempotent. If you want or need to reconfigure vault or AAP, the recommended way to do so is to call `make post-install`. This might change as we move elements of this pattern into the new imperative framework in `common`. - -Specific processes that are called by `post-install` include: - -==== https://github.com/validatedpatterns/common/blob/main/scripts/vault-utils.sh[vault-init] - -The `vault-init` task streamlines the initialization and unsealing of Vault, ensuring that the necessary keys and configurations are in place. Its design allows for safe execution even against an already active Vault cluster, providing both efficiency and security in managing secrets. - -==== https://github.com/validatedpatterns/common/blob/main/scripts/load-k8s-secrets.sh[load-secrets] - -This process employs an Ansible playbook to read the `values-secret.yaml` file and securely store its data as key-value pairs in HashiCorp Vault. The External Secrets Operator (ESO) then retrieves these secrets from Vault and injects them into the Kubernetes cluster as native Kubernetes Secrets, making them accessible to applications running within the cluster. - -In this specific implementation, the pattern utilizes the SSH public key for the kiosk virtual machines (VMs) using the ESO, ensuring that sensitive information, such as SSH keys, is securely managed and available to the VMs as needed. - -Re-running the script will update the secrets in Vault if there have been changes. If the secret values remain unchanged, re-execution is safe and will not adversely affect the existing configurations. - -==== https://github.com/validatedpatterns/ansible-edge-gitops/blob/main/scripts/ansible_load_controller.sh[configure-controller] - -Key components of the configuration process: - -* *Retrieving AAP Credentials*: The script runs the `ansible_get_credentials.yml` playbook to obtain necessary credentials for accessing and managing the AAP instance. - -* *Parsing Secrets*: It then executes the `parse_secrets_from_values_secret.yml` playbook to extract and process sensitive information stored in the `values_secret.yaml` file, which includes passwords, tokens, or other confidential data required for configuration. - -* *Configuring the AAP Instance*: Finally, the script runs the `ansible_configure_controller.yml` playbook to set up and configure the AAP controller based on the retrieved credentials and parsed secrets. - == OpenShift GitOps (ArgoCD) OpenShift GitOps is central to this pattern as it is responsible for insalling all of the other components. The installation process is driven through the installation of the @@ -105,4 +42,4 @@ It is very much the intention of this pattern to make it easy to replace the spe Specifics of the Ansible content for this pattern can be seen https://github.com/validatedpatterns/ansible-edge-gitops/tree/main/ansible[here]. -More details of the specifics of how AAP is configured are available link:/ansible-edge-gitops/ansible-automation-platform/[here]. \ No newline at end of file +More details of the specifics of how AAP is configured are available link:/ansible-edge-gitops/ansible-automation-platform/[here].