This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tagName=foundation-nodes | |
diskName="os$" | |
machines=$(maas root tag machines $tagName | jq -r '.[] | .system_id') | |
for machine in $machines | |
do | |
diskId=$(maas root block-devices read $machine | jq -r '.[] | .name, .id' | grep $diskName -A 1 | tail -n 1) | |
echo "maas root block-device set-boot-disk $machine $diskId" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requires Bash version 4+ because it uses dictionaries/arrays | |
# Define the 2 project IDs | |
# I assume the same user has access to both projects | |
OLD_PROJECT=INSERT_OLD_PROJECT_ID; | |
NEW_PROJECT=INSERT_NEW_PROJECT_ID; | |
# Maintain a dictionary of volume IDs to VM names so that we can attach to the correct VM later | |
# Detach the non-boot volumes from the VMs in the old project and transfer them to the new project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description: A highly-available, production-grade Kubernetes cluster. | |
series: focal | |
machines: | |
# Baremetals | |
"1001": | |
constraints: tags=baremetal | |
"1002": | |
constraints: tags=baremetal | |
"1003": | |
constraints: tags=baremetal |