basho / riak-python-client

The Riak client for Python.
Apache License 2.0
320 stars 182 forks source link

How to supply admin-key and admin-secret to Riak CS? [JIRA: CLIENTS-1082] #520

Closed drozzy closed 7 years ago

drozzy commented 7 years ago

I'm trying to connect to my hosted riak cs instance:

c = RiakClient(http_port=9980, host='111.111.111.111', protocol='http')

But how do I supply the security info provided to me by my setup instructions:

http://docs.basho.com/riak/cs/2.1.1/tutorials/fast-track/test-installation/ (use s3cmd to test)
s3cmd -c ~/.s3cfgfasttrack --configure
   § Access Key: admin-key
   § Secret Key: admin-secret
   § Default Region: CA
   § Encryption password: password
   § Path to GPG program: /usr/bin/gpg
   § Use HTTPS protocol: False
   § HTTP Proxy server name: 111.111.111.111
   § HTTP Proxy server port: 9980

I'm using the following docker container: https://hub.docker.com/r/dimagi/riak-cs/

If I try to save a key in a bucket like so:

b = c.bucket('test')
val1 = 1
key1 = b.new('one', data=val1)
key1.store()

I get this error: riak.riak_error.RiakError: 'Expected status [200, 201, 204, 300], received 404'

Thanks.

alexmoore commented 7 years ago

Hi @drozzy,

The riak-python-client is for Riak KV and Riak TS use. For Riak CS, you should use an S3 client.

Thanks, Alex

Basho-JIRA commented 7 years ago

Fixed, or closed via GitHub issues.

[posted via JIRA by Alexander Moore]