File tree Expand file tree Collapse file tree 10 files changed +47
-17
lines changed Expand file tree Collapse file tree 10 files changed +47
-17
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
3
- - hosts : clusterNodes
3
+ - hosts : clusterNodes:clusterAddNodes
4
4
gather_facts : true
5
5
become : true
6
6
tasks :
Original file line number Diff line number Diff line change 2
2
3
3
collections :
4
4
- name : ' community.general'
5
- version : ' 2.5.1 '
5
+ version : ' 3.1.0 '
6
6
- name : ' amazon.aws'
7
- version : ' 1.4.1 '
7
+ version : ' 1.5.0 '
8
8
- name : ' community.aws'
9
- version : ' 1.4 .0'
9
+ version : ' 1.5 .0'
10
10
- name : ' ansible.posix'
11
11
version : ' 1.2.0'
Original file line number Diff line number Diff line change @@ -6,12 +6,18 @@ ansible_become=true
6
6
ansible_ssh_private_key_file =~/.ssh/davinder-rnd-terraform.pem
7
7
8
8
[clusterNodes]
9
- 3.239.238.66
9
+ 18.214.25.118
10
10
11
11
[clusterAddNodes]
12
+ 54.84.131.96
12
13
13
14
[clusterRemoveNodes]
15
+ 54.84.131.96
16
+ 18.214.25.118
14
17
15
18
[kafka-mirror-maker]
16
19
17
20
[kafka-mirror-maker-remove-nodes]
21
+
22
+ [kafka-manager]
23
+ 54.84.131.96
Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ kafkaZookeeperConnectionTimeoutMs: 10000
31
31
# please use name like <environment>-kafka, so it get distinct name in NewRelic
32
32
kafkaClusterName : development-kafka
33
33
34
- kafkaVersion : 2.6 .0
34
+ kafkaVersion : 2.8 .0
35
35
kafkaScalaVersion : 2.13
36
36
kafkaTarLocation : " /home/dpal/Downloads/kafka_{{ kafkaScalaVersion }}-{{ kafkaVersion }}.tgz"
37
37
38
38
# below will be used while decommission/downgrade only
39
- kafkaOldVersion : 2.5 .0
39
+ kafkaOldVersion : 2.7 .0
40
40
kafkaOldScalaVersion : 2.13
41
41
42
42
# ## Production Optimization Parameters
@@ -68,6 +68,6 @@ kafkaGroupInitRebalanceDelayMs: 3
68
68
69
69
# Only for AWS Based Cluster
70
70
aws_kafka_ec2_region : " us-east-1"
71
- aws_kafka_ebs_device : " /dev/xvdc "
71
+ aws_kafka_ebs_device : " /dev/nvme1n1 "
72
72
aws_kafka_ebs_device_fs : " xfs" # currently tested with xfs only.
73
73
aws_kafka_ebs_device_mount_location : " {{ kafkaInstallDir }}"
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ kafkaManagerInstallDir: /opt
4
4
kafkaManagerVersion : 3.0.0.5
5
5
kafkaManagerDownloadLink : " https://github.com/yahoo/CMAK/releases/download/{{ kafkaManagerVersion }}/cmak-{{ kafkaManagerVersion }}.zip"
6
6
# if you don't want to download with ansible
7
- kafkaManagerRemoteDownload : yes
7
+ kafkaManagerRemoteDownload : true
8
8
kafkaManagerLocalLink : " /tmp/ansible-server/cmak-{{ kafkaManagerVersion }}.zip"
9
9
10
10
kafkaManagerZkHosts : " 10.0.0.1:2181,10.0.0.2:2181,10.0.0.3:2181"
Original file line number Diff line number Diff line change 2
2
ansible.builtin.file :
3
3
path : " {{ kafkaInstallDir }}/jmxMonitor"
4
4
state : directory
5
+ owner : " {{ kafkaUser }}"
6
+ group : " {{ kafkaGroup }}"
5
7
6
8
- name : copying script and input files
7
9
ansible.builtin.copy :
8
10
src : " {{ item }}"
9
11
dest : " {{ kafkaInstallDir }}/jmxMonitor/{{ item }}"
12
+ owner : " {{ kafkaUser }}"
13
+ group : " {{ kafkaGroup }}"
10
14
loop :
11
15
- kafka-consumer-group-metric.py
12
16
- kafka-consumer-group-metric-input.txt
17
21
minute : " *"
18
22
hour : " *"
19
23
weekday : " *"
20
- user : root
24
+ user : " {{ kafkaUser }} "
21
25
job : ' python3 {{ kafkaInstallDir }}/jmxMonitor/kafka-consumer-group-metric.py {{ kafkaInstallDir }}/jmxMonitor/kafka-consumer-group-metric-input.txt {{ kafkaLogDir }}/ {{ kafkaClusterName }}'
Original file line number Diff line number Diff line change 4
4
ansible.builtin.file :
5
5
path : " {{ kafkaInstallDir }}/jmxMonitor"
6
6
state : directory
7
+ owner : " {{ kafkaUser }}"
8
+ group : " {{ kafkaGroup }}"
7
9
8
10
- name : copying script and input files
9
11
ansible.builtin.copy :
10
12
src : " {{ item }}"
11
13
dest : " {{ kafkaInstallDir }}/jmxMonitor/{{ item }}"
14
+ owner : " {{ kafkaUser }}"
15
+ group : " {{ kafkaGroup }}"
12
16
loop :
13
17
- kafka-jmx-metric-collector-mm.py
14
18
- kafka-mirror-input.txt
19
23
minute : " *"
20
24
hour : " *"
21
25
weekday : " *"
22
- user : root
26
+ user : " {{ kafkaUser }} "
23
27
job : ' find /bin/ -name "python3*m" -print0 -exec {} {{ kafkaInstallDir }}/jmxMonitor/kafka-jmx-metric-collector-mm.py {{ ansible_fqdn }} {{ kafkaMirrorMakerJmxInitialPort + item }} {{ kafkaInstallDir }}/jmxMonitor/kafka-mirror-input.txt {{ kafkaLogDir }}/Kafka-Mirror-Maker-Process-{{ item }}- {{ kafkaClusterName }} Kafka-Mirror-Maker-Process-{{ item }} \;'
24
28
loop : " {{ range(1, kafkaMirrorMakerProcessCountPerNode + 1, 1) | list }}"
Original file line number Diff line number Diff line change 4
4
ansible.builtin.file :
5
5
path : " {{ kafkaInstallDir }}/jmxMonitor"
6
6
state : directory
7
+ owner : " {{ kafkaUser }}"
8
+ group : " {{ kafkaGroup }}"
7
9
8
10
- name : copying script and input files
9
11
ansible.builtin.copy :
10
12
src : " {{ item }}"
11
13
dest : " {{ kafkaInstallDir }}/jmxMonitor/{{ item }}"
14
+ owner : " {{ kafkaUser }}"
15
+ group : " {{ kafkaGroup }}"
12
16
loop :
13
17
- kafka-jmx-metric-collector.py
14
18
- kafka-input.txt
19
23
minute : " *"
20
24
hour : " *"
21
25
weekday : " *"
22
- user : root
26
+ user : " {{ kafkaUser }} "
23
27
job : ' find /bin/ -name "python3*m" -print0 -exec {} {{ kafkaInstallDir }}/jmxMonitor/kafka-jmx-metric-collector.py {{ ansible_fqdn }} {{ kafkaJmxPort }} {{ kafkaInstallDir }}/jmxMonitor/kafka-input.txt {{ kafkaLogDir }}/ {{ kafkaClusterName }} \;'
Original file line number Diff line number Diff line change 1
1
---
2
2
3
- - name : copy and unarchive kafka manager | {{ kafkaManagerVersion }}
3
+ - name : copy and unarchive kafka manager | {{ kafkaManagerVersion }} | Remote Download
4
4
ansible.builtin.unarchive :
5
5
src : " {{ kafkaManagerDownloadLink }}"
6
6
dest : " {{ kafkaManagerInstallDir }}"
7
7
owner : " {{ kafkaUser }}"
8
8
group : " {{ kafkaGroup }}"
9
9
validate_certs : false
10
10
keep_newer : yes
11
- remote_src : " {{ kafkaManagerRemoteDownload }} "
11
+ remote_src : true
12
12
creates : " {{ kafkaManagerInstallDir }}/cmak-{{ kafkaManagerVersion }}/bin"
13
+ when : kafkaManagerRemoteDownload
14
+
15
+ - name : copy and unarchive kafka | {{ kafkaManagerVersion }} | Local Upload
16
+ ansible.builtin.unarchive :
17
+ src : " {{ kafkaManagerLocalLink }}"
18
+ dest : " {{ kafkaManagerInstallDir }}"
19
+ owner : " {{ kafkaUser }}"
20
+ group : " {{ kafkaGroup }}"
21
+ validate_certs : false
22
+ keep_newer : yes
23
+ creates : " {{ kafkaManagerInstallDir }}/cmak-{{ kafkaManagerVersion }}/bin"
24
+ when : not kafkaManagerRemoteDownload
13
25
14
26
- name : Ensuring permissions on unarchieved files
15
27
ansible.builtin.file :
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ variable "allowed_inbound_client_cidrs" {
39
39
40
40
variable "instance_type" {
41
41
type = string
42
- default = " t2.micro "
42
+ default = " t3a.xlarge "
43
43
description = " Instance Type"
44
44
}
45
45
@@ -51,7 +51,7 @@ variable "key_name" {
51
51
52
52
variable "kafka_nodes" {
53
53
type = number
54
- default = 1
54
+ default = 2
55
55
description = " how many nodes of kafka cluster is required?"
56
56
}
57
57
@@ -86,4 +86,4 @@ variable "tags" {
86
86
" owner" = " Terraform"
87
87
" software" = " Apache Kafka"
88
88
}
89
- }
89
+ }
You can’t perform that action at this time.
0 commit comments