Skip to content

Commit c4b0f8a

Browse files
authored
Merge pull request #548 from kquinn1204/TELCODOCS-2145-updates
TELCODOCS-2145 Update Ansible Edge GitOps
2 parents e537f0c + 7b12bba commit c4b0f8a

22 files changed

+1124
-1288
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Ansible Edge GitOps
3+
date: 2022-06-08
4+
tier: maintained
5+
summary: This pattern uses OpenShift Virtualization to simulate an edge environment for VMs.
6+
rh_products:
7+
- Red Hat OpenShift Container Platform
8+
- Red Hat Ansible Automation Platform
9+
- Red Hat OpenShift Virtualization
10+
- Red Hat Enterprise Linux
11+
- Red Hat OpenShift Data Foundation
12+
industries:
13+
- Chemical
14+
aliases: /ansible-edge-gitops/
15+
pattern_logo: ansible-edge.png
16+
links:
17+
install: getting-started
18+
help: https://groups.google.com/g/validatedpatterns
19+
bugs: https://github.com/validatedpatterns/ansible-edge-gitops/issues
20+
ci: aegitops
21+
---
22+
23+
:toc:
24+
:imagesdir: /images
25+
:_content-type: ASSEMBLY
26+
include::modules/comm-attributes.adoc[]
27+
28+
== Ansible Edge GitOps
29+
30+
=== Background
31+
32+
Organizations want to accelerate their deployment and improve delivery quality in their Edge environments, where many devices have limited or no support for GitOps practices.
33+
Many virtual machines (VMs) and devices can be effectively managed with Ansible. This pattern demonstrates how to use an OpenShift-based Ansible Automation Platform deployment and manage Edge devices, based on collaboration with a partner in the chemical space.
34+
35+
This pattern uses OpenShift Virtualization (the productization of Kubevirt) to simulate the Edge environment for VMs.
36+
37+
==== Solution elements
38+
39+
* How to use a GitOps approach to manage virtual machines, either in public clouds (limited to AWS for technical reasons) or on-prem
40+
OpenShift installations
41+
* How to integrate AAP into OpenShift
42+
* How to manage Edge devices using AAP hosted in OpenShift
43+
44+
==== Red Hat Technologies
45+
46+
* Red Hat OpenShift Container Platform (Kubernetes)
47+
* Red Hat Ansible Automation Platform (formerly known as "`Ansible
48+
Tower`")
49+
* Red Hat OpenShift GitOps (ArgoCD)
50+
* OpenShift Virtualization (Kubevirt)
51+
* Red Hat Enterprise Linux 8
52+
53+
==== Other technologies this pattern Uses
54+
55+
* Hashicorp Vault
56+
* External Secrets Operator
57+
* Inductive Automation Ignition
58+
59+
=== Architecture
60+
61+
Similar to other patterns, this pattern starts with a central management hub, which hosts the AAP and Vault components.
62+
63+
==== Logical architecture
64+
65+
.Ansible-Edge-Gitops-Architecture
66+
image::/images/ansible-edge-gitops/ansible-edge-gitops-arch.png[Ansible-Edge-Gitops-Architecture]
67+
68+
==== Physical architecture
69+
70+
.Ansible-Edge-GitOps-Physical-Architecture
71+
image::/images/ansible-edge-gitops/aeg-arch-schematic.png[Ansible-Edge-GitOps-Physical-Architecture]
72+
73+
=== Other presentations featuring this pattern
74+
75+
==== Registration required
76+
77+
https://tracks.redhat.com/c/validated-patterns_i?x=5wCWYS&lx=lT1ZfK[image:/images/ansible-edge-gitops/automates-june-2022-deck-thumb.png[Ansible-Automates-June-2022-Deck]]
78+
79+
https://tracks.redhat.com/c/preview-42?x=5wCWYS&lx=lT1ZfK[image:/images/ansible-edge-gitops/automates-june-2022-video-thumb.png[Ansible-Automates-June-2022-Video]]

content/patterns/ansible-edge-gitops/_index.md

Lines changed: 0 additions & 77 deletions
This file was deleted.
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
title: Ansible Automation Platform
3+
weight: 30
4+
aliases: /ansible-edge-gitops/ansible-automation-platform/
5+
---
6+
7+
:toc:
8+
:imagesdir: /images
9+
:_content-type: ASSEMBLY
10+
include::modules/comm-attributes.adoc[]
11+
12+
[id="ansible-automation-pattern"]
13+
== Logging in to the Ansible Automation Platform
14+
15+
The default login user for the AAP interface is `admin`, and the password is randomly generated during installation. This password is required to access the interface.
16+
However, logging into the interface is not necessary, as the pattern automatically configures the AAP instance. The pattern retrieves the password by using the same method as the `ansible_get_credentials.sh` script (described below).
17+
18+
If you need to inspect the AAP instance or change its configuration, there are two ways to log in. Both methods give access to the same instance using the same password.
19+
20+
[id="logging-in-using-a-secret-retrieved-from-the-openshift-console"]
21+
=== Logging in using a secret retrieved from the OpenShift Console
22+
23+
Follow these steps to log in to the Ansible Automation Platform using the OpenShift console:
24+
25+
. In the OpenShift console, go to *Workloads* > *Secrets* and select the `ansible-automation-platform` project if you want to limit the number of secrets you can see.
26+
+
27+
.AAP secret
28+
image::/images/ansible-edge-gitops/ocp-console-secrets-aap-admin-password-v1.png[ansible-edge-observability-operators,title="AAP secret"]
29+
30+
.. Select the `aap-admin-password`.
31+
32+
.. In the *Data* field click *Reveal values* to display the password.
33+
+
34+
.AAP secret detail
35+
image::/images/ansible-edge-gitops/ocp-console-aap-admin-password-detail-v1.png[ansible-edge-observability-operators,title="AAP secret details"]
36+
37+
. Under *Networking* > *Routes*, click the URL for the `aap` route to open the Ansible Automation Platform interface.
38+
39+
.. Log in using the `admin` user and the password you retrieved from the `aap-admin-password` secret. A screen similar to the following appears:
40+
+
41+
.AAP login
42+
image::/images/ansible-edge-gitops/aap-login-v1.png[ansible-edge-observability-operators,title="AAP login"]
43+
44+
[id="logging-in-using-secret-retrieved-using-script-ansible_get_credentials"]
45+
=== Logging in using a secret retrieved with ansible_get_credentials.sh
46+
47+
Follow this procedure to log in to the Ansible Automation Platform using the `ansible_get_credentials.sh` script:
48+
49+
. From the top-level pattern directory (ensuring you have set `KUBECONFIG`), run the following command:
50+
+
51+
[source,terminal]
52+
----
53+
$ ./pattern.sh ./scripts/ansible_get_credentials.sh
54+
----
55+
+
56+
This script retrieves the URL for your Ansible Automation Platform instance and the password for its `admin` user. The password is auto-generated by the AAP operator by default. The output of the command looks like this (your password will be different):
57+
+
58+
[source,text]
59+
----
60+
[WARNING]: No inventory was parsed, only implicit localhost is available
61+
62+
PLAY [Retrieve Credentials for AAP on OpenShift] *******************************************************************
63+
64+
TASK [Retrieve API hostname for AAP] *******************************************************************
65+
ok: [localhost]
66+
67+
TASK [Set ansible_host] *****************************************************************
68+
ok: [localhost]
69+
70+
TASK [Retrieve admin password for AAP] *****************************************************************************
71+
ok: [localhost]
72+
73+
TASK [Set admin_password fact] ****************************************************************************************
74+
ok: [localhost]
75+
76+
TASK [Report AAP Endpoint] *****************************************************************************************
77+
ok: [localhost] => {
78+
"msg": "AAP Endpoint: https://aap-ansible-automation-platform.apps.kevstestcluster.aws.validatedpatterns.io"
79+
}
80+
81+
TASK [Report AAP User] ******************************************************************************
82+
ok: [localhost] => {
83+
"msg": "AAP Admin User: admin"
84+
}
85+
86+
TASK [Report AAP Admin Password] *******************************************************************
87+
ok: [localhost] => {
88+
"msg": "AAP Admin Password: XoQ2MoU88ibAwUZI8tHu194DP304UEqz"
89+
}
90+
91+
PLAY RECAP *******************************************************************************
92+
localhost : ok=7 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
93+
----
94+
95+
== Pattern AAP Configuration Details
96+
97+
This section describes the AAP configuration during the pattern installation. All of the configuration discussed in this section is applied by the
98+
https://github.com/validatedpatterns/ansible-edge-gitops/blob/main/scripts/ansible_load_controller.sh[ansible_load_controller.sh]
99+
script.
100+
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.
102+
103+
Key components of the configuration process:
104+
105+
* Retrieving AAP Credentials: The script runs the `ansible_get_credentials.yml` playbook to obtain necessary credentials for accessing and managing the AAP instance.
106+
107+
* 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.
108+
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.

0 commit comments

Comments
 (0)