Skip to content

Commit

Permalink
Build and Install Bootc Image
Browse files Browse the repository at this point in the history
Signed-off-by: Liora Milbaum <[email protected]>
  • Loading branch information
lmilbaum committed May 4, 2024
1 parent e9d5aa8 commit 44c0e1b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/training-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- main
paths:
- .github/workflows/training-e2e.yaml
- training

workflow_dispatch:

Expand All @@ -21,9 +22,9 @@ env:
TF_VAR_aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
TF_VAR_aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
# concurrency:
# group: ${{ github.workflow }}
# cancel-in-progress: false

jobs:
e2e:
Expand Down
37 changes: 30 additions & 7 deletions training/provision/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@
registry: quay.io
authfile: /etc/containers/auth.json

- name: Build and Install the Bootc Image
- name: Build the Bootc Image
async: 1000
poll: 0
register: build_result
ansible.builtin.shell: |
podman build -t derived_image:latest -f /tmp/Containerfile --authfile=/etc/containers/auth.json .
podman run --rm --privileged --pid=host --security-opt label=type:unconfined_t -v /:/target -v /var/lib/containers:/var/lib/containers derived_image:latest bootc install to-filesystem --karg=console=ttyS0,115200n8 --replace=alongside /target
podman build -t derived_image -f /tmp/Containerfile --authfile=/etc/containers/auth.json .
- name: Check on Build and Install Bootc Image
async_status:
jid: "{{ build_result.ansible_job_id }}"
Expand All @@ -51,6 +50,30 @@
retries: 100
delay: 10

- name: Restart instance
ansible.builtin.reboot:
test_command: which ilab
- name: Install the Bootc Image
async: 1000
poll: 0
register: install_result
ansible.builtin.shell: |
podman run --pull=never --rm --privileged --pid=host --security-opt label=type:unconfined_t -v /:/target -v /var/lib/containers:/var/lib/containers localhost/derived_image bootc install to-filesystem --karg=console=ttyS0,115200n8 --replace=alongside /target
- name: Check on Install Bootc Image
async_status:
jid: "{{ install_result.ansible_job_id }}"
register: job_result
until: job_result.finished
retries: 100
delay: 10

# - name: List images
# register: list_result
# ansible.builtin.shell: |
# podman images

# - ansible.builtin.debug: msg="{{ list_result }}"

# - name: Restart instance
# ansible.builtin.reboot:
# test_command: which ilab
# # vars:
# # remote_user: root

0 comments on commit 44c0e1b

Please sign in to comment.