Skip to content

Commit f07ee90

Browse files
committed
* updated crons
* added support for 2.7.0 * added support for 2.8.0 * updated ansible collections
1 parent 53f90eb commit f07ee90

File tree

10 files changed

+47
-17
lines changed

10 files changed

+47
-17
lines changed

clusterAwsPreSetup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22

3-
- hosts: clusterNodes
3+
- hosts: clusterNodes:clusterAddNodes
44
gather_facts: true
55
become: true
66
tasks:

collections.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
collections:
44
- name: 'community.general'
5-
version: '2.5.1'
5+
version: '3.1.0'
66
- name: 'amazon.aws'
7-
version: '1.4.1'
7+
version: '1.5.0'
88
- name: 'community.aws'
9-
version: '1.4.0'
9+
version: '1.5.0'
1010
- name: 'ansible.posix'
1111
version: '1.2.0'

inventory/development/cluster-aws.ini

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,18 @@ ansible_become=true
66
ansible_ssh_private_key_file=~/.ssh/davinder-rnd-terraform.pem
77

88
[clusterNodes]
9-
3.239.238.66
9+
18.214.25.118
1010

1111
[clusterAddNodes]
12+
54.84.131.96
1213

1314
[clusterRemoveNodes]
15+
54.84.131.96
16+
18.214.25.118
1417

1518
[kafka-mirror-maker]
1619

1720
[kafka-mirror-maker-remove-nodes]
21+
22+
[kafka-manager]
23+
54.84.131.96

inventory/development/group_vars/all.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ kafkaZookeeperConnectionTimeoutMs: 10000
3131
# please use name like <environment>-kafka, so it get distinct name in NewRelic
3232
kafkaClusterName: development-kafka
3333

34-
kafkaVersion: 2.6.0
34+
kafkaVersion: 2.8.0
3535
kafkaScalaVersion: 2.13
3636
kafkaTarLocation: "/home/dpal/Downloads/kafka_{{ kafkaScalaVersion }}-{{ kafkaVersion }}.tgz"
3737

3838
# below will be used while decommission/downgrade only
39-
kafkaOldVersion: 2.5.0
39+
kafkaOldVersion: 2.7.0
4040
kafkaOldScalaVersion: 2.13
4141

4242
### Production Optimization Parameters
@@ -68,6 +68,6 @@ kafkaGroupInitRebalanceDelayMs: 3
6868

6969
# Only for AWS Based Cluster
7070
aws_kafka_ec2_region: "us-east-1"
71-
aws_kafka_ebs_device: "/dev/xvdc"
71+
aws_kafka_ebs_device: "/dev/nvme1n1"
7272
aws_kafka_ebs_device_fs: "xfs" # currently tested with xfs only.
7373
aws_kafka_ebs_device_mount_location: "{{ kafkaInstallDir }}"

inventory/development/group_vars/kafka-manager.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kafkaManagerInstallDir: /opt
44
kafkaManagerVersion: 3.0.0.5
55
kafkaManagerDownloadLink: "https://github.com/yahoo/CMAK/releases/download/{{ kafkaManagerVersion }}/cmak-{{ kafkaManagerVersion }}.zip"
66
# if you don't want to download with ansible
7-
kafkaManagerRemoteDownload: yes
7+
kafkaManagerRemoteDownload: true
88
kafkaManagerLocalLink: "/tmp/ansible-server/cmak-{{ kafkaManagerVersion }}.zip"
99

1010
kafkaManagerZkHosts: "10.0.0.1:2181,10.0.0.2:2181,10.0.0.3:2181"

roles/jmxMonitor/tasks/kafka-consumer-group-metric.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
ansible.builtin.file:
33
path: "{{ kafkaInstallDir }}/jmxMonitor"
44
state: directory
5+
owner: "{{ kafkaUser }}"
6+
group: "{{ kafkaGroup }}"
57

