Get Started With CoreOS on OS X
In one of our recent posts we have covered how to install CoreOS with VirtualBox.
In this post, we learn how to run CoreOS without VirtualBox.
This setup is specific to OS X as it uses xhyve, which is built on top of
Hypervisor.framework introduced in OS X 10.10.
We’re going to use the CoreOS VM application, which is an independent open source project that bundles CoreOS into a VM for running on OS X.
First, download the CoreOS VM app.
The CoreOS VM App does not have many dependencies to download. Everything needed is already included. However, the app will perform some automatic downloads on your behalf., they include CoreOS ISO file needed to run the VM, as well as Docker and fleetctl clients for OS X.
You can double click the app to run it.
When you run the app for first time it checks to see if you have iTerm2 installed. If not, this software gets installed automatically into your Applications folder.
You’ll then be asked what disk size you want for the VM and which CoreOS release channel to use. Don’t worry. You can change this later.
That’s it. You’re good to go.
All app’s files get installed under "~/coreos-osx" folder. No other files or folders are changed.
Look for this icon in your task bar:
Click it, and you should see a menu like this:
You can do lots of things from here, including: starting, halting, reloading, ssh, and opening an OS shell with some pre-set environment variables.
Here's the booted VM with the opened pre-set shell window in iTerm:
The OS shell presets these variables:
When you start your VM, Docker Registry gets started (outside of the VM) on
192.168.64.1:5000. You can then push you Docker images to that IP and port number so you can share them with other VMs you might be running on your Mac.
If you destroy your VM (via the menu) Docker registry will persist the images. Docker registry is running as an OS X background service, with Docker images stored directly on your Mac’s disk, and not inside the VM.
Selecting Fleet-UI from menu will open the list of currently running CoreOS fleet units in your default web browser:
Selecting DockerUI (the web interface for Docker) will similarly show running Docker containers and other info about your Docker images:
You can check your running VM with
corectl -h will show all available commands:
Other useful things can be done from the application menu:
- You can upload Docker images to your VM
- You can update your local fleetctl and Docker OS X clients after you have downloaded the lastest CoreOS ISO version
We have learned how it is easily to install and use CoreOS VM on OS X without needing to use VirtualBox.
For more about Docker, see:
- Get Started With Docker on Your Non-Linux PC
- Dockerfile Instructions and Syntax
- Create and Share Your First Docker Image
For more about CoreOS, see: