Most of the environment variables you need will be found in this json file.
Image Operations
Create Image
If you have already created an Ops project, you can update your existing config.json. You need to add CloudConfig which mentions specific details like ProjectID, BucketName.
Once, you have updated config.json you can create an image in Azure with the following command.
#!/bin/sh# used for uploading blobexport AZURE_STORAGE_ACCOUNT="nanostest"export AZURE_STORAGE_ACCESS_KEY=""# used for createexport AZURE_SUBSCRIPTION_ID=""export AZURE_LOCATION_DEFAULT=""export AZURE_TENANT_ID=""export AZURE_CLIENT_ID=""export AZURE_CLIENT_SECRET=""# used for everything?export AZURE_BASE_GROUP_NAME="bob"GOOS=linuxgobuild-ogtest2opsimagecreate<elf_file|program> -cconfig.json-tazure-agtest2
The newer version of ops uses Azure Galleries to store images as Azure has been moving away from their older image storage now. In fact most new instance types require it.
If you wish to override the default gallery name of 'nanos_gallery' you can export an env var like so:
export AZURE_GALLERY_NAME="my_new_gallery"
List Images
You can list existing images on Azure with ops image list.
By default, ops creates a VPC, a subnet and a security group per instance.
You can select a different VPC, subnet or security group using the configuration file. The keys to set are CloudConfig.VPC, CloudConfig.Subnet and CloudConfig.SecurityGroup.