github.com/misfo/deis@v1.0.1-0.20141111224634-e0eee0392b8a/docs/installing_deis/rackspace.rst (about)

     1  :title: Installing Deis on Rackspace
     2  :description: How to provision a multi-node Deis cluster on Rackspace
     3  
     4  .. _deis_on_rackspace:
     5  
     6  Rackspace
     7  =========
     8  
     9  We'll mostly be following the `CoreOS on Rackspace`_ guide. You'll need to have a sane python
    10  environment with ``pip`` already installed (``sudo easy_install pip``). Please refer to the scripts
    11  in `contrib/rackspace`_ while following this documentation.
    12  
    13  
    14  Install supernova
    15  -----------------
    16  
    17  .. code-block:: console
    18  
    19      $ sudo pip install keyring
    20      $ sudo pip install rackspace-novaclient
    21      $ sudo pip install supernova
    22  
    23  
    24  Configure supernova
    25  -------------------
    26  
    27  Edit ``~/.supernova`` to match the following:
    28  
    29  .. code-block:: console
    30  
    31      [production]
    32      OS_AUTH_URL = https://identity.api.rackspacecloud.com/v2.0/
    33      OS_USERNAME = {rackspace_username}
    34      OS_PASSWORD = {rackspace_api_key}
    35      OS_TENANT_NAME = {rackspace_account_id}
    36      OS_REGION_NAME = DFW (or ORD or another region)
    37      OS_AUTH_SYSTEM = rackspace
    38  
    39  Your account ID is displayed in the upper right-hand corner of the cloud control panel UI, and your
    40  API key can be found on the Account Settings page.
    41  
    42  
    43  Generate SSH Key
    44  ----------------
    45  
    46  Please refer to :ref:`generate_ssh_key` for generating a new SSH key.
    47  
    48  
    49  Set up your keys
    50  ----------------
    51  
    52  Tell supernova about the key pair and give it an identifiable name:
    53  
    54  .. code-block:: console
    55  
    56      $ supernova production keypair-add --pub-key ~/.ssh/deis.pub deis-key
    57  
    58  
    59  Generate a New Discovery URL
    60  ----------------------------
    61  
    62  Please refer to :ref:`generate_discovery_url` for generating a new Discovery URL.
    63  
    64  
    65  Choose number of instances
    66  --------------------------
    67  
    68  By default, the provision script will provision 3 servers. You can override this by setting `DEIS_NUM_INSTANCES`:
    69  
    70  .. code-block:: console
    71  
    72      $ DEIS_NUM_INSTANCES=5 ./provision-rackspace-cluster.sh deis-key
    73  
    74  Note that for scheduling to work properly, clusters must consist of at least 3 nodes and always have an odd number of members.
    75  For more information, see `optimal etcd cluster size`_.
    76  
    77  Deis clusters of less than 3 nodes are unsupported.
    78  
    79  Run the Provision Script
    80  ------------------------
    81  
    82  Run the Rackspace provision script to spawn a new CoreOS cluster. You'll need to provide the name
    83  of the key pair you just added. Optionally, you can also specify a flavor name, as well as the supernova environment to use. The environment will default to `production`, and the flavor to `performance1-2`.
    84  
    85  .. code-block:: console
    86  
    87      $ cd contrib/rackspace
    88      $ ./provision-rackspace-cluster.sh
    89      Usage: provision-rackspace-cluster.sh <key pair name> [flavor] [environment]
    90      $ ./provision-rackspace-cluster.sh deis-key
    91  
    92  .. note::
    93  
    94      The provision script will by default provision ``performance1-2`` servers. Choosing a smaller
    95      server size is not recommended. Please refer to :ref:`system-requirements` for resource
    96      considerations when choosing a server size to run Deis.
    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  Configure Load Balancer
   105  -----------------------
   106  
   107  You'll need to create two load balancers on Rackspace to handle your cluster:
   108  
   109  .. code-block:: console
   110  
   111      Load Balancer 1
   112      Port 80
   113      Protocol HTTP
   114      Health Monitoring -
   115        Monitor Type HTTP
   116        HTTP Path /health-check
   117  
   118      Load Balancer 2
   119      Virtual IP Shared VIP on Another Load Balancer (select Load Balancer 1)
   120      Port 2222
   121      Protocol TCP
   122  
   123  Install Deis Platform
   124  ---------------------
   125  
   126  Now that you've finished provisioning a cluster, please refer to :ref:`install_deis_platform` to
   127  start installing the platform.
   128  
   129  
   130  .. _`contrib/rackspace`: https://github.com/deis/deis/tree/master/contrib/rackspace
   131  .. _`CoreOS on Rackspace`: https://coreos.com/docs/running-coreos/cloud-providers/rackspace/
   132  .. _`optimal etcd cluster size`: https://github.com/coreos/etcd/blob/master/Documentation/optimal-cluster-size.md
   133  .. _Rackspace: https://github.com/deis/deis/tree/master/contrib/rackspace#readme
   134  .. _`contrib/rackspace`: https://github.com/deis/deis/tree/master/contrib/rackspace