Giter Club home page Giter Club logo

coreos-marathon's Introduction

Overview

Create a 3 node Marathon / Mesos cluster with a single master node and 2 slave nodes. Two environments are currently supported.

  • Vagrant - 3 local VMs running CoreOS on VirtualBox or VMware Fusion.
  • Packet.net - 3 physical servers running CoreOS. You need an account with Packet.net to do this.

Vagrant Setup

  1. Install dependencies
  1. Clone this project.
$ git clone https://github.com/force12/coreos-marathon/
$ cd coreos-marathon
  1. Startup and SSH

Boxes are named core-01..03.

$ vagrant up
$ vagrant ssh core-01
  1. Access web UIs

Once all the Docker images have been downloaded and started the web UIs will be availabled at. Note: This can take up to 10 minutes and the images themselves are large.

Vagrant Teardown

  1. Delete Vagrant VMs.
vagrant destroy

Packet Setup

  1. Register for an account with Packet.

  2. Clone this project.

$ git clone https://github.com/force12/coreos-marathon/
$ cd coreos-marathon
  1. Set API key and config.
# .env.packet

API_TOKEN=YOUR_API_KEY
PROJECT_NAME=example
DEVICE_PREFIX=core
PLAN=baremetal_1
# Parsippany, NJ
FACILITY=ewr1
# Either coreos_beta or coreos_alpha
OPERATING_SYSTEM=coreos_beta
  1. Start cluster of 3 physical servers running CoreOS beta.
$ cp .env.packet .env

$ bundle install
$ bundle exec rake packet:cluster:create

Cluster is being provisioned
  1. Check status of the console in the Packet web UI. Once all 3 servers are provisioned get the public IP address of the core-01 node. The Marathon web UI is available on port 8080 and Mesos web UI is on port 5050.

Packet Teardown

  1. Shutdown server cluster.
$ bundle exec rake packet:cluster:destroy

Cluster has been shutdown

Bootstrapping

  • A fresh discovery token is retrieved from discovery.etcd.io for each cluster.
  • CoreOS cloud-config starts etcd2 and fleet and a oneshot unit that starts the cluster.
  • A 3 node Consul cluster is bootstrapped using the etcd cluster.
  • Zookeeper is registered with Consul and accessed via the Consul DNS interface.
  • Mesos and Marathon use Zookeeper for service discovery.

Docker Image

The oneshot unit launches a Docker container using the image quay.io/rossf7/coreos-marathon:latest. This image is based on Alpine Linux and installs Ruby and the fleetctl binary. The container runs a Ruby script that starts the cluster using fleet.

Thanks

Thanks to Packet for the great support while we automated the cluster setup.

This template is based upon these projects.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

This code is licensed under the MIT license.

coreos-marathon's People

Contributors

rossf7 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.