Deploy on Azure
Prerequisites
-
Install NeonDESKTOP: instructions
-
You'll also need to know your AZURE_SUBSCRIPTION_ID
$todo(jefflill): document how to obtain this
Azure Subscription Credentials
NeonKUBE will need your Azure subscription credentials so it will be able to deploy and manage the cluster. You'll also need to accept the NeonKUBE offer EULA on Azure.
Install the Azure CLI.
Run the following command to obtain your subscription credentials (you'll need to subsitute your Azure username for [USER] and your Azure subscription ID for [AZURE_SUBSCRIPTION_ID] below):
az ad sp create-for-rbac --name [USER] --role owner --scopes /subscriptions/[AZURE_SUBSCRIPTION_ID]
The output will be something like:
{
"appId": "[AZURE_CLIENT_ID]",
"displayName": "example-app-name",
"password": "[AZURE_CLIENT_SECRET]",
"tenant": "[AZURE_TENANT_ID]"
}
We'll use the [AZURE_CLIENT_ID], [AZURE_CLIENT_SECRET], and [AZURE_TENANT_ID] from the output plus the AZURE_SUBSCRIPTION_ID you already know.
Next, you'll need to accept the NeonKUBE offer terms and EULA, via the AZURE-CLI:
View the offer terms:
az vm image terms show --urn neonforge:neonkube:0-11-0-beta-0:0.11.0
Accept the terms
az vm image terms accept --urn neonforge:neonkube:0-11-0-beta-0:0.11.0
Azure doesn't directly support semantic versioning of their Virtual Machine Images, so we have to do some version contortions to get this to work. We'll probably add a NeonCLI command that figures out the version and then launches AZURE-CLI with the correct paramweters.
The 0-11-0-beta-0:0.11.0 version part of the URN above is formatted with the first part being the full semantic version of the release 0.11.0 with all dots replaced by dashes like 0-11-0 and the second part being the major, minor, and patch version of the release only.
Cluster Definition
Create a Cluster Definition that describes the cluster.
Make sure that the Azure account has enough Resource Quota to deploy cluster virtual machines.
Be sure to substitute the following from the previous steps:
AZURE_SUBSCRIPTION_ID
AZURE_TENANT_ID
AZURE_CLIENT_ID
AZURE_CLIENT_SECRET
name: my-azure-cluster
datacenter: westus2
hosting:
environment: azure
cloud:
prefixResourceNames: default
azure:
subscriptionId: [AZURE_SUBSCRIPTION_ID]
tenantId: [AZURE_TENANT_ID]
clientId: [AZURE_CLIENT_ID]
clientSecret: [AZURE_CLIENT_SECRET]
region: westus2
defaultVmSize: Standard_E4vs_v5
nodes:
control-0:
role: control-plane
Save the modified cluster definition somewhere on your disk.
Cluster Deployment via NeonDESKTOP
-
Right click the NeonDESKTOP icon in the taskbar > Deploy cluster
-
Use the file picker to select the cluster definiton file you saved above
-
Grab a coffee and wait for NeonDESKTOP to deploy the cluster.
Cluster Deployment via NeonCLI
Cluster deployment happens in two phases:
-
Configuring the hosting infrastructure, which involves configuring the Resource Group, Virtual Networl, starting the VMs, configuring the LoadBalancer, IP Addresses, Disks, etc.
-
Setting up the cluster. This involves configuring Linux and Kubernetes and then installing the necessary cluster components via Helm charts.
Execute the commands to deploy this cluster, passing the PATH to the cluster definition file you saved above and CLUSTERNAME to the cluster name as defined in the definition:
Prepare the cluster infrastructure
neon cluster prepare /path/to/your/cluster-definition.yaml
Setup the cluster
neon cluster setup sysadmin@my-azure-cluster
Then wait for cluster setup to complete.
These operations are currently coordinated by NeonDESKTOP or NeonCLI running on your machine, so you'll need to keep your computer running and connected to the network.
We plan on supporting cloud based deployment in the future where these operations will be managed in the cloud, rather than from your computer.