You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this section, we describe the details of the AAP configuration we apply as part of installing the pattern. All of the configuration
95
-
discussed in this section is applied by the
97
+
In this section, we describe the details of the AAP configuration we apply as part of installing the pattern. All of the configuration discussed in this section is applied by the
A standard dynamic inventory script is available https://github.com/validatedpatterns/ansible-edge-gitops/blob/main/ansible/inventory/openshift_cluster.yml[here].
153
-
This will retrieve the object names, but it will not (currently) map the FQDN properly. Because of this limitation, we moved to using the
This playbook is for testing basic connectivity - making sure that you can reach the nodes you wish to manage, and that the credentials you
181
-
have given will work on them. It will not change anything on the VMs - just gather facts from them (which requires elevating to root).
182
-
183
-
=== Schedules
184
-
185
-
==== Update Project AEG GitOps
186
-
187
-
This job runs every 5 minutes to update the GitOps repository associated with the project. This is necessary when any of the Ansible code (for
188
-
example, the playbooks or roles associated with the pattern) changes, so that the new code is available to the AAP instance.
189
-
190
-
==== Dynamic Provision Kiosk Playbook
191
-
192
-
This job runs every 10 minutes to provision and configure any kiosks it finds to run the Ignition application in a podman container, and
193
-
configure firefox in kiosk mode to display that application. The playbook is designed to be idempotent, so it is safe to run multiple
194
-
times on the same targets; it will not make user-visible changes to those targets unless it must.
195
-
196
-
This playbook combines the link:/patterns/ansible-edge-gitops/ansible-automation-platform/#extra-playbooks-in-the-pattern[inventory_preplay]
197
-
and the link:/patterns/ansible-edge-gitops/ansible-automation-platform/#extra-playbooks-in-the-pattern[Provision
198
-
Kiosk Playbook].
199
-
200
-
=== Execution Environment
201
-
202
-
The pattern includes an execution environment definition that can be found https://github.com/validatedpatterns/ansible-edge-gitops/tree/main/ansible/execution_environment[here].
203
-
204
-
The execution environment includes some additional collections beyond what is provided in the Default execution environment, including:
The execution environment definition is provided if you want to customize or change it; if so, you should also change the Execution
211
-
Environment attributes of the Templates (in the https://github.com/validatedpatterns/ansible-edge-gitops/blob/main/scripts/ansible_load_controller.sh[load
212
-
script], those attributes are set by the variables `aap_execution_environment` and `aap_execution_environment_image`).
* Downloading and running a podman image on the system (and configure it to auto-update)
230
-
* Setting the container up to run at boot time
231
-
* Passing any other runtime arguments to the container. In this container’s case, that includes specifying an admin password override.
232
-
233
-
=== Extra Playbooks in the Pattern
101
+
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.
This playbook is designed to be included in other plays; its purpose is to discover the desired inventory and add those hosts to inventory at
238
-
runtime. It uses a kubernetes query via the cluster-admin kube config file.
105
+
* 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.
241
108
242
-
This does the work of provisioning the kiosk, which configures kiosk mode, and also installs Ignition and configures it to start at boot. It
243
-
runs the link:/patterns/ansible-edge-gitops/ansible-automation-platform/#roles-included-in-the-pattern[kiosk_mode]
244
-
and link:/patterns/ansible-edge-gitops/ansible-automation-platform/#roles-included-in-the-pattern[container_lifecycle]
245
-
roles.
109
+
* 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.
Copy file name to clipboardExpand all lines: content/patterns/ansible-edge-gitops/getting-started.adoc
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,6 +154,27 @@ This is the username and password that you use to log in to link:https://catalog
154
154
base64: true
155
155
----
156
156
157
+
.. Edit the `automation-hub-token` section to include the token generated at the *Load token* link at link:https://console.redhat.com/ansible/automation-hub/token[Automation Hub Token] to generate a token. For example:
158
+
+
159
+
[source,yaml]
160
+
----
161
+
- name: automation-hub-token
162
+
fields:
163
+
- name: token
164
+
path: '/path/to/automation-hub-token'
165
+
----
166
+
167
+
.. Optionally: Edit the `agof-vault-file` section to use the following (you do not need additional secrets for this pattern):
168
+
+
169
+
[source,yaml]
170
+
----
171
+
- name: agof-vault-file
172
+
fields:
173
+
- name: agof-vault-file
174
+
value: '---'
175
+
base64: true
176
+
----
177
+
157
178
. Create and switch to a new branch named `my-branch`, by running the following command:
Copy file name to clipboardExpand all lines: content/patterns/ansible-edge-gitops/installation-details.adoc
+1-22Lines changed: 1 addition & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,41 +101,20 @@ The script has defaults that are overridden when run as part of make install. Th
101
101
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
102
102
https://github.com/validatedpatterns/common/tree/v1/clustergroup[clustergroup] cart. This in turn reads the repo’s https://github.com/validatedpatterns/ansible-edge-gitops/blob/main/values-global.yaml[global values file], which instructs it to read the https://github.com/validatedpatterns/ansible-edge-gitops/blob/main/values-hub.yaml[hub values file]. This is how the pattern knows to apply the Subscriptions and Applications listed further in the pattern.
103
103
104
-
== ODF (OpenShift Data Foundations)
105
-
106
-
ODF is the storage framework that is needed to provide resilient storage for OpenShift Virtualization. It is managed via the helm chart https://github.com/validatedpatterns/ansible-edge-gitops/tree/main/charts/hub/openshift-data-foundations[here].
107
-
108
-
This is basically the same chart that our Medical Diagnosis pattern uses (see link:/patterns/medical-diagnosis/getting-started/[here] for details on the Medical Edge pattern’s use of storage).
109
-
110
-
[NOTE]
111
-
====
112
-
This chart will create a Noobaa S3 bucket named nb.epoch_timestamp.cluster-domain which will not be destroyed when the cluster is destroyed.
113
-
====
114
-
115
104
== OpenShift Virtualization (KubeVirt)
116
105
117
106
OpenShift Virtualization is a framework for running virtual machines as native Kubernetes resources. While it can run without hardware acceleration, the performance of virtual machines will suffer terribly; some testing on a similar workload indicated a 4-6x delay running without hardware acceleration, so at present this pattern requires hardware acceleration. The pattern provides a script https://github.com/validatedpatterns/ansible-edge-gitops/blob/main/scripts/deploy_kubevirt_worker.sh[deploy-kubevirt-worker.sh] which will provision a metal worker to run virtual machines for the pattern.
118
107
119
108
OpenShift Virtualization currently supports only AWS and on-prem clusters; this is because of the way that baremetal resources are provisioned in GCP and Azure. We hope that OpenShift Virtualization can support GCP and Azure soon.
120
109
121
-
The installation of the OpenShift Virtualization HyperConverged deployment is controlled by the chart https://github.com/validatedpatterns/ansible-edge-gitops/tree/main/charts/hub/cnv[here].
122
-
123
-
OpenShift Virtualization was chosen in this pattern to avoid dealing with the differences in galleries and templates of images between the different public cloud providers. The important thing from this pattern’s standpoint is the availability of machine instances to manage (since we are simulating an Edge deployment scenario, which could either be bare metal instances or virtual machines); OpenShift Virtualization was the easiest and most portable way to spin up machine instances. It also provides mechanisms for defining the desired machine set
124
-
declaratively.
125
-
126
-
The creation of virtual machines is controlled by the chart https://github.com/validatedpatterns/ansible-edge-gitops/tree/main/charts/hub/edge-gitops-vms[here].
127
-
128
110
More details about the way we use OpenShift Virtualization are available link:/ansible-edge-gitops/openshift-virtualization[here].
129
111
130
112
== Ansible Automation Platform (AAP, formerly known as Ansible Tower)
131
113
132
-
The use of Ansible Automation Platform is really the centerpiece of this pattern. We have recognized for some time that the notion and design principles of GitOps should apply to things outside of Kubernetes, andwe believe this pattern gives us a way to do that.
114
+
The use of Ansible Automation Platform is really the centerpiece of this pattern. We have recognized for some time that the concept and design principles of GitOps should apply to things outside of Kubernetes, and we believe this pattern gives us a way to do that.
133
115
134
116
All of the Ansible interactions are defined in a Git Repository; the Ansible jobs that configure the VMs are designed to be idempotent (and are scheduled to run every 10 minutes on those VMs).
135
117
136
-
The installation of AAP itself is governed by the chart https://github.com/validatedpatterns/ansible-edge-gitops/tree/main/charts/hub/ansible-automation-platform[here].
137
-
The post-installation configuration of AAP is done via the https://github.com/validatedpatterns/ansible-edge-gitops/blob/main/scripts/ansible_load_controller.sh[ansible-load-controller.sh] script.
138
-
139
118
It is very much the intention of this pattern to make it easy to replace the specific Edge management use case with another one. Some ideas on how to do that can be found link:/ansible-edge-gitops/ideas-for-customization/[here].
140
119
141
120
Specifics of the Ansible content for this pattern can be seen https://github.com/validatedpatterns/ansible-edge-gitops/tree/main/ansible[here].
0 commit comments