此repository是Apache Mesos(7)-Marathon的高级应用的示例代码。对Mesos in Action的keys-values-app的Bundle源进行了替换,替换为阿里云镜像,使国内下载速度更快。
A simple Ruby web application (implemented using the Sinatra framework) that stores key/value pairs in a Redis database.
Each of the machines running this web app must have the following already installed:
- Ruby - tested with versions 1.9.3, 2.0.0, and 2.1.5
- Bundler - tested with version 1.8.4
The listening port for the application will use the environment variable
$PORT
, as set by Marathon. If the variable isn't set, it will fallback to
8080.
Furthermore, the following environment variables must be set:
REDIS_HOST
REDIS_PORT
Install the necessary Ruby gems:
$ bundle install
Run the app:
$ bundle exec ruby app.rb