Return-Path: X-Original-To: apmail-incubator-cloudstack-users-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 045DBC662 for ; Fri, 8 Jun 2012 02:41:11 +0000 (UTC) Received: (qmail 57164 invoked by uid 500); 8 Jun 2012 02:41:10 -0000 Delivered-To: apmail-incubator-cloudstack-users-archive@incubator.apache.org Received: (qmail 56998 invoked by uid 500); 8 Jun 2012 02:41:09 -0000 Mailing-List: contact cloudstack-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-users@incubator.apache.org Delivered-To: mailing list cloudstack-users@incubator.apache.org Received: (qmail 56971 invoked by uid 99); 8 Jun 2012 02:41:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 02:41:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rajesh.battala@citrix.com designates 203.166.19.134 as permitted sender) Received: from [203.166.19.134] (HELO SMTP.CITRIX.COM.AU) (203.166.19.134) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 02:41:03 +0000 X-IronPort-AV: E=Sophos;i="4.75,734,1330905600"; d="scan'208";a="11659240" Received: from banpmailmx02.citrite.net ([10.103.128.74]) by SYDPIPO01.CITRIX.COM.AU with ESMTP/TLS/RC4-MD5; 08 Jun 2012 02:40:39 +0000 Received: from BANPMAILBOX01.citrite.net ([10.103.128.72]) by BANPMAILMX02.citrite.net ([10.103.128.74]) with mapi; Fri, 8 Jun 2012 08:10:38 +0530 From: Rajesh Battala To: "cloudstack-users@incubator.apache.org" , Chiradeep Vittal CC: CloudStack DeveloperList Date: Fri, 8 Jun 2012 08:07:13 +0530 Subject: RE: Re: S3 API in CloudStack 3.0.x Thread-Topic: Re: S3 API in CloudStack 3.0.x Thread-Index: Ac1E/Qph6odIxsaCSXCtadrQfxpBYAAIgqkg Message-ID: <97F4356AEA71904482CD192135C038F9010C39543CC6@BANPMAILBOX01.citrite.net> References: <4FD12B2D.4020709@caringo.com> In-Reply-To: <4FD12B2D.4020709@caringo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 > -----Original Message----- > From: Michael Butterfield [mailto:michael.butterfield@caringo.com] > Sent: Friday, June 08, 2012 3:59 AM > To: Chiradeep Vittal > Cc: CloudStack Users; CloudStack DeveloperList > Subject: Re: Re: S3 API in CloudStack 3.0.x >=20 > I have successfully executed the requests to create a bucket and create a= n > on RHEL 6.2 using boto. Here are few a minor tweaks that I noted during t= he > process: >=20 > (1) In the CloudScape home, there is a minor typo in that INSTALL.txt. I = think > 'sh-keygen -t rsa -q' should be 'ssh-keygen -t rsa -q' > (2) Another trivial tweak I required for RHEL in the 'cloudstack-aws-api- > register' script I changed #!/cygdrive/c/python26/python to match my > python path of #!/usr/bin/python > (3) I needed to set 'enable.ec2.api' to true before running the boto > commands [Rajesh Battala] You need to enable "enable.s3.api" to true before running = the boto commands.=20 Please explore S3 on CS and if you find any bugs, feel free to report at bu= gs.cloudstack.org=20 >=20 > Mike Butterfield >=20 > On 5/31/2012 1:08 PM, Chiradeep Vittal wrote: > > [Sorry for cross posting, but potentially both users and developers > > may be interested] > > > > The s3-hdfs branch in git.cloud.com [1] replaces the filesystem > > backend with a HDFS backend. > > Since we're still discussing where development happens, I haven't > > moved it to anywhere official. > > For those looking to integrate other storage backends, it might > > provide a useful guide. > > > > The steps to get this working are the same, except that the > > storage.root in step 4 below is as follows: > > > > storage.root=3Dhdfs://:9000/s3 > > > > On the HDFS side, I used Hadoop 0.23.1 (although I think it should > > work with Hadoop 1.0). > > I found that I had to set the following configuration in hdfs-site.xml > > > > dfs.permissions > > false > > > > > > > > > > > > [1]http://git.cloud.com/cgit/cloudstack-oss/log/?h=3Ds3-hdfs > > > > On 5/30/12 2:59 PM, "Chiradeep Vittal" > wrote: > > > >> >The S3 API formerly in the "Cloud Bridge" source has been moved to > >> >CloudStack. > >> >Several bugs have been fixed and more features have been supported. > >> >The complete list of supported APIs can be found here: > >> >S3 API Page: > >> >http://wiki.cloudstack.org/display/RelOps/S3+API+in+CloudStack > >> > > >> >There has not been any formal QA applied to this feature, but I hope > >> >we can move it to a more polished state. > >> >For that, I hope the community can contribute some testing and bug > >> >fixing resources. Instructions on using this at the end of this post. > >> > > >> >The code has been tested using boto (https://github.com/boto/boto), > >> >but I suspect that there are other clients (AWS SDK, s3cmd,etc) that > >> >are also popular. The error responses for S3 are not well > >> >documented, so some of these clients might barf unexpectedly. > >> > > >> > > >> >*****Usage********** > >> >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. You can do this through the UI or directly i= n > MySQL: > >> >update configuration set value=3D'true' where name=3D'enable.s3.api'; > >> > > >> >3. Choose a local filesystem path where the objects will be stored. > >> >You 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=3Dhttp://localhost:8080/awsapi > >> >storage.multipartDir=3D__multipart__uploads__ > >> >bucket.dns=3Dfalse > >> >storage.root=3D > >> >serviceEndpoint=3Dlocalhost:8080 > >> > > >> > > >> >5. Restart CloudStack > >> > > >> >6. Obtain API and secret keys for a user (available in the Admin ui > >> >under Accounts -> Users) CloudStack Api key =3D this is the same as > >> >the AWS access key id CloudStack Secret key =3D this is the same as > >> >the AWS secret access key Generate a private key and a self-signed > >> >X.509 certificate. Substitute your own desired storage location > >> >for/path/to/S( below. > >> >$ openssl req -x509 -nodes -days 365 -newkey > >> >rsa:2048 -keyout /path/to/private_key.pem -out > >> >/path/to/cert.pem > >> > > >> >Register the mapping from the X.509 certificate to your accounts API > >> >keys with CloudStack. > >> >$ cloudstack-aws-api-register --apikey=3D > >> >--secretkey=3D > >> >--cert=3D > >> >--url=3Dhttp://:8080/awsapi/rest/AmazonS3 > >> > > >> > > >> >The cloudstack-aws-api-register command is available in /usr/bin in > >> >the machine where CloudStack is installed > >> > > >> >7. Configure the boto S3Connection object as follows: > >> >calling_format=3D OrdinaryCallingFormat() connection =3D > >> >S3Connection(aws_access_key_id=3D, > >> > aws_secret_access_key=3D > >> > is_secure=3DFalse, > >> > host=3D'', > >> > port=3D8080, > >> >calling_format=3Dcalling_format, > >> > path=3D"/awsapi/rest/AmazonS3") > >> > > >> > > >> >