github.com/inflatablewoman/deis@v1.0.1-0.20141111034523-a4511c46a6ce/docs/installing_deis/digitalocean.rst (about)

     1  :title: Installing Deis on DigitalOcean
     2  :description: How to provision a multi-node Deis cluster on DigitalOcean
     3  
     4  .. _deis_on_digitalocean:
     5  
     6  DigitalOcean
     7  ============
     8  
     9  In this tutorial, we will show you how to set up your own 3-node cluster on DigitalOcean.
    10  
    11  Prerequisites
    12  -------------
    13  
    14  To complete this guide, you must have the following:
    15  
    16   - A domain to point to the cluster
    17   - The ability to provision at least 3 DigitalOcean Droplets that are 2GB or greater
    18  
    19  In order to provision the cluster, we will need to install a couple of administrative tools.
    20  `docl`_ is a convenience tool to help provision DigitalOcean Droplets. We will also require the
    21  `Deis Control Utility`_, which will assist us with installing, configuring and managing the Deis
    22  platform.
    23  
    24  Check System Requirements
    25  -------------------------
    26  
    27  Please refer to :ref:`system-requirements` for resource considerations when choosing a droplet
    28  size to run Deis.
    29  
    30  Generate SSH Key
    31  ----------------
    32  
    33  Please refer to :ref:`generate_ssh_key` for generating a new SSH key.
    34  
    35  Generate a New Discovery URL
    36  ----------------------------
    37  
    38  Please refer to :ref:`generate_discovery_url` for generating a new Discovery URL.
    39  
    40  
    41  Create CoreOS Droplets
    42  ----------------------
    43  
    44  Now that we have the user-data file, we can provision some Droplets. We've made this process simple
    45  by supplying a script that does all the heavy lifting for you. If you want to provision manually,
    46  however, start by uploading the SSH key you wish to use to log into each of these servers. After
    47  that, create at least three Droplets with the following specifications:
    48  
    49   - All Droplets deployed in the same region
    50   - Region must have private networking enabled
    51   - Region must have User Data enabled. Supply the user-data file here
    52   - Select CoreOS Alpha channel
    53   - Select your SSH key from the list
    54  
    55  If private networking is not available in your region, swap out ``$private_ipv4`` with
    56  ``$public_ipv4`` in the user-data file.
    57  
    58  If you want to use the script:
    59  
    60  .. code-block:: console
    61  
    62      $ gem install docl
    63      $ docl authorize
    64      $ docl upload_key deis ~/.ssh/deis.pub
    65      $ # retrieve your SSH key's ID
    66      $ docl keys
    67      deis (id: 12345)
    68      $ # retrieve the region name
    69      $ docl regions --metadata --private-networking
    70      Amsterdam 2 (ams2)
    71      Amsterdam 3 (ams3)
    72      London 1 (lon1)
    73      New York 3 (nyc3)
    74      Singapore 1 (sgp1)
    75      $ ./contrib/digitalocean/provision-do-cluster nyc3 12345 4GB
    76  
    77  Which will provision 3 CoreOS nodes for use.
    78  
    79  Configure DNS
    80  -------------
    81  
    82  .. note::
    83  
    84      If you're using your own third-party DNS registrar, please refer to their documentation on this
    85      setup, along with the :ref:`dns_records` required.
    86  
    87  .. note::
    88  
    89      If you don't have an available domain for testing, you can refer to the :ref:`xip_io`
    90      documentation on setting up a wildcard DNS for Deis.
    91  
    92  Deis requires a wildcard DNS record to function properly. If the top-level domain (TLD) that you
    93  are using is ``example.com``, your applications will exist at the ``*.example.com`` level. For example, an
    94  application called ``app`` would be accessible via ``app.example.com``.
    95  
    96  One way to configure this on DigitalOcean is to setup round-robin DNS via the `DNS control panel`_.
    97  To do this, add the following records to your domain:
    98  
    99   - A wildcard CNAME record at your top-level domain, i.e. a CNAME record with * as the name, and @
   100     as the canonical hostname
   101   - For each CoreOS machine created, an A-record that points to the TLD, i.e. an A-record named @,
   102     with the droplet's public IP address
   103  
   104  The zone file will now have the following entries in it: (your IP addresses will be different)
   105  
   106  .. code-block:: console
   107  
   108      *   CNAME   @
   109      @   IN A    104.131.93.162
   110      @   IN A    104.131.47.125
   111      @   IN A    104.131.113.138
   112  
   113  For convenience, you can also set up DNS records for each node:
   114  
   115  .. code-block:: console
   116  
   117      deis-1   IN A    104.131.93.162
   118      deis-2   IN A    104.131.47.125
   119      deis-3   IN A    104.131.113.138
   120  
   121  If you need help using the DNS control panel, check out `this tutorial`_ on DigitalOcean's
   122  community site.
   123  
   124  Install Deis Platform
   125  ---------------------
   126  
   127  Now that you've finished provisioning a cluster, please refer to :ref:`install_deis_platform` to
   128  start installing the platform.
   129  
   130  
   131  .. _`docl`: https://github.com/nathansamson/docl#readme
   132  .. _`Deis Control Utility`: https://github.com/deis/deis/tree/master/deisctl#readme
   133  .. _`DNS control panel`: https://cloud.digitalocean.com/domains
   134  .. _`this tutorial`: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitalocean