Skip to content

Commit a362e21

Browse files
author
Martin Jackson
committed
Add mandatory variable docs
1 parent bc118ed commit a362e21

File tree

1 file changed

+85
-10
lines changed

1 file changed

+85
-10
lines changed

content/blog/2025-01-09-AGOF_v2.adoc

Lines changed: 85 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,21 +152,98 @@ Validated Patterns bootstrap environment. In AGOF v2, and in the Helm chart for
152152
this has been addressed by including a specific service account and RBAC that allows for VM service discovery
153153
by default.
154154

155+
== AGOF v2: Mandatory Variables
156+
157+
The following variables are essential to AGOF running correctly outside of OpenShift. In specific cases the
158+
OpenShift based installation of AAP will determine values for these variables in other ways, so they do not
159+
need to be set explicitly. Outside of OpenShift, these values must be set in either agof_vault.yml or (if using
160+
one) in the inventory file.
161+
162+
[cols="1,1"]
163+
|===
164+
|Variable Name|Variable Type|OpenShift handling?|Default|Notes
165+
166+
|automation_hub_token_vault
167+
|string (base64 encoded token)
168+
|Secret automation-hub-token, field token
169+
|None
170+
|Similar to but distinct from offline_token. Generated on console.redhat.com
171+
172+
|manifest_content
173+
|string (base64 encoded zipfile)
174+
|Secret aap-manifest, field b64content
175+
|None
176+
|A Satellite manifest file that must contain a valid Ansible Automation Platform entitlement
177+
178+
|agof_iac_repo
179+
|string
180+
|Helm value .Values.agof.iac_repo
181+
|https://github.com/validatedpatterns-demos/ansible-edge-gitops-hmi-config-as-code.git
182+
|This drives the rest of the AGOF configuration (along with agof_iac_repo_version)
183+
184+
|agof_iac_repo_version
185+
|string
186+
|Helm value .Values.agof.iac_revision
187+
|main
188+
|Can be a branch name, tag, or SHA commit
189+
190+
|ansible_host
191+
|string
192+
|Discovered by aap-config from installed operand
193+
|aap.<cluster domain name>
194+
|Hostname to use to reach AAP instance. Hostname for route in OpenShift.
195+
Can also be retrieved by running scripts/ansible_get_credentials.sh
196+
197+
|admin_password
198+
|string
199+
|Discovered by aap-config from installed operand
200+
|Randomly generated string per-instance
201+
|Can also be retrieved by running scripts/ansible_get_credentials.sh
202+
203+
|db_password
204+
|string
205+
|Generated at random by OpenShift operator
206+
|None
207+
|Not needed directly for OpenShift AGOF
208+
209+
|offline_token
210+
|string
211+
|Derived from OpenShift pull secret
212+
|None
213+
|Used to download AAP installer
214+
215+
|redhat_username
216+
|string
217+
|Derived from OpenShift pull secret
218+
|None
219+
|Used to download images from registry.redhat.io for non-OpenShift installs
220+
221+
|redhat_password
222+
|string
223+
|Derived from OpenShift pull secret
224+
|None
225+
|Used to download images from registry.redhat.io for non-OpenShift installs
226+
155227
== OpenShift Support
156228

157229
OpenShift support for AGOF works by creating a "clean room" environment for AGOF within the cluster that hosts
158230
the Ansible Automation Platform operator. The scheme expects that the AAP installation will be running but
159-
otherwise unconfigured. The chart will then apply an Ansible Validated Pattern (in the form an Ansible
231+
otherwise unconfigured. Thus, it uses the "API Install" mechanism of AGOF (which will configured a previously installed
232+
instance of AAP), but adjusted for the OpenShift hosted version of AAP in the following ways:
233+
234+
* It forces a variable override order that ensures that the variables passed to the helm chart will take precedence
235+
* It includes all Helm chart values as Ansible extravars, at the highest level of priority
236+
* It provides secrets projected through the chart to the AAP configuration workflow.
237+
238+
The chart will then apply an Ansible Validated Pattern (in the form an Ansible
160239
configuration-as-code set of repositories) to run on the in-cluster AAP controller. The configuration of AAP
161240
will run periodically, every 10 minutes by default, so that if any change is made to either AGOF or to the pattern
162241
those changes will be reflected and applied in the next run.
163242

164243
For use in this scenario, new Makefile targets have been introduced. The key one used for the OpenShift scheme is
165-
`openshift_vp_install`, which can also be run outside OpenShift.
166-
167-
In addition to downloading and installing the collections necessary to configure AAP, the pre-init also sets up
168-
a specific override scheme, which integrates and embeds the variables passed to the helm chart into the Ansible
169-
Validated Pattern.
244+
`openshift_vp_install`, which can also be run outside OpenShift. If run this way, it will use the user's home
245+
directory to download the dependent collections and create the files necessary for AGOF to run which will contain
246+
secrets as defined by the user. These include agof_vault.yml and agof_overrides.yml which are placed in the root of the user's home directory (~).
170247

171248
== agof_vault.yml and agof_overrides.yml
172249

@@ -196,9 +273,7 @@ not have to be specified or known in the public repository. AGOF depends on this
196273
both a user-specific vault file as well as variables imported from helm in a predictable and deterministic way,
197274
so that the user does not have to remember to specify those parameters to the command.
198275

199-
== AGOF v2: Variable Requirements
200-
201-
tbd
276+
== How the OpenShift chart populates the essential variables
202277

203278
== AGOF v2: Repositories for a Pattern and their Purposes
204279

@@ -238,7 +313,7 @@ involve five or more repositories:
238313
2. The AGOF repository which is used to load the AAP configuration
239314
3. The configuration-as-code repository that defines the objects to be created and maintained in Ansible
240315
Automation Platform for the pattern
241-
4. One or more collection repositories much must at minimum contain playbooks to use as Job Templates
316+
4. One or more collection repositories which must at minimum contain playbooks to use as Job Templates
242317
5. One or more inventory repositories to define the nodes on which the pattern will operate.
243318

244319
== Charts for Ansible Validated Patterns

0 commit comments

Comments
 (0)