Jump to: navigation, search

Difference between revisions of "Heat/Using-Boto"

(Install boto)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
__NOTOC__
+
 
 
[http://github.com/boto/boto Boto] is a python AWS client library.
 
[http://github.com/boto/boto Boto] is a python AWS client library.
  
Line 15: Line 15:
 
</nowiki></pre>
 
</nowiki></pre>
  
 +
'''Note''' there are currently some restrictions on which boto versions will work:
 +
  - must be >= 2.4.0 (because we need https://github.com/boto/boto/pull/742)
 +
  - very recent versions break due to an AWS API version bump (ref https://bugs.launchpad.net/heat/+bug/1122472)
 +
  - Version 2.5.2 (included in F17) is known to work, so it is suggested to install this version via pip if your distribution does not provide a suitable version
  
 
== Boto configuration file(s) ==
 
== Boto configuration file(s) ==

Latest revision as of 10:46, 13 March 2013

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

Note there are currently some restrictions on which boto versions will work:

 - must be >= 2.4.0 (because we need https://github.com/boto/boto/pull/742)
 - very recent versions break due to an AWS API version bump (ref https://bugs.launchpad.net/heat/+bug/1122472)
 - Version 2.5.2 (included in F17) is known to work, so it is suggested to install this version via pip if your distribution does not provide a suitable version

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
    is_secure = 0 # Set this to 1 if you want https
    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.