Skip to content

Commit

Permalink
Merge pull request #2195 from IPvSean/devel
Browse files Browse the repository at this point in the history
Network Workshop provisioner updated to AAP 2.5
  • Loading branch information
IPvSean authored Nov 1, 2024
2 parents 662dda8 + 745645c commit 6a160c0
Show file tree
Hide file tree
Showing 73 changed files with 928 additions and 1,133 deletions.
8 changes: 4 additions & 4 deletions provisioner/group_vars/all/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ ee_registry_name: "registry.redhat.io"

# List of execution environments to download during controller installation:
ee_images:
- "{{ ee_registry_name }}/ansible-automation-platform-23/ee-29-rhel8:latest"
- "{{ ee_registry_name }}/ansible-automation-platform-23/ee-supported-rhel8:latest"
- "{{ ee_registry_name }}/ansible-automation-platform-23/ee-minimal-rhel8:latest"
- "{{ ee_registry_name }}/ansible-automation-platform-25/ee-supported-rhel9:latest"
- "{{ ee_registry_name }}/ansible-automation-platform/ee-minimal-rhel9:latest"

# Default EE that uses the registry credential (Default execution environment)
ee_default_image: "{{ ee_registry_name }}/ansible-automation-platform-23/ee-supported-rhel8:latest"
ee_default_image: "{{ ee_registry_name }}/ansible-automation-platform-25/ee-supported-rhel9:latest"
code_server_port: 8123
10 changes: 10 additions & 0 deletions provisioner/group_vars/all/vpc_rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ workshops:
from_port: 27199
cidr_ip: 0.0.0.0/0
rule_desc: receptor
- proto: tcp
to_port: 8123
from_port: 8123
cidr_ip: 0.0.0.0/0
rule_desc: receptor
- proto: tcp
to_port: 8501
from_port: 8501
cidr_ip: 0.0.0.0/0
rule_desc: receptor
f5:
ports:
- proto: tcp
Expand Down
22 changes: 18 additions & 4 deletions provisioner/packer/automation-controller9.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
packer {
required_plugins {
ansible = {
version = ">= 1.1.1"
source = "github.com/hashicorp/ansible"
}
amazon = {
source = "github.com/hashicorp/amazon"
version = "~> 1"
}
}
}

variable "ansible_vars_file" {
type = string
default = null
Expand All @@ -20,8 +33,9 @@ data "amazon-ami" "automation_controller" {
}

source "amazon-ebs" "automation_controller_source" {
ami_name = "automation_controller {{timestamp}}"
instance_type = "m4.xlarge"
ami_name = "automation_controller {{ timestamp }}"
// instance_type = "m4.xlarge"
instance_type = "m5.2xlarge"
region = "us-east-1"
associate_public_ip_address = "true"
source_ami = data.amazon-ami.automation_controller.id
Expand All @@ -32,14 +46,14 @@ source "amazon-ebs" "automation_controller_source" {
ami_regions = ["us-east-1"]
launch_block_device_mappings {
device_name = "/dev/sda1"
volume_size = "40"
volume_size = "60"
volume_type = "gp3"
delete_on_termination = "true"
iops = "3000"
throughput = "125"
}
run_tags = {
"Name" = "packer-build"
"Name" = "packer - {{ timestamp }}"
"owner" = "seanc"
}
}
Expand Down
45 changes: 33 additions & 12 deletions provisioner/packer/pre_build_controller.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
- name: Initial check setup
hosts: localhost
connection: local
become: false
gather_facts: true
tasks:
- name: Download AAP
ansible.builtin.include_role:
name: ../../roles/aap_download
# - name: Initial check setup
# hosts: localhost
# connection: local
# become: false
# gather_facts: true
# tasks:
# - name: Download AAP
# ansible.builtin.include_role:
# name: ../../roles/aap_download

- name: Configures automation controller node
hosts: all
Expand All @@ -20,33 +20,54 @@
student: "{{ username }}"
short_name: "ansible-1"
tasks:
- name: List ansible.controller collection
delegate_to: localhost
become: false
ansible.builtin.shell:
cmd: "ansible-galaxy collection list | grep ansible.controller"
register: collections_list

- name: Display the collection version information
ansible.builtin.debug:
msg: "{{ collections_list.stdout }}"

- name: Set hostname
ansible.builtin.hostname:
name: "{{ short_name|default('ansible-1') }}"
name: "{{ short_name | default('ansible-1') }}"

- name: Setup /etc/hosts file per student
ansible.builtin.template:
src: "{{ playbook_dir }}/templates/etchosts.j2"
dest: "/etc/hosts"

- name: Print out ansible_host var
ansible.builtin.include_vars:
file: "../group_vars/all/all.yml"
file: "../group_vars/all/all.yml"

- name: Print out ansible_host var
ansible.builtin.debug:
var: hostvars.controller

- name: Print ipv4 address
ansible.builtin.debug:
var: ansible_default_ipv4.address

- name: Include user accounts
ansible.builtin.include_role:
name: ../../roles/user_accounts

- name: Include common role
ansible.builtin.include_role:
name: ../../roles/common

- name: Establish connetivity to managed nodes
ansible.builtin.include_role:
name: ../../roles/connectivity_test

- name: Configure control node
ansible.builtin.include_role:
name: ../../roles/control_node
- include_role:

- name: Install code-server
ansible.builtin.include_role:
name: ../../roles/code_server_native
3 changes: 1 addition & 2 deletions provisioner/packer/templates/etchosts.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

127.0.0.1 {{ short_name }}

127.0.0.1 {{ short_name }} {{ short_name }}.local
3 changes: 2 additions & 1 deletion provisioner/provision_lab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
gather_facts: false

tasks:
- ansible.builtin.include_role:
- name: Check connectivity to all AWS instances
ansible.builtin.include_role:
name: ../roles/connectivity_test

- name: Configure host names on managed nodes
Expand Down
46 changes: 0 additions & 46 deletions provisioner/tests/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions provisioner/tests/ansible.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions provisioner/tests/ci-auto_satellite.yml

This file was deleted.

3 changes: 0 additions & 3 deletions provisioner/tests/ci-f5.yml

This file was deleted.

3 changes: 0 additions & 3 deletions provisioner/tests/ci-networking.yml

This file was deleted.

2 changes: 0 additions & 2 deletions provisioner/tests/ci-rhel.yml

This file was deleted.

4 changes: 0 additions & 4 deletions provisioner/tests/ci-security.yml

This file was deleted.

4 changes: 0 additions & 4 deletions provisioner/tests/ci-smart_mgmt.yml

This file was deleted.

3 changes: 0 additions & 3 deletions provisioner/tests/ci-windows.yml

This file was deleted.

30 changes: 0 additions & 30 deletions provisioner/tests/generate_ci_common.py

This file was deleted.

35 changes: 0 additions & 35 deletions provisioner/tests/rhel_verify.yml

This file was deleted.

Loading

0 comments on commit 6a160c0

Please sign in to comment.