Skip to content

Commit 8343d86

Browse files
authored
Merge pull request #2425 from confluentinc/pr_merge_from_8_1_x_to_8_2_x
Merge Conflict Resolution (from 8.1.x to 8.2.x)
2 parents 7bf1be1 + 9c3541d commit 8343d86

File tree

14 files changed

+219
-69
lines changed

14 files changed

+219
-69
lines changed

docs/VARIABLES.md

Lines changed: 60 additions & 53 deletions
Large diffs are not rendered by default.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
##
3+
## The following is an example inventory file for deploying Confluent Platform
4+
## using AWS Systems Manager (SSM) as the connection method with hostname aliasing enabled.
5+
##
6+
## For full SSM setup details, prerequisites, and configuration, see:
7+
## https://docs.confluent.io/ansible/7.9/ansible-prepare.html#manage-connections-to-cp-hosts
8+
##
9+
## When using SSM, ansible_host must contain the EC2 Instance ID for SSM to connect.
10+
## Since hostname_aliasing_enabled uses ansible_host as a fallback for resolving
11+
## the internal hostname, you must explicitly set the "hostname" variable on each host
12+
## to the actual network address (FQDN or IP) so that Confluent Platform components
13+
## can communicate with each other correctly.
14+
##
15+
## Resolution order when hostname_aliasing_enabled is true:
16+
## 1. hostname (host variable)
17+
## 2. ansible_host (fallback - but this is the Instance ID with SSM, so don't rely on it)
18+
## 3. inventory_hostname (final fallback)
19+
##
20+
## Usage:
21+
## ansible-playbook -i docs/sample_inventories/ssm/ssm_hostname_aliasing.yml confluent.platform.all
22+
23+
all:
24+
vars:
25+
## SSM Connection Settings
26+
ansible_connection: amazon.aws.aws_ssm
27+
ansible_aws_ssm_region: "us-east-2"
28+
ansible_aws_ssm_bucket_name: "cp-ansible-ssm-staging-bucket"
29+
ansible_become: true
30+
31+
## Enable hostname aliasing so that the "hostname" variable is used
32+
## for internal CP component addressing instead of ansible_host (which holds the Instance ID).
33+
hostname_aliasing_enabled: true
34+
35+
kafka_controller:
36+
hosts:
37+
kc1:
38+
ansible_host: i-0a1b2c3d4e5f60001
39+
hostname: ip-172-31-10-101.us-east-2.compute.internal
40+
kc2:
41+
ansible_host: i-0a1b2c3d4e5f60002
42+
hostname: ip-172-31-10-102.us-east-2.compute.internal
43+
kc3:
44+
ansible_host: i-0a1b2c3d4e5f60003
45+
hostname: ip-172-31-10-103.us-east-2.compute.internal
46+
47+
kafka_broker:
48+
hosts:
49+
kb1:
50+
ansible_host: i-0a1b2c3d4e5f60004
51+
hostname: ip-172-31-10-104.us-east-2.compute.internal
52+
kb2:
53+
ansible_host: i-0a1b2c3d4e5f60005
54+
hostname: ip-172-31-10-105.us-east-2.compute.internal
55+
kb3:
56+
ansible_host: i-0a1b2c3d4e5f60006
57+
hostname: ip-172-31-10-106.us-east-2.compute.internal
58+
59+
schema_registry:
60+
hosts:
61+
sr1:
62+
ansible_host: i-0a1b2c3d4e5f60007
63+
hostname: ip-172-31-10-107.us-east-2.compute.internal
64+
65+
kafka_connect:
66+
hosts:
67+
kc-connect1:
68+
ansible_host: i-0a1b2c3d4e5f60008
69+
hostname: ip-172-31-10-108.us-east-2.compute.internal
70+
71+
kafka_rest:
72+
hosts:
73+
kr1:
74+
ansible_host: i-0a1b2c3d4e5f60009
75+
hostname: ip-172-31-10-109.us-east-2.compute.internal
76+
77+
ksql:
78+
hosts:
79+
ksql1:
80+
ansible_host: i-0a1b2c3d4e5f60010
81+
hostname: ip-172-31-10-110.us-east-2.compute.internal
82+
83+
control_center_next_gen:
84+
hosts:
85+
c3ng1:
86+
ansible_host: i-0a1b2c3d4e5f60011
87+
hostname: ip-172-31-10-111.us-east-2.compute.internal
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
##
3+
## The following is an example inventory file for deploying Confluent Platform
4+
## using AWS Systems Manager (SSM) as the connection method without hostname aliasing.
5+
##
6+
## For full SSM setup details, prerequisites, and configuration, see:
7+
## https://docs.confluent.io/ansible/7.9/ansible-prepare.html#manage-connections-to-cp-hosts
8+
##
9+
## When hostname_aliasing_enabled is false (default), the resolve_hostname filter
10+
## returns inventory_hostname. Therefore, the inventory hostname must be the actual
11+
## network address (FQDN) of the EC2 instance, and ansible_host holds the Instance ID
12+
## for SSM to connect.
13+
##
14+
## Usage:
15+
## ansible-playbook -i docs/sample_inventories/ssm/ssm_without_hostname_aliasing.yml confluent.platform.all
16+
17+
all:
18+
vars:
19+
## SSM Connection Settings
20+
ansible_connection: amazon.aws.aws_ssm
21+
ansible_aws_ssm_region: "us-east-2"
22+
ansible_aws_ssm_bucket_name: "cp-ansible-ssm-staging-bucket"
23+
ansible_become: true
24+
25+
kafka_controller:
26+
hosts:
27+
ip-172-31-10-101.us-east-2.compute.internal:
28+
ansible_host: i-0a1b2c3d4e5f60001
29+
ip-172-31-10-102.us-east-2.compute.internal:
30+
ansible_host: i-0a1b2c3d4e5f60002
31+
ip-172-31-10-103.us-east-2.compute.internal:
32+
ansible_host: i-0a1b2c3d4e5f60003
33+
34+
kafka_broker:
35+
hosts:
36+
ip-172-31-10-104.us-east-2.compute.internal:
37+
ansible_host: i-0a1b2c3d4e5f60004
38+
ip-172-31-10-105.us-east-2.compute.internal:
39+
ansible_host: i-0a1b2c3d4e5f60005
40+
ip-172-31-10-106.us-east-2.compute.internal:
41+
ansible_host: i-0a1b2c3d4e5f60006
42+
43+
schema_registry:
44+
hosts:
45+
ip-172-31-10-107.us-east-2.compute.internal:
46+
ansible_host: i-0a1b2c3d4e5f60007
47+
48+
kafka_connect:
49+
hosts:
50+
ip-172-31-10-108.us-east-2.compute.internal:
51+
ansible_host: i-0a1b2c3d4e5f60008
52+
53+
kafka_rest:
54+
hosts:
55+
ip-172-31-10-109.us-east-2.compute.internal:
56+
ansible_host: i-0a1b2c3d4e5f60009
57+
58+
ksql:
59+
hosts:
60+
ip-172-31-10-110.us-east-2.compute.internal:
61+
ansible_host: i-0a1b2c3d4e5f60010
62+
63+
control_center_next_gen:
64+
hosts:
65+
ip-172-31-10-111.us-east-2.compute.internal:
66+
ansible_host: i-0a1b2c3d4e5f60011

roles/common/tasks/cert_principal_extract.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Extract DNAME from line
77
# Remove spaces after commas
88
shell: |
9-
set -o pipefail
109
keytool -list -keystore {{keystore_path}} \
1110
-storepass {{keystore_storepass}} \
1211
{% if fips_enabled|bool and ('kafka_controller' in group_names or 'kafka_broker' in group_names) %}

roles/common/tasks/config_validations.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
- name: Retrieve SSL public key hash from private key on Local Host
1919
shell:
20-
cmd: set -o pipefail; openssl pkey -pubout | openssl sha256
20+
cmd: openssl pkey -pubout | openssl sha256
2121
stdin: "{{ lookup('file', ssl_key_filepath) }}"
2222
executable: "{{ shell_executable }}"
2323
register: key_hash_local
@@ -45,7 +45,7 @@
4545

4646
- name: Retrieve SSL public key Hash from private key on Remote Host
4747
shell:
48-
cmd: set -o pipefail; openssl pkey -pubout | openssl sha256
48+
cmd: openssl pkey -pubout | openssl sha256
4949
stdin: "{{ remote_key['results'][group_idx].content | b64decode }}"
5050
executable: "{{ shell_executable }}"
5151
register: key_hash_remote
@@ -62,7 +62,7 @@
6262

