How to install CoreOS on bare metal

coreosCoreOS 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.

  1. Burn a CD from the ISO file.
  2. 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 config file uses a hash for the password. Here is how to discover the hash key for a given password.

sudo openssl passwd -1
Password:
Verifying - Password:
IRdy7X2.sZN3D$1$45xofd3w$HNyIRYklO

 

cloud-config.yml

Now you can create the cloud-config file with this command:

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, remove the CD and boot to the hard drive. You are now ready to make some initial configuration settings.

 

Thanks for visiting.