Skip to content

Handle create/delete of storage pool for bootMode iso: #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion capt/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tasks:
create-playground:
silent: true
summary: |
Create the CAPT playground. Use the .playground file to define things like cluster size and Kubernetes version.
Create the CAPT playground. Use the config.yaml file to define things like cluster size and Kubernetes version.
cmds:
- task: system-deps-warnings
- task: validate-binaries
Expand Down
2 changes: 1 addition & 1 deletion capt/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ counts:
versions:
capt: v0.6.1
chart: 0.6.1
kube: v1.28.9
kube: v1.29.4
os: 20.04
kubevip: 0.8.7
capt:
Expand Down
10 changes: 10 additions & 0 deletions capt/tasks/Taskfile-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ tasks:
- task: bmc-secret
- task: vms
- task: vbmc:start-vbmcs
- task: default-storage-pool
- task: apply-bmc-secret
- task: apply-bmc-machines
- task: apply-hardware
Expand Down Expand Up @@ -240,3 +241,12 @@ tasks:
- echo "Workload cluster kubeconfig saved to {{.OUTPUT_DIR}}/{{.CLUSTER_NAME}}.kubeconfig."
status:
- echo ; [ -f {{.OUTPUT_DIR}}/{{.CLUSTER_NAME}}.kubeconfig ]

default-storage-pool:
summary: |
Create the default storage pool for the redfish emulator to work properly.
cmds:
- virsh --connect qemu:///system pool-define-as --name default --type dir --target /tmp/iso
- virsh --connect qemu:///system pool-start --build default
status:
- virsh --connect qemu:///system pool-info default
11 changes: 11 additions & 0 deletions capt/tasks/Taskfile-delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tasks:
- task: vbmc-container
- task: vbmc-generated-files
- task: vms
- task: default-storage-pool
- task: output-dir

kind-cluster:
Expand Down Expand Up @@ -38,6 +39,16 @@ tasks:
status:
- got=$(virsh --connect qemu:///system list --all --name | grep -ce "{{.VM_BASE_NAME}}*" || :); [[ "$got" == "0" ]]

default-storage-pool:
summary: |
Delete the default storage pool.
cmds:
- for vol in $(virsh --connect qemu:///system -q vol-list default | xargs | cut -d " " -f1,3,5,7,9); do virsh --connect qemu:///system vol-delete --pool default $vol; done
- virsh --connect qemu:///system pool-destroy default || true
- virsh --connect qemu:///system pool-undefine default
status:
- (! virsh --connect qemu:///system pool-info default )

vbmc-container:
summary: |
Delete the Virtual BMC container.
Expand Down
Loading