Merge "Sequence deploys - compute after control plane."
[apex-tripleo-heat-templates.git] / block-storage-nfs.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Description: 'Common Block Storage Configuration'
3 Parameters:
4   BlockStorageImage:
5     Type: String
6     Default: overcloud-cinder-volume
7   OvercloudBlockStorageFlavor:
8     Default: baremetal
9     Description: Flavor for block storage nodes to request when deploying.
10     Type: String
11 Resources:
12   BlockStorageAccessPolicy:
13     Type: OS::Heat::AccessPolicy
14     Properties:
15       AllowedResources:
16       - BlockStorage0
17   BlockStorageUser:
18     Type: AWS::IAM::User
19     Properties:
20       Policies: [ { Ref: BlockStorageAccessPolicy } ]
21   BlockStorageKey:
22     Type: AWS::IAM::AccessKey
23     Properties:
24       UserName:
25         Ref: BlockStorageUser
26   BlockStorage0CompletionCondition:
27     Type: AWS::CloudFormation::WaitCondition
28     DependsOn: controller0Config
29     Properties:
30       Handle: {Ref: BlockStorage0CompletionHandle}
31       Count: '1'
32       Timeout: '1800'
33   BlockStorage0CompletionHandle:
34     Type: AWS::CloudFormation::WaitConditionHandle
35   BlockStorage0:
36     Type: OS::Nova::Server
37     Properties:
38       image:
39         {Ref: BlockStorageImage}
40       flavor: {Ref: OvercloudBlockStorageFlavor}
41       key_name: {Ref: KeyName}
42     Metadata:
43       completion-handle:
44         Ref: BlockStorage0CompletionHandle
45       os-collect-config:
46         cfn:
47           access_key_id:
48             Ref: BlockStorageKey
49           secret_access_key:
50             Fn::GetAtt: [ BlockStorageKey, SecretAccessKey ]
51           stack_name: {Ref: 'AWS::StackName'}
52       OpenStack::ImageBuilder::Elements: [ cinder ]
53       keystone:
54         host: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
55       cinder:
56         db: {"Fn::Join": ['', ['mysql://cinder:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } , '/cinder']]}
57         volume_size_mb: '5000'
58         service-password:
59           Ref: CinderPassword
60         include_nfs_backend: 'true'
61         nfs_shares:
62           - {"Fn::Join": ['', [{"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } , ':/mnt/state/var/lib/nfs_share']]}
63       admin-password: {Ref: AdminPassword}
64       rabbit:
65         host: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
66         username: {Ref: RabbitUserName}
67         password: {Ref: RabbitPassword}
68       interfaces:
69         control: {Ref: NeutronPublicInterface}