c23b50993aa649ae748baefb9f1d1da6b291e88a
[fuel.git] / mcp / reclass / classes / cluster / mcp-common-ha / openstack_proxy.yml.j2
1 ##############################################################################
2 # Copyright (c) 2018 Mirantis Inc., Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 ---
9 classes:
10   - system.linux.system.repo.mcp.mirror.v1.openstack
11   - system.nginx.server.single
12   - system.nginx.server.proxy.openstack_api
13   - system.nginx.server.proxy.openstack_vnc
14   - system.nginx.server.proxy.openstack_web
15   - system.nginx.server.proxy.openstack.aodh
16   - system.nginx.server.proxy.openstack.ceilometer
17   - system.apache.server.single
18   - system.horizon.server.single
19   - system.salt.minion.cert.proxy
20   - system.sphinx.server.doc.reclass
21   - service.keepalived.cluster.single
22   - system.keepalived.cluster.instance.openstack_web_public_vip
23 parameters:
24   _param:
25     cluster_vip_address: ${_param:openstack_proxy_address}
26     keepalived_openstack_web_public_vip_address: ${_param:cluster_vip_address}
27     keepalived_openstack_web_public_vip_interface: ${_param:single_nic}
28     keepalived_vip_address: ${_param:openstack_proxy_control_address}
29     keepalived_vip_interface: ${_param:control_nic}
30     keepalived_vip_virtual_router_id: 240
31     nginx_proxy_ssl:
32       enabled: true
33       authority: ${_param:salt_minion_ca_authority}
34       engine: salt
35       mode: secure
36     salt_minion_ca_host: cfg01.${_param:cluster_domain}
37   linux:
38     system:
39       package:
40         libapache2-mod-wsgi:
41           version: latest
42 {%- if not conf.MCP_VCP %}
43   nginx:
44     server:
45       # NOTE(armband): Define host.address for all proxies for uniformity
46       site:
47         nginx_proxy_novnc: &nginx_openstack_proxy_address
48           host:
49             address: ${_param:openstack_proxy_address}
50         nginx_proxy_openstack_api_aodh:
51           <<: *nginx_openstack_proxy_address
52         nginx_proxy_openstack_api_ceilometer:
53           <<: *nginx_openstack_proxy_address
54         nginx_proxy_openstack_api_cinder:
55           <<: *nginx_openstack_proxy_address
56         nginx_proxy_openstack_api_glance:
57           <<: *nginx_openstack_proxy_address
58         nginx_proxy_openstack_api_heat:
59           <<: *nginx_openstack_proxy_address
60         nginx_proxy_openstack_api_heat_cfn:
61           <<: *nginx_openstack_proxy_address
62         nginx_proxy_openstack_api_heat_cloudwatch:
63           <<: *nginx_openstack_proxy_address
64           enabled: false
65         nginx_proxy_openstack_api_keystone:
66           <<: *nginx_openstack_proxy_address
67         nginx_proxy_openstack_api_keystone_private:
68           <<: *nginx_openstack_proxy_address
69         nginx_proxy_openstack_api_neutron:
70           <<: *nginx_openstack_proxy_address
71         nginx_proxy_openstack_api_nova:
72           <<: *nginx_openstack_proxy_address
73         nginx_proxy_openstack_web:
74           <<: *nginx_openstack_proxy_address
75         nginx_ssl_redirect_openstack_web:
76           <<: *nginx_openstack_proxy_address
77         nginx_static_reclass_doc:
78           <<: *nginx_openstack_proxy_address
79 {%- else %}
80   nginx:
81     server:
82       site:
83         nginx_proxy_openstack_api_heat_cloudwatch:
84           enabled: false
85 {%- endif %}
86   salt:
87     minion:
88       cert:
89         proxy:
90           alternative_names: "IP:${_param:openstack_proxy_address}"
91           key_usage: 'digitalSignature, keyEncipherment'
92   keepalived:
93     cluster:
94       vrrp_scripts:
95         check_pidof:
96           args: 'nginx'
97   apache:
98     server:
99       bind:
100         listen_default_ports: false