summaryrefslogtreecommitdiffstats
path: root/rabbitmq.yaml
blob: e00f60392b3f8ba764a49c959e630f0a4e9c0ec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
HeatTemplateFormatVersion: '2012-12-12'
Description: 'HEAT Template - Dedicated MySQL server'
Parameters:
  KeyName: 
    Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
    Type: String
    Default: default
  InstanceType:
    Description: Use this flavor
    Type: String
    Default: bm.small
  RabbitMQImage:
    Type: String
Resources:
  RabbbitMQ:
    Type: AWS::EC2::Instance
    Metadata:
      OpenStack::ImageBuilder::Elements: [ rabbitmq-server ]
      rabbitmq:
        password_handle: {Ref: RabbitMQPasswordHandle}
    Properties:
      ImageId:
        {Ref: RabbitMQImage}
      InstanceType: {Ref: InstanceType}
      KeyName: {Ref: KeyName}
      UserData: "#!/bin/bash\ntouch /tmp/userdata-finished\necho Userdata finished $(date)\n"
  RabbitMQPasswordHandle:
    Type: AWS::CloudFormation::WaitConditionHandle
  RabbitMQPassword:
    DependsOn: RabbitMQ
    Type: AWS::CloudFormation::WaitCondition
    Properties:
      Handle: {Ref: RabbitMQPasswordHandle}
      Timeout: 60
Outputs:
    RabbitMQHost: 
        Fn::GetAtt: [ RabbitMQ , PrivateIp ]
    RabbitMQPassword:
        Fn::GetAtt: [ RabbitMQPassword, Data ]