Scality: Setup the RS2 (REST) Connector

From Define Wiki
Revision as of 13:31, 15 August 2013 by David (talk | contribs)
Jump to navigation Jump to search

Install the RS2 Connector

  yum install scality-rest-connector

Configure the RS2 Connector

[root@blade2 scality]$ scality-rest-connector-config 
Do you want to configure sagentd? If you answer no, default values will be used [y]: 
Please, enter the prefix used to name nodes in the supervisor [blade2-c]: 
Please, enter the IP address of this server for the supervisor [172.28.15.2]: 
Please, enter the IP address of the supervisor [172.28.15.1]: 
install new config
configuring usage of ssl
generating /etc/scality-rest-connector/connectors.conf
Starting connector:                                        [  OK  ]

Add the Connector in the Web Interface

  • Point browser to http://blade1:3080/
  • Default Password is root/admin
  • Connector should appear greyed out on the left hand side, click on it, then add connector.

Install brs2prov

Dependencies

  yum install curl perl-Digest-HMAC


The brs2prov pacakge can be downloaded here: http://docs.scality.com/download/attachments/328517/brs2prov.zip?version=1&modificationDate=1348510607000

[root@blade2 ~]# unzip brs2prov.zip 
Archive:  brs2prov.zip
  inflating: brs2prov                
[root@blade2 ~]# cp brs2prov /usr/local/bin/

Create a User

[root@blade2 ~]# ./brs2prov -adduser test -dname test -id admin -key provkey -host blade2:8180
<?xml version="1.0" encoding="UTF-8"?>
<AddUser><User>test</User>
<AccessKeyId>6B8F0973D32146CD6B8F09000000004000000120</AccessKeyId>
</AddUser>

Install s3cmd

Before we set this up, we need add dnsmasq so *.blade2 get resolved correctly === Install dnsmask

 yum install dnsmasq

Add folllowing line in /etc/dnsmasq.conf

 address=/.<FQDN>/<IP>
 Example:
 address=/.blade2/172.28.15.2
 
 /etc/init.d/dnsmasq restart 

Update your resolv.conf to do DNS lookup locally first

 [root@blade2 ~]# cat /etc/resolv.conf 
 ; generated by /sbin/dhclient-script
 search local pxe.boston.co.uk.
 nameserver 172.28.15.2
 nameserver 172.28.0.2

Test you can ping any subdomain:

 ping any.blade2

Install s3cmd

  yum install s3cmd
  • Note: When using Scality RS2 specify the username created using brs2prov and the authentication secret key stored in the supervisor (default is secretkey).

Lets run the --configure command which will create a default ~/.s3cfg file

root@blade2 ~]# s3cmd --configure 

Enter new values or accept defaults in brackets with Enter.
Refer to user manual for detailed description of all options.

Access key and Secret key are your identifiers for Amazon S3
Access Key: 6B8F0973D32146CD6B8F09000000004000000120
Secret Key: secretkey

Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption password: 
Path to GPG program [/usr/bin/gpg]: 

When using secure HTTPS protocol all communication with Amazon S3
servers is protected from 3rd party eavesdropping. This method is
slower than plain HTTP and can't be used if you're behind a proxy
Use HTTPS protocol [No]: 

On some networks all internet access must go through a HTTP proxy.
Try setting it here if you can't conect to S3 directly
HTTP Proxy server name: 

New settings:
  Access Key: 6B8F0973D32146CD6B8F09000000004000000120
  Secret Key: secretkey
  Encryption password: 
  Path to GPG program: /usr/bin/gpg
  Use HTTPS protocol: False
  HTTP Proxy server name: 
  HTTP Proxy server port: 0

Test access with supplied credentials? [Y/n] n

Save settings? [y/N] y
Configuration saved to '/root/.s3cfg'

Edit the .s3cfg file and update the amazon s3 references

  # from: 
host_base = s3.amazonaws.com
host_bucket = %(bucket)s.s3.amazonaws.com
  # to: 
host_base = blade2
host_bucket = %(bucket)s.blade2