Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Feature specifications

...

The configuration environment is controlled by a file which needs to be accurately defined at the time of installation. Within the cloud bridge installation directory, the file is at conf/cloud-bridge.properties. Typical configuration information defined in this file is

host=http://myhost:8080/awsapiImage Removed
storage.root=/mounts/mymountpoint
storage.multipartDir=_multipartuploads_
bucket.dns=false
serviceEndpoint=myhost:8080

So configured, the S3 API REST translation service will be running at http://myhost:8080/awsapi/rest/AmazonS3/Image Removed.

The following step, with tomcat running, is to set up user keys using the script awsapi-setup/setup/cloudstack-aws-api-register. This needs setting up in accordance with the following example

./cloudstack-aws-api-register -u http://localhost:8080/awsapi/rest/AmazonS3Image Removed -a MyAccessIDKey -s MySecretKey openssl_generated.mycert.pem

...

...

  1. The incoming request is interpreted.
  2. The authentication of the request is appended to it.
  3. The service which processes the request provides a response.
  4. The informational response is returned if successful or an error response provided otherwise, in accordance with http://docs.amazonwebservices.com/AmazonS3/latest/dev/UsingRESTError.htmlImage Removed.

To validate the request data structure (termed the canonical string) the following rules are enforced by the design:

...

  1. Get CloudStack running on the latest 3.0.x series
  2. Enable the S3 API by setting the flag enable.s3.api to 'true' in the configuration table. This can be done through the UI or directly in MySQL:
    update configuration set value='true' where name='enable.s3.api';
  3. Choose a local filesystem path where the objects will be stored. We can mount an NFS store or use the local filesystem. E.g,:
    • mkdir -p /mnt/s3
    • Ensure that the 'cloud' user can write to this directory
  4. Edit the file $TOMCAT_HOME/conf/cloud-bridge.properties:
    • host=http://localhost:8080/awsapiImage Removed
      storage.multipartDir=_multipartuploads_
      bucket.dns=false
      storage.root=<mount point or filesystem path>
      serviceEndpoint=localhost:8080
  5. Restart CloudStack.
  6. Obtain API and secret keys for a user (available in the Admin ui under Accounts -> Users)
    • CloudStack Api key = this is the same as the AWS access key id
    • CloudStack Secret key = this is the same as the AWS secret access key
  7. Generate a private key and a self-signed X.509 certificate. Substitute your own desired storage location for /path/to/… below.
    • $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 <http://rsa:2048/Image Removed> -keyout /path/to/private_key.pem -out /path/to/cert.pem
  8. Register the mapping from the X.509 certificate to your accounts API keys with CloudStack.
    • $ cloudstack-aws-api-register --apikey=<User’s Cloudstack API key> --secretkey=<User’s CloudStack Secret key> --cert=</path/to/cert.pem> --url=http://<cloudstack-server>:8080/awsapi/rest/AmazonS3
  9. Configure the boto S3Connection object as follows:

...