https://github.com/icsnju/apt-mesos
A Mesos Framework which provides an easy way to build job environment and schedule tasks in a multi-node cluster, written in Go.
https://github.com/icsnju/apt-mesos
golang mesos mesos-framework
Last synced: 2 months ago
JSON representation
A Mesos Framework which provides an easy way to build job environment and schedule tasks in a multi-node cluster, written in Go.
- Host: GitHub
- URL: https://github.com/icsnju/apt-mesos
- Owner: icsnju
- Created: 2016-01-13T06:20:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-12-16T05:56:59.000Z (over 7 years ago)
- Last Synced: 2025-03-22T21:47:34.359Z (about 1 year ago)
- Topics: golang, mesos, mesos-framework
- Language: Go
- Homepage:
- Size: 19.5 MB
- Stars: 1
- Watchers: 5
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# apt-mesos
[](https://travis-ci.org/icsnju/apt-mesos)
Apt-Mesos is a Mesos Framework for Testing which provides an easy way to build testing environment and schedule testing tasks in a multi-node cluster.
The latest version is 0.2.0, which support:
* Use RESTful API to submit, list, delete, kill tasks
* Measure cluster's metrics(`cpus`, `mem`, `disk`)
Other features will be added in later versions.
* WEBUI (updated on version 0.2.0)
## Prerequisites
* golang (nessesary)
* vagrant
* VirtualBox
* vagrant plugins
* vagrant-omnibus `$ vagrant plugin install vagrant-omnibus`
* vagrant-berkshelf `$ vagrant plugin install vagrant-berkshelf`
* vaggrant-hosts `$ vagrant plugin install vagrant-hosts`
**Note:** You should build a `Mesos` environment first. We provide `Vagrantfile` and some scripts to help you build `Mesos Cluster` easily (thanks to [everpeace/vagrant-mesos](https://github.com/everpeace/vagrant-mesos)), or you can use [playa-mesos](https://github.com/mesosphere/playa-mesos) to build `Mesos Standalone` .
## Installation
### Compile source code
```
$ go get github.com/icsnju/apt-mesos
$ cd $GOPATH/src/github.com/icsnju/apt-mesos
$ go build
```
### Build Mesos cluster
```
$ cd vagrant
$ vagrant up
```
## Usage
### Start server
```
$ ./apt-mesos --master= --addr=
```
### AM WebUI
Open your browser and visit `http://`, then you can create a task easily and fetch the test results.
### Submit a task:
```
$ curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" /api/tasks -d@task.json
```
### Task format
```
{
"cmd": "sh /data/ping.sh",
"cpus": "1",
"mem": "16",
"docker_image": "busybox",
"volumes": [
{
"container_path":"/data",
"host_path":"/vagrant"
}
]
}
```
### Complete usage:
```
Usage of ./apt-mesos:
-addr string
Address to listen on (default "127.0.0.1:3030")
-debug
Run in debug mode
-master string
Master to connect to (default "127.0.0.1:5050")
```
### Hack the WEBUI
We provide a simple WEBUI, welcome to fork the code [https://github.com/JetMuffin/sher-frontend](https://github.com/JetMuffin/sher-frontend) and contribute to this project!
## Contributors
[JetMuffin](https://github.com/JetMuffin)