Learn DC/OS with minidcos (1) – Installation and Initial DC/OS cluster Launch

As a distributed system, DC/OS is itself a distributed system, a cluster manager, a container platform, and an operating system. It includes a group of agent nodes with different responsibilities. To configure the whole system is not easy. Luckily, there is a tool named minidcos, which allow you to deploy “fake” agent nodes on the same machine, even a laptop.

This serial of articles aim to document all the details of install minidcos, configure the “fake” cluster and deploy services there.

Install minidcos

You can follow the instructions to install minidcos.

I did it on Ubuntu 18.04.5. First, install the missing software.

Install the minidcos through pip.

Note: here the official instruction has some mistakes. Use mine.

Next step is to install docker.

Need to restart/re-login to make sure your account is in docker group.

Use following command to test if minidcos and docker are installed correctly.

If there is any errors/warnings, you probably need to fix them.

minidcos supports different environments to manage the DC/OS cluster, such as AWS, Docker and Vagrant. Docker is the most familiar tool for me so I will use it in my rest explanation.

Download DC/OS installation package

Some blogs suggest you to use “dcos download-installer” to download the latest DC/OS installation package. But as I tried, minidcos doesn’t work well with the latest DC/OS version. So I suggest you to download DC/OS 1.12.5 by this link. (All versions can be found on this page.)  Because of it, you can’t try the latest features in newer DC/OS version at this moment.

Launch DC/OS Cluster

I downloaded DC/OS 1.12.5 (dcos_generate_config.sh) onto ~/dcos. It’s time to launch it. By the following command, the “fake” DC/OS cluster (named “default“) will be brought up.

Depends on how powerful your environment is, it may take some time to finish the deployment. Use following command to check.

If you want to find more logs, add “-vvvvv“. (P.S., That’s also how I found minidcos doesn’t support newer DC/OS version well.)

Open DC/OS Management Dashboard

When the cluster is launched, you can log into the management dashboard.

After this command, the dashboard page (http://172.17.0.2) should be opened in browser.

I chose “Log in with Google” and the dashboard will finally pop up.

The dashboard panel shows the usage of memory, CPU, disk, GPU, nodes and etc.

Something Under the Hood…

minidcos is using docker container to run the master/agent nodes.

There are three nodes running – master, public node and (private) node. Each of it runs Centos 7 image.

DC/OS software runs on these nodes.And in each node, there runs another docker environment. I believe it’s needed by later service deployment.

And another useful command is “minidcos docker inspect“. With it, you can find more details of the cluster, such as the cluster id, IP addresses of each node, containers and etc.

Conclusion

By far, the installation and initial launch is finished. Hope it’s helpful to you. And in next chapter, let’s run some services on this platform.

 

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注