...
...
In the UI, set the following global settings:
Now CTL-C your rdebug, and then "ant rdebug" again (to restart the management server).
At this point, it would be good to check that you can access the console of the newly created instance, followed by destroying the instance.
expunge.interval = 120
expunge.delay = 120
Destroying the instance is important, and confirming that it was expunged prior to trying to test the EC2 API. This is due to the resource constraints on the DevCloud image.
Code Block |
---|
python cloudstack-aws-api-register --apikey=JdTxDI2rOZ0RDZdgF1O_ZxfISxNuema9gQ3NyE4z5psX4sgSxE4ueEBohG3bfqWHr7BYP6_sAghXTIvm3noqkw --secretkey=fVT0r5lETIJThRGyec-Eg4WFm9_IN5tNIut7Ac5BJW0VExFGdRZEqA_JFvxdTFDH2ZeRcbO25xPQcyxt0VRWKg --cert=/path/to/cert.pem --url=http://localhost:7080/awsapi
|
...
Note |
---|
You can specify an empty file as cert but use the keys generated in the GUI |
...
. Executing this with an empty cert file will result in an error. Regardless of this error, if the registration works you should see the credentials in the cloudbridge database in the usercredentials table. Within the DevCloud VM (as root): You should see your account as the only row in that table. |
Code Block |
---|
#!/usr/bin/env python import sys import os import boto import boto.ec2 region = boto.ec2.regioninfo.RegionInfo(name="ROOT",endpoint="localhost") apikey='JiKIBbp6GRe3-7Ma-KF_pJl69BAsv2smJEA3So4DLfG0JCa9u5VnGeS5qsSo6cHiArzu8pRwEr4DkGy6M5inTw' secretkey='x9iMD9XY0xsnLy_1EZQi6lOXAY5hH-O6S2z_VFVTWMO5_GAIdeSm93tNk09rb56cB1bAQKZ0vSOztBrusZRu6g' def main(): '''Establish connection to EC2 cloud''' conn =boto.connect_ec2(aws_access_key_id=apikey, aws_secret_access_key=secretkey, is_secure=False, region=region, port=7080, path="/awsapi", api_version="2010-11-15") '''Get list of images that I own''' images = conn.get_all_images() print images myimage = images[0] '''Pick an instance type''' vm_type='m1.small' reservation = myimage.run(instance_type=vm_type,security_groups=['default']) if __name__ == '__main__': main() |
If we made it this far, the release has at least been reasonably "smoke tested".