github.com/technosophos/deis@v1.7.1-0.20150915173815-f9005256004b/docs/installing_deis/azure.rst (about) 1 :title: Installing Deis on Microsoft Azure 2 :description: How to provision a multi-node Deis cluster on Microsoft Azure 3 4 .. _deis_on_azure: 5 6 Microsoft Azure 7 =============== 8 9 This section will show you how to create a 3-node Deis cluster on Microsoft Azure. 10 11 Before you start, :ref:`get the Deis source <get_the_source>` and change directory into `contrib/azure`_ 12 while following this documentation. 13 14 15 Install Python and Azure SDK for Python 16 --------------------------------------- 17 18 The cluster creation tool uses Python and the Python Azure library to create a CoreOS cluster. 19 If you haven't already, install these on your development machine: 20 21 .. code-block:: console 22 23 $ brew install python 24 $ sudo pip install azure pyyaml 25 26 Generate Certificates 27 --------------------- 28 29 The azure-coreos-cluster creation tool uses the Azure management REST API to create the CoreOS 30 cluster which uses a management certificate to authenticate. 31 32 If you don't have a management certificate already configured, the script generate-mgmt-cert.sh can 33 create this certificate for you. Otherwise, you can skip to the next section. 34 35 If you need to create a certificate, edit cert.conf in contrib/azure with your company's details and then run: 36 37 .. code-block:: console 38 39 $ ./generate-mgmt-cert.sh 40 41 Upload Management Cert 42 ---------------------- 43 44 If you haven't uploaded your management certificate to Azure (azure-cert.cer if you used the script 45 in the previous section), do that now using the `management certificates tab`_ of the 46 Azure portal's Settings. 47 48 Also copy the Azure subscription id from this table and save it for the cluster creation script below. 49 50 51 Create CoreOS Cluster 52 --------------------- 53 54 With the management certificate and cloud config in place, we are ready to create our cluster. 55 56 * Create a virtual network with a name of your choosing, containing at least one subnet. This is required to ensure that nodes get a static private IP address. Note the name of the virtual network and subnet for the cluster creation script below. 57 * Create a container called ``vhds`` within 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. 58 * Choose a cloud service name for your Deis cluster for the script below. The script will automatically create this cloud service for you. 59 * Create an `affinity group`_ if you don't already have one. Supply it in quotes with the ``--affinity-group`` parameter. 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 ``--location`` parameter. The default is ``"West US"``. If you specify both parameters, ``location`` will be ignored. Please note that the script *will not* create an affinity group by itself; it expects the affinity group exists. 60 61 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 62 endpoint. It will then use the newly created CoreOS config on the newly provisioned cluster. 63 64 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. 65 66 .. code-block:: console 67 68 $ ./azure-coreos-cluster [cloud service name] 69 --subscription [subscription id] 70 --azure-cert azure-cert.pem 71 --num-nodes 3 72 --affinity-group [affinity group name] 73 --vm-size Large 74 --pip 75 --deis 76 --blob-container-url https://[blob container].blob.core.windows.net/vhds/ 77 --data-disk 78 --custom-data azure-user-data 79 --virtual-network-name [virtual network name] 80 --subnet-names [subnet name] 81 82 This script will by default provision a 3-node cluster, but you can increase this with the 83 ``--num-nodes`` parameter. Likewise, you can increase the VM size using ``--vm-size``. 84 It is not recommended that you use smaller than Large (A3) sized instances. 85 86 A Deis cluster must have 3 or more nodes. See :ref:`cluster-size` for more details. 87 88 89 Configure DNS 90 ------------- 91 92 See :ref:`configure-dns` for more information on properly setting up your DNS records with Deis. 93 94 95 Install Deis Platform 96 --------------------- 97 98 Now that you've finished provisioning a cluster, please refer to :ref:`install_deis_platform` to 99 start installing the platform. 100 101 .. _`management certificates tab`: https://manage.windowsazure.com/#Workspaces/AdminTasks/ListManagementCertificates 102 .. _`contrib/azure`: https://github.com/deis/deis/tree/master/contrib/azure 103 .. _`etcd`: https://github.com/coreos/etcd 104 .. _`etcd disaster recovery`: https://github.com/coreos/etcd/blob/master/Documentation/admin_guide.md#disaster-recovery 105 .. _`region`: http://azure.microsoft.com/en-us/regions/ 106 .. _`affinity group`: https://msdn.microsoft.com/en-gb/library/azure/jj156085.aspx