Jump to: navigation, search

Difference between revisions of "Heat/Using-Boto"

 
Line 30: Line 30:
 
     cfn_region_name = heat
 
     cfn_region_name = heat
 
     cfn_region_endpoint = 127.0.0.1
 
     cfn_region_endpoint = 127.0.0.1
 +
 +
    cloudwatch_region_name = heat
 +
    cloudwatch_region_endpoint = 127.0.0.1
 +
 +
    # Set the client retries to 1, or errors connecting to heat repeat
 +
    # which is not useful when debugging API issues
 +
    num_retries = 1
 +
 
</nowiki></pre>
 
</nowiki></pre>
  
  
 
Note that heat installs a template boto.cfg, see heat/etc/boto.cfg - the Credentials section must be uncommented and populated with your keystone-ec2 login details, or copy the file to ~/.boto and chmod to keep your credentials private for non-development deployment.
 
Note that heat installs a template boto.cfg, see heat/etc/boto.cfg - the Credentials section must be uncommented and populated with your keystone-ec2 login details, or copy the file to ~/.boto and chmod to keep your credentials private for non-development deployment.

Revision as of 14:45, 22 January 2013

[Boto](http://github.com/boto/boto) is a python AWS client library.

Using boto with heat

The boto cloudformation API can be used to interface with the heat cloudformation compatible orchestration API (heat-api-cfn)

You use the boto API directly, or make use of the heat-boto tool, which supports identical usage to the existing heat cli tool (note the output format is a bit different..)

Install boto

yum install python-boto


Boto configuration file(s)

You need a /etc/boto.cfg file (or per-user ~/.boto), which looks something like this (note the AWS keys are as returned from keystone ec2-credentials-list):


    [Credentials]
    aws_access_key_id = <key>
    aws_secret_access_key = <secret_key>

    [Boto]
    debug = 0
    cfn_region_name = heat
    cfn_region_endpoint = 127.0.0.1

    cloudwatch_region_name = heat
    cloudwatch_region_endpoint = 127.0.0.1

    # Set the client retries to 1, or errors connecting to heat repeat
    # which is not useful when debugging API issues
    num_retries = 1


Note that heat installs a template boto.cfg, see heat/etc/boto.cfg - the Credentials section must be uncommented and populated with your keystone-ec2 login details, or copy the file to ~/.boto and chmod to keep your credentials private for non-development deployment.