This section will show you how to create a 3-node Deis cluster on Microsoft Azure.
The cluster creation tool uses a Python script to generate a configuration file. This script uses PyYAML, a Python library, to do its work.
If you haven’t already, install these on your development machine:
For OSX users:
$ brew install python $ sudo pip install pyyaml
For Ubuntu users:
$ sudo apt-get install -y python-yaml
Additionally, we’ll also need to install the Azure CLI from Microsoft.
First, login to the Azure CLI:
$ azure login
Deis makes use of Azure Resource Manager to submit a template describing the infrastructure that we’d like to create. You’ll need an organizational account (not a typical Microsoft or Live account) in order to use this template.
Instruct the client to switch to ARM mode:
$ azure config mode arm
Switch to the
$ cd contrib/azure
Generate a new discovery URL for the deployment so the hosts can find each other:
$ ./create-azure-user-data $(curl -s https://discovery.etcd.io/new)
parameters.json to configure the parameters required for the
publicDomainName, specify the prefix of domain name (like
sshKeyData, use the public key material for the SSH key you’d like
to use to log into the hosts. For
customData, you’ll need to supply the
base64-encoded version of
azure-user-data. This can be generated using
$ base64 azure-user-data
Paste the result into
parameters.json. Any of the values in
are defaults and can be customized if desired.
For best performance, Deis clusters on Azure default to using premium storage. This incurs an additional cost. Using standard storage is possible, but is unsupported as it resulted in cluster issues during testing. Premium storage is only available in some regions.
Finally, we can deploy. Choose a valid location to deploy – you can list all locations
azure location list.
As an example, to create a deployment named “deis” in the “West US” region:
$ azure group create --name deis --location "West US" --deployment-name deis --template-file arm-template.json --parameters-file parameters.json
Each instance will have a public IP address which can be used to log in via SSH
or as a tunnel endpoint for
deisctl. You can get these IPs from the Azure Portal
or via the CLI with
azure vm show:
$ azure vm show deisNode0 --resource-group deis | grep 'Public IP address'
See Configure DNS for more information on properly setting up your DNS records with Deis.