Search This Blog

Wednesday, April 17, 2013

Challenge 2 script

The full summary of all posts for API Rackspace challenge can be found here:
Rackspace api-challenge summary

Challenge 2 script

Below is the output and the results for the script #2 from the api-challenge.
The script first create a single new cloud server with a name web0.
Next it waits for the cloud server to be created. This behavior is similar to challenge #1
Once the cloud is built it create a backup under the name web0-img, by cloning the live cloud server.
Once the image is saved it uses it to spin up a new cloud server with a name web0_m.dd.hh.mm.ss.
Once the new cloud image is built it shows the summary of the created objects.
Before the end of the work the created objects (2 cloud server, 1 image) are deleted.
 
$ python.exe challenge2.py
[00:41:59] Building 1 cloud server(s).
[00:41:59] building web0 cloud server
[00:42:00] Waiting for the servers to be built ...
.
.
.
.
.
.
.
.
.
.
[00:47:36] Preparing to clone 1 server(s) ...
[00:47:36] Creating cloud image file: 'web0-img' from web0 cloud server
[00:47:38] Waiting for the clone images to be created ...
.
.
.
[00:49:41] Building 1 new cloud server(s) from taken images.
[00:49:41] building new web0_4.17.1.49.41 cloud server from image web0-img
[00:49:42] Waiting for the servers to be built from the cloned images ...
.
.
.
.
.
.
[00:53:16] Created cloud server details:
Server # 0:  ID  fd9b996c-d034-4aca-9c73-2ef11b31707d name             web0 IP     162.13.2.151 password Gz7CjrjNtNU7
[00:53:16] Created images details:
Image  # 0:  ID  a0c1b05a-3ab0-414e-8d3c-663f58f5ab94 name         web0-img from server fd9b996c-d034-4aca-9c73-2ef11b31707d
[00:53:16] Created cloned server details:
Server # 0:  ID  de18d5f6-bb97-4e5f-a315-53698edffd0e name web0_4.17.1.49.41 IP     162.13.2.231 password FDoC8mMHtppo

References
  1. https://github.com/rtomaszewski/api-challenge/tree/challenge2


No comments:

Post a Comment