Rackspace api-challenge summary
Challenge 11 script
Below is the output and results from script #11 from the api-challenge.
The script can be repeatedly run with the option -d otherwise it stops if any of the cloud objects it wants to create already exist.
Challenge 11: Write an application that will: Create an SSL terminated load balancer
(Create self-signed certificate).
Create a DNS record that should be pointed to the load balancer. Create Three servers
as nodes behind the LB.
Each server should have a CBS volume attached to it. (Size and type are irrelevant.)
All three servers should have a private Cloud Network shared between them.
Login information to all three servers returned in a readable format as the result
of the script, including connection information. Worth 6 points
Depending on the obligatory -n options it will create cloud objects with predictable names.
Below is an example what objects it creates and what the naming conversion is.
# # python challenge11.py usage: challenge11.py [-h] [-v] [-d] [ -k key-key ] [ -c cert ] [ -i image-id ][ -f flavor-id ] -n FQDN-name image-id -f flavor-id -h - usage help -v - verbose / debug output -d - delete objects if they existed in cloud before creating new one -k - certificate pritate key (see -c below) -c - public certificate ( see -k above) -n - FQDN name like www.myexample.com -i - specify image-id or use the default for Ubuntu 10.04 -f - specify flavor-id or use the default for the smallest cloud server # python challenge11.py -d -n www.challenge11.myrado.net [01:04:17] Checked your cert/key pair www.challenge11.myrado.net.crt/www.challenge11.myrado.net.key, ok [01:04:18] Deleting existing domain challenge11.myrado.net [01:04:20] Checked your FQDN www.challenge11.myrado.net, ok [01:04:20] Checked your DNS domains challenge11.myrado.net, there is none, ok [01:04:26] Deleted existing cloud server www.challenge11.myrado.net-0 [01:04:29] Deleted existing cloud server www.challenge11.myrado.net-1 [01:04:33] Deleted existing cloud server www.challenge11.myrado.net-2 [01:04:33] Checked your existing cloud server www.challenge11.myrado.net-*, ok [01:04:34] Checked your block images www.challenge11.myrado.net, there is none, ok [01:04:36] Checked your lb www.challenge11.myrado.net, there is none, ok [01:04:37] Checked your image id d4c7b93d-9f18-45dc-aa7c-3e3b126e3792, ok [01:04:37] Checked your flavor id 2, ok [01:04:38] Deleted existing network obj www.challenge11.myrado.net [01:04:38] Checked your existing network objects www.challenge11.myrado.net, ok [01:04:38] Checked your cert/key pair www.challenge11.myrado.net.crt/www.challenge11.myrado.net.key, ok [01:04:39] Checked your FQDN www.challenge11.myrado.net, ok [01:04:39] Checked your DNS domains challenge11.myrado.net, there is none, ok [01:04:45] Deleted existing cloud server www.challenge11.myrado.net-1 [01:04:50] Deleted existing cloud server www.challenge11.myrado.net-2 [01:04:50] Checked your existing cloud server www.challenge11.myrado.net-*, ok [01:04:50] Deleted existing block storage image www.challenge11.myrado.net-0 [01:04:51] Deleted existing block storage image www.challenge11.myrado.net-1 [01:04:51] Deleted existing block storage image www.challenge11.myrado.net-2 [01:04:51] Checked your block images www.challenge11.myrado.net, there is none, ok [01:05:04] Checked your image id d4c7b93d-9f18-45dc-aa7c-3e3b126e3792, ok [01:05:04] Checked your flavor id 2, ok [01:05:05] Checked your existing network objects www.challenge11.myrado.net, ok [01:05:05] Building 3 cloud servers . . . . [01:08:20] Building and configuring lb ... . . . . . . . [01:09:09] Building and configuring dns domain ... [01:09:13] ---------------------------------------------------------------------- [01:09:13] vip name www.challenge11.myrado.net and ip 162.13.24.49 [01:09:13] cloud server www.challenge11.myrado.net-0 added to pool as 10.179.65.126 [01:09:13] cloud server www.challenge11.myrado.net-1 added to pool as 10.179.70.78 [01:09:13] cloud server www.challenge11.myrado.net-2 added to pool as 10.179.73.93 [01:09:13] ---------------------------------------------------------------------- Server # 0: ID 3227a512-3a1c-4f68-a82a-89d15ec74341 name www.challenge11.myrado.net-0 pub IP 95.138.173.80 priv IP 192.168.100.2 password SecretP@ss1 Server # 1: ID 662606f2-66a8-4281-8025-5161bf31754c name www.challenge11.myrado.net-1 pub IP 95.138.171.48 priv IP 192.168.100.1 password SecretP@ss1 Server # 2: ID f37d3551-60f5-40f3-92eb-4cbb1f7dbcfe name www.challenge11.myrado.net-2 pub IP 95.138.175.130 priv IP 192.168.100.3 password SecretP@ss1
References