Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6ab4d09
Seed AO CI/CD Pipeline via APD Gitea and OpenFlake.
IPvSean Nov 3, 2026
ecacbb9
Include OpenFlake in Deploy Shared Services workflow.
IPvSean Nov 3, 2026
c5b0e78
Update Shared Services catalog card for OpenFlake.
IPvSean Nov 3, 2026
b24b53f
Make Mattermost credential summary the last playbook task.
IPvSean Nov 4, 2026
550e48c
Fix Gitea Actions workflow YAML for ansible-lint.
IPvSean Nov 4, 2026
feee0cd
Fix Gitea Actions runner registration for 1.22.
IPvSean Nov 4, 2026
94ce7eb
Avoid Gitea runner token API 403 with a fixed registration token.
IPvSean Nov 4, 2026
cb98021
Prefill CI/CD webhook mock defaults from Gitea credential.
IPvSean Nov 5, 2026
7b1ebf0
Seed full Lightwell inventory-service baseline in Gitea.
IPvSean Nov 5, 2026
1d83282
Keep Lightwell patch on aiohttp 3.9.0.rhlw-00001 only.
IPvSean Nov 5, 2026
cf2aec8
Include CI/CD demo host setup in Provision Gitea.
IPvSean Nov 5, 2026
8f24f05
Automate Gitea AO_WEBHOOK_URL during AO Install.
IPvSean Nov 5, 2026
1e21043
Refresh AO API token before workflow sync during seed.
IPvSean Nov 5, 2026
d0ae2ea
Authorize and publish CI/CD webhook via AO service account.
IPvSean Nov 5, 2026
7235d2f
Print OpenFlake login in AO Install seed summary.
IPvSean Nov 5, 2026
2f2479e
Print OpenFlake login as the last install task.
IPvSean Nov 5, 2026
57fb2d6
Attach OpenFlake credential to Drain and Rollback CI/CD JTs.
IPvSean Nov 5, 2026
2cb5b9e
Seed CI/CD Demo Reset Change Request JT with CHG survey.
IPvSean Nov 5, 2026
68a20be
Document Reset Change Request as delete+recreate.
IPvSean Nov 5, 2026
d3395b5
Print Gitea login as the last provision task.
IPvSean Nov 5, 2026
9115813
sync fixes for gitea
IPvSean Nov 5, 2026
a170545
Harden AO CI/CD seed and clarify Path 2 Shared Services.
IPvSean Nov 5, 2026
ca43cae
Fix Gitea act_runner against host Podman socket.
IPvSean Nov 6, 2026
e8b4539
Fix YAML merge that broke act_runner assert task.
IPvSean Nov 6, 2026
c55de6e
Fix AO network-access JWT vars recursive template loop.
IPvSean Nov 6, 2026
67f453b
Remove hash comments from Jinja inside sync_workflow node normalize.
IPvSean Nov 6, 2026
f9f264b
Simplify Deploy Shared Services survey to region only.
IPvSean Nov 6, 2026
d4e6348
Always surface Gitea status in AO Install seed summary.
IPvSean Nov 6, 2026
61dd3ac
Set OpenFlake UI token lifetime to 48h on install.
IPvSean Nov 6, 2026
11c8a95
Add Shared Services S3 credentials portal at end of workflow.
IPvSean Nov 6, 2026
a074ef3
Fix Shared Services portal S3 upload without object ACLs.
IPvSean Nov 6, 2026
04ad6a4
Fix Shared Services portal URL to dotted S3 website endpoint.
IPvSean Nov 6, 2026
ac78131
Fix credentials portal payload so the browser can JSON.parse it.
IPvSean Nov 6, 2026
6453104
Print HTTPS S3 URL for credentials portal unlock.
IPvSean Nov 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/_data/demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1861,20 +1861,21 @@
- slug: infrastructure-shared-services
readme_path: infrastructure/docs/shared-services.md
title: "Infrastructure | AWS — Deploy Shared Services"
subtitle: "One-click VPC, keypair, Mattermost, and Gitea without cloud-stack VMs"
subtitle: "One-click VPC, keypair, Mattermost, Gitea, and OpenFlake"
category: infrastructure
status: active
tags:
- AWS
- Chat
- Git
- OpenShift
- Workflow
thumbnail:
gradient: "linear-gradient(135deg, #231f20 0%, #3d7ea6 100%)"
icon: "🧩"
blurb: "Create VPC and keypair, then provision Mattermost and Gitea in parallel — shared lab services without the five Deploy Cloud Stack VMs."
blurb: "Create VPC and keypair, then provision Mattermost and Gitea in parallel while OpenFlake installs on OpenShift — shared lab services without the five Deploy Cloud Stack VMs."
stats:
playbooks: 2
playbooks: 3
url: /demos/infrastructure-shared-services/
github_path: infrastructure/setup.yml

