stigkj / vagrant-puppet-mesosphere

Spin up a Mesosphere cluster with Vagrant (Virtualbox / AWS / Digital Ocean)

Home Page:https://github.com/tayzlor/vagrant-puppet-mesosphere

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vagrant-puppet-mesosphere

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.

Prerequisites

Mesos Standalone on VirtualBox

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 in hieradata/common.yml )

    $ cd standalone $ vagrant up

After box is up, you can see services running at:

Mesos Cluster on VirtualBox

Cluster Configuration

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."

Node types

mesos-master

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 in cluster.yml)

mesos-slave

Includes -

  • Docker (1.4.0)
  • Mesos (running in slave server mode)
  • Consul, running in agent mode (optional - configure via consul_enable: param in cluster.yml)

Launch Cluster

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:

Destroy Cluster

this operations all VM instances forming the cluster.

$ cd cluster
$ ./vagrant destroy

Credits

Inspired by - https://github.com/everpeace/vagrant-mesos which is similar but uses Chef, and has a slightly different cluster layout / components. philzim.com/2014/11/12/service-discovery-orchestration-with-mesos-and-consul

About

Spin up a Mesosphere cluster with Vagrant (Virtualbox / AWS / Digital Ocean)

https://github.com/tayzlor/vagrant-puppet-mesosphere

License:Apache License 2.0


Languages

Language:Ruby 73.2%Language:Puppet 21.0%Language:Shell 5.8%