<?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>NiftyName &#187; infrastructure as a platform</title>
	<atom:link href="http://www.niftyname.org/tag/infrastructure-as-a-platform/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.niftyname.org</link>
	<description>Open Source Hardware As A Service</description>
	<lastBuildDate>Tue, 10 Nov 2009 17:59:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>How to create my web frontend infrastructure in few lines of code ?</title>
		<link>http://www.niftyname.org/2009/05/how-to-create-my-web-frontend-infrastructure-in-few-lines-of-code/</link>
		<comments>http://www.niftyname.org/2009/05/how-to-create-my-web-frontend-infrastructure-in-few-lines-of-code/#comments</comments>
		<pubDate>Fri, 29 May 2009 15:31:33 +0000</pubDate>
		<dc:creator>sebastien</dc:creator>
				<category><![CDATA[call the expert]]></category>
		<category><![CDATA[infrastructure as a platform]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[xmlrpc]]></category>

		<guid isPermaLink="false">http://www.niftyname.org/?p=460</guid>
		<description><![CDATA[Today we&#8217;ll introduce the first article of &#8220;call the expert&#8221; category. This category&#8217;s goal is to explain by example how to use NiftyName capacities through its API. You can download attached files at the end of the article and test at home Today case study is &#8220;how can I quick create my 5 servers cluster [...]]]></description>
			<content:encoded><![CDATA[<p>Today we&#8217;ll introduce the first article of <strong>&#8220;call the expert&#8221;</strong> category.</p>
<p>This category&#8217;s goal is to explain by example how to use NiftyName capacities through its API.</p>
<p>You can download attached files at the end of the article and test at home <img src='http://www.niftyname.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Today case study is</p>
<p><strong>&#8220;how can I quick create my 5 servers cluster for my new website frontend ?&#8221;</strong></p>
<p>You have 
<a title="watch zish video tutorial"  href="http://www.niftyname.org/doc/zish-video-tutorial/">zish</a> and 
<a title="watch zigui video tutorial"  href="http://www.niftyname.org/doc/zigui-video-tutorial/">zigui</a> of course, but sometimes it&#8217;s not pretty for repetitive tasks. Well, we need to make our own script. This script is written in Python. You write yours in any language, in future posts we&#8217;ll try to make some examples in PhP, Ruby, etc&#8230;</p>
<p>And&#8230; voilà ! the main script code is inlined behind. In downloadable archive there is some extra code, mainly code already used for 
<a title="go to zinn developper's website"  href="http://src.ielo.net/projects/show/zinn" onclick="javascript:pageTracker._trackPageview('/external/src.ielo.net/projects/show/zinn');" >zinn</a> XMLRPC functionnal tests (if you&#8217;re curious, you 
<a title="zinn test section in git repository"  href="http://src.ielo.net/repositories/browse/zinn/test" onclick="javascript:pageTracker._trackPageview('/external/src.ielo.net/repositories/browse/zinn/test');" >can look at it</a>).</p>
<p>To make this code work for you, customize the MyXmlRPC class and that&#8217;s all.</p>
<pre class="brush: python; title: ;">
import os, sys, basexmlrpc

#Personnal XML-RPC class
class MyXmlRPC(basexmlrpc.BaseXmlRPC):
    def __init__(self):
        super(MyXmlRPC, self).__init__()
        self.confdir    = '%s/.zinn/users' % os.getenv('HOME')
        self.publicname = 'I am a nifty user'
        self.name       = 'niftyuser'
        self.passphrase = 'jablonski'
        self.sitegroup  = 'marseille'
        self.client = 'niftycli'
        self.vsite = 'web-frontend-vsite'
        #self.vsite = 'myniftyvsite'
        self.proxy = None

#Initialize connection
try:
    client = MyXmlRPC()
    client.proxy = client.get_authentified_proxy()
except Exception, e:
    print e
    sys.exit(0)

#Common attributes
how_many_frontends = 5
vsite_attributes = {'siteGroup': client.sitegroup, 'client': client.client}
machine_attributes = {
        'vcpu'  : 2,
        'cpu'   : 'x86-64bits',
        'memory': '2G',
        'vnc'   : {'keymap': 'en-us', 'password': 'Mys3scr3tp4sS'}
     }
storage_attributes = {'size': '3G'}
interface_attributes = {'model': 'virtio'}
attach_stor_attributes = {
            'bus'       : 'virtio',
            'media'     : 'disk',
            'readOnly'  : False,
            'bootOrder' : 1,
            'bootable'  : False
        }

#Bulk creation
client.proxy.vsite.create(client.vsite, vsite_attributes)

for i in range(how_many_frontends):
    client.proxy.machine.create(client.vsite, 'front%d' %i, machine_attributes)
    client.proxy.storage.create(client.vsite, 'stor%d' %i, storage_attributes)
    client.proxy.interface.create(client.vsite, 'iface%d' %i, interface_attributes)

    ipaddress_attributes = {'reverse': 'front%d.%s' %(i, client.vsite), 'family': 'ipv4'}
    client.proxy.ipaddress.create(client.vsite, 'ip%d' %i, ipaddress_attributes)

    client.proxy.interface.ipaddress.attach(client.vsite, 'iface%d' %i, 'ip%d' %i)
    client.proxy.machine.interface.attach(client.vsite, 'front%d' %i, 'iface%d' %i)

    status = 'notrunning'
    while status != 'running':
        r = client.proxy.storage.list(client.vsite, 'stor%d' %i)
        status = r[0]['status']['current']

    client.proxy.machine.storage.attach(client.vsite, 'front%d' %i, 'stor%d' %i, attach_stor_attributes)
</pre>
<p>This first sample lacks a lot of advanced functionnalities, like having all the cluster in a private network. OS installation is not covered too. Stay tuned, there&#8217;s more to come.</p>
<p>Download the archive 
<a title="download first lesson archive"  href="http://www.niftyname.org/call-the-expert/call-the-expert-lesson1.tgz">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.niftyname.org/2009/05/how-to-create-my-web-frontend-infrastructure-in-few-lines-of-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Publication of the free HaaS platform</title>
		<link>http://www.niftyname.org/2009/03/publication-of-the-free-haas-platform/</link>
		<comments>http://www.niftyname.org/2009/03/publication-of-the-free-haas-platform/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 17:33:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[release]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[infrastructure as a platform]]></category>
		<category><![CDATA[virtualisation]]></category>

		<guid isPermaLink="false">http://www.niftyname.org/?p=415</guid>
		<description><![CDATA[IELO/Lost-Oasis team is proud to announce the first release of its components aimed to virtualisation platforms management. Facing the emergence of non-free platforms like Amazon EC2, Microsoft Azure and others it was necessary to bring a free solution. It&#8217;s the first early preview of our NiftyName. At the moment you can create and manage virtual [...]]]></description>
			<content:encoded><![CDATA[<p>IELO/Lost-Oasis team is proud to announce the first release of its components aimed to virtualisation platforms management.</p>
<p>Facing the emergence of non-free platforms like Amazon EC2, Microsoft Azure and others it was necessary to bring a free solution. It&#8217;s the first early preview of our NiftyName. At the moment you can create and manage virtual machines pools and all related components (storage, private and public network, etc).</p>
<p>Multi-site active redundancy is not supported yet but all components have been designed for this.</p>
<p>The whole architecture is based on documented XMLRPC (SSL) webservices: you can make your own derivative tools on top.</p>
<p>Furthermore, two clients applications (console and GTK) on top of the API are already distributed.</p>
<p>This 1.0.0 verison supports the following functionnalities:</p>
<ul>
<li>Virtual machines (based on KVM, multi cpu, x86-64, VNC, etc)</li>
<li>Storage (private, public, clone, shared between instances)</li>
<li>Network (public addresses, IPv6 support, private Vlan, multiple interfaces)</li>
<li>Users/clients management, permissions, roles, etc</li>
</ul>
<p>A test platform is available, you can create test users and services today in real conditions.</p>
<p>We&#8217;re looking forward to read your remarks, propositions and contributions to make the project better and carry it to a higher level.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.niftyname.org/2009/03/publication-of-the-free-haas-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

