Deis clusters can be provisioned anywhere CoreOS can, including on your own hardware. To get CoreOS running on raw hardware, you can boot with PXE or iPXE - this will boot a CoreOS machine running entirely from RAM. Then, you can install CoreOS to disk.
To avoid problems deploying/launching apps later on it is necessary to install CoreOS to disk with a SSH key without a passphrase. The following command will generate a new keypair named "deis".
$ ssh-keygen -q -t rsa -f ~/.ssh/deis -N '' -C deis
Create a user-data file with a new discovery URL this way:
$ make discovery-url
Or copy contrib/coreos/user-data.example
to contrib/coreos/user-data
and follow the directions in the etcd:
section to add a unique discovery URL.
Add the public key part for the SSH key generated in the first step to the user-data file:
ssh_authorized_keys:
- ssh-rsa AAAAB3... deis
CoreOS on bare metal doesn't detect the $private_ipv4
reliably. Replace all occurences in the user-data with the (private) IP address of the node.
Since CoreOS doesn't detect private and public IP adresses the /etc/environment
file doesn't get written on boot. Add it to the write_files
section of user-data
- path: /etc/environment
permissions: 0644
content: |
COREOS_PUBLIC_IPV4=<your public ip>
COREOS_PRIVATE_IPV4=<your private ip>
Assuming you have booted your bare metal server into CoreOS you can perform now perform the installation to disk.
Save the user-data to your bare metal machine. The example assumes you transferred the config to /tmp/config
coreos-install -C alpha -c /tmp/config -d /dev/sda
This will install the current CoreOS release to disk. If you want to install the recommended CoreOS version check the Deis changelog
and specify that version by appending the -V
parameter to the install command, e.g. -V 472.0.0
.
After the installation has finished reboot your server. Once your machine is back up you should be able to log in as the core
user using the deis
ssh key.
Set the default domain used to anchor your applications:
$ deisctl config platform set domain=mycluster.local
For this to work, you'll need to configure DNS records so you can access applications hosted on Deis. See Configuring DNS for details.
If you want to allow deis run
for one-off admin commands, you must provide an SSH private key that allows Deis to gather container logs on CoreOS hosts:
$ deisctl config platform set sshPrivateKey=<path-to-private-key>
Once your server(s) are all provisioned you can proceed to install Deis. Use the hostname of one of your machines in the next step.
$ ssh-add ~/.ssh/deis
$ export DEISCTL_TUNNEL=your.server.name.here
$ deisctl install platform && deisctl start platform
After that, register with Deis!
$ deis register http://deis.example.org
username: deis
password:
password (confirm):
email: [email protected]
- Use machines with ample disk space and RAM (we use large instances on EC2, for comparison)
- Choose an appropriate cluster size
If your hostname after installation to disk is localhost
set the hostname in user-data before installation:
hostname: your-hostname
The hostname must not be the fully qualified domain name!
Certain DNS servers and firewalls have problems with glibc sending out requests for IPv4 and IPv6 addresses in parallel. The solution is to set the option single-request
in /etc/resolv.conf
. This can best be accomplished in the user-data when installing CoreOS to disk. Add the following block to the write_files
section:
- path: /etc/resolv.conf
permissions: 0644
content: |
nameserver 8.8.8.8
nameserver 8.8.4.4
domain your.domain.name
options single-request