DC/OS: local deployment using Vagrant

DC/OS (Datacenter Operating System) is an open source platform enabling enterprises to easily build and run modern apps in production. It literally abstracts datacenter into a single computer. DC/OS is suitable for various application types and infrastructure agnostic by design. It runs on top of any bare-metal, private or public clouds. Even local deployment on a single machine is possible and quite easy (useful for testing, development and demo purposes).


Local deployment with Vagrant

Before start make sure you have latest versions of VirtualBox and Vagrant installed on your system.

Everything is tested on Mac OS X but DC/OS Vagrant package have been reported to work also on Windows (7, 10), Ubuntu (14, 15, 16), Fedora 23, Arch Linux. Minimal requirement for RAM is 5GB.

1) Clone “dcos-vagrant” from GitHub:

git clone git@github.com:dcos/dcos-vagrant.git

2) Download latest DC/OS package into dcos-vagrant folder:

cd dcos-vagrant
curl -O https://downloads.dcos.io/dcos/EarlyAccess/dcos_generate_config.sh

3) Install Vagrant Host Manager Plugin, it manages the “/etc/hosts” on the VMs and host to allow access by hostname.

vagrant plugin install vagrant-hostmanager

4) Configure the DC/OS installer, it requires Vagrant config file and environment variable which selects DC/OS configuration.

cp VagrantConfig.yaml.example VagrantConfig.yaml
export DCOS_CONFIG_PATH=etc/config-1.7.yaml

5) Disable authentication. DC/OS cluster uses external OAuth by default but it is more convenient to have it disabled for local testing.

echo “oauth_enabled: ‘false’” >> etc/config-1.7.yaml

6) Start minimal DC/OS cluster which has one master node and one agent node. Depending on your Internet connection speed you’ll need to wait some time for download of OS images and setup of VirtualBox VMs.

vagrant up m1 a1 boot

Check main dashboard

After successful execution of last “vagrant up” command you can check that your minimal cluster is up and running. This is simple. Just open following URL in your browser:

http://m1.dcos/

You’ll see something like screen shot below.

Doing more

So enjoy your day with new DC/OS cluster! You can do more now: install various packages, scale the cluster, deploy your own applications.

When you are done use following command to shutdown all VMs:

vagrant destroy -f

Originally published at yurisubach.com on July 6, 2016.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.