68
- name: copying script and input files
79
ansible.builtin.copy:
810
src: "{{ item }}"
911
dest: "{{ kafkaInstallDir }}/jmxMonitor/{{ item }}"
12+
owner: "{{ kafkaUser }}"
13+
group: "{{ kafkaGroup }}"
1014
loop:
1115
- kafka-consumer-group-metric.py
1216
- kafka-consumer-group-metric-input.txt
@@ -17,5 +21,5 @@
1721
minute: "*"
1822
hour: "*"
1923
weekday: "*"
20-
user: root
24+
user: "{{ kafkaUser }}"
2125
job: 'python3 {{ kafkaInstallDir }}/jmxMonitor/kafka-consumer-group-metric.py {{ kafkaInstallDir }}/jmxMonitor/kafka-consumer-group-metric-input.txt {{ kafkaLogDir }}/ {{ kafkaClusterName }}'

roles/jmxMonitor/tasks/kafka-mirror-maker.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
ansible.builtin.file:
55
path: "{{ kafkaInstallDir }}/jmxMonitor"
66
state: directory
7+
owner: "{{ kafkaUser }}"
8+
group: "{{ kafkaGroup }}"
79

810
- name: copying script and input files
911
ansible.builtin.copy:
1012
src: "{{ item }}"
1113
dest: "{{ kafkaInstallDir }}/jmxMonitor/{{ item }}"
14+
owner: "{{ kafkaUser }}"
15+
group: "{{ kafkaGroup }}"
1216
loop:
1317
- kafka-jmx-metric-collector-mm.py
1418
- kafka-mirror-input.txt
@@ -19,6 +23,6 @@
1923
minute: "*"
2024
hour: "*"
2125
weekday: "*"
22-
user: root
26+
user: "{{ kafkaUser }}"
2327
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 }} \;'
2428
loop: "{{ range(1, kafkaMirrorMakerProcessCountPerNode + 1, 1) | list }}"

roles/jmxMonitor/tasks/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
ansible.builtin.file:
55
path: "{{ kafkaInstallDir }}/jmxMonitor"
66
state: directory
7+
owner: "{{ kafkaUser }}"
8+
group: "{{ kafkaGroup }}"
79

810
- name: copying script and input files
911
ansible.builtin.copy:
1012
src: "{{ item }}"
1113
dest: "{{ kafkaInstallDir }}/jmxMonitor/{{ item }}"
14+
owner: "{{ kafkaUser }}"
15+
group: "{{ kafkaGroup }}"
1216
loop:
1317
- kafka-jmx-metric-collector.py
1418
- kafka-input.txt
@@ -19,5 +23,5 @@
1923
minute: "*"
2024
hour: "*"
2125
weekday: "*"
22-
user: root
26+
user: "{{ kafkaUser }}"
2327
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 }} \;'

roles/kafka-manager/tasks/main.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
---
22

3-
- name: copy and unarchive kafka manager | {{ kafkaManagerVersion }}
3+
- name: copy and unarchive kafka manager | {{ kafkaManagerVersion }} | Remote Download
44
ansible.builtin.unarchive:
55
src: "{{ kafkaManagerDownloadLink }}"
66
dest: "{{ kafkaManagerInstallDir }}"
77
owner: "{{ kafkaUser }}"
88
group: "{{ kafkaGroup }}"
99
validate_certs: false
1010
keep_newer: yes
11-
remote_src: "{{ kafkaManagerRemoteDownload }}"
11+
remote_src: true
1212
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
1325

1426
- name: Ensuring permissions on unarchieved files
1527
ansible.builtin.file:

terraform/aws/var.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ variable "allowed_inbound_client_cidrs" {
3939

4040
variable "instance_type" {
4141
type = string
42-
default = "t2.micro"
42+
default = "t3a.xlarge"
4343
description = "Instance Type"
4444
}
4545

@@ -51,7 +51,7 @@ variable "key_name" {
5151

5252
variable "kafka_nodes" {
5353
type = number
54-
default = 1
54+
default = 2
5555
description = "how many nodes of kafka cluster is required?"
5656
}
5757

@@ -86,4 +86,4 @@ variable "tags" {
8686
"owner" = "Terraform"
8787
"software" = "Apache Kafka"
8888
}
89-
}
89+
}

0 commit comments

Comments
 (0)