Using Euca2ools Configuration Files

The following examples show how to set up a basic Euca2ools configuration file.

  1. Open a text editor and add a [user] section. For example:
    [user john]
    key-id = AKIA93F29V0AEXAMPLE
    secret-key = vcasd93cm1458un4vj84039vda78mDEXAMPLE
    Once you've defined a user in a configuration file, you can specify this user from any subsequent [region] section in the configuration file.
  2. Add a [region] section to a configuration file. Be sure to add a user entry that points to a user already defined in a config file; Euca2ools will use this user's credentials to access to the cloud specified in this region section. For example:
    [region us-east-1]
    ec2-url = https://ec2.amazonaws.com/
    iam-url = https://iam.amazonaws.com/
    s3-url  = https://s3.amazonaws.com/
    user = john
    Once you've set up a user and a region in the configuration file, you can easily switch between regions using the --region option from any euca2ools command.
  3. Add a [global] section to specify which region to use when you don't specify the --region option on the command line. For example:
    Note: Any euca2ools commands entered without specifying the --region option will result in an error.
    [global]
    default-region = us-east-1

The following example shows an example of a complete euca2ools configuration file.

[user john]
key-id = AKIA93F29V0AEXAMPLE
secret-key = vcasd93cm1458un4vj84039vda78mDEXAMPLE
[user fry]
[region us-east-1]
autoscaling-url = https://autoscaling.us-east-1.amazonaws.com/
ec2-url = https://ec2.us-east-1.amazonaws.com/
elasticloadbalancing-url = https://elasticloadbalancing.us-east-1.amazonaws.com/
iam-url = https://iam.amazonaws.com/
monitoring-url = https://monitoring.us-east-1.amazonaws.com/
s3-url = https://s3.amazonaws.com/
user = john
[region ecc]
autoscaling-url =
https://communitycloud.eucalyptus.com:8773/services/AutoScaling/
ec2-url = https://communitycloud.eucalyptus.com:8773/services/Eucalyptus/
elasticloadbalancing-url =
https://communitycloud.eucalyptus.com:8773/services/LoadBalancing/
iam-url = https://communitycloud.eucalyptus.com:8773/services/Euare/
monitoring-url = https://communitycloud.eucalyptus.com:8773/services/Monitoring/
s3-url = https://communitycloud.eucalyptus.com:8773/services/Walrus/
user = john
[global]
default-region = us-east-1

To use the configuration file, simple specify one of the named regions by using the --region option with any euca2ools command. For example:

euca-describe-instances --region ecc

This command will use the use the service URLs and user credentials specified in the "ecc" region and "ecc-admin" user sections in the configuration file.

x