/
main.yml
187 lines (160 loc) · 7.68 KB
/
main.yml
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
---
magnum_services:
magnum-api:
container_name: magnum_api
group: magnum-api
enabled: true
image: "{{ magnum_api_image_full }}"
environment:
DUMMY_ENVIRONMENT: kolla_useless_env
volumes: "{{ magnum_api_default_volumes + magnum_api_extra_volumes }}"
dimensions: "{{ magnum_api_dimensions }}"
healthcheck: "{{ magnum_api_healthcheck }}"
haproxy:
magnum_api:
enabled: "{{ enable_magnum }}"
mode: "http"
external: false
port: "{{ magnum_api_port }}"
listen_port: "{{ magnum_api_listen_port }}"
magnum_api_external:
enabled: "{{ enable_magnum }}"
mode: "http"
external: true
external_fqdn: "{{ magnum_external_fqdn }}"
port: "{{ magnum_api_public_port }}"
listen_port: "{{ magnum_api_listen_port }}"
magnum-conductor:
container_name: magnum_conductor
group: magnum-conductor
enabled: true
image: "{{ magnum_conductor_image_full }}"
environment: "{{ magnum_conductor_container_proxy }}"
volumes: "{{ magnum_conductor_default_volumes + magnum_conductor_extra_volumes }}"
dimensions: "{{ magnum_conductor_dimensions }}"
healthcheck: "{{ magnum_conductor_healthcheck }}"
####################
# Config Validate
####################
magnum_config_validation:
- generator: "/magnum/etc/magnum/magnum-config-generator.conf"
config: "/etc/magnum/magnum.conf"
####################
# Database
####################
magnum_database_name: "magnum"
magnum_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}magnum{% endif %}"
magnum_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
####################
# Database sharding
####################
magnum_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ magnum_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
magnum_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
magnum_database_shard:
users:
- user: "{{ magnum_database_user }}"
password: "{{ magnum_database_password }}"
rules:
- schema: "{{ magnum_database_name }}"
shard_id: "{{ magnum_database_shard_id }}"
####################
# Magnum
####################
enable_cluster_user_trust: False
# The default cinder volume type to be used for container storage volume in clusters
# that specify the docker-volume-size option. For example gp1, io1 etc
default_docker_volume_type: ""
####################
# Docker
####################
magnum_tag: "{{ openstack_tag }}"
magnum_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/magnum-api"
magnum_api_tag: "{{ magnum_tag }}"
magnum_api_image_full: "{{ magnum_api_image }}:{{ magnum_api_tag }}"
magnum_conductor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/magnum-conductor"
magnum_conductor_tag: "{{ magnum_tag }}"
magnum_conductor_image_full: "{{ magnum_conductor_image }}:{{ magnum_conductor_tag }}"
magnum_api_dimensions: "{{ default_container_dimensions }}"
magnum_conductor_dimensions: "{{ default_container_dimensions }}"
magnum_api_enable_healthchecks: "{{ enable_container_healthchecks }}"
magnum_api_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
magnum_api_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
magnum_api_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
magnum_api_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ magnum_api_port }}"]
magnum_api_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
magnum_api_healthcheck:
interval: "{{ magnum_api_healthcheck_interval }}"
retries: "{{ magnum_api_healthcheck_retries }}"
start_period: "{{ magnum_api_healthcheck_start_period }}"
test: "{% if magnum_api_enable_healthchecks | bool %}{{ magnum_api_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ magnum_api_healthcheck_timeout }}"
magnum_conductor_enable_healthchecks: "{{ enable_container_healthchecks }}"
magnum_conductor_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
magnum_conductor_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
magnum_conductor_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
magnum_conductor_healthcheck_test: ["CMD-SHELL", "healthcheck_port magnum-conductor {{ om_rpc_port }}"]
magnum_conductor_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
magnum_conductor_healthcheck:
interval: "{{ magnum_conductor_healthcheck_interval }}"
retries: "{{ magnum_conductor_healthcheck_retries }}"
start_period: "{{ magnum_conductor_healthcheck_start_period }}"
test: "{% if magnum_conductor_enable_healthchecks | bool %}{{ magnum_conductor_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ magnum_conductor_healthcheck_timeout }}"
magnum_api_default_volumes:
- "{{ node_config_directory }}/magnum-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
- "{{ kolla_dev_repos_directory ~ '/magnum/magnum:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/magnum' if magnum_dev_mode | bool else '' }}"
- "kolla_logs:/var/log/kolla/"
magnum_conductor_default_volumes:
- "{{ node_config_directory }}/magnum-conductor/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
- "magnum:/var/lib/magnum/"
- "{{ kolla_dev_repos_directory ~ '/magnum/magnum:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/magnum' if magnum_dev_mode | bool else '' }}"
- "kolla_logs:/var/log/kolla/"
magnum_extra_volumes: "{{ default_extra_volumes }}"
magnum_api_extra_volumes: "{{ magnum_extra_volumes }}"
magnum_conductor_extra_volumes: "{{ magnum_extra_volumes }}"
magnum_conductor_container_proxy: "{{ container_proxy }}"
####################
# OpenStack
####################
magnum_internal_endpoint: "{{ magnum_internal_fqdn | kolla_url(internal_protocol, magnum_api_port, '/v1') }}"
magnum_public_endpoint: "{{ magnum_external_fqdn | kolla_url(public_protocol, magnum_api_public_port, '/v1') }}"
magnum_logging_debug: "{{ openstack_logging_debug }}"
magnum_keystone_user: "magnum"
magnum_trustee_domain_admin: "magnum_trustee_domain_admin"
magnum_trustee_domain: "magnum"
openstack_magnum_auth: "{{ openstack_auth }}"
magnum_api_workers: "{{ openstack_service_workers }}"
magnum_conductor_workers: "{{ openstack_service_workers }}"
####################
# Kolla
####################
magnum_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
magnum_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
magnum_dev_mode: "{{ kolla_dev_mode }}"
magnum_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
magnum_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
magnum_enabled_notification_topics: "{{ magnum_notification_topics | selectattr('enabled', 'equalto', true) | list }}"
####################
# Keystone
####################
magnum_ks_services:
- name: "magnum"
type: "container-infra"
description: "Container Infrastructure Management Service"
endpoints:
- {'interface': 'internal', 'url': '{{ magnum_internal_endpoint }}'}
- {'interface': 'public', 'url': '{{ magnum_public_endpoint }}'}
magnum_ks_users:
- project: "service"
user: "{{ magnum_keystone_user }}"
password: "{{ magnum_keystone_password }}"
role: "admin"