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