Installing CoreOS on your own hardware is quite simple when you know what you are doing. Here are the steps I used to install CoreOS on an old PC Chasis I had laying around.
- Download the latest CoreOS ISO. First you need to choose the Channel you want to use from https://coreos.com/docs/running-coreos/platforms/iso/
- Burn the ISO to a CD or USB. I used http://www.linuxliveusb.com/ to create a Bootable USB Disk.
- Generate a Private Key. Since I was using windows I downloaded and installed PuTTYGen from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
- Create a cloud-config.yaml file. This file is required to ensure that you can log into the CoreOS device after installation. Mine consisted of the following [code]#cloud-config users:- name: nirving ssh-authorized-keys: - ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEA9yiF4mgijCjTJfEd/loA/C648krW05+fBXYtxNbLnfzwkrRZmbl9k0nIzJcKV4w3N9mmnI/udF7YTAHrSxTnHQhlsa445I6T+Y7OTvEQmqimBdymeUeiNiXUEmdgMMkGgN/EvHgc6Gs+xmGY1A4J0FZdwhe/0C4UpZgzLU3n2imVfFCEnJC+c7K+gG1EjIhw6NjSjGy+gXDsGOYcuia/ERTjUK2XxdGsGIktyBC0rYIg04XQ6+k6rvoYxW4HjK7wZj2vaOdnxqqbnXQxAxjY0WfMer2gqSP+xNTHAEITDpHbD2EosAAYfVfoWKpg5mnVqDf9BGCZHyoHuZiH5ynomQ== rsa-key-20150711 groups: - sudo[/code] Make sure that this is saved in Unix format, otherwise it will cause issues later. I am not of the exact syntax to enable root access, but the user nirving has sudo so it can create the necessary configuration after installation. Note: replace the ssh-rsa entry with the public key generated previously.
- Boot the PC device of the USB.
- When it has finished loading, you will need to issue the following commands [code lang="bash"] sudo su - mount /dev/sdb1 /mnt coreos-install -d /dev/sda -c /mnt/cloud-config.yaml [/code]
- When finished you can reboot the PC Device and wait for it to start up.
- Connect to the PC Device via Putty or SSH using the Private Key created before and the user configured in the cloud-config.yaml file.
Add Static IP
You will need to create a file containing the following, just remember to replace with the details you require for your network.
[Network] Address=10.0.0.100/24 Gateway=10.0.0.1 DNS=10.0.0.1
Allow Root to SSH in
Log in as the user created in the cloud-config.yaml file and issue the following commands
sudo su - cp -rf ~/nirving/.ssh .
You should now be able to connect using the same Private Key, although it is advisable to use a different key.