Walrus is a storage service included with Eucalyptus that is interface compatible with Amazon's S3. Walrus allows users to store persistent data, organized as buckets and objects (see Amazon's S3 Getting Started Guide for more information). Walrus system options can be modified via the administrator web interface.
If you would like to use Walrus to manage Eucalyptus VM images, you can use Amazon's tools to store/register/delete them from Walrus.
Otherwise, you may use S3 Curl to interact with Walrus directly. S3 Curl is a command line tool that computes the signature and invokes curl.
You may create, delete, list buckets, put, get, delete objects, set access control policies, etc. Please refer to the Amazon S3 documentation for the S3 interface specification.
You will need the perl-Digest-HMAC package for S3 Curl, if it is not already installed on your system.
You will need to modify the file s3curl.pl in your favorite editor to change the hostname endpoint.
For example, change
my @endpoints = ( 's3.amazonaws.com' );
to
my @endpoints = ( 'your-host' );
where, your-host is the IP or the hostname on which Walrus runs. For authentication to succeed, it is crucial that your-host is the same as the host portion of the $S3_URL environment variable set by eucarc.
Be sure to source your 'eucarc' file before running the commands below.
s3curl.pl --id $EC2_ACCESS_KEY --key $EC2_SECRET_KEY <curl options>
It is preferable to add your credentials to the ".s3curl" config file. Please read the README file bundled with s3curl for details.
s3curl.pl --id $EC2_ACCESS_KEY --key $EC2_SECRET_KEY --put /dev/null -- -s -v $S3_URL/bucketName
where bucketName is the name of the bucket that you want to create.
s3curl.pl --id $EC2_ACCESS_KEY --key $EC2_SECRET_KEY --put <filename> -- -s -v $S3_URL/bucketName/objectName
where objectName is the name of the object that you want to create.
s3curl.pl --id $EC2_ACCESS_KEY --key $EC2_SECRET_KEY --head -- -s -v $S3_URL/bucketName/objectName > object.head cat object.head
s3curl.pl --id $EC2_ACCESS_KEY --key $EC2_SECRET_KEY --get -- -s -v $S3_URL/bucketName/objectName > object
s3curl.pl --id $EC2_ACCESS_KEY --key $EC2_SECRET_KEY --del -- -s -v $S3_URL/bucketName/objectName
s3curl.pl --id $EC2_ACCESS_KEY --key $EC2_SECRET_KEY --del -- -s -v $S3_URL/bucketName
Note that, according to the S3 specification, a bucket needs to be empty before it can be deleted.
You may pipe the output through "xmlindent" (you might need to install it, if it is not already installed on your system).
s3curl.pl --id $EC2_ACCESS_KEY --key $EC2_SECRET_KEY --get -- -s -v $S3_URL/bucketName?acl | xmlindent > bucket.acl
s3curl.pl --id $EC2_ACCESS_KEY --key $EC2_SECRET_KEY --get -- -s -v $S3_URL/bucketName | xmlindent > bucket.list
s3curl.pl --id $EC2_ACCESS_KEY --key $EC2_SECRET_KEY --get -- -s -v $S3_URL | xmlindent > bucketlisting