Don't use this. Really. Azure has managed disks now. Azure has a better CLI now.
The only thing valuable in here is the cleanup script, which is destructive and you're better off reading/writing yourself.
I'll probably delete this repo in the future, or archive it, or move it to junk repo, or something.
Collection of random tools for Azure.
Note, some of these scripts assume they're executing in busybox. (cleanup.sh
, for example, uses timeout which has different syntax under busybox)
This will delete resource groups whose name contains the first argument.
export AZURE_SUBSCRIPTION_ID=6f368760-9ad2-4aef-8ff1-fb038d2e75bf
./cleanup.sh k8s
# Output:
# DELETE: colemick-k8s-c0 colemick-k8s-pr220 k8s-any-1117-1959a49
# SUBSCRIPTION: 6f368760-9ad2-4aef-8ff1-fb038d2e75bf
# CONFIRM ('yes' proceeds, everything else exits):
This will create and upload a formatted VHD to your storage account/container.
export AZURE_SUBSCRIPTION_ID=6f368760-9ad2-4aef-8ff1-fb038d2e75bf
export AZURE_RESOURCE_GROUP=colemick-vhds2
export AZURE_STORAGE_ACCOUNT=colemickvhds2
export AZURE_STORAGE_CONTAINER=colemickvhds2
export IMAGE_SIZE=10G
export MKFS_TYPE=ext4 # (default: 'ext4'. possible: ['ext4', 'ntfs', 'xfs'])
./make-vhd.sh
# Output:
# ...
# VHD_URL=https://colemickvhds2.blob.core.windows.net/colemickvhds2/data-disk-082916103645.vhd
docker.io/colemickens/azure-tools:latest