Minimal Mesosphere DC/OS v1.8 (Single)

… (with tweak for running a tiny marathon-lb)


  • One VMs only! (for a resource constrained lab or laptop)
  • CentOS 7.x Minimal + SELINUX Disabled + Firewall Disabled + IPv6 Disabled
  • Docker 1.11.x with “–storage-driver=overlay”


Host Role VM Size
mesos-single-01 bootstrap + master + dcos-cli 2 CPU, 4GB RAM, 60GB HDD

Update: I was told that this setup will seize to work with DCOS v1.9 due to some unavoidable conflict. Ouch!

Common script – To be run on every node

# add docker repo and install docker
cat > /etc/yum.repos.d/docker.repo << '__EOF__'
name=Docker Repository - Centos $releasever

yum install -y
yum install -y docker-engine-1.11.2 docker-engine-selinux-1.11.2 tar xz unzip curl ipset nfs-utils

yum clean all

groupadd nogroup

mkdir -p /etc/systemd/system/docker.service.d

cat > /etc/systemd/system/docker.service.d/override.conf << '__EOF__'
ExecStart=/usr/bin/docker daemon --storage-driver=overlay --insecure-registry mesos-mini-01:5000 -H fd:// 

systemctl daemon-reload
systemctl enable docker

systemctl start docker

# if the default DNS doesn't resolve
tee -a /etc/hosts << '__EOF__' mesos-single

To be run on node1 {bootstrap + master + dcos-cli}

Generate bootstrap

mkdir /opt/dcos-setup && cd /opt/dcos-setup && curl -O

mkdir -p genconf

cat > genconf/ip-detect << '__EOF__'
#!/usr/bin/env bash
set -o nounset -o errexit
export PATH=/usr/sbin:/usr/bin:$PATH
echo $(ip addr show ens192 | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)

chmod 755 genconf/ip-detect

### VERY IMPORTANT: validate that the following ip-detect is working
### if not then follow
###   to get a working script, must work consistently on each & every node

cat > genconf/config.yaml << '__EOF__'
bootstrap_url: http://mesos-mini-01:8081       
cluster_name: dcos
exhibitor_storage_backend: static
master_discovery: static


Launch bootstrap

docker pull nginx:alpine
docker run -d --restart=unless-stopped -p 8081:80 -v /opt/dcos-setup/genconf/serve:/usr/share/nginx/html:ro --name=dcos-bootstrap-nginx nginx:alpine

Install master

mkdir -p /tmp/dcos && cd /tmp/dcos && curl -O http://mesos-single:8081/ && bash master && cd -

Install slave

export opt_mesos=$(ls -1d /opt/mesosphere/packages/mesos--*)
ln -s $opt_mesos/ /etc/systemd/system
ln -s $opt_mesos/ /etc/systemd/system/
mkdir -p /var/log/mesos
systemctl start dcos-mesos-slave

Install dcos-cli (while we are waiting for master to come up).

mkdir -p ~/bin && cd ~/bin && curl -O && chmod 755 ~/bin/dcos && cd -

dcos config set core.dcos_url http://mesos-single
dcos auth login

Leave a Reply