Fixes for nova element changes.
[apex-tripleo-heat-templates.git] / nova.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Description: 'HEAT Template - Nova'
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   NovaDSN:
13     Description: DSN for connecting to nova database
14     Type: String
15   NovaImage:
16     Type: String
17   KeystoneHost:
18     Type: String
19   ServicePassword:
20     Description: admin_password for setting up auth in nova.
21     Type: String
22   TemplateURL:
23     Type: String
24     Default: https://raw.github.com/openstack-ops/templates/master/
25   RabbitHost:
26     Type: String
27   RabbitPassword:
28     Type: String
29   NovaInterfaces:
30     Type: String
31     Default: eth0
32 Resources:
33   AccessPolicy:
34     Type: OS::Heat::AccessPolicy
35     Properties:
36       AllowedResources: [ Nova ]
37   User:
38     Type: AWS::IAM::User
39     Properties:
40       Policies: [ { Ref: AccessPolicy } ]
41   Key:
42     Type: AWS::IAM::AccessKey
43     Properties:
44       UserName:
45         Ref: User
46   Nova:
47     Type: AWS::EC2::Instance
48     Properties:
49       ImageId:
50         {Ref: NovaImage}
51       InstanceType: {Ref: InstanceType}
52       KeyName: {Ref: KeyName}
53     Metadata:
54       OpenStack::ImageBuilder::Elements: [ nova ]
55       heat: 
56         access_key_id:
57           Ref: Key
58         secret_key:
59           Fn::GetAtt: [ Key, SecretAccessKey ]
60         stack:
61           name: {Ref: 'AWS::StackName'}
62           region: {Ref: 'AWS::Region'}
63         refresh:
64           - resource: Nova
65       keystone:
66         host: {Ref: KeystoneHost}
67       nova:
68         db: {Ref: NovaDSN}
69       quantum:
70         host: {Ref: QuantumHost}
71       service-password: {Ref: ServicePassword}
72       admin-password: {Ref: ServicePassword}
73       rabbit:
74         host: {Ref: RabbitHost}
75         password: {Ref: RabbitPassword}
76       swift:
77         store_user: ''
78         store_key: ''
79       interfaces:
80         control: {Ref: NovaInterfaces}