© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted SlapOS Introduction This guide will teach you: Why should you read ? Philosophy A demo ! SlapOS architecture Simple as SLAP
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Why should you read? I want to create my own SaaS / PaaS business I want e-commerce & billing for NiftyName Eucalyptus or OpenNebula I need to automatically configure 135 different interconnected software on 3400 servers I have 100 spare servers which I want to share temporarily I need to package and test my application for 20 Linux distributions Next Week!
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted SlapOS Philosophy What is the most reliable and cost efficient Cloud ? Take 3 servers in 3 different countries with 3 unrelated ISPs - Let application handle redundancy and energy
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Demo – Select Application
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Demo – Select Software Release
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Demo – Order Instance
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Demo - Pay
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Demo – Access Instance
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Demo – Control Instance
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted SLAP Protocol SlapOS Architecture Data Center 1Data Center 2Home Cloud 1Home Cloud 2 SlapOS Master SlapOS Nodes
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted SlapOS Node Initial State Data Center 1 SlapOS Nodes GNU / Linux SLAPGrid Buildout supervisord It fits on a USB Key ! SlapOS Kernel
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted SlapOS Master Node SlapOS Master SlapOS Kernel ERP5 Cloud Engine 1.List of Available SlapOS Nodes 2.How to install a software 3.Where to install a software 4.How to run configured software 5.Where to run configured software
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted SlapOS Node Installed Data Center 1 SlapOS Nodes GNU / Linux SLAPGrid Buildout supervisord OS Commerce 3.1 MediaWiki 1.8 I make my own recipes SlapOS Kernel User Software
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted SlapOS Node Running Data Center 1 SlapOS Nodes GNU / Linux SLAPGrid Buildout supervisord OS Commerce 3.1 MediaWiki 1.8 SlapOS Kernel User Software User Instances 200+ instances per server !
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Simple as SLAP – Installation > builder.sh SlapOs.x86_ raw /dev/sdb server.key slapos.xml nexedi.pub 1 2 It takes less than 5 minutes to add a node
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Simple as SLAP – Recipes class Recipe(BaseSlapRecipe): def _createConfigurationString(self): instance_parameter_dict = self.computer_partition\.getInstanceParameterDict() ip = instance_parameter_dict['ip_list'][0][1] tcp_port = self.computer_partition.setConnectionDict(dict( ip = ip, tcp_port = tcp_port)) return '-l %s -p %s -U 0' % (ip, tcp_port) def _install(self): self.wrapper_template_location = pkg_resources.resource_filename( __name__, os.path.join('template', 'wrapper.in')) self._createRunningWrapper(dict( real_binary = self.options['server_binary'], configuration_string = self._createConfigurationString() )) # nothing to return to buildout return []
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Simple as SLAP – Requesting > python from slapos.slap import slap import memcache s = slap() s.initializeConnection( " cp = s.registerComputerPartition("nexedivifib8", "slappart197") ncp = cp.request( pi/memcached_software_profile cfg", "memcached", "memcached server 1")... connection = ncp.getConnectionDict() mc = memcache.Client(['%s:%s' % ( connection['ip'], connection['tcp_port'])]) mc.set("some_key", "Some value") value = mc.get("some_key")
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Simple as SLAP – COMPATIBLE! memcached flare mysql senna SlapOS profile Buildout profile sphinx memcached Runtime python Java Ruby PHP... IaaS libcloud kvm... Frontend apache varnish ha-proxy nginx... kumofs mroonga... Database NoSQL... Backend Zope Django... Applications ERP5 Nuxeo XWiki Drupal SlapOS planned profile Plone... Monitoring supervisord cfengine...
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Use as SLAP – Contribute ! varnish ha-proxy apache My Application PHP mysql apache My Application PHP apache My Application PHP Reuse buildout recipes
© ViFiB SA 2010 – All rights reserved– Creative Commons License – No Commercial Use Permitted Next Steps SLAP Protocol 1.Define XSD or RelaxNG 2.Make it 100% Restful 3.Documentation 4.Standard Interfaces 5.What is an SLA in SLAP ? 1.Make SlapOS profile 2.Documentation 3.Standard Interfaces 4.AppStore Java Drupal SlapOS Master Java Drupal Who wants to cook recipes with me ? NEO Test KumoFS Test You ?