Azure

OPS can run on Microsoft Azure assuming your environment is setup.

Pre-requisites

  1. Create a new resource group.

  2. Create a storage account - that is your bucket.

  3. You might need to login first.

      az login --scope https://graph.windows.net//.default
  4. Create a quickstart auth:

      az ad sp create-for-rbac --sdk-auth > quickstart.auth
  5. Create a role using the clientID as the assignee inside quickstart.auth:

        az role assignment create --assignee client-id-goes-here --role Contributor --scope /subscriptions/sub-id-goes-here/resourceGroups/resource-group-name

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.

{
  "CloudConfig" :{
    "Zone": "us-west2-a",
    "BucketName":"nanostest"
  }
}

Once, you have updated config.json you can create an image in Azure with the following command.

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:

List Images

You can list existing images on Azure with ops image list.

Delete Image

Instance Operations

Create Instance

VPC, Subnet and Security Group

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.

IP Forwarding

By default, IP forwarding is disabled on Azure.

If you would like to enable IP forwarding when creating the instance you can use the following:

List Instances

Get Logs for Instance

You can get logs from serial console of a particular instance using ops instance logs command. The logs are stored in your cloud storage bucket.

Delete Instance

Volume Operations

Create Volume

Create a small 1mb min. volume locally:

Upload and set the size to 50gb remotely:

List Volumes

Networking Considerations

IPV6 Networking

IPV6 support differs from cloud to cloud.

You can enable IPV6 on Azure with the following config:

Last updated

Was this helpful?