Skip to content

Latest commit

 

History

History
132 lines (89 loc) · 2.53 KB

azure.md

File metadata and controls

132 lines (89 loc) · 2.53 KB

Experiment setup with Azure

Links

Here are some docs that may be useful when dealing with AKS:

Azure CLI

You will need to set up the Azure client (az) as per the official instructions.

In Ubuntu:

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

Then run the Azure login:

az login

On success, this returns some JSON with the details of your account(s). You need to pick the id field of the one you want, then:

az account set -s <account_id>

Setting up a cluster with AKS

At the time of writing, AKS only supported Ubuntu 18.04, which is insufficient for certain experiments. See below for setting up a cluster on custom VMs.

Provision the cluster with:

inv cluster.provision

Once set up, you need to configure kubectl with:

inv cluster.credentials

From here you can follow the Faasm k8s instructions from a normal Faasm checkout.

Clearing up

Once finished with the cluster, you can delete it with:

inv cluster.delete

Setting up VMs

List any in existence:

inv vm.list-all

Create a new one:

inv vm.create

Delete one:

# Delete a specific VM and associated resources
inv vm.delete <vm name>

Delete all:

# Delete all VMs and resources
inv vm.delete-all

# Delete all VMs and resources with given prefix
inv vm.delete-all --prefix <some prefix>

The size of VMs is determined in the script itself, so you can tweak it there if necessary.

Once provisioned, you can set up a VM according to the docs.

Setting up K8s on custom VMs

Create as many VMs as you need:

inv vm.create -n 4

List them to work out which ones you want to deploy on:

inv vm.list-all

If you just want to deploy on all the ones that are there, you can run the following commands without a prefix, otherwise deploy on a subset using their shared name prefix.

We have to set up the Ansible inventory, and open the ports necessary for Faasm and kubectl:

# All VMs
inv vm.open-ports
inv vm.inventory

# VMs with names starting with prefix
inv vm.open-ports --prefix <vm prefix>
inv vm.inventory --prefix <vm prefix>

You can then follow the k8s setup docs.