This repo is used to build an Ubuntu-Core-based image meant to be used in an Azure VM.
- Follow https://ubuntu.com/core/docs/sign-model-assertion to create a snapcraft key.
- Build a local Azure gadget snap following the instructions in https://github.com/danpdraper/pc-gadget/tree/azure
- Build a local kernel snap from https://git.launchpad.net/~ckt-core-cloud-test/+git/azure-kernel-snaps-uc24
- Export your snapcraft credentials following the instructions in https://ubuntu.com/core/docs/create-ubuntu-one#heading--snapcraft-credentials
- Run
$ SNAPCRAFT_KEY_NAME=<name of snapcraft key> GADGET_SNAP_PATH=<path to local Azure gadget snap> KERNEL_SNAP_PATH=<path to local Azure kernel snap> SNAPCRAFT_STORE_CREDENTIALS=$(cat <path to Snapcraft credentials file>) make raw_image
WIP
To convert the raw image to a fixed-size VHD, publish that VHD to Azure, and create an image gallery image version from that VHD, run the following from this repository's root:
Warning Use only a-z and _ characters for the Azure resource group name and disk name as the scripts concat these for the image gallery name and other characters cause issues.
$ AZURE_RESOURCE_GROUP_NAME=<name of target resource group for disk> AZURE_DISK_NAME=<name of disk> make image_gallery_image_version$ AZURE_RESOURCE_GROUP_NAME=<name of target resource group for disk> AZURE_VM_NAME=<name of disk> make azure_vmGet the public IP of the VM from the output of the previous step or with something like:
az vm show -d -n <vm name> -g <resource group> --query publicIpsThe above should have created a new ssh key under ~/.ssh
ssh -i ~/.ssh/1717589696_845042 -o IdentitiesOnly=yes <your username>@<public ip>