Skip to content

Commit

Permalink
creating anisble playbooks and more content to testing framework
Browse files Browse the repository at this point in the history
Signed-off-by: greg pereira <[email protected]>
  • Loading branch information
Gregory-Pereira committed May 1, 2024
1 parent 4419054 commit 0b36def
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Instructlab Images Testing Framework
name: Bootc Images Testing Framework

on:
schedule: # schedule the job to run every day at midnight
Expand All @@ -9,7 +9,7 @@ on:
branches:
- main
paths:
- .github/workflows/instructlab_testing_framework.yaml
- .github/workflows/bootc_testing_framework.yaml

workflow_dispatch:

Expand Down Expand Up @@ -37,11 +37,9 @@ jobs:
matrix:
include:
- arch: amd64
aws_image_type: t3a.medium
aws_image_type: t2.micro
image_name: nvidia-bootc
aws_ami_architecture: x86_64
# - arch: amd64
# aws_image_type: g5.8xlarge
# aws_ami_architecture: x86_64
steps:
- name: Checkout
uses: actions/[email protected]
Expand Down Expand Up @@ -82,10 +80,18 @@ jobs:
echo "pem_filename=$(terraform output pem_filename | xargs)" >> $GITHUB_OUTPUT
working-directory: terraform-test-environment-module

- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.11'
- name: Ansible Collections
run: ansible-galaxy install -r ./provision/requirements.yml
working-directory: ./main/training

- name: Provision
run: |
ansible-playbook ./main/training/provision/playbook.yml \
-i terraform-test-environment-module/hosts.ini \
--private-key=terraform-test-environment-module/${{ steps.terraform-output.outputs.pem_filename }}
env:
ANSIBLE_HOST_KEY_CHECKING: false
image_name: ${{ matrix.image_name }}

- name: Destroy Test Environment
id: down
Expand Down
21 changes: 21 additions & 0 deletions training/provision/playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
- name: Test Environment Provisioning
hosts: test_environments
remote_user: fedora
become: true
gather_facts: false

tasks:

- name: Wait until the instance is ready
ansible.builtin.wait_for_connection:
delay: 15
timeout: 180

- name: Gather facts for first time
ansible.builtin.setup:

- name: Required Packages
ansible.builtin.package:
name: podman
state: present
4 changes: 4 additions & 0 deletions training/provision/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
collections:
- name: containers.podman
version: 1.13.0

0 comments on commit 0b36def

Please sign in to comment.