Introduction
The infra.ai Ansible validated content collection provides ready-to-use roles and playbooks for deploying Red Hat Enterprise Linux AI (RHEL AI) across AWS, Azure, Google Cloud Platform, and bare metal environments. This guide walks through each deployment option.
What's Included
The collection provides:
- 9 Playbooks for provisioning and teardown across platforms
- 2 Roles for bare metal ISO creation and NGINX proxy setup
- Support for AWS, Azure, GCP, and bare metal deployments
Installation
``bash
ansible-galaxy collection install infra.ai
`
Dependencies are automatically installed:
- amazon.aws
- cloud.aws_ops
- google.cloud
- cloud.azure_ops
Deploying on AWS
Configure Credentials
`bash
aws configure set aws_access_key_id my-access-key
aws configure set aws_secret_access_key my-secret-key
aws configure set region eu-central-1
`
Set Variables
`bash
cp sample_vars.yml vars.yml
vi vars.yml
`
Provision Infrastructure
`bash
ansible-playbook infra.ai.aws_provision -i inventory/rhelai.aws_ec2.yml -e @vars.yml
`
Teardown
`bash
ansible-playbook infra.ai.aws_teardown -i inventory/rhelai.aws_ec2.yml -e @vars.yml
`
Deploying on Google Cloud
Configure Service Account
`bash
gcloud init
gcloud iam service-accounts keys create creds.json --iam-account=<iam_account>
`
Provision
`bash
ansible-playbook infra.ai.gcp_provision -e @vars.yml -i inventory/rhelai.gcp.yml
`
Teardown
`bash
ansible-playbook infra.ai.gcp_teardown -e @vars.yml -i inventory/rhelai.gcp.yml
`
Deploying on Azure
Login and Configure
`bash
az login
az resource list
`
Note: The azure.azcollection requires additional Python packages:
`bash
pip install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements.txt
`
Provision
`bash
ansible-playbook infra.ai.azure_provision -i localhost, -e @vars.yml
`
Teardown
`bash
ansible-playbook infra.ai.azure_teardown -i localhost, -e @vars.yml
`
Deploying on Bare Metal
Prerequisites
1. Download the RHEL AI ISO from Red Hat
2. Generate container registry credentials at Red Hat Registry Authentication
Build ISO
`bash
ansible-playbook infra.ai.baremetal_provision -e @vars.yml
`
The playbook creates a customized ISO image. Transfer it to a USB drive and boot the target machine. Warning: The bare metal host will be automatically reinstalled with no human interaction required.
Setting Up NGINX Proxy
Deploy a reverse proxy with SSL for AI services:
`bash
ansible-playbook infra.ai.proxy -i inventory/rhelai.aws_ec2.yml -e @vars.yml
`
Or use the role directly:
`yaml
---
- name: Install and provision nginx proxy
hosts: all
roles:
- role: infra.ai.nginx_proxy
nginx_proxy_fqdn: ai.example.com
nginx_proxy_install_dir: /home/ec2-user
``
Best Practices
1. Start with cloud — AWS or GCP is easiest for initi