Create your Mesosphere stack with Vagrant and Puppet (Virtualbox / AWS / Digital Ocean are supported providers).
This creates a Mesos cluster in which Marathon framework and Consul (Optional, used for service discovery) are running. This means you can build your own Mesos+Marathon+Docker PaaS with vagrant up
! If you want to deploy docker containers, please refer to the chapter "Deploy Docker Container with Marathon" in this blog entry.
- Using VirtualBox
- vagrant 1.6.5+: http://www.vagrantup.com/
- VirtualBox: https://www.virtualbox.org/ (not required if you use ec2/DigitalOcean.)
- vagrant plugins
- vagrant-hosts
$ vagrant plugin install vagrant-hosts
- vagrant-cachier
$ vagrant plugin install vagrant-cachier
- vagrant-aws (only if you use ec2.)
$ vagrant plugin install vagrant-aws
- vagrant-digitalocean (only if you use DigitalOcean.)
$ vagrant plugin install vagrant-digitalocean
- vagrant-hosts
Clone this repository and update git submodules:
$ git clone https://github.com/tayzlor/vagrant-puppet-mesosphere.git
$ cd vagrant-puppet-mesosphere
$ git submodule init
$ git submodule update
Includes -
- Docker (1.4.0)
- Mesos master (x1)
- Mesos slave (x1)
- Marathon (0.7.5)
- Zookeeper
- Consul, running in server mode (Optional - configure via
consul_enable:
param inhieradata/common.yml
)
$ cd standalone
$ vagrant up
After box is up, you can see services running at:
- Mesos web UI on: http://mesos:5050
- Marathon web UI on: http://mesos:8080
- Consul web UI on: http://mesos:8500
Cluster configuration is defined at cluster/cluster.yml
. You can edit the file to configure cluster settings.
# Mesos cluster configurations
# The numbers of servers
##############################
master_n: 1 # hostname will be master1,master2,…
slave_n : 1 # hostname will be slave1,slave2,…
# Memory and Cpus setting(only for virtualbox)
##########################################
master_mem : 256
master_cpus: 1
slave_mem : 512
slave_cpus : 2
# private ip bases
# When ec2, this should be matched with
# private addresses defined by subnet_id below.
################################################
master_ipbase: "172.31.1."
slave_ipbase : "172.31.2."
Includes -
- Docker (1.4.0)
- Mesos (running in master server mode)
- Marathon (0.7.5)
- Zookeeper
- Consul, running in server mode (Optional - configure via
consul_enable:
param incluster.yml
)
Includes -
- Docker (1.4.0)
- Mesos (running in slave server mode)
- Consul, running in agent mode (optional - configure via
consul_enable:
param incluster.yml
)
This may takes several minutes(10 to 20 min.).
$ cd cluster
$ vagrant up
At default setting, after all the boxes are up, you can see services running at:
- Mesos web UI on: http://172.31.1.11:5050
- Marathon web UI on: http://172.31.3.11:8080
- Chronos web UI on: http://172.31.3.11:8081
this operations all VM instances forming the cluster.
$ cd cluster
$ vagrant destroy
Inspired by - https://github.com/everpeace/vagrant-mesos which is similar but uses Chef, and has a slightly different cluster layout / components. http://philzim.com/2014/11/12/service-discovery-orchestration-with-mesos-and-consul