github.com/rvaralda/deis@v1.4.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 Review disk usage 87 ^^^^^^^^^^^^^^^^^ 88 89 See :ref:`disk_usage` for more information on how to optimize local disks for Deis. 90 91 Provide the config file to the installer 92 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 93 94 Save the user-data file to your bare metal machine. The example assumes you transferred the config 95 to ``/tmp/config`` 96 97 98 Start the installation 99 ^^^^^^^^^^^^^^^^^^^^^^ 100 101 .. code-block:: console 102 103 coreos-install -C stable -c /tmp/config -d /dev/sda 104 105 106 This will install the latest `CoreOS`_ stable release to disk. The Deis provision scripts for other 107 platforms typically specify a CoreOS version - currently, ``557.2.0``. To specify a CoreOS 108 version, append the ``-V`` parameter to the install command, e.g. ``-V 557.2.0``. 109 110 After the installation has finished, reboot your server. Once your machine is back up, you should 111 be able to log in as the `core` user using the `deis` ssh key. 112 113 114 Configure DNS 115 ------------- 116 117 See :ref:`configure-dns` for more information on properly setting up your DNS records with Deis. 118 119 120 Install Deis Platform 121 --------------------- 122 123 Now that you've finished provisioning a cluster, please refer to :ref:`install_deis_platform` to 124 start installing the platform. 125 126 Known Problems 127 -------------- 128 129 130 Hostname is localhost 131 ^^^^^^^^^^^^^^^^^^^^^ 132 133 If your hostname after installation to disk is ``localhost``, set the hostname in user-data before 134 installation: 135 136 .. code-block:: console 137 138 hostname: your-hostname 139 140 The hostname must not be the fully qualified domain name! 141 142 143 Slow name resolution 144 ^^^^^^^^^^^^^^^^^^^^ 145 146 Certain DNS servers and firewalls have problems with glibc sending out requests for IPv4 and IPv6 147 addresses in parallel. The solution is to set the option ``single-request`` in 148 ``/etc/resolv.conf``. This can best be accomplished in the user-data when installing `CoreOS`_ to 149 disk. Add the following block to the ``write_files`` section: 150 151 .. code-block:: console 152 153 - path: /etc/resolv.conf 154 permissions: 0644 155 content: | 156 nameserver 8.8.8.8 157 nameserver 8.8.4.4 158 domain your.domain.name 159 options single-request 160 161 162 .. _`contrib/bare-metal`: https://github.com/deis/deis/tree/master/contrib/bare-metal 163 .. _`cluster size`: https://github.com/coreos/etcd/blob/master/Documentation/optimal-cluster-size.md 164 .. _`CoreOS`: https://coreos.com/ 165 .. _`install CoreOS to disk`: https://coreos.com/docs/running-coreos/bare-metal/installing-to-disk/ 166 .. _`iPXE`: https://coreos.com/docs/running-coreos/bare-metal/booting-with-ipxe/ 167 .. _`PXE`: https://coreos.com/docs/running-coreos/bare-metal/booting-with-pxe/