Merge "[lib.sh] Split into multiple files for readability"
[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.linux.system.single.simple
12   - system.nginx.server.single
13   - system.nginx.server.proxy.openstack_api
14   - system.nginx.server.proxy.openstack_vnc
15   - system.nginx.server.proxy.openstack_web
16   - system.nginx.server.proxy.openstack.aodh
17   - system.nginx.server.proxy.openstack.ceilometer
18   - system.apache.server.single
19   - system.horizon.server.single
20   - system.salt.minion.cert.proxy
21   - system.sphinx.server.doc.reclass
22   - service.keepalived.cluster.single
23   - system.keepalived.cluster.instance.openstack_web_public_vip
24 parameters:
25   _param:
26     cluster_vip_address: ${_param:openstack_proxy_address}
27     keepalived_openstack_web_public_vip_address: ${_param:cluster_vip_address}
28     keepalived_openstack_web_public_vip_interface: ${_param:single_nic}
29     keepalived_vip_address: ${_param:openstack_proxy_control_address}
30     keepalived_vip_interface: ${_param:control_nic}
31     keepalived_vip_virtual_router_id: 240
32     nginx_proxy_ssl:
33       enabled: true
34       authority: ${_param:salt_minion_ca_authority}
35       engine: salt
36       mode: secure
37     salt_minion_ca_host: cfg01.${_param:cluster_domain}
38   linux:
39     system:
40       package:
41         libapache2-mod-wsgi:
42           version: latest
43       kernel:
44         ~boot_options:
45           - ipv6.disable=0
46 {%- if not conf.MCP_VCP %}
47   nginx:
48     server:
49       # NOTE(armband): Define host.address for all proxies for uniformity
50       site:
51         nginx_proxy_novnc: &nginx_openstack_proxy_address
52           host:
53             address: ${_param:openstack_proxy_address}
54         nginx_proxy_openstack_api_aodh:
55           <<: *nginx_openstack_proxy_address
56         nginx_proxy_openstack_api_ceilometer:
57           <<: *nginx_openstack_proxy_address
58         nginx_proxy_openstack_api_cinder:
59           <<: *nginx_openstack_proxy_address
60         nginx_proxy_openstack_api_glance:
61           <<: *nginx_openstack_proxy_address
62         nginx_proxy_openstack_api_heat:
63           <<: *nginx_openstack_proxy_address
64         nginx_proxy_openstack_api_heat_cfn:
65           <<: *nginx_openstack_proxy_address
66         nginx_proxy_openstack_api_heat_cloudwatch:
67           <<: *nginx_openstack_proxy_address
68           enabled: false
69         nginx_proxy_openstack_api_keystone:
70           <<: *nginx_openstack_proxy_address
71         nginx_proxy_openstack_api_keystone_private:
72           <<: *nginx_openstack_proxy_address
73         nginx_proxy_openstack_api_neutron:
74           <<: *nginx_openstack_proxy_address
75         nginx_proxy_openstack_api_nova:
76           <<: *nginx_openstack_proxy_address
77         nginx_proxy_openstack_web:
78           <<: *nginx_openstack_proxy_address
79         nginx_ssl_redirect_openstack_web:
80           <<: *nginx_openstack_proxy_address
81         nginx_static_reclass_doc:
82           <<: *nginx_openstack_proxy_address
83 {%- else %}
84   nginx:
85     server:
86       site:
87         nginx_proxy_openstack_api_heat_cloudwatch:
88           enabled: false
89 {%- endif %}
90   salt:
91     minion:
92       cert:
93         proxy:
94           alternative_names: "IP:${_param:openstack_proxy_address}"
95           key_usage: 'digitalSignature, keyEncipherment'
96   keepalived:
97     cluster:
98       vrrp_scripts:
99         check_pidof:
100           args: 'nginx'
101   apache:
102     server:
103       bind:
104         listen_default_ports: false