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