Hand modifying notcompute to work with elements.
[apex-tripleo-heat-templates.git] / glance.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Description: 'Glance'
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   GlanceDSN:
13     Description: DSN for connecting to glance database
14     Type: String
15   GlanceImage:
16     Type: String
17   KeystoneHost:
18     Type: String
19   ServicePassword:
20     Description: admin_password for setting up auth in keystone.
21     Type: String
22   RabbitHost:
23     Type: String
24   RabbitPassword:
25     Type: String
26 Resources:
27   AccessPolicy:
28     Type: OS::Heat::AccessPolicy
29     Properties:
30       AllowedResources: [ Glance ]
31   User:
32     Type: AWS::IAM::User
33     Properties:
34       Policies: [ { Ref: AccessPolicy } ]
35   Key:
36     Type: AWS::IAM::AccessKey
37     Properties:
38       UserName:
39         Ref: User
40   Glance:
41     Type: AWS::EC2::Instance
42     Properties:
43       ImageId:
44         {Ref: GlanceImage}
45       InstanceType: {Ref: InstanceType}
46       KeyName: {Ref: KeyName}
47     Metadata:
48       OpenStack::Role: stateless
49       OpenStack::ImageBuilder::Elements: [ glance ]
50       heat: 
51         access_key_id:
52           Ref: Key
53         secret_key:
54           Fn::GetAtt: [ Key, SecretAccessKey ]
55         stack:
56           name: {Ref: 'AWS::StackName'}
57           region: {Ref: 'AWS::Region'}
58         refresh:
59           - resource: Glance
60       keystone:
61         host: {Ref: KeystoneHost}
62       glance:
63         db: {Ref: GlanceDSN}
64       service-password: {Ref: ServicePassword}
65       rabbit:
66         host: {Ref: RabbitHost}
67         password: {Ref: RabbitPassword}
68       swift:
69         store_user: ''
70         store_key: ''