mirror of
https://bitbucket.org/atlassian-docker/docker-atlassian-confluence-server.git
synced 2024-08-30 18:22:16 +00:00
DCD-558: Add support for TCP and multicast clustering.
This commit is contained in:
parent
e1fc7fe9c6
commit
4507378340
@ -38,18 +38,25 @@
|
||||
|
||||
{% if atl_cluster_type is defined %}
|
||||
<property name="confluence.cluster">true</property>
|
||||
<property name="confluence.cluster.join.type">{{ atl_cluster_type }}</property>
|
||||
<property name="confluence.cluster.name">{{ atl_cluster_name }}</property>
|
||||
<property name="confluence.cluster.home">{{ atl_product_home_shared }}</property>
|
||||
<property name="shared-home">{{ atl_product_home_shared }}</property>
|
||||
|
||||
<property name="confluence.cluster.join.type">{{ atl_cluster_type }}</property>
|
||||
{% if atl_cluster_type == 'aws' %}
|
||||
<property name="confluence.cluster.aws.iam.role">{{ atl_hazelcast_network_aws_iam_role }}</property>
|
||||
<property name="confluence.cluster.aws.region">{{ atl_hazelcast_network_aws_iam_region }}</property>
|
||||
<property name="confluence.cluster.aws.host.header">{{ atl_hazelcast_network_aws_host_header }}</property>
|
||||
<property name="confluence.cluster.aws.tag.key">{{ atl_hazelcast_network_aws_tag_key }}</property>
|
||||
<property name="confluence.cluster.aws.tag.value">{{ atl_hazelcast_network_aws_tag_value }}</property>
|
||||
<property name="confluence.cluster.name">{{ atl_cluster_name }}</property>
|
||||
<property name="confluence.cluster.ttl">{{ atl_cluster_ttl }}</property>
|
||||
|
||||
{% elif atl_cluster_type == 'tcp_ip' %}
|
||||
<property name="confluence.cluster.peers">{{ atl_cluster_peers }}</property>
|
||||
|
||||
{% elif atl_cluster_type == 'multicast' %}
|
||||
<property name="confluence.cluster.address">{{ atl_cluster_address }}</property>
|
||||
<property name="confluence.cluster.ttl">{{ atl_cluster_ttl }}</property>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
@ -267,3 +267,35 @@ def test_confluence_xml_cluster_aws(docker_cli, image):
|
||||
assert xml.xpath('//property[@name="confluence.cluster.aws.tag.value"]')[0].text == "atl_hazelcast_network_aws_tag_value"
|
||||
assert xml.xpath('//property[@name="confluence.cluster.name"]')[0].text == "atl_cluster_name"
|
||||
assert xml.xpath('//property[@name="confluence.cluster.ttl"]')[0].text == "atl_cluster_ttl"
|
||||
|
||||
def test_confluence_xml_cluster_multicast(docker_cli, image):
|
||||
environment = {
|
||||
'ATL_CLUSTER_TYPE': 'multicast',
|
||||
'ATL_CLUSTER_NAME': 'atl_cluster_name',
|
||||
'ATL_CLUSTER_TTL': 'atl_cluster_ttl',
|
||||
'ATL_CLUSTER_ADDRESS': '99.99.99.99'
|
||||
}
|
||||
container = run_image(docker_cli, image, environment=environment)
|
||||
wait_for_file(container, "/var/atlassian/application-data/confluence/confluence.cfg.xml")
|
||||
xml = etree.fromstring(container.file('/var/atlassian/application-data/confluence/confluence.cfg.xml').content)
|
||||
|
||||
assert xml.xpath('//property[@name="confluence.cluster"]')[0].text == "true"
|
||||
assert xml.xpath('//property[@name="confluence.cluster.join.type"]')[0].text == "multicast"
|
||||
assert xml.xpath('//property[@name="confluence.cluster.name"]')[0].text == "atl_cluster_name"
|
||||
assert xml.xpath('//property[@name="confluence.cluster.ttl"]')[0].text == "atl_cluster_ttl"
|
||||
assert xml.xpath('//property[@name="confluence.cluster.address"]')[0].text == "99.99.99.99"
|
||||
|
||||
def test_confluence_xml_cluster_tcp(docker_cli, image):
|
||||
environment = {
|
||||
'ATL_CLUSTER_TYPE': 'tcp_ip',
|
||||
'ATL_CLUSTER_PEERS': '1.1.1.1,99.99.99.99',
|
||||
'ATL_CLUSTER_NAME': 'atl_cluster_name',
|
||||
}
|
||||
container = run_image(docker_cli, image, environment=environment)
|
||||
wait_for_file(container, "/var/atlassian/application-data/confluence/confluence.cfg.xml")
|
||||
xml = etree.fromstring(container.file('/var/atlassian/application-data/confluence/confluence.cfg.xml').content)
|
||||
|
||||
assert xml.xpath('//property[@name="confluence.cluster"]')[0].text == "true"
|
||||
assert xml.xpath('//property[@name="confluence.cluster.join.type"]')[0].text == "tcp_ip"
|
||||
assert xml.xpath('//property[@name="confluence.cluster.name"]')[0].text == "atl_cluster_name"
|
||||
assert xml.xpath('//property[@name="confluence.cluster.peers"]')[0].text == "1.1.1.1,99.99.99.99"
|
||||
|
Loading…
Reference in New Issue
Block a user