Skip to content

Commit c0a6a2d

Browse files
authored
Merge pull request #2334 from IPvSean/devel
update the lab page
2 parents 43e6c9b + 05395c8 commit c0a6a2d

File tree

3 files changed

+189
-12
lines changed

3 files changed

+189
-12
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
<h1 id="90_minute_sectin">90 minute workshops</h1>
1515
<section class="page-contain">
1616
<!-- lab -->
17-
<a target="_blank" href="https://rhpds.github.io/showroom-ai-driven-ansible-automation/modules/index.html" class="data-card">
17+
<a target="_blank" href="https://rhpds.github.io/ai-driven-automation-showroom/modules/index.html" class="data-card">
1818
<h3>AI + Ansible</h3>
19-
<h4>Introduction to AI-Driven Ansible Automation</h4>
19+
<h4>Introduction to AI-Driven Ansible Automation & AIOps</h4>
2020
<p>Build an intelligent, self-healing automation workflow</p>
2121
<span class="link-text">
2222
Lab Page
2323
<svg width="25" height="16" viewBox="0 0 25 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2424
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.8631 0.929124L24.2271 7.29308C24.6176 7.68361 24.6176 8.31677 24.2271 8.7073L17.8631 15.0713C17.4726 15.4618 16.8394 15.4618 16.4489 15.0713C16.0584 14.6807 16.0584 14.0476 16.4489 13.657L21.1058 9.00019H0.47998V7.00019H21.1058L16.4489 2.34334C16.0584 1.95281 16.0584 1.31965 16.4489 0.929124C16.8394 0.538599 17.4726 0.538599 17.8631 0.929124Z" fill="#000000"/>
2525
</svg>
2626
</span>
27-
<div id="lab_powered_by">Red Hat Demo Platform</div>
27+
<div id="lab_powered_by"><div class="features-text">Features Splunk</div>Red Hat Demo Platform</div>
2828
</a>
2929
<!-- lab -->
3030
<a target="_new" href="https://rhpds.github.io/showroom-virt-aap-day-2/modules/index.html" class="data-card">