Expand Down
5 changes: 3 additions & 2 deletions infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,21 @@ Detect unauthorized changes to `/etc/ssh/sshd_config` via Linux audit, route eve
|--------------|-------------|
| **Vault** | Install or remove HashiCorp Vault on an OpenShift cluster via the HashiCorp Helm chart (dev mode). Install seeds the KV v2 secrets engine and userpass auth with sample credentials. |

### Shared services (Mattermost + Gitea)
### Shared services (Mattermost + Gitea + OpenFlake)

#### Workflows

| Workflow | Description |
|----------|-------------|
| [**Infrastructure ǀ AWS - Deploy Shared Services**](docs/shared-services.md) | One-click VPC + keypair, then Mattermost and Gitea in parallel (no cloud-stack VMs) |
| [**Infrastructure ǀ AWS - Deploy Shared Services**](docs/shared-services.md) | One-click VPC + keypair, then Mattermost and Gitea in parallel, with OpenFlake on OpenShift from the start; ends with a password-gated S3 credentials portal (no cloud-stack VMs) |

#### Jobs

| Job Template | Description |
|--------------|-------------|
| [**Infrastructure ǀ AWS - Provision Mattermost**](docs/mattermost.md) | EC2 `aws_mattermost` + Podman Mattermost with bot token for AO and other chat demos |
| [**Infrastructure ǀ AWS - Provision Gitea**](docs/gitea.md) | EC2 `aws_gitea` + Podman Gitea (SQLite); job output prints `apdadmin` / `Ansible123!` |
| [**Infrastructure ǀ AWS - Shared Services Portal**](docs/shared-services.md) | S3 password-gated page with this lab’s Mattermost / Gitea / OpenFlake logins |

### OPA (Open Policy Agent)

Expand Down
84 changes: 84 additions & 0 deletions infrastructure/ao/demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ ao_aap_integration_name: APD AAP
ao_machine_credential_name: APD Machine Credential
ao_aws_credential_name: AWS
ao_mattermost_credential_name: Mattermost
ao_openflake_credential_name: OpenFlake
ao_gitea_credential_name: Gitea
# Controller credential (RHDP boot / setup.yml); Install JT attaches it for env injectors.
ao_litemaas_credential_name: LiteMaaS
# AO-native LLM assets created by seed from the Controller LiteMaaS credential.
Expand Down Expand Up @@ -88,3 +90,85 @@ ao_demos:
requires_cloud_stack: false
requires_mattermost: false
job_templates: []

# CI/CD Pipeline — OpenFlake CHG + Gitea PR/CI → AO webhook.
# Demo host is aws_gitea (shared services); app ports 8080/80 + Gitea.
# JT names must match cicd-pipeline/ao/cicd-pipeline.json exactly.
- slug: cicd-pipeline
enabled: true
workflow: cicd-pipeline/ao/cicd-pipeline.json
inventory_limit: aws_gitea
requires_cloud_stack: false
requires_mattermost: false
requires_openflake: true
requires_gitea: true
job_templates:
- name: CI/CD Demo - Deploy and Test Dev
playbook: cicd-pipeline/playbooks/cicd_deploy_dev_and_test.yml
credentials:
- machine
- openflake
limit: aws_gitea
- name: CI/CD Demo - Drain Load Balancer
playbook: cicd-pipeline/playbooks/cicd_drain_lb.yml
credentials:
- machine
- openflake
limit: aws_gitea
- name: CI/CD Demo - Deploy to Prod
playbook: cicd-pipeline/playbooks/cicd_deploy_prod.yml
credentials:
- machine
- openflake
limit: aws_gitea
- name: CI/CD Demo - Rollback to Snapshot
playbook: cicd-pipeline/playbooks/cicd_rollback_to_snapshot.yml
credentials:
- machine
- openflake
limit: aws_gitea
- name: CI/CD Demo - Close Loop
playbook: cicd-pipeline/playbooks/cicd_close_loop.yml
credentials:
- openflake
- name: CI/CD Demo - Simulate Lightwell PR
playbook: cicd-pipeline/playbooks/cicd_simulate_lightwell_pr.yml
credentials:
- openflake
- gitea
# Keep major.minor.patch identical to baseline (3.9.0); only the
# Lightwell backport suffix changes. Upstream playbook default is
# 3.9.2.rhlw-00001 which breaks the demo story.
extra_vars:
patched_dep: aiohttp==3.9.0.rhlw-00001

