CoreOS Tutorial 01 - Installation

I'm writing these CoreOS tutorials to document & share my experience with the platform.  In my initial dealings with Docker & CoreOS I have found the CoreOS docs to be very minimal & unsatisfactory especially for new users.

Prep for the install

These instructions show how to perform CoreOS install using the .iso method.
  • Download the CoreOS .iso
  • Get familiar with the cloud-config.yaml example file & gather all the values for the < your xxxx> tags within the file ( your going to need them later)
  • Create a bootable CoreOS USB key or burn a CD using the .iso file
  • Create your own personal SSH Keys (you'll nee the contents of the file) 
  • Make sure you have an active internet connection
Now we're ready for some boot action

Install CoreOS

These directions show how to install CoreOS to a disk
  • Boot to CoreOS using the bootable USB Key or CD until you see the $ core@localhost~$ prompt
  • Download the cloud-config.yaml template I mentioned above:
         $ wget -O cloud-config.yaml
  • Get the Network Interface name:
        $ ifconfig - the nic name should be something like en... or ens...
  • Use the VIM text editor to modify the cloud-config.yaml file we just downloaded.
       $ vim cloud-config.yaml
  • Replace all the < your ... > tags with values pertinent to your installation, values such as Hostname, IP Address, Gateway, Public SSH Keys etc...
  • Save the file with your changes.
  • Now we'll install CoreOS using the core-install script:
        $ sudo coreos-install -d /dev/sda -C stable -c ~/cloud-config.yaml
  • After a successful installation reboot the server & remove the boot media
  • Reboot a second time for the new settings to take place

Assign Sudo Access to the cloud-config.yaml users

Unfortunately you have to manually add users to the sudoers file in order to assign root privileges.
  •  Login into the new server via SSH:
        $ ssh core@<your ip address>
  • $ sudo -i      to get root access
  • Create a new sudo rule & give the user(s) sudo access (replace the < ..> with your user's name:
        $ echo "< your user's name > ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/< your user's name >
  • Reboot the server
  • Login to the server via ssh using your new user & test your sudo access
CoreOS is a very cool tool but still lacking in documentation which is usually the case with cutting edge technologies.  I'll be writing a followup blog that will discuss CoreOS & using docker to create new application containers.

Props to Stevie Holdway's blog which served we well in writing this. It's also a great resource.

Stay tuned



  1. Hi Angel, thanks for the writeup! Have you had a chance to play around with HA and containers yet?


Post a Comment