Quantum -> Neutron rename
[apex-tripleo-heat-templates.git] / nova-api.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Description: 'Nova API'
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   RabbitHost:
23     Type: String
24   RabbitPassword:
25     Type: String
26   NovaInterfaces:
27     Type: String
28     Default: eth0
29 Resources:
30   AccessPolicy:
31     Type: OS::Heat::AccessPolicy
32     Properties:
33       AllowedResources: [ NovaApi ]
34   User:
35     Type: AWS::IAM::User
36     Properties:
37       Policies: [ { Ref: AccessPolicy } ]
38   Key:
39     Type: AWS::IAM::AccessKey
40     Properties:
41       UserName:
42         Ref: User
43   NovaApi:
44     Type: AWS::EC2::Instance
45     Properties:
46       ImageId:
47         {Ref: NovaImage}
48       InstanceType: {Ref: InstanceType}
49       KeyName: {Ref: KeyName}
50     Metadata:
51       OpenStack::Role: stateless
52       OpenStack::ImageBuilder::Elements: [ nova-api ]
53       heat: 
54         access_key_id:
55           Ref: Key
56         secret_key:
57           Fn::GetAtt: [ Key, SecretAccessKey ]
58         stack:
59           name: {Ref: 'AWS::StackName'}
60           region: {Ref: 'AWS::Region'}
61         refresh:
62           - resource: NovaApi
63       keystone:
64         host: {Ref: KeystoneHost}
65       nova:
66         db: {Ref: NovaDSN}
67       neutron:
68         host: {Ref: NeutronHost}
69       service-password: {Ref: ServicePassword}
70       admin-password: {Ref: ServicePassword}
71       rabbit:
72         host: {Ref: RabbitHost}
73         password: {Ref: RabbitPassword}
74       swift:
75         store_user: ''
76         store_key: ''
77       interfaces:
78         control: {Ref: NovaInterfaces}