This section will show you how to create a 3-node Deis cluster on Microsoft Azure.
The cluster creation tool uses Python and the Python Azure library to create a CoreOS cluster. If you haven’t already, install these on your development machine:
$ brew install python $ sudo pip install azure pyyaml
The azure-coreos-cluster creation tool uses the Azure management REST API to create the CoreOS cluster which uses a management certificate to authenticate.
If you don’t have a management certificate already configured, the script generate-mgmt-cert.sh can create this certificate for you. Otherwise, you can skip to the next section.
If you need to create a certificate, edit cert.conf in contrib/azure with your company’s details and then run:
If you haven’t uploaded your management certificate to Azure (azure-cert.cer if you used the script in the previous section), do that now using the management certificates tab of the Azure portal’s Settings.
Also copy the Azure subscription id from this table and save it for the cluster creation script below.
With the management certificate and cloud config in place, we are ready to create our cluster.
vhdswithin a storage account in the same region as your cluster using the Azure portal. Note the URL of the container for the cluster creation script below.
--affinity-groupparameter. Although using an affinity group is not mandatory, it is highly recommended since it tells the Azure fabric to place all VMs in the cluster physically close to each other, reducing inter-node latency by a great deal. If you don’t want to use affinity groups, specify a region for Azure to use with a
--locationparameter. The default is
"West US". If you specify both parameters,
locationwill be ignored. Please note that the script will not create an affinity group by itself; it expects the affinity group exists.
This script calls the
./create-azure-user-data script which takes the stock cluster instance config in
../coreos/user-data.example, customizes it for Azure, and inserts a unique cluster discovery
endpoint. It will then use the newly created CoreOS config on the newly provisioned cluster.
With that, let’s run the azure-coreos-cluster script which will create the CoreOS cluster. Fill in the bracketed values with the values for your deployment you created above.
$ ./azure-coreos-cluster [cloud service name] --subscription [subscription id] --azure-cert azure-cert.pem --num-nodes 3 --affinity-group [affinity group name] --vm-size Large --pip --deis --blob-container-url https://[blob container].blob.core.windows.net/vhds/ --data-disk --custom-data azure-user-data
This script will by default provision a 3-node cluster, but you can increase this with the
--num-nodes parameter. Likewise, you can increase the VM size using
It is not recommended that you use smaller than Large (A3) sized instances.
A Deis cluster must have 3 or more nodes. See Cluster size for more details.
See Configure DNS for more information on properly setting up your DNS records with Deis.