summaryrefslogtreecommitdiffstats
path: root/notcompute.yaml
blob: 3579760b2c16b1473b44416d97f2e4b7c7503433 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
Description: Nova API,Keystone,Heat Engine and API,Glance,Quantum,Dedicated MySQL
  server,Dedicated RabbitMQ Server
HeatTemplateFormatVersion: '2012-12-12'
Parameters:
  AdminToken:
    Type: String
  BootstrapDumpPassword:
    Default: ''
    Description: Password to use for mysqldump from Bootstrap Host
    Type: String
  BootstrapHost:
    Default: ''
    Description: Load mysqldump from this Host
    Type: String
  BootstrapRootPassword:
    Default: ''
    Description: Root password for localhost access after bootstrap
    Type: String
  BootstrapSlavePassword:
    Default: ''
    Description: Password to use with BootstrapSlaveUser
    Type: String
  BootstrapSlaveUser:
    Default: ''
    Description: User to use for replication from bootstrap host
    Type: String
  GlanceDBPassword:
    Description: Password for connecting to glance database
    Type: String
  HeatDBPassword:
    Description: Password for accessing Heat database.
    Type: String
  InstanceType:
    Default: baremetal
    Description: Use this flavor
    Type: String
  KeyName:
    Default: default
    Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
    Type: String
  KeystoneDBPassword:
    Description: Password for connecting to keystone
    Type: String
  NovaDBPassword:
    Description: Password for connecting to nova database
    Type: String
  NovaInterfaces:
    Default: eth0
    Type: String
  QuantumDBPassword:
    Description: Password for connecting to quantum database
    Type: String
  QuantumInterfaces:
    Default: eth0
    Type: String
  RabbitMQPassword:
    Description: Password for RabbitMQ
    Type: String
  RabbitPassword:
    Type: String
  ServicePassword:
    Description: admin_password for setting up auth in nova.
    Type: String
  notcomputeImage:
    Type: String
Resources:
  AccessPolicy:
    Properties:
      AllowedResources:
      - notcompute
    Type: OS::Heat::AccessPolicy
  Key:
    Properties:
      UserName:
        Ref: User
    Type: AWS::IAM::AccessKey
  User:
    Properties:
      Policies:
      - Ref: AccessPolicy
    Type: AWS::IAM::User
  notcompute:
    Metadata:
      OpenStack::ImageBuilder::Elements:
      - nova-api
      - keystone
      - heat-api
      - heat-engine
      - glance
      - mysql-migration
      - rabbitmq-server
      admin-password:
        Ref: ServicePassword
      admin-token:
        Ref: AdminToken
      mysql:
        create-users:
          - database: keystone
            username: keystone
            password: {Ref: KeystoneDBPassword}
          - database: heat
            username: heat
            password: {Ref: HeatDBPassword}
          - database: glance
            username: glance
            password: {Ref: GlanceDBPassword}
          - database: nova
            username: nova
            password: {Ref: NovaDBPassword}
          - database: quantum
            username: quantum
            password: {Ref: QuantumDBPassword}
      glance:
        db:
          Fn::Join:
            - ''
            - - 'mysql://glance:'
              - {Ref: GlanceDBPassword}
              - '@127.0.0.1/glance'
      heat:
        db:
          Fn::Join:
            - ''
            - - 'mysql://heat:'
              - {Ref: HeatDBPassword}
              - '@127.0.0.1/heat'
        access_key_id:
          Ref: Key
        refresh:
        - resource: notcompute
        secret_key:
          Fn::GetAtt:
          - Key
          - SecretAccessKey
        stack:
          name:
            Ref: AWS::StackName
          region:
            Ref: AWS::Region
        auth_encryption_key: unset
      interfaces:
        control:
          Ref: NovaInterfaces
      keystone:
        host:
          Fn::GetAtt: [ notcompute, PrivateIp ]
        db:
          Fn::Join:
            - ''
            - - 'mysql://keystone:'
              - {Ref: KeystoneDBPassword}
              - '@127.0.0.1/keystone'
      nova:
        db:
          Fn::Join:
            - ''
            - - 'mysql://nova:'
              - {Ref: NovaDBPassword}
              - '@127.0.0.1/nova'
      quantum:
        host:
          Fn::GetAtt: [ notcompute , PrivateIp ]
        ovs_db:
          Fn::Join:
            - ''
            - - 'mysql://quantum:'
              - {Ref: QuantumDBPassword}
              - '@127.0.0.1/ovs_quantum'
      rabbit:
        host:
          Fn::GetAtt: [ notcompute , PrivateIp ]
        password:
          Ref: RabbitPassword
        users:
          username: guest
          password:
            Ref: RabbitPassword
      service-password:
        Ref: ServicePassword
    Properties:
      ImageId:
        Ref: notcomputeImage
      InstanceType:
        Ref: InstanceType
      KeyName:
        Ref: KeyName
    Type: AWS::EC2::Instance