<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chmouel&#039;s Blog &#187; Rackspace</title>
	<atom:link href="http://blog.chmouel.com/category/rackspace/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.chmouel.com</link>
	<description>Random and probably boring stuff.</description>
	<lastBuildDate>Wed, 01 Feb 2012 10:28:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Mass editing firewall on Rackspace Cloud.</title>
		<link>http://blog.chmouel.com/2011/05/05/mass-editing-firewall-on-rackspace-cloud/</link>
		<comments>http://blog.chmouel.com/2011/05/05/mass-editing-firewall-on-rackspace-cloud/#comments</comments>
		<pubDate>Thu, 05 May 2011 22:12:42 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://blog.chmouel.com/?p=447</guid>
		<description><![CDATA[A lot of our customers in Rackspace cloud has been asking how to mass edit firewalls of servers when you have multiple servers without doing it manually. Part of my cloudservers-api-demo I have written a simple firewall scripts abstracting the &#8230; <a href="http://blog.chmouel.com/2011/05/05/mass-editing-firewall-on-rackspace-cloud/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A lot of our customers in Rackspace cloud has been asking how to mass edit firewalls of servers when you have multiple servers without doing it manually.</p>
<p>Part of my <a href="https://github.com/chmouel/cloudservers-api-demo">cloudservers-api-dem</a>o I have written a simple firewall scripts abstracting the Operating System firewall software to allow/enable/disable the firewall and ports/networks.</p>
<p>The script has been kept very simple by design and currently allow only to :</p>
<ul>
<li><span style="font-size: medium;">
<p style="display: inline !important;">enable the firewall</p>
<p></span></li>
<li><span style="font-size: medium;">
<p style="display: inline !important;">disable the firewall</p>
<p></span></li>
<li><span style="font-size: medium;">
<p style="display: inline !important;">allow or disallow a port or a network</p>
<p></span></li>
<li><span style="font-size: medium;">
<p style="display: inline !important;">see firewall status</p>
<p></span></li>
</ul>
<h3>PREREQUISITES</h3>
<ul>
<li><span style="font-size: medium;">
<p style="display: inline !important;">A management server under Ubuntu maverick.</p>
<p></span></li>
<li><span style="font-size: medium;">
<p style="display: inline !important;">A supported Operating System for clients which includes :</p>
<p></span></li>
<li><span style="font-size: medium;">
<p style="display: inline !important;">Debian.</p>
<p></span></li>
<li><span style="font-size: medium;">
<p style="display: inline !important;">Ubuntu.</p>
<p></span></li>
<li><span style="font-size: medium;">
<p style="display: inline !important;">RHEL.</p>
<p></span></li>
<li><span style="font-size: medium;">
<p style="display: inline !important;">Fedora</p>
<p></span></li>
<li><span style="font-size: medium;">
<p style="display: inline !important;">My patched python-cloudservers library (see below for installs).</p>
<p></span></li>
<li><span style="font-size: medium;">
<p style="display: inline !important;">Your SSH key installed on all VM for root users.</p>
<p></span></li>
</ul>
<h3>Install</h3>
<ul>
<li><span style="font-size: medium;">
<p style="display: inline !important;">After you have kicked a VM with a Ubuntu maverick and connected to it as root you want first execute intall some prereq packages :</p>
<p></span></li>
</ul>

<div class="wp_codebox"><table><tr id="p4475"><td class="code" id="p447code5"><pre class="sh" style="font-family:monospace;">apt-get update &amp;amp;&amp;amp; apt-get -y install python-stdeb git</pre></td></tr></table></div>

<p>checkout my python-cloudservers library :</p>

<div class="wp_codebox"><table><tr id="p4476"><td class="code" id="p447code6"><pre class="sh" style="font-family:monospace;">git clone git://github.com/chmouel/python-cloudservers.git</pre></td></tr></table></div>

<p>after being checked-out you will go into the python-cloudservers directory which has just been created and do this :</p>

<div class="wp_codebox"><table><tr id="p4477"><td class="code" id="p447code7"><pre class="sh" style="font-family:monospace;">cd python-cloudservers/
python setup.py install</pre></td></tr></table></div>

<p>this should automatically install all the dependences.</p>
<p>Now you can install my api-demo which include the firewall script :</p>

<div class="wp_codebox"><table><tr id="p4478"><td class="code" id="p447code8"><pre class="sh" style="font-family:monospace;">cd ../
git clone git://github.com/chmouel/cloudservers-api-demo</pre></td></tr></table></div>

<p>You need to configure some environemnt variable first which keep information about your rackspace account.</p>
<p>edit your ~/.bashrc (or /etc/environement if you want to make it global) and configure those variable :</p>
<pre>export RCLOUD_DATACENTER=UK
export UK_RCLOUD_USER="MY_USERNAME"
export UK_RCLOUD_KEY="MY_API_KEY"
export UK_RCLOUD_AURL="https://lon.auth.api.rackspacecloud.com/v1.0"</pre>
<p>or for the US you would have :</p>
<pre>export RCLOUD_DATACENTER=US
export UK_RCLOUD_USER="MY_USERNAME"
export UK_RCLOUD_KEY="MY_API_KEY"
export UK_RCLOUD_AURL="https://auth.api.rackspacecloud.com/v1.0"</pre>
<p>source the ~/.bashrc or relog into your account to have those accounts set-up you can test it to see if that works by going to :</p>
<pre>~/cloudservers-api-demo/python</pre>
<p>and launch the command :</p>
<pre>./list-servers.py</pre>
<p>to test if this is working properly (it should list your servers for your DATACENTER)</p>
<p>you are now basically ready to mass update firewall on all servers.</p>
<p>Let&#8217;s say you have two web servers named web1 and web2 and two db servers named db1 and db2 and you would like to allow the 80 port on the web servers and 3306 port on the db servers.</p>
<p>You would have to go to this directory :</p>
<pre>~/cloudservers-api-demo/firewall/</pre>
<p>and first execute this command to see the help/usages :</p>
<pre>./fw-control.py --help</pre>
<p>so let&#8217;s say to enable the firewall on all the web and db server first you can do :</p>
<pre>./fw-control.py -s "web db" enable</pre>
<p>it will connect and enable the firewall on all the servers which match the name web and db.</p>
<p>now let&#8217;s say we want to enable port 80 on the web :</p>
<pre>./fw-control.py -s "web" allow port 80</pre>
<p>if you log into the servers you can check with</p>
<pre>iptables -L -n</pre>
<p>that it it has been enabled properly.</p>
<p>This is simple enough for you to modify the script to your liking to make it more modular for your specific environement.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2011/05/05/mass-editing-firewall-on-rackspace-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto shutdown your Cloud Server and not getting billed for it.</title>
		<link>http://blog.chmouel.com/2011/04/07/howto-shutdown-your-cloud-server-and-not-getting-billed-for-it/</link>
		<comments>http://blog.chmouel.com/2011/04/07/howto-shutdown-your-cloud-server-and-not-getting-billed-for-it/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 09:36:28 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://blog.chmouel.com/?p=441</guid>
		<description><![CDATA[Currently in Rackspace-Cloud when you are shutting-down your Cloud Servers you are still paying for it. The reason is that when the Cloud Server is shut-down your CloudServer is still sitting on the hyper-visor and still use resources on the &#8230; <a href="http://blog.chmouel.com/2011/04/07/howto-shutdown-your-cloud-server-and-not-getting-billed-for-it/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Currently in Rackspace-Cloud when you are shutting-down your Cloud Servers you are still paying for it.</p>
<p>The reason is that when the Cloud Server is shut-down your CloudServer is still sitting on the hyper-visor and still use resources on the Cloud and then get you billed for it.</p>
<p>There is a way to get around it by having the CloudServer stored as an image into CloudFiles.</p>
<p>The caveat with this solution is that every-time you are creating a server out of the stored image you are getting a new IP and in certain cases you would need to make a change in your application with the new IP.</p>
<p>If you only use domain names instead of IP in your application you are not dependent of the IP change, to update the domain with the new IP after creating the VM you can either :</p>
<p>  &#8211; Have a dynamic DNS or &#8216;Cloud DNS&#8217; updated just after you created your server out of the image.</p>
<p>  &#8211; Have a script going into your server and update the IP directly in /etc/hosts.</p>
<p>In programming words this is the steps you would do. I am using the python-nova binding which allow you to connect to RackSpace Cloud.</p>
<p>At first I am going to create an object which we are going to authenticate</p>

<div class="wp_codebox"><table><tr id="p44118"><td class="code" id="p441code18"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> novaclient
cx = novaclient.<span style="color: black;">OpenStack</span><span style="color: black;">&#40;</span>USERNAME,
                            API_KEY<span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>or for the UK :</p>

<div class="wp_codebox"><table><tr id="p44119"><td class="code" id="p441code19"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> novaclient
cx = novaclient.<span style="color: black;">OpenStack</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;USERNAME&quot;</span>,
                            <span style="color: #483d8b;">&quot;API_KEY&quot;</span>,
                            <span style="color: #483d8b;">'https://lon.auth.api.rackspacecloud.com/v1.0'</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>cx is going to be the object from where we can do things on it. Let&#8217;s first find the server server that we want, assuming your server is called test you would get the server like this :</p>

<div class="wp_codebox"><table><tr id="p44120"><td class="code" id="p441code20"><pre class="python" style="font-family:monospace;">server = cx.<span style="color: black;">servers</span>.<span style="color: black;">find</span><span style="color: black;">&#40;</span>name=<span style="color: #483d8b;">'test'</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>The variable &#8216;server&#8217; contain our server &#8216;object&#8217; and we can get its ID out of it :</p>

<div class="wp_codebox"><table><tr id="p44121"><td class="code" id="p441code21"><pre class="python" style="font-family:monospace;">server_id = server.<span style="color: #008000;">id</span></pre></td></tr></table></div>

<p>We got the function cx.images.create to create an image from a server which accept as first argument the image name and the second the server id we just got. this would start the creation of the image :</p>

<div class="wp_codebox"><table><tr id="p44122"><td class="code" id="p441code22"><pre class="python" style="font-family:monospace;">cx.<span style="color: black;">images</span>.<span style="color: black;">create</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;backup_server&quot;</span>, server_id<span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>The server has started to get backed-up into your Cloud Files account, you can see it directly into the &#8220;My Server Images&#8221; tab of Hosting => Cloud Servers section :</p>
<p><a href="http://blog.chmouel.com/wp-content/uploads/2011/04/Backup.png"><img src="http://blog.chmouel.com/wp-content/uploads/2011/04/Backup-1024x31.png" alt="" title="Backup" width="640" height="19" class="aligncenter size-large wp-image-442" /></a></p>
<p>You can now delete the server since it&#8217;s &#8216;backuped&#8217; into cloud files ;</p>

<div class="wp_codebox"><table><tr id="p44123"><td class="code" id="p441code23"><pre class="python" style="font-family:monospace;">server.<span style="color: black;">delete</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>At this time you are not billed for your Cloud Servers anymore and only for the storage usage in Cloud Files.</p>
<p>When you want to restore the image as a server, you would first get the id of your image  :</p>

<div class="wp_codebox"><table><tr id="p44124"><td class="code" id="p441code24"><pre class="python" style="font-family:monospace;">image = cx.<span style="color: black;">images</span>.<span style="color: black;">find</span><span style="color: black;">&#40;</span>name=<span style="color: #483d8b;">'backup-test'</span><span style="color: black;">&#41;</span>
image_id = image.<span style="color: #008000;">id</span></pre></td></tr></table></div>

<p>and create the server out of this image :</p>

<div class="wp_codebox"><table><tr id="p44125"><td class="code" id="p441code25"><pre class="python" style="font-family:monospace;"> CNX.<span style="color: black;">servers</span>.<span style="color: black;">create</span><span style="color: black;">&#40;</span>image=image_id,
                            flavor=<span style="color: #ff4500;">1</span>,
                            name=<span style="color: #483d8b;">&quot;test&quot;</span>,
                            <span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>The flavor argument is the type of image you want, 1 the minimal 256M flavor. The full list is :</p>

<div class="wp_codebox"><table><tr id="p44126"><td class="code" id="p441code26"><pre class="python" style="font-family:monospace;">&nbsp;
In <span style="color: black;">&#91;</span><span style="color: #ff4500;">14</span><span style="color: black;">&#93;</span>: <span style="color: #ff7700;font-weight:bold;">for</span> x <span style="color: #ff7700;font-weight:bold;">in</span> cx.<span style="color: black;">flavors</span>.<span style="color: #008000;">list</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
   ....:     <span style="color: #ff7700;font-weight:bold;">print</span> x.<span style="color: #008000;">id</span>, <span style="color: #483d8b;">'-'</span>, x.<span style="color: black;">name</span>
   ....:     
   ....:     
<span style="color: #ff4500;">1</span> - <span style="color: #ff4500;">256</span> server
<span style="color: #ff4500;">2</span> - <span style="color: #ff4500;">512</span> server
<span style="color: #ff4500;">3</span> - 1GB server
<span style="color: #ff4500;">4</span> - 2GB server
<span style="color: #ff4500;">5</span> - 4GB server
<span style="color: #ff4500;">6</span> - 8GB server
<span style="color: #ff4500;">7</span> - 15.5GB server</pre></td></tr></table></div>

<p>When the server has created it should be exactly the same as what you have before created in image. You can now run a script using SSH with SSH keys to log into servers and do adjustment with the new IP.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2011/04/07/howto-shutdown-your-cloud-server-and-not-getting-billed-for-it/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Uploading to Rackspace Cloud Files via FTP</title>
		<link>http://blog.chmouel.com/2011/04/06/uploading-to-rackspace-cloud-files-via-ftp/</link>
		<comments>http://blog.chmouel.com/2011/04/06/uploading-to-rackspace-cloud-files-via-ftp/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 13:05:44 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://blog.chmouel.com/?p=436</guid>
		<description><![CDATA[Sometime ago I wrote a FTP proxy to RackSpace Cloud Files which expose Rackspace Cloud Files as a FTP server acting as a proxy. Thanks to the OpenSource community a user on github took it and add support OpenStack and &#8230; <a href="http://blog.chmouel.com/2011/04/06/uploading-to-rackspace-cloud-files-via-ftp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.chmouel.com/2009/10/29/ftp-server-for-cloud-files/">Sometime ago</a> I wrote a <a href="https://github.com/chmouel/ftp-cloudfs/">FTP proxy</a> to RackSpace Cloud Files which expose Rackspace Cloud Files as a FTP server acting as a proxy. </p>
<p>Thanks to the OpenSource community a user on github took it and add support <a href="http://www.openstack.org/">OpenStack</a> and all the latest features available in Cloud Files.</p>
<p>It is now pretty robust and works pretty well via nautilus even with the <a href="http://docs.openstack.org/openstack-object-storage/developer/content/ch03s02.html#d5e527">pseudo hierarchical folder feature</a>. The fun part here is that it allow you to effectively have a Cloud Drive where you can easily store your files/backup from your Linux desktop via nautilus built-in ftp support.</p>
<p>I have made a video that show how it works :</p>
<p><iframe src="http://player.vimeo.com/video/22024058" width="400" height="300" frameborder="0"></iframe>
<p><a href="http://vimeo.com/22024058">Upload to the Cloud via FTP</a> from <a href="http://vimeo.com/user4559588">Chmouel Boudjnah</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2011/04/06/uploading-to-rackspace-cloud-files-via-ftp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing python-cloudfiles from pypi</title>
		<link>http://blog.chmouel.com/2011/02/16/installing-python-cloudfiles-from-pypi/</link>
		<comments>http://blog.chmouel.com/2011/02/16/installing-python-cloudfiles-from-pypi/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 05:41:33 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://blog.chmouel.com/?p=399</guid>
		<description><![CDATA[I have just uploaded python-cloudfiles to pypi available here This make things easy to add as a dependence of your project like you can have something like this in your setup.py : requirements = ['python-cloudfiles'] and it will automatically download &#8230; <a href="http://blog.chmouel.com/2011/02/16/installing-python-cloudfiles-from-pypi/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have just uploaded <a href="https://github.com/rackspace/python-cloudfiles">python-cloudfiles</a> to pypi available <a href="http://pypi.python.org/pypi/python-cloudfiles/">here </a></p>
<p>This make things easy to add as a dependence of  your project like  you can have something like this in your setup.py  :</p>
<p><code>requirements = ['python-cloudfiles']</code></p>
<p>and it  will automatically download it as part of the dependence with easy_install or pip. </p>
<p>cool kids on latest debian/ubuntu can do stuff like this (from<a href="http://packages.debian.org/sid/python-stdeb"> python-stdeb</a> package) :</p>
<p><code>pypi-install python-cloudfiles</code></p>
<p>which would automatically download the tarball from pypi and install it as a packages (like the way it should be for prod machine!)</p>
<p>If you have a virtualenv environment you can easily do a (needs <a href="http://packages.debian.org/sid/python-pip">python-pip</a> package) :</p>
<p><code>pip -E /usr/local/myvirtualenvroot install python-cloudfiles<br />
</code></p>
<p>and magic would be done to get you on latest python-cloudfiles.</p>
<p>As a bonus side you can browse online the python-cloudfiles library :</p>
<p><a href="http://packages.python.org/cloudfiles/">http://packages.python.org/python-cloudfiles/</a></p>
<p><strong><br />
[Update] This has been renamed back to python-cloudfiles please update your setup.py or scripts.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2011/02/16/installing-python-cloudfiles-from-pypi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use fireuploader with the Rackspace Cloud UK</title>
		<link>http://blog.chmouel.com/2011/02/07/how-to-use-fireuploader-with-the-rackspace-cloud-uk/</link>
		<comments>http://blog.chmouel.com/2011/02/07/how-to-use-fireuploader-with-the-rackspace-cloud-uk/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 11:16:05 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://blog.chmouel.com/?p=406</guid>
		<description><![CDATA[Fireuploader is a Firefox addon that gives you a nice GUI to upload files via your firefox browser. I have made a special version of the extensions to make it works with the RackSpace Cloud UK. Install the addon from &#8230; <a href="http://blog.chmouel.com/2011/02/07/how-to-use-fireuploader-with-the-rackspace-cloud-uk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Fireuploader is a Firefox addon that gives you a nice GUI to upload files via your firefox browser.</p>
<p>I have made a special version of the extensions to make it works with the RackSpace Cloud UK.</p>
<p>Install the addon from here :</p>
<p><a href="http://www.chmouel.com/pub/firefox_universal_uploader__fireuploader_-0.4.5-fx+mz+ukcf.xpi">http://www.chmouel.com/pub/firefox_universal_uploader__fireuploader_-0.4.5-fx+mz+ukcf.xpi</a></p>
<p>Allow the website by  clicking Allow in the yellow bar on the top as seen in this screenshot :</p>
<p><a href="http://blog.chmouel.com/wp-content/uploads/2011/02/Click-Allow-on-the-top.png"><img src="http://blog.chmouel.com/wp-content/uploads/2011/02/Click-Allow-on-the-top-1024x37.png" alt="Click Allow on the top" title="Click Allow on the top" width="640" height="23" class="aligncenter size-large wp-image-412" /></a></p>
<p>Click on Install Now and restart Firefox.</p>
<p>After the Firefox browser is restarted you can go in Tools => Fireuploader and choose Rackspace Cloud UK in the dropdown list :</p>
<p><a href="http://blog.chmouel.com/wp-content/uploads/2011/02/Screenshot-Fire-Universal-Uploader-Mozilla-Firefox.png"><img src="http://blog.chmouel.com/wp-content/uploads/2011/02/Screenshot-Fire-Universal-Uploader-Mozilla-Firefox-1024x525.png" alt="" title="Screenshot-Fire-Universal Uploader - Mozilla Firefox" width="640" height="328" class="aligncenter size-large wp-image-418" /></a></p>
<p>and click on Manage Account :</p>
<p>enter your UK username and  UK API Key and &#8220;Save Password&#8221; if you like and it should log you into your UK Cloud :</p>
<p><a href="http://blog.chmouel.com/wp-content/uploads/2011/02/Screenshot.png"><img src="http://blog.chmouel.com/wp-content/uploads/2011/02/Screenshot-1024x435.png" alt="" title="Rackspace UK Cloud" width="640" height="271" class="aligncenter size-large wp-image-420" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2011/02/07/how-to-use-fireuploader-with-the-rackspace-cloud-uk/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Howto access the UK Rackspace Cloud with the PHP Binding</title>
		<link>http://blog.chmouel.com/2011/01/12/howto-access-the-uk-rackspace-cloud-with-the-php-binding/</link>
		<comments>http://blog.chmouel.com/2011/01/12/howto-access-the-uk-rackspace-cloud-with-the-php-binding/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 16:17:07 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://blog.chmouel.com/?p=394</guid>
		<description><![CDATA[One of the last library I didn&#8217;t documented in my earlier post was php-cloudfiles. You need to have at least the version 1.7.6 released to have support to different auth_server and when you have that you can do it like &#8230; <a href="http://blog.chmouel.com/2011/01/12/howto-access-the-uk-rackspace-cloud-with-the-php-binding/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the last library I didn&#8217;t documented in my<a href="http://blog.chmouel.com/2011/01/04/how-to-use-the-rackspace-cloud-uk-api/"> earlier post</a> was php-cloudfiles. You need to have at least the <a href="https://github.com/rackspace/php-cloudfiles/archives/1.7.6">version 1.7.6</a> released to have support to different auth_server and when you have that you can do it like this to get access to cloud files via the library :</p>

<div class="wp_codebox"><table><tr id="p39428"><td class="code" id="p394code28"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cloudfiles.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Allow override by environment variable
</span><span style="color: #000088;">$USER</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;MY_API_USERNAME&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$API_KEY</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;MY_API_KEY&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$auth</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CF_Authentication<span style="color: #009900;">&#40;</span><span style="color: #000088;">$USER</span><span style="color: #339933;">,</span> <span style="color: #000088;">$API_KEY</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> UK_AUTHURL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">authenticate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2011/01/12/howto-access-the-uk-rackspace-cloud-with-the-php-binding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Backup with duplicity on Rackspace CloudFiles (including UK) script.</title>
		<link>http://blog.chmouel.com/2011/01/06/backup-with-duplicity-on-rackspace-cloudfiles-including-uk-script/</link>
		<comments>http://blog.chmouel.com/2011/01/06/backup-with-duplicity-on-rackspace-cloudfiles-including-uk-script/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 00:21:34 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://blog.chmouel.com/?p=392</guid>
		<description><![CDATA[It seems that my post about using duplicity to backup your data on Rackspace CloudFiles got popular and people may be interested to use with the newly (Beta) released Rackspace Cloud UK. You would just need to have a environnement &#8230; <a href="http://blog.chmouel.com/2011/01/06/backup-with-duplicity-on-rackspace-cloudfiles-including-uk-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It seems that my post about using duplicity to backup your data on Rackspace CloudFiles got popular and people may be interested to use with the newly (Beta) released Rackspace Cloud UK. You would just need to have a environnement exported at the top of your backup script like this :  </p>
<p>export CLOUDFILES_AUTHURL=https://lon.auth.api.rackspacecloud.com/v1.0</p>
<p>and it will use the UK auth server (the same goes for OpenStack auth server if you have your own Swift install).</p>
<p>To make things easier I have taken this script from :</p>
<p><a href="http://damontimm.com/code/dt-s3-backup">http://damontimm.com/code/dt-s3-backup<br />
</a><br />
and adapted it to make it work with Rackspace Cloud Files.</p>
<p>This is available here :</p>
<p><a href="https://github.com/chmouel/dt-cf-backup">https://github.com/chmouel/dt-cf-backup<br />
</a><br />
You need to make sure that you have python-cloudfiles installed, on a Debian or Ubuntu system you can do it like this :</p>

<div class="wp_codebox"><table><tr id="p39231"><td class="code" id="p392code31"><pre class="shell" style="font-family:monospace;">sudo apt-get -y install python-stdeb 
sudo pypi-install python-cloudfiles</pre></td></tr></table></div>

<p>Check the documentation of your Operating System to install python-cloudfiles, usually it is very easy to do it via <a href="http://pip.openplans.org/">pip</a> (pip install python-cloudfiles)</p>
<p>When you have installed duplicity and checkout the script (see the github page for documentation how to do it) you can start configuring it. </p>
<p>At the top there is a detailled explanation of the different variables that need to be configured. You can change it in the script or you can have them configured in an external configuration file in your home directory called ~/.dt-cf-backup.conf, this is an example :</p>

<div class="wp_codebox"><table><tr id="p39232"><td class="code" id="p392code32"><pre class="shell" style="font-family:monospace;">export CLOUDFILES_USERNAME=&quot;MY_USERNAME&quot;
export CLOUDFILES_APIKEY=&quot;MY_APIKEY&quot;
export PASSPHRASE=&quot;MY_PASSPHRASE&quot;
GPG_KEY=&quot;8D643162&quot;
ROOT=&quot;/home/chmouel&quot;
export DEST=&quot;cf+http://duplicity_backup&quot;
INCLIST=( /home/chmouel/ )
EXCLIST=( 	 &quot;/home/chmouel/tmp&quot;    &quot;/**.DS_Store&quot; &quot;/**Icon?&quot; &quot;/**.AppleDouble&quot;  )
LOGDIR=&quot;/tmp/&quot;
LOG_FILE_OWNER=&quot;chmouel:&quot;</pre></td></tr></table></div>

<p>You can then just run :</p>
<pre>
./dt-cf-backup.sh --backup
</pre>
<p>to do your backup. </p>
<p>There is much more documentation in the <a href="https://github.com/chmouel/dt-cf-backup/blob/master/README">README.txt.</a></p>
<p>I just would like to thanks again the author of dt-s3-backup for this script. I have just made a few modifications for Rackspace Cloud Files.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2011/01/06/backup-with-duplicity-on-rackspace-cloudfiles-including-uk-script/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Howto use Cyberduck with Rackspace Cloud UK</title>
		<link>http://blog.chmouel.com/2011/01/04/howto-use-cyberduck-with-rackspace-cloud-uk/</link>
		<comments>http://blog.chmouel.com/2011/01/04/howto-use-cyberduck-with-rackspace-cloud-uk/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 15:04:36 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://blog.chmouel.com/?p=382</guid>
		<description><![CDATA[If you are wondering howto use a graphical client like Cyberduck to access the Rackspace Cloud UK this is how you do it. We are going to use the Swift OpenStack support in Cyberduck to access the UK CloudFiles instance. &#8230; <a href="http://blog.chmouel.com/2011/01/04/howto-use-cyberduck-with-rackspace-cloud-uk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you are wondering howto use a graphical client like Cyberduck to access the Rackspace Cloud UK this is how you do it. We are going to use the Swift OpenStack support in Cyberduck to access the UK CloudFiles instance.</p>
<p>You first Open Cyberduck and Click on open connection :</p>
<p><a href="http://blog.chmouel.com/wp-content/uploads/2011/01/Open-Window.png"><img src="http://blog.chmouel.com/wp-content/uploads/2011/01/Open-Window-300x257.png" alt="" title="Open Cyberduck" width="300" height="257" class="aligncenter size-medium wp-image-384" /></a></p>
<p>In the Menu choose Swift (OpenStack Object Storage) and in Server field you specify :</p>
<p>lon.auth.api.rackspacecloud.com</p>
<p>and enter your Username and Api Key (in Password field) :</p>
<p><a href="http://blog.chmouel.com/wp-content/uploads/2011/01/New-Connection.png"><img src="http://blog.chmouel.com/wp-content/uploads/2011/01/New-Connection-300x246.png" alt="" title="Create a new connection" width="300" height="246" class="aligncenter size-medium wp-image-383" /></a></p>
<p>You should just be able to press connect to get going, if it is asking for a Password again in the next screen (which is to store in your Apple Keychain) just specify your API Key again in there.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2011/01/04/howto-use-cyberduck-with-rackspace-cloud-uk/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How-to use the Rackspace Cloud UK API</title>
		<link>http://blog.chmouel.com/2011/01/04/how-to-use-the-rackspace-cloud-uk-api/</link>
		<comments>http://blog.chmouel.com/2011/01/04/how-to-use-the-rackspace-cloud-uk-api/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 09:00:00 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://blog.chmouel.com/?p=350</guid>
		<description><![CDATA[Rackspace just released the public beta for the UK version of Rackspace Cloud. The UK Rackspace Cloud doesn&#8217;t have the same auth server as the US Cloud so there is a few change you need to do to support the &#8230; <a href="http://blog.chmouel.com/2011/01/04/how-to-use-the-rackspace-cloud-uk-api/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Rackspace just released the public beta for the UK version of Rackspace Cloud. The UK Rackspace Cloud doesn&#8217;t have the same auth server as the US Cloud so there is a few change you need to do to support the UK Rackspace Cloud. This is the same way Amazon has different zone for EC2 we have now different geographical zone between the US and now the UK.</p>
<p>If you access directly, you just need to adjust the Auth URL in your code  to go to :</p>
<p><a href="https://lon.auth.api.rackspacecloud.com">https://lon.auth.api.rackspacecloud.com<br />
</a><br />
instead of :<br />
<a href="https://auth.api.rackspacecloud.com">https://auth.api.rackspacecloud.com</a></p>
<p>The language binding provided by Rackspace  has  all been updated  and available from github :</p>
<p>For <a href="https://github.com/rackspace/python-cloudfiles">Python CloudFiles</a> :</p>

<div class="wp_codebox"><table><tr id="p35040"><td class="code" id="p350code40"><pre class="python" style="font-family:monospace;"> cnx = cloudfiles.<span style="color: black;">Connection</span><span style="color: black;">&#40;</span>api_username, api_key, authurl=<span style="color: #483d8b;">&quot;https://lon.auth.api.rackspacecloud.com/v1.0)</span></pre></td></tr></table></div>

<p>For <a href="http://packages.python.org/python-cloudservers">Python CloudServers</a> :</p>

<div class="wp_codebox"><table><tr id="p35041"><td class="code" id="p350code41"><pre class="python" style="font-family:monospace;">    cloudservers.<span style="color: black;">CloudServers</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;USERNAME&quot;</span>, <span style="color: #483d8b;">&quot;API_KEY&quot;</span>, auth_url=<span style="color: #483d8b;">&quot;https://lon.auth.api.rackspacecloud.com/v1.0&quot;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>For <a href="https://github.com/rackspace/ruby-cloudfiles">Ruby CloudFiles </a>  :</p>

<div class="wp_codebox"><table><tr id="p35042"><td class="code" id="p350code42"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'cloudfiles'</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Log into the Cloud Files system</span>
cf = <span style="color:#6666ff; font-weight:bold;">CloudFiles::Connection</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>
                                <span style="color:#ff3333; font-weight:bold;">:username</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;USERNAME&quot;</span>,
                                <span style="color:#ff3333; font-weight:bold;">:api_key</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;API_KEY&quot;</span>,
                                <span style="color:#ff3333; font-weight:bold;">:authurl</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;https://lon.auth.api.rackspacecloud.com/v1.0&quot;</span>
                                <span style="color:#006600; font-weight:bold;">&#41;</span></pre></td></tr></table></div>

<p>For <a href="https://github.com/rackspace/csharp-cloudfiles">C# CloudFiles</a>  :</p>

<div class="wp_codebox"><table><tr id="p35043"><td class="code" id="p350code43"><pre class="csharp" style="font-family:monospace;">UserCredentials userCreds <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> UserCredentials<span style="color: #008000;">&#40;</span><span style="color: #008000;">new</span> Uri<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;https://lon.auth.api.rackspacecloud.com/v1.0&quot;</span><span style="color: #008000;">&#41;</span>, username, api_key, <span style="color: #0600FF; font-weight: bold;">null</span>, <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
Connection connection <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> com<span style="color: #008000;">.</span><span style="color: #0000FF;">mosso</span><span style="color: #008000;">.</span><span style="color: #0000FF;">cloudfiles</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Connection</span><span style="color: #008000;">&#40;</span>userCreds<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>For <a href="https://github.com/rackspace/java-cloudfiles">Java CloudFIles</a> add a cloudfiles.properties file  in your classpath with this content :</p>

<div class="wp_codebox"><table><tr id="p35044"><td class="code" id="p350code44"><pre class="ini" style="font-family:monospace;"><span style="color: #000099;">username</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">username</span>
<span style="color: #000099;">password</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">apikey</span>
<span style="color: #000099;">auth_url</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">https://lon.auth.api.rackspacecloud.com/v1.0</span>
<span style="color: #000099;">connection_timeout</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">15000</span></pre></td></tr></table></div>

<p>and you would be able to access it like this without any argument to the constructor :</p>

<div class="wp_codebox"><table><tr id="p35045"><td class="code" id="p350code45"><pre class="java" style="font-family:monospace;">FilesClient client <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> FilesClient<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
client.<span style="color: #006633;">login</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>For non rackspace binding I have sent a patch for Apache <a href="http://incubator.apache.org/libcloud/">libcloud</a> :</p>
<p><a href="https://issues.apache.org/jira/browse/LIBCLOUD-66">https://issues.apache.org/jira/browse/LIBCLOUD-66</a></p>
<p>which when integrated would allow to do something like this :</p>
<p><script src="https://gist.github.com/753038.js?file=rackspace-uk-libcloud.py"></script></p>
<p>for <a href="http://code.google.com/p/jclouds/">jclouds</a> you can just pass the auth server like this for cloudfiles :</p>
<p><script src="https://gist.github.com/753008.js?file=rackspace-cloudfiles-uk.java"></script></p>
<p>and like this for cloudservers :</p>
<p><script src="https://gist.github.com/753028.js?file=rackspace-cloudservers-uk.java"></script></p>
<p>for Ruby <a href="https://github.com/geemus/fog/">Fog</a> :</p>

<div class="wp_codebox"><table><tr id="p35046"><td class="code" id="p350code46"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'fog'</span>
&nbsp;
rackspace = <span style="color:#6666ff; font-weight:bold;">Fog::Rackspace::Storage</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>
  <span style="color:#ff3333; font-weight:bold;">:rackspace_api_key</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;&quot;</span>,
  <span style="color:#ff3333; font-weight:bold;">:rackspace_username</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;&quot;</span>,
  <span style="color:#ff3333; font-weight:bold;">:rackspace_auth_url</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;lon.auth.api.rackspacecloud.com&quot;</span>
<span style="color:#006600; font-weight:bold;">&#41;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2011/01/04/how-to-use-the-rackspace-cloud-uk-api/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Automatically spawn Rackspace Cloud Servers and customise it.</title>
		<link>http://blog.chmouel.com/2010/11/23/automatically-spawn-rackspace-cloud-servers-and-customise-it/</link>
		<comments>http://blog.chmouel.com/2010/11/23/automatically-spawn-rackspace-cloud-servers-and-customise-it/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 12:36:00 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://blog.chmouel.com/?p=343</guid>
		<description><![CDATA[Lately I had to spawn some cloud servers and automatically customise them. I have used the python-cloudservers library and installed it automatically with pypi (works for Debian/Ubuntu you may want to check for other distros): pypi-install python-cloudservers From there writing &#8230; <a href="http://blog.chmouel.com/2010/11/23/automatically-spawn-rackspace-cloud-servers-and-customise-it/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Lately I had to spawn some cloud servers and automatically customise them. </p>
<p>I have used the <a href="https://github.com/jacobian/python-cloudservers"> python-cloudservers</a> library and installed it automatically with pypi (works for Debian/Ubuntu you may want to check for other distros):</p>

<div class="wp_codebox"><table><tr id="p34350"><td class="code" id="p343code50"><pre class="bash" style="font-family:monospace;">pypi-install python-cloudservers</pre></td></tr></table></div>

<p>From there writing the script was pretty straight forward, I needed to know what type of CloudServers I wanted which in my case the smallest was good enough which is number 1 for me. </p>
<p>If you want to see all flavours you can do something like that from python command prompt<br />
:</p>

<div class="wp_codebox"><table><tr id="p34351"><td class="code" id="p343code51"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> cloudservers
cs = cloudservers.<span style="color: black;">CloudServers</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;API_USERNAME&quot;</span>, <span style="color: #483d8b;">&quot;API_PASSWORD&quot;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> cs.<span style="color: black;">flavors</span>.<span style="color: #008000;">list</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;ID: %s = %s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>i.<span style="color: #008000;">id</span>, i.<span style="color: black;">name</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>which should output something like this at the time this article has<br />
been written :</p>
<pre>
ID: 1 - 256 server
ID: 2 - 512 server
ID: 3 - 1GB server
ID: 4 - 2GB server
ID: 5 - 4GB server
ID: 6 - 8GB server
ID: 7 - 15.5GB server
</pre>
<p>You need to figure out the image type as well which is basically the Operating System, in this case I wanted Ubuntu Maverick which is 69. If you want to see all image type you can do :</p>

<div class="wp_codebox"><table><tr id="p34352"><td class="code" id="p343code52"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> cloudservers
cs = cloudservers.<span style="color: black;">CloudServers</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;API_USERNAME&quot;</span>, <span style="color: #483d8b;">&quot;API_PASSWORD&quot;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> cs.<span style="color: black;">images</span>.<span style="color: #008000;">list</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;ID: %s = %s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>i.<span style="color: #008000;">id</span>, i.<span style="color: black;">name</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>which print something like this for me at this time :</p>
<pre>
ID: 29 = Windows Server 2003 R2 SP2 x86
ID: 69 = Ubuntu 10.10 (maverick)
ID: 41 = Oracle EL JeOS Release 5 Update 3
ID: 40 = Oracle EL Server Release 5 Update 4
ID: 187811 = CentOS 5.4
ID: 4 = Debian 5.0 (lenny)
ID: 10 = Ubuntu 8.04.2 LTS (hardy)
ID: 23 = Windows Server 2003 R2 SP2 x64
ID: 24 = Windows Server 2008 SP2 x64
ID: 49 = Ubuntu 10.04 LTS (lucid)
ID: 14362 = Ubuntu 9.10 (karmic)
ID: 62 = Red Hat Enterprise Linux 5.5
ID: 53 = Fedora 13
ID: 17 = Fedora 12
ID: 71 = Fedora 14
ID: 31 = Windows Server 2008 SP2 x86
ID: 51 = CentOS 5.5
ID: 14 = Red Hat Enterprise Linux 5.4
ID: 19 = Gentoo 10.1
ID: 28 = Windows Server 2008 R2 x64
ID: 55 = Arch 2010.05
ID: 6719676 = Backup-Image
</pre>
<p>Now to make stuff going automatic we send our ~/.ssh/id_rsa to &#8216;/root/.ssh/authorized_keys&#8217; and assuming you have a properly<br />
configured ssh-agent which was already identified you have a passwordless access and you can launch command.</p>
<p>I have a script that does basic customisations at :</p>
<p>http://chmouel.com/pub/bootstrap.sh</p>
<p>but you get the idea from there to launch the command the way you want, you can as well scp and ssh it after if you wanted to have some non public stuff in the script.</p>
<p>Here is the full script you need to adjust a few variable at the top of the file and customize it the way you want but that should get you started :</p>
<p><script src="https://gist.github.com/711681.js"> </script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2010/11/23/automatically-spawn-rackspace-cloud-servers-and-customise-it/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