6363
- name: Retrieve SSL public key hash from X509 certificate on Local Host
6464
shell:
65-
cmd: set -o pipefail; openssl x509 -noout -pubkey | openssl sha256
65+
cmd: openssl x509 -noout -pubkey | openssl sha256
6666
stdin: "{{ lookup('file', ssl_signed_cert_filepath) }}"
6767
executable: "{{ shell_executable }}"
6868
register: cert_hash_local
@@ -90,7 +90,7 @@
9090

9191
- name: Retrieve SSL public key hash from X509 certificate on Remote Host
9292
shell:
93-
cmd: set -o pipefail; openssl x509 -noout -pubkey | openssl sha256
93+
cmd: openssl x509 -noout -pubkey | openssl sha256
9494
stdin: "{{ remote_cert['results'][group_idx].content | b64decode }}"
9595
executable: "{{ shell_executable }}"
9696
register: cert_hash_remote

roles/common/tasks/masterkey.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
- name: Generate Master Encryption Key and File
99
tags: masterkey
1010
shell: |
11-
set -o pipefail
1211
{{ confluent_cli_path }} secret master-key generate \
1312
--local-secrets-file /tmp/security.properties \
1413
--passphrase @/tmp/passphrase.txt | awk '/Master/{print $5}'

roles/control_center_next_gen/tasks/health_check.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,7 @@
145145
- validation
146146

147147
- name: Validate Cron Jobs for Logrotate
148-
shell: |
149-
set -o pipefail
150-
crontab -l | grep -c "{{ item }}"
148+
shell: crontab -l | grep -c "{{ item }}"
151149
args:
152150
executable: "{{ shell_executable }}"
153151
register: logrotate_cron_validation

roles/kafka_broker/tasks/set_principal.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
# Extract DNAME from line
2727
# Remove spaces after commas
2828
shell: |
29-
set -o pipefail
3029
keytool -list -keystore {{kb_keystore_path}} \
3130
-storepass {{kb_keystore_storepass}} \
3231
{% if fips_enabled|bool %}

roles/kafka_controller/tasks/health_check.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#Registers LEO of controllers only if Metadata Quorum passed in the above task
4040
- name: Register LogEndOffset
4141
shell: |
42-
set -o pipefail
4342
{{ binary_base_path }}/bin/kafka-metadata-quorum --bootstrap-{{bootstrap_server_or_controller}} {{server_hostname}}:{{server_port}} \
4443
--command-config {{kafka_controller.client_config_file}} describe --replication | grep -v Observer | awk '{print $3}'
4544
args:

roles/kafka_controller/tasks/set_principal.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
# Extract DNAME from line
2727
# Remove spaces after commas
2828
shell: |
29-
set -o pipefail
3029
keytool -list -keystore {{kc_keystore_path}} \
3130
-storepass {{kc_keystore_storepass}} \
3231
{% if fips_enabled|bool %}

0 commit comments

Comments
 (0)