Important
You are viewing documentation for an older version of Confluent Platform. For the latest, click here.
Advance Deployments with Ansible Playbooks for Confluent Platform¶
This section provides information about various deployment configurations for Confluent Platform using Ansible.
Deploy Confluent Platform across multiple regions¶
To configure multi region clusters, use the following properties in the hosts.yml
inventory file:
replica.selector.class
sets on all brokersbroker.rack
uniquely sets on each host
For example:
kafka_broker:
vars:
kafka_broker:
properties:
replica.selector.class: org.apache.kafka.common.replica.RackAwareReplicaSelector
kafka_broker:
hosts:
ip-192-24-10-207.us-west.compute.internal:
broker_id: 1
kafka_broker:
properties:
broker.rack: us-west-2a
ip-192-24-5-30.us-west.compute.internal:
broker_id: 2
kafka_broker:
properties:
broker.rack: us-west-2b
ip-192-24-10-0.us-west.compute.internal:
broker_id: 3
kafka_broker:
properties:
broker.rack: us-west-2a
You can apply the kafka_broker
properties directly within the kafka_broker
group as well.
Configure multiple ksqlDB clusters¶
To configure multiple ksqlDB clusters, create new groups for each cluster and set them as children of the ksqlDB group.
The Ansible groups cannot be named ksql
.
The name of these groups determine how each cluster is named in Control Center.
Each ksqlDB cluster needs a unique value for the ksql_service_id
property. By
convention, the service ID should end with an underscore.
For example:
ksql1:
vars:
ksql_service_id: ksql1_
hosts:
ip-172-31-34-15.us-east-2.compute.internal:
ip-172-31-37-16.us-east-2.compute.internal:
ksql2:
vars:
ksql_service_id: ksql2_
hosts:
ip-172-31-34-17.us-east-2.compute.internal:
ip-172-31-37-18.us-east-2.compute.internal:
ksql:
children:
ksql1:
ksql2:
To configure Control Center for multiple ksqlDB clusters, set the
ksql_cluster_ansible_group_names
property to a list of all ksqlDB children
groups.
For example:
control_center:
hosts:
ip-172-31-37-15.us-east-2.compute.internal:
vars:
ksql_cluster_ansible_group_names:
- ksql1
- ksql2
Configure multiple Connect clusters¶
To configure multiple Connect clusters, create a new group for each cluster
and set it as children of the kafka_connect
group.
The Ansible groups cannot be named kafka_connect
.
Each connect cluster needs a unique value for the kafka_connect_group_id
property. The value of kafka_connect_group_id
will be the name of the
connect cluster within Control Center.
For example:
syslog:
vars:
kafka_connect_group_id: connect_syslog
hosts:
ip-172-31-34-246.us-east-2.compute.internal:
elastic:
vars:
kafka_connect_group_id: connect-elastic
hosts:
ip-172-31-34-246.us-east-2.compute.internal:
kafka_connect:
children:
syslog:
Elastic:
To configure Control Center for multiple connect clusters, set the
kafka_connect_cluster_ansible_group_names
property to a list of all
kafka_connect
children groups.
For example:
control_center:
hosts:
ip-172-31-37-15.us-east-2.compute.internal:
vars:
kafka_connect_cluster_ansible_group_names:
- syslog
- elastic