Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
software:riak [2014/02/05 14:38]
Michele Porelli
software:riak [2014/02/05 17:57]
Michele Porelli
Line 3: Line 3:
 ==== Setup an S3 clone with Debian==== ==== Setup an S3 clone with Debian====
 This guide is tested on Debian Wheezy with Riak 1.4.4 in my (virtualized) servers This guide is tested on Debian Wheezy with Riak 1.4.4 in my (virtualized) servers
-  * All riak components should be installed on the same machine+  * All riak components should be installed on the same machine ​(riak, riak-cs, riak-cs-control,​ stanchion)
   * Web application should be on a different machine or you have to use riak ip and port as proxy   * Web application should be on a different machine or you have to use riak ip and port as proxy
   * Development outside the network is possibile but using the proxy as above   * Development outside the network is possibile but using the proxy as above
Line 37: Line 37:
                                                                                                                        
 In progress... In progress...
 +
 +=== Riak-CS S3 Clone ===
 +  - Add basho key<​code>#​ curl http://​apt.basho.com/​gpg/​basho.apt.key | apt-key add -</​code>​
 +  - Add basho repository<​code>​echo deb http://​apt.basho.com $(lsb_release -sc) main > /​etc/​apt/​sources.list</​code>​
 +  - Install all riak components<​code>#​ apt-get install riak riak-cs stanchion riak-cs-control</​code>​
 +  - Change riak backend to use riak-cs<​code>#​ nano /​etc/​riak/​app.config</​code><​code>​in riak_kv section comment (place two '​%'​ at line start) the following line:
 +
 +{storage_backend,​ riak_kv_bitcask_backend},​
 +
 +and replace it with:
 +
 +{add_paths, ["/​usr/​lib/​riak-cs/​lib/​riak_cs-1.4.4/​ebin"​]},​
 +{storage_backend,​ riak_cs_kv_multi_backend},​
 +{multi_backend_prefix_list,​ [{<<"​0b:">>,​ be_blocks}]},​
 +{multi_backend_default,​ be_default},​
 +{multi_backend,​ [
 +  {be_default,​ riak_kv_eleveldb_backend,​ [
 +    {max_open_files,​ 50},
 +      {data_root, "/​var/​lib/​riak/​leveldb"​}
 +  ]},
 +    {be_blocks, riak_kv_bitcask_backend,​ [
 +      {data_root, "/​var/​lib/​riak/​bitcask"​}
 +  ]}
 +]},</​code><​code>​in riak_core section add:
 +
 +{default_bucket_props,​ [{allow_mult,​ true}]},
 +</​code>​
 +  - Increase riak capacity<​code>/​etc/​riak/​vm.args</​code><​code>##​ This setting is not present in default Riak installations,​ so
 +## it should be added. ​ In some cases, a value of 128000 may be
 +## appropriate.
 ++zdbbl 96000</​code>​
 +  - Temporary enable admin user creation<​code>#​ nano /​etc/​riak-cs/​ap.config</​code><​code>​change {anonymous_user_creation,​ false} in {anonymous_user_creation,​ true}</​code>​
 +  - Start riak, riak-cs and stanchion<​code>​riak start && riak-cs start && stanchion start && riak-cs-control start</​code>​
 +  - Create an admin user<​code>​curl -H '​Content-Type:​ application/​json'​ \
 +  -X POST http://​localhost:​8080/​riak-cs/​user \
 +  --data '​{"​email":"​sysadmin@example.com",​ "​name":"​admin user"​}'​
 +
 +Take a note with the response!
 +</​code>​
 +  - Stop riak&​co.<​code>​riak-cs-control stop ; stanchion stop ; riak-cs stop ; riak stop</​code>​
 +  - Set riak-cs network ip<​code>#​ nano /​etc/​riak-cs/​app.config</​code><​code>​Change riak_ip value from localhost to your riak machine lan ip</​code>​
 +  - admin-key and admin-secrets in riak-cs and stanchion
 +  - script
 +  - ulimit
 +=== Web server ===
 +  - install nginx
 +  - configure nginx server
 +=== Firewall ===
 +  - redirect rule
 +
 +
Navigation
Print/export
QR Code
QR Code Riak (generated for current page)