-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support providing ZDM configuration as YAML file
- Loading branch information
1 parent
8980640
commit bc6e085
Showing
8 changed files
with
182 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#jinja2: lstrip_blocks: "True", trim_blocks: "True" | ||
|
||
{% set zdm_proxy_address_list = [] %} | ||
{% for host in groups['proxies'] %} | ||
{{ zdm_proxy_address_list.append(host) }} | ||
{% endfor %} | ||
proxy_topology_index:{{ groups['proxies'].index(hostvars[inventory_hostname]['ansible_default_ipv4']['address']) }} | ||
proxy_topology_addresses:{{ zdm_proxy_address_list|join(',') }} | ||
|
||
{% if ( origin_contact_points is defined ) %} | ||
origin_contact_points:{{ origin_contact_points }} | ||
{% if ( origin_port is defined ) %} | ||
origin_port:{{ origin_port }} | ||
{% endif %} | ||
{% elif ( ( origin_scb_downloaded is defined and origin_scb_downloaded == 'success' ) or ( origin_scb_provided is defined and origin_scb_provided == 'success' ) )%} | ||
origin_secure_connect_bundle_path:{{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/origin_scb.zip | ||
{% endif %} | ||
{% if ( origin_local_datacenter is defined ) %} | ||
origin_local_datacenter:{{ origin_local_datacenter }} | ||
{% endif %} | ||
|
||
{% if ( target_contact_points is defined ) %} | ||
target_contact_points:{{ target_contact_points }} | ||
{% if ( target_port is defined ) %} | ||
target_port:{{ target_port }} | ||
{% endif %} | ||
{% elif ( target_scb_downloaded is defined and target_scb_downloaded == 'success' ) or ( target_scb_provided is defined and target_scb_provided == 'success' ) %} | ||
target_secure_connect_bundle_path:{{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/target_scb.zip | ||
{% endif %} | ||
{% if ( target_local_datacenter is defined ) %} | ||
target_local_datacenter:{{ target_local_datacenter }} | ||
{% endif %} | ||
|
||
proxy_listen_address:{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }} | ||
proxy_listen_port:{{ zdm_proxy_listen_port }} | ||
|
||
metrics_address:{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }} | ||
metrics_port:{{ metrics_port }} | ||
|
||
{% if ( origin_tls_user_dir_path is defined and origin_tls_server_ca_filename is defined ) %} | ||
origin_tls_server_ca_path:{{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ origin_tls_dest_dir_name }}/{{ origin_tls_server_ca_filename }} | ||
{% endif %} | ||
{% if ( origin_tls_user_dir_path is defined and origin_tls_client_cert_filename is defined ) %} | ||
origin_tls_client_cert_path:{{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ origin_tls_dest_dir_name }}/{{ origin_tls_client_cert_filename }} | ||
{% endif %} | ||
{% if ( origin_tls_user_dir_path is defined and origin_tls_client_key_filename is defined ) %} | ||
origin_tls_client_key_path:{{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ origin_tls_dest_dir_name }}/{{ origin_tls_client_key_filename }} | ||
{% endif %} | ||
|
||
{% if ( target_tls_user_dir_path is defined and target_tls_server_ca_filename is defined ) %} | ||
target_tls_server_ca_path:{{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ target_tls_dest_dir_name }}/{{ target_tls_server_ca_filename }} | ||
{% endif %} | ||
{% if ( target_tls_user_dir_path is defined and target_tls_client_cert_filename is defined ) %} | ||
target_tls_client_cert_path:{{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ target_tls_dest_dir_name }}/{{ target_tls_client_cert_filename }} | ||
{% endif %} | ||
{% if ( target_tls_user_dir_path is defined and target_tls_client_key_filename is defined ) %} | ||
target_tls_client_key_path:{{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ target_tls_dest_dir_name }}/{{ target_tls_client_key_filename }} | ||
{% endif %} | ||
|
||
{% if ( zdm_proxy_tls_user_dir_path is defined and zdm_proxy_tls_ca_filename is defined ) %} | ||
proxy_tls_ca_path:{{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ zdm_proxy_tls_dest_dir_name }}/{{ zdm_proxy_tls_ca_filename }} | ||
{% endif %} | ||
{% if ( zdm_proxy_tls_user_dir_path is defined and zdm_proxy_tls_cert_filename is defined ) %} | ||
proxy_tls_cert_path:{{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ zdm_proxy_tls_dest_dir_name }}/{{ zdm_proxy_tls_cert_filename }} | ||
{% endif %} | ||
{% if ( zdm_proxy_tls_user_dir_path is defined and zdm_proxy_tls_key_filename is defined ) %} | ||
proxy_tls_key_path:{{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ zdm_proxy_tls_dest_dir_name }}/{{ zdm_proxy_tls_key_filename }} | ||
{% endif %} | ||
{% if ( zdm_proxy_tls_require_client_auth is defined ) %} | ||
proxy_tls_require_client_auth:{{ zdm_proxy_tls_require_client_auth }} | ||
{% endif %} | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#jinja2: lstrip_blocks: "True", trim_blocks: "True" | ||
|
||
{% if ( primary_cluster is defined ) %} | ||
primary_cluster:{{ primary_cluster }} | ||
{% endif %} | ||
|
||
{% if ( read_mode is defined ) %} | ||
read_mode:{{ read_mode }} | ||
{% endif %} | ||
|
||
{% if ( log_level is defined ) %} | ||
log_level:{{ log_level }} | ||
{% endif %} | ||
|
||
{% if ( zdm_proxy_max_clients_connections is defined ) %} | ||
proxy_max_client_connections:{{ zdm_proxy_max_clients_connections }} | ||
{% endif %} | ||
|
||
{% if ( zdm_proxy_request_timeout_ms is defined ) %} | ||
proxy_request_timeout_ms:{{ zdm_proxy_request_timeout_ms }} | ||
{% endif %} | ||
{% if ( origin_connection_timeout_ms is defined ) %} | ||
origin_connection_timeout_ms:{{ origin_connection_timeout_ms }} | ||
{% endif %} | ||
{% if ( target_connection_timeout_ms is defined ) %} | ||
target_connection_timeout_ms:{{ target_connection_timeout_ms }} | ||
{% endif %} | ||
{% if ( async_handshake_timeout_ms is defined ) %} | ||
async_handshake_timeout_ms:{{ async_handshake_timeout_ms }} | ||
{% endif %} | ||
{% if ( heartbeat_interval_ms is defined ) %} | ||
heartbeat_interval_ms:{{ heartbeat_interval_ms }} | ||
{% endif %} | ||
{% if ( zdm_proxy_max_stream_ids is defined ) %} | ||
proxy_max_stream_ids:{{ zdm_proxy_max_stream_ids }} | ||
{% endif %} | ||
|
||
{% if ( metrics_enabled is defined ) %} | ||
metrics_enabled:{{ metrics_enabled }} | ||
{% endif %} | ||
|
||
{% if ( system_queries_mode is defined ) %} | ||
system_queries_mode:{{ system_queries_mode }} | ||
{% endif %} | ||
|
||
{% if ( replace_cql_functions is defined ) %} | ||
replace_cql_functions:{{ replace_cql_functions }} | ||
{% endif %} | ||
|
||
{% if ( forward_client_credentials_to_origin is defined ) %} | ||
forward_client_credentials_to_origin:{{ forward_client_credentials_to_origin }} | ||
{% endif %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters