aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/config-osa/templates/openstack_user_config.yml.j2
blob: be119fbe3e9ac8d0d41785cff2d0ec6ecb733592 (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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
---
cidr_networks:
  container: {{ mgmt_cidr }}
  tunnel: {{ tenant_cidr }}
  storage: {{ storage_cidr }}

used_ips:
{% for item in network_cfg["ip_settings"] %}
  - "{{ ','.join(item["ip_ranges"][0]) }}"
{% if item["name"] == "mgmt" %}
  - "{{ ','.join(item["dhcp_ranges"][0]) }}"
{% endif %}
{% if "gw" in item %}
  - "{{ item["gw"] }}"
{% endif %}
{% endfor %}
  - "{{ internal_vip.ip }}"
  - "{{ public_vip.ip }}"

{% if "linuxbridge" == NEUTRON_MECHANISM_DRIVERS[0] %}
{% set neutron_agent = "neutron_linuxbridge_agent" %}
{% else %}
{% set neutron_agent = "neutron_openvswitch_agent" %}
{% endif %}
{% set provider_net_mappings = network_cfg["provider_net_mappings"] %}
{% set public_net_info = network_cfg["public_net_info"] %}
{% set ext_physnet = public_net_info["provider_network"] %}
{% set ext_type = public_net_info["type"] %}
{% set ext_intf = [] %}
{% for item in provider_net_mappings %}
{% if item["network"] == ext_physnet %}
{% set _ = ext_intf.append(item["interface"]) %}
{% endif %}
{% endfor %}
global_overrides:
  internal_lb_vip_address: {{ internal_vip.ip }}
  external_lb_vip_address: {{ public_vip.ip }}
  tunnel_bridge: "br-tenant"
  management_bridge: "br-mgmt"
  provider_networks:
    - network:
        container_bridge: "br-mgmt"
        container_type: "veth"
        container_interface: "eth1"
        ip_from_q: "container"
        type: "raw"
        group_binds:
          - all_containers
          - hosts
        is_container_address: true
        is_ssh_address: true
{% if tenant_net_info["type"] == "vxlan" %}
    - network:
        container_bridge: "br-tenant"
        container_type: "veth"
        container_interface: "eth2"
        ip_from_q: "tunnel"
        type: "vxlan"
        range: "{{ tenant_net_info["range"] }}"
        net_name: "vxlan"
        group_binds:
          - {{ neutron_agent }}
{% endif %}
    - network:
        container_bridge: "br-external"
        container_type: "veth"
        container_interface: "{{ ext_intf[0] }}"
        host_bind_override: "{{ ext_intf[0] }}"
        type: "{{ ext_type }}"
        net_name: "{{ ext_physnet }}"
        group_binds:
          - {{ neutron_agent }}
{% for item in provider_net_mappings %}
{% if item["network"] != ext_physnet and "controller" in item["role"] %}
    - network:
        container_bridge: "br-tenant"
        container_type: "veth"
        container_interface: "{{ item["interface"] }}"
        host_bind_override: "{{ item["interface"] }}"
        type: "flat"
        net_name: "{{ item["network"] }}"
        group_binds:
          - {{ neutron_agent }}
{% endif %}
{% endfor %}
    - network:
        container_bridge: "br-storage"
        container_type: "veth"
        container_interface: "eth2"
        ip_from_q: "storage"
        type: "raw"
        group_binds:
          - glance_api
          - cinder_api
          - cinder_volume
          - nova_compute

###
### Infrastructure
###

# galera, memcache, rabbitmq, utility
shared-infra_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# repository (apt cache, python packages, etc)
repo-infra_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# load balancer
# Ideally the load balancer should not use the Infrastructure hosts.
# Dedicated hardware is best for improved performance and security.
haproxy_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# rsyslog server
#log_hosts:
 # log1:
 #  ip: 10.1.0.53

###
### OpenStack
###

# keystone
identity_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# cinder api services
storage-infra_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# glance
# The settings here are repeated for each infra host.
# They could instead be applied as global settings in
# user_variables, but are left here to illustrate that
# each container could have different storage targets.
image_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
    container_vars:
       limit_container_types: glance
       glance_nfs_client:
         - server: "{{ip_settings[groups.compute[0]]['storage']['ip']}}"
           remote_path: "/images"
           local_path: "/var/lib/glance/images"
           type: "nfs"
           options: "_netdev,auto"
{% endfor %}

# nova api, conductor, etc services
compute-infra_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# heat
orchestration_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# horizon
dashboard_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# neutron server, agents (L3, etc)
network_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# ceilometer (telemetry API)
metering-infra_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# aodh (telemetry alarm service)
metering-alarm_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# gnocchi (telemetry metrics storage)
metrics_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# tacker (mano service)
mano_hosts:
{% for host in groups.controller%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# nova hypervisors
compute_hosts:
{% for host in groups.compute%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# ceilometer compute agent (telemetry)
metering-compute_hosts:
{% for host in groups.compute%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
{% endfor %}

# cinder volume hosts (NFS-backed)
# The settings here are repeated for each infra host.
# They could instead be applied as global settings in
# user_variables, but are left here to illustrate that
# each container could have different storage targets.
storage_hosts:
{% for host in groups.compute%}
  {{host}}:
    ip: {{ hostvars[host]['ansible_ssh_host'] }}
    container_vars:
      cinder_backends:
        limit_container_types: cinder_volume
        lvm:
          volume_group: cinder-volumes
          volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
          volume_backend_name: LVM_iSCSI
          iscsi_ip_address: "{{ip_settings[host]['storage']['ip']}}"
{% endfor %}