Search code examples
ruby-on-railspostgresqlservice-discoverymesosmesosphere

Connecting rails with storage services on a mesos cluster


How can I communicate a Rails application with a Postgres DB using Zookeeper, Marathon and Mesos? Obviously I can't hardcode storage locations under database.yml


Solution

  • Task storage on Mesos is currently ephemeral, meaning if you were to run Postgres via Marathon and the task was somehow lost, you would lose your database's data. The Mesos team is currently (as of 2014-08-11) discussing ways to support persistent storage: https://issues.apache.org/jira/browse/MESOS-1554

    Until Mesos supports persistent storage, you should run your database separate from Mesos and give your Rails app (running on Marathon + Mesos) static credentials to it in "database.yml".