From 4f93fac826e8e611b440bf7f933318d26775cd99 Mon Sep 17 00:00:00 2001 From: Liora Milbaum Date: Thu, 2 May 2024 14:00:39 +0300 Subject: [PATCH] restart test environment instance after bootc install Signed-off-by: Liora Milbaum --- .github/workflows/README.md | 7 +++++-- .../{bootc_testing_framework.yaml => training-e2e.yaml} | 6 +++--- training/provision/playbook.yml | 4 ++++ 3 files changed, 12 insertions(+), 5 deletions(-) rename .github/workflows/{bootc_testing_framework.yaml => training-e2e.yaml} (96%) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index cda5accf..4a759130 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -25,6 +25,9 @@ Finally all of our testing framework workflows will call `terraform destroy` to IMPORTATNT: If you are doing development and testing, please make sure that instances in AWS are spun down before leaving if you have access to the AWS account. -### testing_bootc specific pieces +### training-e2e -This workflow is based off of `Fedroa 40`. It provisions a `g5.8xlarge` AWS EC2 instance. In the ansible playbook for this workflow, it will first check that the only requirement -- podman -- is installed to before running the bootc install. \ No newline at end of file +The test environment is initially based off of `Fedroa 40`. +It bootstraps a `g5.8xlarge` AWS EC2 instance with Terraform. +Provisioning is executed with ansible. The ansible playbook is invoking bootc install and +reboots the instance. diff --git a/.github/workflows/bootc_testing_framework.yaml b/.github/workflows/training-e2e.yaml similarity index 96% rename from .github/workflows/bootc_testing_framework.yaml rename to .github/workflows/training-e2e.yaml index 29125edb..2a67c653 100644 --- a/.github/workflows/bootc_testing_framework.yaml +++ b/.github/workflows/training-e2e.yaml @@ -1,4 +1,4 @@ -name: Bootc Images Testing Framework +name: traning E2E on: schedule: # schedule the job to run every day at midnight @@ -9,7 +9,7 @@ on: branches: - main paths: - - .github/workflows/bootc_testing_framework.yaml + - .github/workflows/training-e2e.yaml workflow_dispatch: @@ -26,7 +26,7 @@ concurrency: cancel-in-progress: false jobs: - integration-tests: + e2e: if: github.repository == 'containers/ai-lab-recipes' runs-on: ubuntu-22.04 strategy: diff --git a/training/provision/playbook.yml b/training/provision/playbook.yml index 746e39a2..566afc6d 100644 --- a/training/provision/playbook.yml +++ b/training/provision/playbook.yml @@ -37,3 +37,7 @@ privileged: yes pid_mode: host command: "bootc install to-filesystem --karg=console=ttyS0,115200n8 --replace=alongside /target" + + - name: Restart instance + ansible.builtin.reboot: + test_command: pwd