Last active
August 29, 2015 14:06
-
-
Save up1/052a87878bb2d54c4c4e to your computer and use it in GitHub Desktop.
Install Riak with Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$curl -i "http://127.0.0.1:49162/buckets/test/keys/somkiat" -X PUT -H "Content-type: text/plain" -d "สวัสดี Riak" | |
HTTP/1.1 204 No Content | |
Vary: Accept-Encoding | |
Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact) | |
Date: Tue, 09 Sep 2014 08:28:06 GMT | |
Content-Type: text/plain | |
Content-Length: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$docker images | grep riak | |
hectcastro/riak latest 8f45093c63a8 2 minutes ago 511.8 MB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$DOCKER_RIAK_AUTOMATIC_CLUSTERING=1 DOCKER_RIAK_CLUSTER_SIZE=5 make start-cluster | |
./bin/start-cluster.sh | |
Bringing up cluster nodes: | |
Successfully brought up [riak01] | |
Successfully brought up [riak02] | |
Successfully brought up [riak03] | |
Successfully brought up [riak04] | |
Successfully brought up [riak05] | |
Please wait approximately 30 seconds for the cluster to stabilize. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
364d6ea82460 hectcastro/riak:latest "/sbin/my_init --qui 36 minutes ago Up 19 minutes 0.0.0.0:49161->8087/tcp, 0.0.0.0:49162->8098/tcp riak05 | |
5abee49dc788 hectcastro/riak:latest "/sbin/my_init --qui 36 minutes ago Up 19 minutes 0.0.0.0:49159->8098/tcp, 0.0.0.0:49160->8087/tcp riak04 | |
cc335434fd6e hectcastro/riak:latest "/sbin/my_init --qui 37 minutes ago Up 19 minutes 0.0.0.0:49157->8087/tcp, 0.0.0.0:49158->8098/tcp riak03 | |
5573f34fb722 hectcastro/riak:latest "/sbin/my_init --qui 37 minutes ago Up 19 minutes 0.0.0.0:49155->8087/tcp, 0.0.0.0:49156->8098/tcp riak02 | |
70cbc413fbfa hectcastro/riak:latest "/sbin/my_init --qui 37 minutes ago Up 19 minutes 0.0.0.0:49153->8087/tcp, 0.0.0.0:49154->8098/tcp riak01,riak02/seed,riak03/seed,riak04/seed,riak05/seed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$boot2docker init | |
$boot2docker start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$curl -i "http://127.0.0.1:49158/buckets/test/keys/somkiat" | |
HTTP/1.1 200 OK | |
X-Riak-Vclock: a85hYGBgzGDKBVIcFxR36IXwbfyVwZTImMfKIGbWfJYvCwA= | |
Vary: Accept-Encoding | |
Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact) | |
Link: </buckets/test>; rel="up" | |
Last-Modified: Tue, 09 Sep 2014 08:28:06 GMT | |
ETag: "7HBC9NQGGUEd6WLBenBHM4" | |
Date: Tue, 09 Sep 2014 08:31:43 GMT | |
Content-Type: text/plain | |
Content-Length: 23 | |
สวัสดี Riak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$git clone https://github.com/hectcastro/docker-riak.git | |
$cd docker-riak | |
$make build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$make test-cluster | grep -A6 "ring_members" | |
"ring_members": [ | |
"[email protected]", | |
"[email protected]", | |
"[email protected]", | |
"[email protected]", | |
"[email protected]" | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment