Here is the Marathon JSON used to deploy Riak on Mesos backed by Flocker and Calico Docker Networking
{
"id": "marathon-demo-riak",
"apps": [{
"id": "riak1",
"container": {
"type": "DOCKER",Here is the Marathon JSON used to deploy Riak on Mesos backed by Flocker and Calico Docker Networking
{
"id": "marathon-demo-riak",
"apps": [{
"id": "riak1",
"container": {
"type": "DOCKER",| defmodule HttpRequester do | |
| use GenServer | |
| def start_link(_) do | |
| GenServer.start_link(__MODULE__, nil, []) | |
| end | |
| def fetch(server, url) do | |
| # Don't use cast: http://blog.elixirsips.com/2014/07/16/errata-dont-use-cast-in-a-poolboy-transaction/ | |
| timeout_ms = 10_000 |
| defmodule Abilities1 do | |
| defimpl Canada.Can, for: User do | |
| def can?(%User{id: user_id}, action, %Testimonial{id: testimonial_id}) | |
| when action in [:create], do: true | |
| def can?(%User{id: user_id}, action, %Testimonial{id: testimonial_id}) | |
| when action in [:edit], do: true | |
| end | |
| end | |
| defmodule BetterAbilities do |
| var npm = require("npm"); | |
| var fs = require("fs-extra"); | |
| var chokidar = require("chokidar"); | |
| var packagePaths = [ | |
| "../mobile-app/node_modules/shared-package/lib", | |
| "../web-app/node_modules/shared-package/lib", | |
| ]; | |
| var noop = () => {}; |
| export function actionTypeBuilder(prefix) { | |
| return { | |
| type: actionType => `${prefix}/${actionType}`, | |
| loading: actionType => `${actionType}/loading`, | |
| ready: actionType => `${actionType}/ready`, | |
| stopped: actionType => `${actionType}/stopped`, | |
| changed: actionType => `${actionType}/changed`, | |
| error: actionType => `${actionType}/error`, | |
| success: actionType => `${actionType}/success` | |
| }; |