Hand modifying notcompute to work with elements.
[apex-tripleo-heat-templates.git] / keystone.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Description: 'Keystone'
3 Parameters:
4   KeyName: 
5     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
6     Type: String
7     Default: default
8   InstanceType:
9     Description: Use this flavor
10     Type: String
11     Default: bm.small
12   KeystoneDSN:
13     Description: DSN for connecting to keystone
14     Type: String
15   KeystoneImage:
16     Type: String
17   AdminToken:
18     Type: String
19 Resources:
20   ApiAccessPolicy:
21     Type: OS::Heat::AccessPolicy
22     Properties:
23       AllowedResources: [ KeystoneLaunch, Keystone ]
24   ApiUser:
25     Type: AWS::IAM::User
26     Properties:
27       Policies: [ { Ref: ApiAccessPolicy } ]
28   ApiKey:
29     Type: AWS::IAM::AccessKey
30     Properties:
31       UserName:
32         Ref: ApiUser
33   Keystone:
34     Type: AWS::EC2::Instance
35     Properties:
36       ImageId:
37         {Ref: KeystoneImage}
38       InstanceType: {Ref: InstanceType}
39       KeyName: {Ref: KeyName}
40     Metadata:
41       OpenStack::Role: stateless
42       OpenStack::ImageBuilder::Elements: [ keystone ]
43       heat: 
44         access_key_id:
45           Ref: ApiKey
46         secret_key:
47           Fn::GetAtt: [ ApiKey, SecretAccessKey ]
48         stack:
49           name: {Ref: 'AWS::StackName'}
50           region: {Ref: 'AWS::Region'}
51         refresh:
52           - resource: Keystone
53       admin-token: {Ref: AdminToken}
54       keystone:
55         db: {Ref: KeystoneDSN}