|
| 1 | +# Repository Overview |
| 2 | + |
| 3 | +## Purpose |
| 4 | + |
| 5 | +This repository is an Ansible-based **Infrastructure as Code (IaC)** system designed to automate the setup and management of demo environments on the Red Hat Demo Platform. It serves as the foundation for the Ansible Product Demos catalog item, enabling quick deployment of various automation demonstrations. |
| 6 | + |
| 7 | +## What This Repository Does |
| 8 | + |
| 9 | +The `aap.as.code` repository: |
| 10 | + |
| 11 | +- **Automates AAP Configuration**: Provisions and configures Ansible Automation Platform (AAP) instances with predefined templates, credentials, inventories, and projects |
| 12 | +- **Enables Demo Orchestration**: Loads setup templates that pull in other specialized demo repositories |
| 13 | +- **Manages Configuration as Code**: Maintains all infrastructure and configuration definitions in version-controlled YAML files |
| 14 | +- **Integrates ServiceNow & EDA**: Provides Event-Driven Ansible integration with ServiceNow for automated incident response |
| 15 | + |
| 16 | +## Why This Repository Exists |
| 17 | + |
| 18 | +Organizations and sales engineers need to quickly spin up working Ansible demonstrations on the Red Hat Demo Platform. Rather than manually configuring each AAP instance, this repository provides: |
| 19 | + |
| 20 | +- **Consistency**: Every demo environment is configured identically |
| 21 | +- **Speed**: Automated setup reduces deployment time from hours to minutes |
| 22 | +- **Repeatability**: Infrastructure as Code ensures reproducible environments |
| 23 | +- **Flexibility**: Modular design allows loading different demo scenarios |
| 24 | + |
| 25 | +## Architecture Pattern |
| 26 | + |
| 27 | +The project follows an **Infrastructure as Code (IaC)** pattern where: |
| 28 | + |
| 29 | +- All infrastructure and configuration is defined in code |
| 30 | +- Changes are version-controlled through Git |
| 31 | +- Ansible playbooks manage the entire lifecycle |
| 32 | +- Configuration is declarative rather than imperative |
| 33 | + |
| 34 | +**Entry Point**: `playbooks/main.yml` |
| 35 | + |
| 36 | +## Key Components |
| 37 | + |
| 38 | +### Configuration as Code Files |
| 39 | + |
| 40 | +Located in `playbooks/files/config_as_code/`, these define: |
| 41 | + |
| 42 | +- **Controller Configuration**: |
| 43 | + - `controller_credentials.yml` - Authentication credentials |
| 44 | + - `controller_hosts.yml` - Managed hosts |
| 45 | + - `controller_inventories.yml` - Host groupings |
| 46 | + - `controller_projects.yml` - Source code repositories |
| 47 | + - `controller_templates.yml` - Job templates |
| 48 | + - `controller_settings.yml` - Platform settings |
| 49 | + |
| 50 | +- **Event-Driven Ansible**: |
| 51 | + - `eda_credentials.yml` - EDA authentication |
| 52 | + - `eda_decision_environments.yml` - Decision environment containers |
| 53 | + - `eda_event_streams.yml` - Event source configurations |
| 54 | + - `eda_projects.yml` - Rulebook repositories |
| 55 | + - `eda_rulebook_activations.yml` - Active event-response rules |
| 56 | + |
| 57 | +- **Gateway & Access**: |
| 58 | + - `gateway_organizations.yml` - Organization structure |
| 59 | + - `gateway_settings.yml` - Gateway configuration |
| 60 | + - `gateway_teams.yml` - Team definitions |
| 61 | + - `gateway_users.yml` - User accounts |
| 62 | + |
| 63 | +### Related Demo Repositories |
| 64 | + |
| 65 | +This repository integrates with specialized daily demos: |
| 66 | + |
| 67 | +- [AAP Daily Demo Windows](https://github.com/ericcames/aap.dailydemo.windows) - Windows automation scenarios |
| 68 | +- [AAP Daily Demo Linux](https://github.com/ericcames/aap.dailydemo.linux) - Linux system management |
| 69 | +- [AAP Daily Demo F5](https://github.com/ericcames/aap.dailydemo.F5) - F5 load balancer automation |
| 70 | +- [AAP Daily Demo Panos](https://github.com/ericcames/aap.dailydemo.Panos) - Palo Alto firewall automation |
| 71 | +- [AAP Daily Demo Satellite](https://github.com/ericcames/aap.dailydemo.satellite) - Red Hat Satellite integration |
| 72 | +- [AAP Daily Demo Hashicorp](https://github.com/ericcames/aap.dailydemo.hashicorp) - Vault and Terraform integration |
| 73 | + |
| 74 | +## How It Works |
| 75 | + |
| 76 | +### Prerequisites |
| 77 | + |
| 78 | +1. **Automation Hub Access**: |
| 79 | + - Certified content: `https://console.redhat.com/api/automation-hub/content/published/` |
| 80 | + - Validated content: `https://console.redhat.com/api/automation-hub/content/validated/` |
| 81 | + - API token for authentication |
| 82 | + |
| 83 | +2. **Secrets Management**: |
| 84 | + - Vault credential in AAP |
| 85 | + - Remote vault file with encrypted secrets |
| 86 | + - Public SSH key in a publicly accessible repository |
| 87 | + |
| 88 | +3. **Red Hat Demo Platform**: |
| 89 | + - Access to the Ansible Product Demos catalog item |
| 90 | + - AAP instance provisioned and accessible |
| 91 | + |
| 92 | +### Deployment Process |
| 93 | + |
| 94 | +1. **Configure Credentials**: Set up Automation Hub (certified and validated) credentials in AAP |
| 95 | +2. **Link to Organization**: Associate Galaxy credentials with the Default Organization |
| 96 | +3. **Create Vault Credential**: Configure vault password for decrypting secrets |
| 97 | +4. **Create Project**: Point AAP to this Git repository |
| 98 | +5. **Prepare Remote Resources**: Host vault file and SSH public key in accessible locations |
| 99 | +6. **Create Job Template**: Configure template with required extra variables |
| 100 | +7. **Execute**: Launch the job template to provision the demo environment |
| 101 | + |
| 102 | +### Required Extra Variables |
| 103 | + |
| 104 | +```yaml |
| 105 | +my_windows_catalog_short_description: "Your Catalog Description" |
| 106 | +my_aap_url: "URL from Red Hat Demo Platform" |
| 107 | +my_ctrl_admin_password: "Password from Red Hat Demo Platform" |
| 108 | +my_vault: "Your Vault Credential Name" |
| 109 | +my_remote_vault: "https://url-to-your-vault-file.yml" |
| 110 | +my_remote_ssh_pub_key: "https://url-to-your-public-key.pub" |
| 111 | +``` |
| 112 | +
|
| 113 | +## ServiceNow Integration |
| 114 | +
|
| 115 | +The repository includes extensive Event-Driven Ansible integration with ServiceNow: |
| 116 | +
|
| 117 | +- **Event Streams**: Listen for ServiceNow incidents and changes |
| 118 | +- **Rulebook Activations**: Automated response to SNOW events |
| 119 | +- **Decision Environments**: Containerized rulebook execution |
| 120 | +- **Documentation**: See `doc/AAP_Servicenow.pdf` for detailed setup |
| 121 | + |
| 122 | +Check `playbooks/files/config_as_code/eda_*` files for EDA configuration examples. |
| 123 | + |
| 124 | +## Documentation Structure |
| 125 | + |
| 126 | +- **README.md**: Setup and deployment instructions |
| 127 | +- **docs/index.md**: Documentation index and quick reference |
| 128 | +- **docs/project-overview.md**: Executive summary |
| 129 | +- **docs/architecture.md**: Technical architecture details |
| 130 | +- **docs/development-guide.md**: Developer setup process |
| 131 | +- **docs/deployment-guide.md**: Deployment instructions |
| 132 | +- **doc/**: ServiceNow integration guides (PDFs and external links) |
| 133 | + |
| 134 | +## Technology Stack |
| 135 | + |
| 136 | +- **Orchestration**: Ansible Automation Platform |
| 137 | +- **Configuration Management**: Ansible playbooks and roles |
| 138 | +- **Event-Driven Automation**: Event-Driven Ansible (EDA) |
| 139 | +- **Integration**: ServiceNow, AWS, various network devices |
| 140 | +- **Version Control**: Git/GitHub |
| 141 | +- **Secrets Management**: Ansible Vault, remote vault files |
| 142 | + |
| 143 | +## Repository Type |
| 144 | + |
| 145 | +**Monolithic** - All configuration and playbooks are maintained in a single repository for simplified management and deployment. |
| 146 | + |
| 147 | +## Getting Started |
| 148 | + |
| 149 | +For detailed setup instructions, see: |
| 150 | +- [README.md](README.md) - Complete setup walkthrough |
| 151 | +- [docs/development-guide.md](docs/development-guide.md) - Development environment setup |
| 152 | +- [docs/deployment-guide.md](docs/deployment-guide.md) - Deployment on Red Hat Demo Platform |
| 153 | + |
| 154 | +## Target Audience |
| 155 | + |
| 156 | +- Red Hat sales engineers demonstrating AAP capabilities |
| 157 | +- Solution architects building proof-of-concepts |
| 158 | +- Partners showcasing Red Hat Ansible automation |
| 159 | +- Training and education teams delivering hands-on labs |
0 commit comments