How to install CoreOS on bare metal
CoreOS can be installed in various locations, including AWS, Google Compute and more. This article however shows you how to install CoreOS on your own hardware, which seems like a good place to start.
Boot to CD
Start by browsing to the CoreOS website and downloading the stable ISO file.
- Burn a CD from the ISO file.
- Boot your machine from the CD.
Once the system loads, the default core user account will automatically login. This is very similar to a Live CD environment. Importantly CoreOS isn't installed yet.
Password hash
The cloud-config.yml file uses a hash for the password. Here is how to discover the hash key for any given password.
sudo openssl passwd -1
Password:
Verifying - Password:
IRdy7X2.sZN3D$1$45xofd3w$HNyIRYklO
Now make a note of the long hash key, you'll need it for the next step.
cloud-config.yml
We need to create a cloud-config file that the install can use, in order to initialise a user account.
vi cloud_config.yml
... and here is an example of content:
#cloud-config
users:
- name: steven
passwd: IRdy7X2.sZN3D$1$45xofd3w$HNyIRYklO
groups:
- sudo
- docker
You will need to replace the name and password with your previously created hash. Please ensure that the spaces are added exactly as above.
Installation
We are now ready to run the install by running the following command:
sudo coreos-install -d /dev/sda -C stable -c cloud_config.yml
Now you can restart your host:
sudo shutdown -r now
...remove the CD and boot to the hard drive. You are now ready to make some initial configuration settings.
Thanks for visiting.