Fixes for quantum template
[apex-tripleo-heat-templates.git] / quantum.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Description: 'HEAT Template - Quantum'
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   QuantumDSN:
13     Description: DSN for connecting to quantum database
14     Type: String
15   QuantumImage:
16     Type: String
17   KeystoneHost:
18     Type: String
19   ServicePassword:
20     Description: admin_password for setting up auth in quantum.
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   QuantumInterfaces:
30     Type: String
31     Default: eth0
32 Resources:
33   AccessPolicy:
34     Type: OS::Heat::AccessPolicy
35     Properties:
36       AllowedResources: [ Quantum ]
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   Quantum:
47     Type: AWS::EC2::Instance
48     Properties:
49       ImageId:
50         {Ref: QuantumImage}
51       InstanceType: {Ref: InstanceType}
52       KeyName: {Ref: KeyName}
53     Metadata:
54       OpenStack::ImageBuilder::Elements: [ quantum ]
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: Quantum
65       keystone:
66         host: {Ref: KeystoneHost}
67       quantum:
68         ovs_db: {Ref: QuantumDSN}
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: QuantumInterfaces}