Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  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 ##Edit
  4. Edit the file $TOMCAT_HOME/conf/cloud-bridge.properties:
    • host=http://localhost:8080/awsapi
      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/> -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:

...