The video below provide a short introduction and comparison of Openstack and Appfog that is based on CloudFoundry. Both products embracing the open source developed paradigm. Both try to define standard and become leader in the respective domain.
As a bonus material for these who are interested in the overall technical system architecture this link provide slides and video of Derek Collison (a lead technical architect for CloudFondry at Vmware) Cloud Foundry: Inside the Machine
Demonstration and example
- You need to create a basic account that is free (but has resource limitation)
- You can use the GUI to create your fist application
- Use the CLI af (docu here) to get a look and feel what it is
$ curl -v http://rado-python.hp.af.cm/ * About to connect() to rado-python.hp.af.cm port 80 (#0) * Trying 15.185.166.79... connected > GET / HTTP/1.1 > User-Agent: curl/7.22.0 (i686-pc-cygwin) libcurl/7.22.0 OpenSSL/0.9.8r zlib/1.2.5 libidn/1.22 libssh2/1.2.7 > Host: rado-python.hp.af.cm > Accept: */* > < HTTP/1.1 200 OK < Server: nginx < Content-Type: text/plain < Keep-Alive: timeout=300 < Content-Length: 34 < Accept-Ranges: bytes < Date: Thu, 28 Mar 2013 01:25:30 GMT < X-Varnish: 816993201 < Age: 0 < Via: 1.1 varnish < Connection: keep-alive < * Connection #0 to host rado-python.hp.af.cm left intact * Closing connection #0 Hello World! AppFog Python Support
Some info about the application hosted on AppFog.
C:\Users\radoslaw>af login Attempting login to [https://api.appfog.com] Email: xxx Password: ************ Successfully logged into [https://api.appfog.com] C:\Users\radoslaw>af info AppFog Free Your Cloud Edition For support visit http://support.appfog.com Target: https://api.appfog.com (v0.999) Client: v0.3.18.12 User: xxx Usage: Memory (384.0M of 2.0G total) Services (1 of 8 total) Apps (2 of 9999 total) # download the source code C:\Users\radoslaw\workspace\appfog>af pull rado-python Pulling last pushed source code: OK
The source code for our fist hello word application is very simple.
import bottle import os def application(environ, start_response): data = "Hello World! AppFog Python Support" start_response("200 OK", [ ("Content-Type", "text/plain"), ("Content-Length", str(len(data))) ]) return iter([data])
By default only one instance (cloud server?) is spin up to host our app.
C:\Users\radoslaw\workspace\appfog>af stats rado-python +----------+-------------+----------------+--------------+---------------+ | Instance | CPU (Cores) | Memory (limit) | Disk (limit) | Uptime | +----------+-------------+----------------+--------------+---------------+ | 0 | 0% (4) | 26.1M (128M) | 7.1M (1G) | 0d:0h:58m:18s | +----------+-------------+----------------+--------------+---------------+ C:\Users\radoslaw\workspace\appfog>af instances rado-python +-------+---------+--------------------+ | Index | State | Start Time | +-------+---------+--------------------+ | 0 | RUNNING | 03/28/2013 12:34AM | +-------+---------+--------------------+
On the GUI we can quickly and easily increase the number of instance. Once new instance is spun up and application code is cloned to it we see the changes on the CLI as well.
C:\Users\radoslaw\workspace\appfog>af stats rado-python +----------+-------------+----------------+--------------+--------------+ | Instance | CPU (Cores) | Memory (limit) | Disk (limit) | Uptime | +----------+-------------+----------------+--------------+--------------+ | 0 | 0% (4) | 26.1M (128M) | 7.1M (1G) | 0d:1h:2m:35s | | 1 | 0.7% (4) | 26.0M (128M) | 0B (1G) | 0d:0h:0m:58s | +----------+-------------+----------------+--------------+--------------+ C:\Users\radoslaw\workspace\appfog>af instances rado-python +-------+---------+--------------------+ | Index | State | Start Time | +-------+---------+--------------------+ | 0 | RUNNING | 03/28/2013 12:34AM | | 1 | RUNNING | 03/28/2013 01:35AM | +-------+---------+--------------------+
After the testing we delete our application.
C:\Users\radoslaw\workspace\appfog>af delete rado-python
References
No comments:
Post a Comment