Skip to content

Commit

Permalink
Merge pull request #549 from containers/hacking_e2e_fix
Browse files Browse the repository at this point in the history
trying to pass runtime var to allow for model pull
  • Loading branch information
rhatdan authored Jun 11, 2024
2 parents 5c92332 + 45dc5dd commit 24b4bbc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/training-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
paths:
- .github/workflows/training-e2e.yaml
- ./training/**

workflow_dispatch:

env:
Expand All @@ -20,6 +20,7 @@ env:
TF_VAR_aws_volume_size: 500
TF_VAR_aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
TF_VAR_aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
HF_TOKEN: ${{ secrets.HF_TOKEN }}

concurrency:
group: ${{ github.workflow }}
Expand Down Expand Up @@ -69,7 +70,7 @@ jobs:
env:
TF_VAR_aws_instance_type: ${{ matrix.aws_image_type }}
TF_VAR_aws_ami_architecture: ${{ matrix.aws_ami_architecture }}

- name: Terraform Output
id: terraform-output
run: |
Expand All @@ -95,16 +96,13 @@ jobs:
env:
ANSIBLE_CONFIG: ./main/training/tests/ansible.cfg

- name: Wait for 4 minutes
run: sleep 240

# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3.18
# timeout-minutes: 20
# with:
# detached: true
# limit-access-to-actor: false

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3.18
timeout-minutes: 60
Expand All @@ -114,9 +112,10 @@ jobs:

- name: Run tests
run: |
ansible-playbook ./main/training/tests/e2e-tests/playbook.yml \
ansible-playbook ./main/training/tests/e2e-tests/playbook.yml -vvv \
-i terraform-test-environment-module/hosts.ini \
--private-key=terraform-test-environment-module/${{ steps.terraform-output.outputs.pem_filename }} \
--extra-vars "HF_TOKEN=${{ secrets.HF_TOKEN }}" \
--extra-vars "image_name=${{ matrix.image_name }}" \
--extra-vars "ssh_public_key='${{ steps.terraform-output.outputs.ssh_public_key }}'" \
--extra-vars "registry_user=${{ secrets.REGISTRY_USER }}" \
Expand All @@ -141,7 +140,7 @@ jobs:
env:
TF_VAR_aws_instance_type: ${{ matrix.aws_image_type }}
TF_VAR_aws_ami_architecture: ${{ matrix.aws_ami_architecture }}

- name: Publish Job Results to Slack
id: slack
if: always()
Expand Down
6 changes: 4 additions & 2 deletions training/tests/e2e-tests/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
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:

Expand All @@ -20,6 +20,8 @@
url: https://raw.githubusercontent.com/instructlab/instructlab/main/scripts/basic-workflow-tests.sh
dest: /tmp/basic-workflow-tests.sh
mode: 755
environment:
HF_TOKEN: "{{ HF_TOKEN }}"

# Allow for debugging with tmate
# - name: Wait for 15 minutes
Expand Down
11 changes: 5 additions & 6 deletions training/tests/provision/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
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:

Expand Down Expand Up @@ -42,7 +42,7 @@
ansible.builtin.shell: |
podman pull "quay.io/ai-lab/{{ image_name }}:latest" \
--authfile=/etc/containers/auth.json \
--arch amd64
--arch amd64
# --retry=3 \
# --retry-delay=15 \
Expand Down Expand Up @@ -112,6 +112,5 @@
delegate_to: localhost

- name: Reboot
ansible.builtin.shell: systemctl reboot
ignore_errors: true
ignore_unreachable: true
ansible.builtin.reboot:
reboot_timeout: 300

0 comments on commit 24b4bbc

Please sign in to comment.