Skip to content

Instantly share code, notes, and snippets.

@lmars
Last active January 22, 2016 20:43
Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save lmars/fca0f18b4ecd507fb39a to your computer and use it in GitHub Desktop.
Save lmars/fca0f18b4ecd507fb39a to your computer and use it in GitHub Desktop.
Flynn Redis
# create a redis app
flynn create --remote "" redis
# create a release using the latest (at the time of writing) Docker Redis image
flynn -a redis release add -f config.json "https://registry.hub.docker.com?name=redis&id=868be653dea3ff6082b043c0f34b95bb180cc82ab14a18d9d6b8e27b7929762c"
# scale the server to one process. This may time out initially as the server pulls the image, but watch "flynn -a redis ps" and should come up.
flynn -a redis scale server=1
# redis should now be running in the cluster at redis.discoverd:6379
flynn -a redis run redis-cli -h redis.discoverd -p 6379
redis.discoverd:6379> PING
PONG
# note that although the container has a data volume, they are not currently sticky so restarting the container will get a new data directory. This will be fixed when we have a Redis appliance / sticky volumes.
{
"processes": {
"server": {
"cmd": ["redis-server"],
"data": true,
"ports": [{
"port": 6379,
"proto": "tcp",
"service": {
"name": "redis",
"create": true,
"check": { "type": "tcp" }
}
}]
}
}
}
@JMSwag
Copy link

JMSwag commented Jun 28, 2015

Does this workflow still work with flynn v20150627.0?

@lmars
Copy link
Author

lmars commented Jul 6, 2015

@JMSwag this should still work yes, did you have issues with it?

@rstacruz
Copy link

Where is the https://registry.hub.docker.com?name=redis&id=868be653dea3ff6082b043c0f34b95bb180cc82ab14a18d9d6b8e27b7929762c url taken from?

@JMSwag
Copy link

JMSwag commented Aug 4, 2015

@lmars no longer an issue with the latest version

@leewardbound
Copy link

Any update on how to achieve data persistence?

@sevazhidkov
Copy link

Data persistence is not working?

@eymengunay
Copy link

@sevazhidkov No, unfortunately at this time persistent storage is not supported.See issue: flynn/flynn#1345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment