GitHub user robertgmoss opened a pull request:
https://github.com/apache/brooklyn-server/pull/723
adds a new ComputeServiceRegistry to handle when Brooklyn runs on an ec2
instance and want to pick up credentials from an IAM role
Allows the following catalog item to be added to add locations for all AWS
regions such that if the Brooklyn server is running on an EC2 instance and that
instance has been assigned an IAM role with e.g `AmazonEC2FullAccess` then the
credentials can be inferred from the instance profile.
This PR furthermore refactors the existing `ComputeServiceRegistryImpl`
class into an abstract class to allow the new
`AwsEc2SessionAwareComputeServiceRegistry` class to reuse as much as possible.
```
brooklyn.catalog:
version: 0.1.0-SNAPSHOT
items:
- id: amazon-anywhere
itemType: location
item:
type: jclouds:aws-ec2
brooklyn.config:
displayName: AWS (any region)
jclouds.computeServiceRegistry:
$brooklyn:object:
type:
org.apache.brooklyn.location.jclouds.AwsEc2SessionAwareComputeServiceRegistry
- id: amazon-us-east-1
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS US East (N. Virginia)
region: us-east-1
- id: amazon-us-east-2
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS US East (Ohio)
region: us-east-2
- id: amazon-us-west-1
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS US West (N. California)
region: us-west-1
- id: amazon-us-west-2
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS US West (Oregon)
region: us-west-2
- id: amazon-ca-central-1
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS Canada (Central)
region: ca-central-1
- id: amazon-ap-south-1
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS Asia Pacific (Mumbai)
region: ap-south-1
- id: amazon-ap-northeast-2
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS Asia Pacific (Seoul)
region: ap-northeast-2
- id: amazon-ap-southeast-1
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS Asia Pacific (Singapore)
region: ap-southeast-1
- id: amazon-ap-southeast-2
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS Asia Pacific (Sydney)
region: ap-southeast-2
- id: amazon-ap-northeast-1
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS Asia Pacific (Tokyo)
region: ap-northeast-1
- id: amazon-eu-central-1
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS EU (Frankfurt)
region: eu-central-1
- id: amazon-eu-west-1
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS EU (Ireland)
region: eu-west-1
- id: amazon-eu-west-2
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS EU (London)
region: eu-west-2
- id: amazon-sa-east-1
itemType: location
item:
type: amazon-anywhere
brooklyn.config:
displayName: AWS South America (São Paulo)
region: sa-east-1
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/robertgmoss/brooklyn-server
feature/aws-ec2-session-creds
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/723.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #723
----
commit e6ca01c9ae56d8ca0065793f4fbd33bdf8d409ec
Author: Robert Moss <[email protected]>
Date: 2017-05-24T15:41:53Z
adds a new ComputeServiceRegistry to handle when Brooklyn runs on an ec2
instance and want to pick up credentials from an IAM role
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---