github.com/rvaralda/deis@v1.4.1/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  Create Cluster Cloud Config
    51  ---------------------------
    52  
    53  Before we can create a cluster, we need to create a cloud config for it. The script
    54  ``create-azure-user-data`` does this for you. This script takes the stock cluster instance config
    55  in ``../coreos/user-data.example``, customizes it for Azure, and inserts a unique cluster discovery
    56  endpoint:
    57  
    58  .. code-block:: console
    59  
    60      $ ./create-azure-user-data $(curl -s https://discovery.etcd.io/new)
    61  
    62  This will create a azure-user-data cloud config file. We'll use this with the script in the next
    63  section during cluster creation.
    64  
    65  Create CoreOS Cluster
    66  ---------------------
    67  
    68  With the management certificate and cloud config in place, we are ready to create our cluster.
    69  
    70  * 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.
    71  * Choose a cloud service name for your Deis cluster for the script below. The script will automatically create this cloud service for you.
    72  * Choose an Azure `region`_ to use. Supply it in quotes with the ``--location`` parameter. The default is "West US".
    73  
    74  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.
    75  
    76  .. code-block:: console
    77  
    78      $ ./azure-coreos-cluster [cloud service name]
    79           --subscription [subscription id]
    80           --azure-cert azure-cert.pem
    81           --num-nodes 3
    82           --location "[location]"
    83           --vm-size Large
    84           --pip
    85           --deis
    86           --blob-container-url https://[blob container].blob.core.windows.net/vhds/
    87           --data-disk
    88           --custom-data azure-user-data
    89  
    90  This script will by default provision a 3 node cluster but you can increase this with the
    91  ``--num-nodes`` parameter. Likewise, you can increase the VM size using ``--vm-size``.
    92  It is not recommended that you use smaller than Large (A3) sized instances.
    93  
    94  Note that for scheduling to work properly, clusters must consist of at least 3 nodes and always
    95  have an odd number of members. For more information, see `etcd disaster recovery`_.
    96  
    97  
    98  Configure DNS
    99  -------------
   100  
   101  See :ref:`configure-dns` for more information on properly setting up your DNS records with Deis.
   102  
   103  
   104  Install Deis Platform
   105  ---------------------
   106  
   107  Now that you've finished provisioning a cluster, please refer to :ref:`install_deis_platform` to
   108  start installing the platform.
   109  
   110  .. _`management certificates tab`: https://manage.windowsazure.com/#Workspaces/AdminTasks/ListManagementCertificates
   111  .. _`contrib/azure`: https://github.com/deis/deis/tree/master/contrib/azure
   112  .. _`etcd`: https://github.com/coreos/etcd
   113  .. _`etcd disaster recovery`: https://github.com/coreos/etcd/blob/master/Documentation/admin_guide.md#disaster-recovery
   114  .. _`region`: http://azure.microsoft.com/en-us/regions/