Introduction to CoreOS
CoreOS is a lightweight, no nonsense operating system. It is designed for security, consistency and reliability. Idea is to have a focused operating system for running and scaling Docker container based applications. CoreOS comes with Docker pre-installed.
CoreOS is quite serious when it comes to using Docker containers for applications. The OS does not ships with a package manager like yum, dnf or apt. Instead we have to run all of our favorite tools from inside of a container. This can also be attributed from the fact that the entire
/usr is mounted as read-only and both
/sbin are symbolic links to
How to run debugging tools in CoreOS
Since CoreOS does not come with a package manager and
/usr/ is read-only, it becomes very difficult to install any tool. CoreOS recommends using
toolbox for running any tools that are not inbuilt. Under the hood, the
toolbox command runs a Fedora Linux Docker container and connects us to the shell of the container.
$ toolbox # cat /etc/fedora-release Fedora release 23 (Twenty Three)
Now we are inside the Fedora Linux shell, we can install whatever tools we want to, like traceroute and run it from the container.
# yum -y install traceroute # traceroute -i eth0
What else can CoreOS do?
CoreOS comes with Etcd pre-installed. Etcd is a key-value store which is excellent for service discovery. Etcd is distributed and replicated by nature and hence any change made is always reflected across the cluster. CoreOS also consist of fleet which presents the entire cluster as a single system. It can be used to build highly available clusters by distributing containers across different machines.
We will dig up more on Fleet in one of our next tutorial.