- name: CI/CD Demo - Reset Demo
playbook: cicd-pipeline/playbooks/cicd_reset_demo.yml
credentials:
- machine
- gitea
limit: aws_gitea
# Presenter helper — clear OpenFlake CHG activity so the pipeline can be re-shown.
- name: CI/CD Demo - Reset Change Request
playbook: cicd-pipeline/playbooks/cicd_reset_change_request.yml
credentials:
- openflake
ask_variables_on_launch: false
survey:
name: Reset OpenFlake change
description: Clear work/close notes and reopen the change for another AO demo run.
spec:
- question_name: Change request number
type: text
variable: change_request
required: true
default: CHG0034907
question_description: >-
OpenFlake change to reset (e.g. CHG0034907 or 34907).
extra_vars:
change_request: CHG0034907
- name: CI/CD Demo - Setup Demo Host
playbook: cicd-pipeline/setup/cicd_setup_demo_host.yml
credentials:
- machine
limit: aws_gitea
18 changes: 18 additions & 0 deletions infrastructure/ao/network-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,20 @@
- "{{ ao_instance }}-worker"
- "{{ ao_instance }}-background-worker"

# Demo-friendly session: refresh cookie is the hard logout boundary
# (upstream default 8h). Access JWT stays short; the UI refreshes it.
# Plain ints — do not self-template (ao_x: "{{ ao_x | default(...) }}"
# recurses). Override with -e ao_session_refresh_hours=N if needed.
ao_session_refresh_hours: 48
ao_session_access_minutes: 60

ao_env_all:
- name: APP_INTEGRATION_URL_ALLOWED_HOSTS
value: "{{ ao_allowed_hosts | to_json }}"
- name: APP_JWT_REFRESH_TOKEN_LIFETIME_HOURS
value: "{{ ao_session_refresh_hours | string }}"
- name: APP_JWT_ACCESS_TOKEN_LIFETIME_MINUTES
value: "{{ ao_session_access_minutes | string }}"
ao_env_backend:
- name: APP_OIDC_ALLOW_PRIVATE_NETWORKS
value: "true"
Expand Down Expand Up @@ -120,6 +131,13 @@
ansible.builtin.debug:
var: ao_allowed_hosts

- name: Show demo session lifetime
ansible.builtin.debug:
msg: >-
AO browser sessions last {{ ao_session_refresh_hours }}h
(APP_JWT_REFRESH_TOKEN_LIFETIME_HOURS; access JWT
{{ ao_session_access_minutes }}m with auto-refresh).

- name: Get admin password
kubernetes.core.k8s_info:
api_version: v1
Expand Down
173 changes: 153 additions & 20 deletions infrastructure/ao/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,25 +73,7 @@
no_log: true

- name: Log in to Automation Orchestrator API
ansible.builtin.uri:
url: "{{ ao_api_url }}/auth/login"
method: POST
body_format: json
body:
username: admin
password: "{{ ao_admin_password }}"
validate_certs: false
status_code: [200]
register: ao_login
no_log: true
until: ao_login.status | default(0) == 200
retries: 30
delay: 5

- name: Store AO API token
ansible.builtin.set_fact:
ao_api_token: "{{ ao_login.json.access_token }}"
no_log: true
ansible.builtin.include_tasks: tasks/ao_login.yml

- name: Resolve AAP token for AO integration
ansible.builtin.include_tasks: tasks/resolve_aap_token.yml
Expand All @@ -108,9 +90,22 @@
- name: Provision AAP project and job templates for enabled demos
ansible.builtin.include_tasks: tasks/provision_aap_demos.yml

# AAP JT provisioning can outlive the AO JWT; refresh before workflow sync.
- name: Refresh AO API token before workflow sync
ansible.builtin.include_tasks: tasks/ao_login.yml

- name: Ensure AO CI/CD webhook service account
ansible.builtin.include_tasks: tasks/wire_ao_cicd_service_account.yml

- name: Synchronize enabled AO workflow exports
ansible.builtin.include_tasks: tasks/sync_demos.yml

- name: Publish CI/CD workflow with authorized webhook service account
ansible.builtin.include_tasks: tasks/publish_cicd_workflow.yml

- name: Wire AO webhook URL into Gitea Actions secrets
ansible.builtin.include_tasks: tasks/wire_gitea_ao_webhook.yml

- name: Record Mattermost warning when credential and inventory are missing
when:
- (ao_mattermost_demos | default([]) | length) > 0
Expand All @@ -128,6 +123,70 @@
]
}}

- name: Record OpenFlake warning when credential is missing
when:
- (ao_openflake_demos | default([]) | length) > 0
- not (ao_openflake_present | default(false) | bool)
ansible.builtin.set_fact:
ao_seed_warnings: >-
{{
ao_seed_warnings + [
'Demo(s) '
~ (ao_openflake_demos | map(attribute='slug') | list | join(', '))
~ ' need OpenFlake. Run Infrastructure | OpenFlake (writes the '
~ 'OpenFlake Controller credential), then re-run Install.'
]
}}

# Chart-generated admin password lives only in the OpenShift Secret.
# Surface it in the Install seed summary (same pattern as Mattermost) so
# students do not have to dig into the nested Shared Services / OpenFlake job.
- name: Read OpenFlake admin password from cluster Secret
when: ao_openflake_present | default(false) | bool
kubernetes.core.k8s_info:
kind: Secret
name: openflake
namespace: "{{ ao_openflake_namespace | default('openflake') }}"
register: ao_openflake_secret
failed_when: false
no_log: true

- name: Decode OpenFlake admin login for seed summary
when:
- ao_openflake_present | default(false) | bool
- (ao_openflake_secret.resources | default([]) | length) > 0
ansible.builtin.set_fact:
ao_openflake_username: >-
{{
ao_openflake_secret.resources[0].data.ADMIN_USERNAME
| default('') | b64decode
| default('admin', true)
}}
ao_openflake_password: >-
{{
ao_openflake_secret.resources[0].data.ADMIN_PASSWORD
| default('') | b64decode
}}
no_log: true

- name: Record Gitea warning when credential or host is missing
when:
- (ao_gitea_demos | default([]) | length) > 0
- >-
not (ao_gitea_present | default(false) | bool)
or not (ao_gitea_host_present | default(false) | bool)
ansible.builtin.set_fact:
ao_seed_warnings: >-
{{
ao_seed_warnings + [
'Demo(s) '
~ (ao_gitea_demos | map(attribute='slug') | list | join(', '))
~ ' need aws_gitea + Gitea Controller credential. Run '
~ 'Infrastructure | AWS - Deploy Shared Services (or Provision Gitea), '
~ 'sync AWS Inventory, then re-run Install.'
]
}}

# Decode the admin password here (same pattern as install.yml) so no_log
# on ao_admin_password does not redact this final presenter-facing summary.
- name: Show seed summary
Expand All @@ -152,7 +211,81 @@
]
if (ao_mattermost_server | default('') | length) > 0
else [
'Mattermost: not provisioned — run Infrastructure | AWS - Provision Mattermost (updates Mattermost credential + syncs inventory)',
'Mattermost: not provisioned — run Infrastructure | AWS - Deploy Shared Services (or Provision Mattermost)',
]
)
+ (
(
[
'Gitea URL: http://' ~ ao_gitea_host ~ ':' ~ ao_gitea_port,
'Gitea Username: apdadmin',
'Gitea Password: Ansible123!',
'Gitea Controller credential: attached to CI/CD Demo JTs when present',
]
+ (
[
'Gitea Actions AO webhook secrets: set (AO_WEBHOOK_URL'
~ (
', AO_TOKEN_URL, AO_CLIENT_ID, AO_CLIENT_SECRET'
if (ao_gitea_oauth_secrets_set | default(false) | bool)
else ''
)
~ ') → ' ~ ao_cicd_webhook_url,
]
if (ao_gitea_webhook_secret_set | default(false) | bool)
else [
'Gitea Actions AO webhook secrets: NOT set — re-run Install after Gitea is healthy',
]
)
+ (
[
'AO CI/CD webhook service account: authorized + workflow published',
]
if (ao_cicd_workflow_published | default(false) | bool)
else (
[
'AO CI/CD webhook service account: prepared (publish pending)',
]
if (ao_cicd_sa_ready | default(false) | bool)
else [
'AO CI/CD webhook service account: not ready',
]
)
)
)
if (
(ao_gitea_present | default(false) | bool)
and (ao_gitea_host | default('') | length) > 0
)
else [
'Gitea: not provisioned — Shared Services / Provision Gitea may have failed or was skipped. Check that workflow node, then re-run Install for cicd-pipeline.',
]
)
+ (
(
[
'OpenFlake URL: ' ~ ao_openflake_url,
'OpenFlake Username: '
~ (ao_openflake_username | default('admin')),
]
+ (
[
'OpenFlake Password: ' ~ ao_openflake_password,
]
if (ao_openflake_password | default('') | length) > 0
else [
'OpenFlake Password: see Infrastructure | OpenFlake job output '
~ '(or: oc -n openflake get secret openflake '
~ '-o jsonpath="{.data.ADMIN_PASSWORD}" | base64 -d)',
]
)
+ [
'OpenFlake Controller credential: attached to CI/CD Demo JTs when present',
]
)
if (ao_openflake_present | default(false) | bool)
else [
'OpenFlake: not provisioned — run Infrastructure | AWS - Deploy Shared Services (or OpenFlake) for cicd-pipeline',
]
)
+ (
Expand Down
Loading
Loading