github.com/misfo/deis@v1.0.1-0.20141111224634-e0eee0392b8a/docs/installing_deis/baremetal.rst (about) 1 :title: Installing Deis on Bare Metal 2 :description: How to provision a multi-node Deis cluster on Bare Metal 3 4 .. _deis_on_bare_metal: 5 6 Bare Metal 7 ========== 8 9 Deis clusters can be provisioned anywhere `CoreOS`_ can, including on your own hardware. To get 10 CoreOS running on raw hardware, you can boot with `PXE`_ or `iPXE`_ - this will boot a CoreOS 11 machine running entirely from RAM. Then, you can `install CoreOS to disk`_. 12 13 .. important:: 14 15 Deis requires CoreOS version 472.0.0 or more recent. 16 17 18 Check System Requirements 19 ------------------------- 20 21 Please refer to :ref:`system-requirements` for resource considerations when choosing a 22 machine size to run Deis. 23 24 Generate SSH Key 25 ---------------- 26 27 Please refer to :ref:`generate_ssh_key` for generating a new SSH key. 28 29 30 Customize user-data 31 ------------------- 32 33 34 Generate a New Discovery URL 35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 36 37 Please refer to :ref:`generate_discovery_url` for generating a new Discovery URL. 38 39 40 SSH Key 41 ^^^^^^^ 42 43 Add the public key part for the SSH key generated in the first step to the user-data file: 44 45 .. code-block:: console 46 47 ssh_authorized_keys: 48 - ssh-rsa AAAAB3... deis 49 50 51 Update $private_ipv4 52 ^^^^^^^^^^^^^^^^^^^^ 53 54 `CoreOS`_ on bare metal doesn't detect the ``$private_ipv4`` reliably. Replace all occurences in 55 the user-data with the (private) IP address of the node. 56 57 58 Add Environment 59 ^^^^^^^^^^^^^^^ 60 61 Since `CoreOS`_ doesn't detect private and public IP adresses, ``/etc/environment`` file doesn't 62 get written on boot. Add it to the `write_files` section of the user-data file: 63 64 .. code-block:: console 65 66 - path: /etc/environment 67 permissions: 0644 68 content: | 69 COREOS_PUBLIC_IPV4=<your public ip> 70 COREOS_PRIVATE_IPV4=<your private ip> 71 72 73 Install CoreOS to disk 74 ---------------------- 75 76 Assuming you have booted your bare metal server into `CoreOS`_, you can perform now perform the 77 installation to disk. 78 79 Provide the config file to the installer 80 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 81 82 Save the user-data file to your bare metal machine. The example assumes you transferred the config 83 to ``/tmp/config`` 84 85 86 Start the installation 87 ^^^^^^^^^^^^^^^^^^^^^^ 88 89 .. code-block:: console 90 91 coreos-install -C alpha -c /tmp/config -d /dev/sda 92 93 94 This will install the latest `CoreOS`_ alpha release to disk. To specify a specific CoreOS version, 95 append the ``-V`` parameter to the install command, e.g. ``-V 494.0.0``. 96 97 After the installation has finished, reboot your server. Once your machine is back up, you should 98 be able to log in as the `core` user using the `deis` ssh key. 99 100 101 Configure DNS 102 ------------- 103 104 See :ref:`configure-dns` for more information on properly setting up your DNS records with Deis. 105 106 107 Install Deis Platform 108 --------------------- 109 110 Now that you've finished provisioning a cluster, please refer to :ref:`install_deis_platform` to 111 start installing the platform. 112 113 Known Problems 114 -------------- 115 116 117 Hostname is localhost 118 ^^^^^^^^^^^^^^^^^^^^^ 119 120 If your hostname after installation to disk is ``localhost``, set the hostname in user-data before 121 installation: 122 123 .. code-block:: console 124 125 hostname: your-hostname 126 127 The hostname must not be the fully qualified domain name! 128 129 130 Slow name resolution 131 ^^^^^^^^^^^^^^^^^^^^ 132 133 Certain DNS servers and firewalls have problems with glibc sending out requests for IPv4 and IPv6 134 addresses in parallel. The solution is to set the option ``single-request`` in 135 ``/etc/resolv.conf``. This can best be accomplished in the user-data when installing `CoreOS`_ to 136 disk. Add the following block to the ``write_files`` section: 137 138 .. code-block:: console 139 140 - path: /etc/resolv.conf 141 permissions: 0644 142 content: | 143 nameserver 8.8.8.8 144 nameserver 8.8.4.4 145 domain your.domain.name 146 options single-request 147 148 149 .. _`cluster size`: https://github.com/coreos/etcd/blob/master/Documentation/optimal-cluster-size.md 150 .. _`CoreOS`: https://coreos.com/ 151 .. _`install CoreOS to disk`: https://coreos.com/docs/running-coreos/bare-metal/installing-to-disk/ 152 .. _`iPXE`: https://coreos.com/docs/running-coreos/bare-metal/booting-with-ipxe/ 153 .. _`PXE`: https://coreos.com/docs/running-coreos/bare-metal/booting-with-pxe/