assets/css/style.scss

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ header {
215215
.header-nav {
216216
gap: 16px;
217217
}
218-
218+
219219
.header-link {
220220
font-size: 11px;
221221
padding: 6px 8px;
@@ -226,7 +226,7 @@ header {
226226
.header-nav {
227227
gap: 14px;
228228
}
229-
229+
230230
.header-link {
231231
font-size: 10px;
232232
padding: 6px 7px;
@@ -237,7 +237,7 @@ header {
237237
.header-nav {
238238
gap: 14px;
239239
}
240-
240+
241241
.header-link {
242242
font-size: 11px;
243243
padding: 6px 8px;
@@ -248,15 +248,15 @@ header {
248248
.header-container {
249249
padding: 0 15px;
250250
}
251-
251+
252252
.header-logo {
253253
width: 110px;
254254
}
255-
255+
256256
.header-nav {
257257
gap: 12px;
258258
}
259-
259+
260260
.header-link {
261261
font-size: 10px;
262262
padding: 6px 7px;
@@ -268,11 +268,11 @@ header {
268268
.header-logo {
269269
width: 100px;
270270
}
271-
271+
272272
.header-nav {
273273
gap: 10px;
274274
}
275-
275+
276276
.header-link {
277277
font-size: 9px;
278278
padding: 5px 6px;
@@ -284,7 +284,7 @@ header {
284284
.header-nav {
285285
gap: 8px;
286286
}
287-
287+
288288
.header-link {
289289
font-size: 8px;
290290
padding: 4px 5px;
@@ -565,6 +565,24 @@ div#lab_powered_by img {
565565
width: 30%;
566566
}
567567

568+
.data-card .features-text {
569+
font-size: 85%;
570+
margin-top: 0.5em;
571+
color: #5d009c !important;
572+
}
573+
574+
.data-card:hover .features-text {
575+
color: #ffffff !important;
576+
}
577+
578+
.data-card #lab_powered_by {
579+
color: #000000;
580+
}
581+
582+
.data-card:hover #lab_powered_by {
583+
color: #ffffff !important;
584+
}
585+
568586
pre code {
569587
background-color: #f5f2f0;
570588
color: #333;

nginx-ssl-proxy-explanation.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# nginx SSL Proxy Setup for Ansible Automation Platform
2+
3+
## Table of Contents
4+
5+
1. [Overview](#overview)
6+
2. [Architecture Explanation](#architecture-explanation)
7+
3. [How the Setup Works](#how-the-setup-works)
8+
4. [Port Configuration Discovery](#port-configuration-discovery)
9+
5. [The nginx Proxy Solution](#the-nginx-proxy-solution)
10+
6. [Traffic Flow](#traffic-flow)
11+
7. [Why This Approach](#why-this-approach)
12+
8. [Key Configuration Files](#key-configuration-files)
13+
14+
## Overview
15+
16+
This document explains how the `issue_cert` role implements SSL certificates for Ansible Automation Platform (AAP) workshops **without modifying AAP itself**. Instead of reconfiguring AAP's SSL certificates (which would require re-running the entire installer), this solution installs a **separate nginx instance** that acts as an SSL-terminating reverse proxy.
17+
18+
## Architecture Explanation
19+
20+
**Important**: This setup does **NOT** modify AAP's configuration or install nginx "into" AAP. Instead, it:
21+
22+
1. **Installs a standalone nginx service** on the same host as AAP
23+
2. **Configures nginx as a reverse proxy** with SSL termination
24+
3. **Leaves AAP completely unchanged** - AAP continues running on its original port with its original configuration
25+
26+
## How the Setup Works
27+
28+
### AAP Installation (Pre-built in AMI)
29+
- AAP is installed during the Packer AMI build process
30+
- The `extra_vars.yml` file specifies `aap_port: 8501`
31+
- AAP's envoy gateway is configured to listen on port 8501 instead of the default 443
32+
- AAP runs with its own self-signed certificates on port 8501
33+
34+
### SSL Certificate Solution (During Workshop Provisioning)
35+
- The `issue_cert` role installs a **separate nginx instance**
36+
- nginx obtains proper SSL certificates from Let's Encrypt
37+
- nginx is configured to listen on port 443 (the standard HTTPS port)
38+
- nginx proxies all traffic to AAP running on localhost:8501
39+
40+
## Port Configuration Discovery
41+
42+
The mystery of port 8501 is solved by examining the Packer build configuration:
43+
44+
**File: `/provisioner/packer/extra_vars.yml`**
45+
```yaml
46+
aap_port: 8501
47+
```
48+
49+
This variable is used during AMI creation, causing AAP to be installed with:
50+
```yaml
51+
envoy_https_port: 8501 # Instead of default 443
52+
```
53+
54+
## The nginx Proxy Solution
55+
56+
### nginx Installation and Configuration
57+
58+
The `issue_cert` role performs these steps:
59+
60+
1. **Installs nginx** (separate from AAP)
61+
```yaml
62+
- name: Make sure nginx and certbot are installed
63+
ansible.builtin.dnf:
64+
name:
65+
- nginx
66+
- certbot
67+
```
68+
69+
2. **Obtains SSL certificates** from Let's Encrypt
70+
```yaml
71+
- name: Issue SSL cert
72+
ansible.builtin.shell: certbot certonly --standalone -d {{ dns_name }}
73+
```
74+
75+
3. **Configures nginx as SSL proxy**
76+
```nginx
77+
# HTTPS server block
78+
server {
79+
listen 443 ssl;
80+
server_name {{ dns_name }};
81+
82+
# SSL certificates from Let's Encrypt
83+
ssl_certificate /etc/nginx/ssl/aap.crt;
84+
ssl_certificate_key /etc/nginx/ssl/aap.key;
85+
86+
# Proxy all traffic to AAP
87+
location / {
88+
proxy_pass https://127.0.0.1:8501;
89+
proxy_ssl_verify off;
90+
# ... additional proxy headers
91+
}
92+
}
93+
```
94+
95+
## Traffic Flow
96+
97+
```
98+
Internet Request (HTTPS:443)
99+
100+
nginx (Port 443) - SSL Termination with Let's Encrypt Certs
101+
102+
Proxy Pass to AAP (localhost:8501) - Original AAP with Self-Signed Certs
103+
104+
AAP Response back through nginx
105+
106+
Encrypted Response to Client
107+
```
108+
109+
## Why This Approach
110+
111+
### Advantages:
112+
1. **No AAP Modification**: AAP installation remains completely untouched
113+
2. **No Installer Re-run**: Avoids the time and complexity of reconfiguring AAP
114+
3. **Proper SSL Certificates**: Uses Let's Encrypt for trusted certificates
115+
4. **Clean Separation**: nginx handles SSL, AAP handles application logic
116+
5. **Easy Maintenance**: SSL certificate renewal happens independently of AAP
117+
118+
### Alternative Approaches (Not Used):
119+
- **Modifying AAP SSL**: Would require re-running the AAP installer with new certificate paths
120+
- **Direct Certificate Replacement**: Would require stopping AAP services and complex certificate management
121+
122+
## Key Configuration Files
123+
124+
### 1. Packer Build Configuration
125+
**File**: `provisioner/packer/extra_vars.yml`
126+
```yaml
127+
aap_port: 8501 # Forces AAP to use port 8501 during AMI build
128+
```
129+
130+
### 2. AAP Installation Template
131+
**File**: `roles/control_node/templates/controller_install.j2`
132+
```ini
133+
envoy_https_port={{ aap_port | default('443') | int }}
134+
```
135+
136+
### 3. nginx Configuration Template
137+
**File**: `roles/issue_cert/templates/nginx.conf.j2`
138+
```nginx
139+
server {
140+
listen 443 ssl;
141+
location / {
142+
proxy_pass https://127.0.0.1:8501; # Proxy to AAP
143+
}
144+
}
145+
```
146+
147+
### 4. Security Group Rules
148+
**File**: `provisioner/group_vars/all/vpc_rules.yml`
149+
```yaml
150+
- proto: tcp
151+
to_port: 8501
152+
from_port: 8501
153+
cidr_ip: 0.0.0.0/0
154+
rule_desc: receptor # AAP internal port
155+
```
156+
157+
---
158+
159+
**Summary**: This is an elegant solution that provides proper SSL certificates for workshop participants without the complexity and time required to modify AAP's native SSL configuration. The separate nginx proxy handles all SSL concerns while AAP continues running unchanged on its internal port.

0 commit comments

Comments
 (0)