Search This Blog

Wednesday, April 24, 2013

Challenge 9 script

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

Challenge 9 script

Below is the output and results from script #9 from the api-challenge.
The script checks if the provided parameters are correct and doesn't collide with existing cloud objects.
First it creates cloud server. Once it is built it maps its public IP in DNS A record for new domain it created.
# python

    usage: [-h] [-v] -n FQDN-name -i image-id -f flavor-id
        -h - usage help
        -v - verbose / debug output
        -n - FQDN name
        -i - proper image id
        -f - flavor id

# python -n -i 88130782-11ec-4795-b85f-b55a297ba446 -f 2
[19:54:23] Creating new DNS zone
[19:54:24] Creating cloud server ...(please wait the build can take a while)
[19:59:34] DNS zone has been udpated and a new A record created
[19:59:34] rec A: ->

These are some steps to verify the config.
# dig +short @

# nova list | grep
| e7c3a258-13ff-426b-8c2d-d24649943947 | | ACTIVE | public=2a00:1a48:7805:0111:8cfc:cf10:ff08:3ac6,; private=  |


No comments:

Post a Comment