Skip to content

Instantly share code, notes, and snippets.

@patrick0057
Last active December 26, 2018 19:43
Show Gist options
  • Save patrick0057/d907f884aec45cfda16705d2ff0c70c8 to your computer and use it in GitHub Desktop.
Save patrick0057/d907f884aec45cfda16705d2ff0c70c8 to your computer and use it in GitHub Desktop.
Rancher 1.6 deploy Azure node from CLI
#!/bin/bash
#Blank values must be filled in unless specified otherwise by preceding comment.
#Name of the rancher environment you want to deploy your node to
export RANCHER_ENVIRONMENT='Default'
#Full path of your Rancher CLI executable
export RANCHERCLI_PATH='/usr/local/bin/rancher'
export MACHINE_DRIVER='azure'
#Name of your Node
export NAME=''
#AZURE_ENVIRONMENT can be: AzureChinaCloud, AzureGermanCloud, AzurePublicCloud or AzureUSGovernmentCloud
export AZURE_ENVIRONMENT='AzurePublicCloud'
#To get a list of locations for AZURE_LOCATION you can use the following command which utilizes amazon's cli az and jq for formatting.
# az account list-locations --output json | jq -r '.[].name'
export AZURE_LOCATION='centralus'
export AZURE_AVAILABILITY_SET=''
export AZURE_RESOURCE_GROUP=''
export AZURE_SUBSCRIPTION_ID=''
export AZURE_CLIENT_ID=''
export AZURE_CLIENT_SECRET=''
export AZURE_SUBNET=''
export AZURE_VNET=''
#Can leave AZURE_PRIVATE_IP_ADDRESS blank for default value
export AZURE_PRIVATE_IP_ADDRESS=''
export AZURE_SUBNET_PREFIX=''
export AZURE_STATIC_PUBLIC_IP='Static'
export AZURE_IMAGE='canonical:UbuntuServer:16.04.0-LTS:latest'
export AZURE_DOCKER_PORT='2376'
export AZURE_SSH_USER='docker-user'
export AZURE_SIZE='Standard_A3'
export AZURE_OPEN_PORT='500/udp,4500/udp'
export AZURE_STORAGE_TYPE='Standard_LRS'
export ENGINE_INSTALL_URL='https://releases.rancher.com/install-docker/17.06.sh'
$RANCHERCLI_PATH host create $NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment