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