github.com/amrnt/deis@v1.3.1/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 runs on CoreOS version 494.5.0 or later in the Stable channel. 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 .. include:: ../_includes/_private-network.rst 64 65 Add Environment 66 ^^^^^^^^^^^^^^^ 67 68 Since `CoreOS`_ doesn't detect private and public IP adresses, ``/etc/environment`` file doesn't 69 get written on boot. Add it to the `write_files` section of the user-data file: 70 71 .. code-block:: console 72 73 - path: /etc/environment 74 permissions: 0644 75 content: | 76 COREOS_PUBLIC_IPV4=<your public ip> 77 COREOS_PRIVATE_IPV4=<your private ip> 78 79 80 Install CoreOS to disk 81 ---------------------- 82 83 Assuming you have booted your bare metal server into `CoreOS`_, you can now perform the 84 installation to disk. 85 86 Provide the config file to the installer 87 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 88 89 Save the user-data file to your bare metal machine. The example assumes you transferred the config 90 to ``/tmp/config`` 91 92 93 Start the installation 94 ^^^^^^^^^^^^^^^^^^^^^^ 95 96 .. code-block:: console 97 98 coreos-install -C stable -c /tmp/config -d /dev/sda 99 100 101 This will install the latest `CoreOS`_ stable release to disk. The Deis provision scripts for other 102 platforms typically specify a CoreOS version - currently, ``522.6.0``. To specify a CoreOS 103 version, append the ``-V`` parameter to the install command, e.g. ``-V 522.6.0``. 104 105 After the installation has finished, reboot your server. Once your machine is back up, you should 106 be able to log in as the `core` user using the `deis` ssh key. 107 108 109 Configure DNS 110 ------------- 111 112 See :ref:`configure-dns` for more information on properly setting up your DNS records with Deis. 113 114 115 Install Deis Platform 116 --------------------- 117 118 Now that you've finished provisioning a cluster, please refer to :ref:`install_deis_platform` to 119 start installing the platform. 120 121 Known Problems 122 -------------- 123 124 125 Hostname is localhost 126 ^^^^^^^^^^^^^^^^^^^^^ 127 128 If your hostname after installation to disk is ``localhost``, set the hostname in user-data before 129 installation: 130 131 .. code-block:: console 132 133 hostname: your-hostname 134 135 The hostname must not be the fully qualified domain name! 136 137 138 Slow name resolution 139 ^^^^^^^^^^^^^^^^^^^^ 140 141 Certain DNS servers and firewalls have problems with glibc sending out requests for IPv4 and IPv6 142 addresses in parallel. The solution is to set the option ``single-request`` in 143 ``/etc/resolv.conf``. This can best be accomplished in the user-data when installing `CoreOS`_ to 144 disk. Add the following block to the ``write_files`` section: 145 146 .. code-block:: console 147 148 - path: /etc/resolv.conf 149 permissions: 0644 150 content: | 151 nameserver 8.8.8.8 152 nameserver 8.8.4.4 153 domain your.domain.name 154 options single-request 155 156 157 .. _`contrib/bare-metal`: https://github.com/deis/deis/tree/master/contrib/bare-metal 158 .. _`cluster size`: https://github.com/coreos/etcd/blob/master/Documentation/optimal-cluster-size.md 159 .. _`CoreOS`: https://coreos.com/ 160 .. _`install CoreOS to disk`: https://coreos.com/docs/running-coreos/bare-metal/installing-to-disk/ 161 .. _`iPXE`: https://coreos.com/docs/running-coreos/bare-metal/booting-with-ipxe/ 162 .. _`PXE`: https://coreos.com/docs/running-coreos/bare-metal/booting-with-pxe/