weiguang1017 / swan

mesos scheduler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status codecov Go Report Card Join the chat at https://gitter.im/Dataman-Cloud/swan

swan is a mesos scheduling framework written in golang based on mesos new HTTP API.

you can use swan to deployment application on mesos cluster, and manage the entire lifecycle of the application. you can do rolling-update with new version, you can scale application, and you can do health check for your applications and auto failover when applications or services are not available.

swan is maintained by dataman-cloud, and licensed under the Apache License, Version 2.0.

Features

  • Application deployment
  • Application scaling
  • Rolling update
  • Version rollback
  • Health check
  • Auto failover

Special features

  • The instance name is fixed during the application lifecycle.
  • The instance index is continuously incremented from zero.

Installation

Use Docker Compose(all-in-one, include mesos)

docker-compose up -d

From Source(swan only)

First get the swan:

go get github.com/Dataman-Cloud/swan

Then you can compile swan with:

go install github.com/Dataman-Cloud/swan

swan will be installed at $GOPATH/bin/swan, If $GOPATH/bin is in your PATH, you can invoke swan from the CLI.

Latest Release(swan only)

To get started with the latest release, run the following commands:

wget https://github.com/Dataman-Cloud/swan/releases/download/v0.1/swan
chmod +x swan

Run

swan --masters=192.168.1.50:5050 

Use swan --help to see usage.

Getting Started

swan has no ui, no command-line client at this time. you can use it with curl.

  • applicaiton deloyment
curl -X POST -H "Content-Type: application/json" -d@example.json http://localhost:9999/v1/apps
  • application delete
curl -X DELETE http://localhost:9999/v1/apps/nginx0003
  • application show
curl http://localhost:9999/v1/apps/nginx0003
  • applications list
curl http://localhost:9999/v1/apps
  • application scaling
curl -X POST http://localhost:9999/v1/apps/nginx0003/scale?instances=10

instances is used to specified the instances count you wanna scale to.

  • application rolling update
curl -X POST -H "Content-Type: application/json" -d@new_verison.json http://localhost:9999/v1/apps/nginx0003/update\?instances\=-1

instances -1 means updating all instances. other value means updating the specified instances at one time.

  • application versions
curl http://localhost:9999/v1/apps/nginx0003/versions

Roadmap

See ROADMAP for the full roadmap.

Contributing

If you want to contribute to swan, make a PR or report a issue. The goal of swan is to become the default and best scheduler for mesos, so let's do it!

Licensing

Swan is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

About

mesos scheduler

License:Apache License 2.0


Languages

Language:Go 62.2%Language:Protocol Buffer 37.4%Language:Makefile 0.4%