Basic (newbie) install CoreOS on VirtualBox – Getting started with Docker

I got intrigued by this Dutch article mentioning Docker and CoreOS. So on this Saturday, after reading the article, I made an attempt to setup CoreOS on VirtualBox (already installed on my Mac).

I wanted to start with a bare minimum install to see what CoreOS was all about and run into newbie problems almost straight away, attempting to install it, as a standalone environment via an ISO file. The following will give you a heads-up and start your Docker experience within 30 minutes or so. If not done so already, download VirtualBox to get started.

Okay, so I downloaded the ISO of CoreOS here:

VirtualBox is already installed on my Mac, and updated to the latest version, I created a default Linux environment via the wizard:

Screen Shot 2015-04-11 at 13.07.31

Screen Shot 2015-04-11 at 13.08.10

Then I associated my downloaded CoreOS ISO file to the IDE controller under the storage section.

Screen Shot 2015-04-11 at 13.10.15

Okay, Everything setup and ready to go.

After startup, you will be automatically logged in via the “core” account.

Screen Shot 2015-04-11 at 16.12.09

So how to get a standalone install up and running…?

I found the following article “Installing CoreOS” which is very helpful (but not with some of my blanks filled in 😛 ).

So just like in the article, I started started with (on my VirtualBox disk /dev/sda)

sudo coreos-install -d /dev/sda -C stable

Cool, here we go…

Screen Shot 2015-04-11 at 13.26.48

Screen Shot 2015-04-11 at 13.25.35

Tada, I thought, But just as my counterpart on “Installing CoreOS“, he didn’t read the CoreOS manuals and I didn’t properly read his (LOL)

…because after a restart via…

sudo shutdown -h now

…and then removing the ISO file from the virtual CD/DVD controller…

Screen Shot 2015-04-11 at 13.35.19

The new VirtualBox CoreOS environment comes up with…

Screen Shot 2015-04-11 at 13.37.14

PASSWORD? Duh?! What password and/or for which user? Root? Core?

Long story short…There is no password (as also mentioned in “Installing CoreOS“). So I also started actually reading the CoreOS documentation, especially this first part of creating the cloud-config file.

I don’t have GitHub (or at least not an account that is actually used by me), so I wanted to start with an appropriate default called user “marco”.

Now how to create a “password hash” with the current bare minimum in place?

After attaching the ISO file again to the CD/DVD controller, the machine will startup again with its LiveCD/ISO standard environment.

OpenSSL is available in this bare CoreOS minimum environment ,so I did the following…

sudo openssl passwd -1 > cloud-config-file

I entered a password like “test” and confirmed it in the verifying step.

Screen Shot 2015-04-11 at 13.49.52

The newly created file cloud-config-file has now the password hash value which I edited with via as specified in the cloud-config file documentation (in this case, for now, with the bare minimum: a user account).

Screen Shot 2015-04-11 at 13.50.37

Screen Shot 2015-04-11 at 14.09.01

When I had finished this, updating the file cloud-config-file, I made another attempt at downloading and installing the CoreOS software.

sudo coreos-install -d /dev/sda -C stable -c cloud-config-file

Screen Shot 2015-04-11 at 14.01.55

Another “Success!” remark, so via via shutting down the VirtualBox environment again, removing the  ISO file from the CD/DVD controller, it now reboots and you are able to login via your named “user” and with the password value used for creating the “password hash”.

Screen Shot 2015-04-11 at 14.17.07

So now its time to see what it can do 😉

So next up trying the following.

Tip before hand: add an extra (local) virtual network adapter, so you can connect and open a shell to your VirtualBox CoreOS machine for, for example, committing Docker commands and more.

HTH/M

 

Marco Gralike Written by: