@techwavedev/agi-agent-kit 1.1.7 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @techwavedev/agi-agent-kit might be problematic. Click here for more details.

Files changed (111) hide show
  1. package/CHANGELOG.md +82 -1
  2. package/README.md +190 -12
  3. package/bin/init.js +30 -2
  4. package/package.json +6 -3
  5. package/templates/base/AGENTS.md +54 -23
  6. package/templates/base/README.md +325 -0
  7. package/templates/base/directives/memory_integration.md +95 -0
  8. package/templates/base/execution/memory_manager.py +309 -0
  9. package/templates/base/execution/session_boot.py +218 -0
  10. package/templates/base/execution/session_init.py +320 -0
  11. package/templates/base/skill-creator/SKILL_skillcreator.md +23 -36
  12. package/templates/base/skill-creator/scripts/init_skill.py +18 -135
  13. package/templates/skills/ec/README.md +31 -0
  14. package/templates/skills/ec/aws/SKILL.md +1020 -0
  15. package/templates/skills/ec/aws/defaults.yaml +13 -0
  16. package/templates/skills/ec/aws/references/common_patterns.md +80 -0
  17. package/templates/skills/ec/aws/references/mcp_servers.md +98 -0
  18. package/templates/skills/ec/aws-terraform/SKILL.md +349 -0
  19. package/templates/skills/ec/aws-terraform/references/best_practices.md +394 -0
  20. package/templates/skills/ec/aws-terraform/references/checkov_reference.md +337 -0
  21. package/templates/skills/ec/aws-terraform/scripts/configure_mcp.py +150 -0
  22. package/templates/skills/ec/confluent-kafka/SKILL.md +655 -0
  23. package/templates/skills/ec/confluent-kafka/references/ansible_playbooks.md +792 -0
  24. package/templates/skills/ec/confluent-kafka/references/ec_deployment.md +579 -0
  25. package/templates/skills/ec/confluent-kafka/references/kraft_migration.md +490 -0
  26. package/templates/skills/ec/confluent-kafka/references/troubleshooting.md +778 -0
  27. package/templates/skills/ec/confluent-kafka/references/upgrade_7x_to_8x.md +488 -0
  28. package/templates/skills/ec/confluent-kafka/scripts/kafka_health_check.py +435 -0
  29. package/templates/skills/ec/confluent-kafka/scripts/upgrade_preflight.py +568 -0
  30. package/templates/skills/ec/confluent-kafka/scripts/validate_config.py +455 -0
  31. package/templates/skills/ec/consul/SKILL.md +427 -0
  32. package/templates/skills/ec/consul/references/acl_setup.md +168 -0
  33. package/templates/skills/ec/consul/references/ha_config.md +196 -0
  34. package/templates/skills/ec/consul/references/troubleshooting.md +267 -0
  35. package/templates/skills/ec/consul/references/upgrades.md +213 -0
  36. package/templates/skills/ec/consul/scripts/consul_health_report.py +530 -0
  37. package/templates/skills/ec/consul/scripts/consul_status.py +264 -0
  38. package/templates/skills/ec/consul/scripts/generate_values.py +170 -0
  39. package/templates/skills/ec/documentation/SKILL.md +351 -0
  40. package/templates/skills/ec/documentation/references/best_practices.md +201 -0
  41. package/templates/skills/ec/documentation/scripts/analyze_code.py +307 -0
  42. package/templates/skills/ec/documentation/scripts/detect_changes.py +460 -0
  43. package/templates/skills/ec/documentation/scripts/generate_changelog.py +312 -0
  44. package/templates/skills/ec/documentation/scripts/sync_docs.py +272 -0
  45. package/templates/skills/ec/documentation/scripts/update_skill_docs.py +366 -0
  46. package/templates/skills/ec/gitlab/SKILL.md +529 -0
  47. package/templates/skills/ec/gitlab/references/agent_installation.md +416 -0
  48. package/templates/skills/ec/gitlab/references/api_reference.md +508 -0
  49. package/templates/skills/ec/gitlab/references/gitops_flux.md +465 -0
  50. package/templates/skills/ec/gitlab/references/troubleshooting.md +518 -0
  51. package/templates/skills/ec/gitlab/scripts/generate_agent_values.py +329 -0
  52. package/templates/skills/ec/gitlab/scripts/gitlab_agent_status.py +414 -0
  53. package/templates/skills/ec/jira/SKILL.md +484 -0
  54. package/templates/skills/ec/jira/references/jql_reference.md +148 -0
  55. package/templates/skills/ec/jira/scripts/add_comment.py +91 -0
  56. package/templates/skills/ec/jira/scripts/bulk_log_work.py +124 -0
  57. package/templates/skills/ec/jira/scripts/create_ticket.py +162 -0
  58. package/templates/skills/ec/jira/scripts/get_ticket.py +191 -0
  59. package/templates/skills/ec/jira/scripts/jira_client.py +383 -0
  60. package/templates/skills/ec/jira/scripts/log_work.py +154 -0
  61. package/templates/skills/ec/jira/scripts/search_tickets.py +104 -0
  62. package/templates/skills/ec/jira/scripts/update_comment.py +67 -0
  63. package/templates/skills/ec/jira/scripts/update_ticket.py +161 -0
  64. package/templates/skills/ec/karpenter/SKILL.md +301 -0
  65. package/templates/skills/ec/karpenter/references/ec2nodeclasses.md +421 -0
  66. package/templates/skills/ec/karpenter/references/migration.md +396 -0
  67. package/templates/skills/ec/karpenter/references/nodepools.md +400 -0
  68. package/templates/skills/ec/karpenter/references/troubleshooting.md +359 -0
  69. package/templates/skills/ec/karpenter/scripts/generate_ec2nodeclass.py +187 -0
  70. package/templates/skills/ec/karpenter/scripts/generate_nodepool.py +245 -0
  71. package/templates/skills/ec/karpenter/scripts/karpenter_status.py +359 -0
  72. package/templates/skills/ec/opensearch/SKILL.md +720 -0
  73. package/templates/skills/ec/opensearch/references/ml_neural_search.md +576 -0
  74. package/templates/skills/ec/opensearch/references/operator.md +532 -0
  75. package/templates/skills/ec/opensearch/references/query_dsl.md +532 -0
  76. package/templates/skills/ec/opensearch/scripts/configure_mcp.py +148 -0
  77. package/templates/skills/ec/victoriametrics/SKILL.md +598 -0
  78. package/templates/skills/ec/victoriametrics/references/kubernetes.md +531 -0
  79. package/templates/skills/ec/victoriametrics/references/prometheus_migration.md +333 -0
  80. package/templates/skills/ec/victoriametrics/references/troubleshooting.md +442 -0
  81. package/templates/skills/knowledge/SKILLS_CATALOG.md +274 -4
  82. package/templates/skills/knowledge/intelligent-routing/SKILL.md +237 -164
  83. package/templates/skills/knowledge/parallel-agents/SKILL.md +345 -73
  84. package/templates/skills/knowledge/plugin-discovery/SKILL.md +582 -0
  85. package/templates/skills/knowledge/plugin-discovery/scripts/platform_setup.py +1083 -0
  86. package/templates/skills/knowledge/design-md/README.md +0 -34
  87. package/templates/skills/knowledge/design-md/SKILL.md +0 -193
  88. package/templates/skills/knowledge/design-md/examples/DESIGN.md +0 -154
  89. package/templates/skills/knowledge/notebooklm-mcp/SKILL.md +0 -71
  90. package/templates/skills/knowledge/notebooklm-mcp/assets/example_asset.txt +0 -24
  91. package/templates/skills/knowledge/notebooklm-mcp/references/api_reference.md +0 -34
  92. package/templates/skills/knowledge/notebooklm-mcp/scripts/example.py +0 -19
  93. package/templates/skills/knowledge/react-components/README.md +0 -36
  94. package/templates/skills/knowledge/react-components/SKILL.md +0 -53
  95. package/templates/skills/knowledge/react-components/examples/gold-standard-card.tsx +0 -80
  96. package/templates/skills/knowledge/react-components/package-lock.json +0 -231
  97. package/templates/skills/knowledge/react-components/package.json +0 -16
  98. package/templates/skills/knowledge/react-components/resources/architecture-checklist.md +0 -15
  99. package/templates/skills/knowledge/react-components/resources/component-template.tsx +0 -37
  100. package/templates/skills/knowledge/react-components/resources/stitch-api-reference.md +0 -14
  101. package/templates/skills/knowledge/react-components/resources/style-guide.json +0 -27
  102. package/templates/skills/knowledge/react-components/scripts/fetch-stitch.sh +0 -30
  103. package/templates/skills/knowledge/react-components/scripts/validate.js +0 -68
  104. package/templates/skills/knowledge/self-update/SKILL.md +0 -60
  105. package/templates/skills/knowledge/self-update/scripts/update_kit.py +0 -103
  106. package/templates/skills/knowledge/stitch-loop/README.md +0 -54
  107. package/templates/skills/knowledge/stitch-loop/SKILL.md +0 -235
  108. package/templates/skills/knowledge/stitch-loop/examples/SITE.md +0 -73
  109. package/templates/skills/knowledge/stitch-loop/examples/next-prompt.md +0 -25
  110. package/templates/skills/knowledge/stitch-loop/resources/baton-schema.md +0 -61
  111. package/templates/skills/knowledge/stitch-loop/resources/site-template.md +0 -104
@@ -0,0 +1,579 @@
1
+ # EC Kafka Deployment Reference
2
+
3
+ This document provides the complete reference for Confluent Kafka KRaft deployments in European Commission (EC) controlled environments.
4
+
5
+ > **Note:** All hostnames, paths, and credentials shown use variable placeholders. Actual values must be provided via inventory files or environment-specific configuration outside of version control.
6
+
7
+ ---
8
+
9
+ ## Table of Contents
10
+
11
+ 1. [Environment Overview](#environment-overview)
12
+ 2. [Variable Definitions](#variable-definitions)
13
+ 3. [Directory Structure](#directory-structure)
14
+ 4. [Path Reference](#path-reference)
15
+ 5. [Vault Integration](#vault-integration)
16
+ 6. [Ansible Deployment](#ansible-deployment)
17
+ 7. [EC Customizations](#ec-customizations)
18
+ 8. [Service Management](#service-management)
19
+ 9. [SSL/TLS Configuration](#ssltls-configuration)
20
+ 10. [Troubleshooting](#troubleshooting)
21
+
22
+ ---
23
+
24
+ ## Environment Overview
25
+
26
+ ### Design Principles
27
+
28
+ | Principle | Implementation |
29
+ | ------------------- | ------------------------------------- |
30
+ | **KRaft-Only** | No ZooKeeper; pure KRaft mode |
31
+ | **SSL-Only** | mTLS required; no SASL/RBAC |
32
+ | **Non-Root** | systemd user services; no sudo |
33
+ | **Archive Install** | tar.gz deployment; no package manager |
34
+ | **Vault Secrets** | HashiCorp Vault for credentials |
35
+ | **No Drift** | Explicit cleanup tasks |
36
+
37
+ ### Cluster Topology Template
38
+
39
+ ```
40
+ CONTROLLERS (Quorum Voters)
41
+ ├── {{ controller_host_1 }} (node_id: {{ controller_id_1 }}) :{{ controller_port }}
42
+ ├── {{ controller_host_2 }} (node_id: {{ controller_id_2 }}) :{{ controller_port }}
43
+ └── {{ controller_host_3 }} (node_id: {{ controller_id_3 }}) :{{ controller_port }}
44
+
45
+ BROKERS
46
+ ├── {{ broker_host_1 }} (node_id: {{ broker_id_1 }}) :{{ broker_port }}
47
+ ├── {{ broker_host_2 }} (node_id: {{ broker_id_2 }}) :{{ broker_port }}
48
+ └── {{ broker_host_3 }} (node_id: {{ broker_id_3 }}) :{{ broker_port }}
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Variable Definitions
54
+
55
+ ### Required Variables
56
+
57
+ Define these in your inventory or environment file (not in git):
58
+
59
+ ```yaml
60
+ # Environment identifier
61
+ env_name: "poc" # poc, nonprod, prod
62
+
63
+ # User/Group
64
+ kafka_user: "{{ service_user }}" # e.g., b4-reuse
65
+ kafka_group: "{{ service_group }}" # e.g., apim
66
+
67
+ # Base paths
68
+ base_path: "/ec/local/reuse" # Main installation root
69
+ ansible_base: "/ec/local/kafka/ansible" # Ansible repository
70
+ java_version: "jdk-17.0.2" # Java version
71
+
72
+ # Confluent
73
+ confluent_version: "7.9.3" # Confluent Platform version
74
+
75
+ # Controller hosts
76
+ controller_hosts:
77
+ - host: "{{ controller_host_1 }}"
78
+ node_id: 0
79
+ - host: "{{ controller_host_2 }}"
80
+ node_id: 1
81
+ - host: "{{ controller_host_3 }}"
82
+ node_id: 2
83
+
84
+ # Broker hosts
85
+ broker_hosts:
86
+ - host: "{{ broker_host_1 }}"
87
+ node_id: 200
88
+ - host: "{{ broker_host_2 }}"
89
+ node_id: 201
90
+ - host: "{{ broker_host_3 }}"
91
+ node_id: 202
92
+
93
+ # Ports
94
+ controller_port: 9093
95
+ broker_port: 9443
96
+ jmx_port: 7071
97
+
98
+ # Vault
99
+ vault_address: "{{ vault_addr }}"
100
+ vault_namespace: "{{ vault_ns }}"
101
+ vault_mount: "{{ vault_kv_mount }}"
102
+ vault_path: "passwords/{{ env_name }}"
103
+
104
+ # SSL
105
+ keystore_filename: "{{ env_name }}-keystore.jks"
106
+ truststore_filename: "{{ env_name }}-truststore.jks"
107
+ ```
108
+
109
+ ### Example Environment File
110
+
111
+ Create `inventories/<env>/group_vars/all.yml`:
112
+
113
+ ```yaml
114
+ # ansible_user and connection
115
+ ansible_user: "{{ service_user }}"
116
+ ansible_ssh_private_key_file: "{{ ssh_key_path }}"
117
+ ansible_python_interpreter: /usr/bin/python3.12
118
+
119
+ # User/Group for file ownership
120
+ user: "{{ service_user }}"
121
+ group: "{{ service_group }}"
122
+
123
+ # Paths
124
+ custom_java_path: "{{ base_path }}/opt/{{ java_version }}"
125
+ ssl_file_dir: "{{ base_path }}/opt/ssl"
126
+ secrets_dir: "{{ base_path }}/opt/ssl"
127
+ secprops_path: "{{ base_path }}/opt/ssl/security.properties"
128
+
129
+ # Vault
130
+ vault_bin: "{{ ansible_base }}/vault/vault"
131
+ vault_path: "passwords/{{ env_name }}"
132
+ ```
133
+
134
+ ---
135
+
136
+ ## Directory Structure
137
+
138
+ ### Installation Base
139
+
140
+ ```
141
+ {{ base_path }}/ # Main installation root
142
+ ├── opt/
143
+ │ ├── confluent-{{ confluent_version }}/ # Confluent Platform installation
144
+ │ │ ├── bin/ # CLI tools
145
+ │ │ ├── etc/ # Default configs (unused)
146
+ │ │ └── share/ # Java libraries
147
+ │ │
148
+ │ ├── {{ java_version }}/ # Java installation
149
+ │ │
150
+ │ ├── ssl/ # SSL certificates
151
+ │ │ ├── {{ keystore_filename }}
152
+ │ │ ├── {{ truststore_filename }}
153
+ │ │ └── security.properties # Encrypted passwords
154
+ │ │
155
+ │ ├── data/ # Kafka data
156
+ │ │ ├── controller/ # Controller logs
157
+ │ │ └── (broker data at root)
158
+ │ │
159
+ │ ├── logs/ # Application logs
160
+ │ │
161
+ │ ├── config/kafka/ # Custom configs
162
+ │ │ └── log4j.properties
163
+ │ │
164
+ │ └── monitoring/ # JMX exporter
165
+
166
+ ├── etc/
167
+ │ ├── kafka/
168
+ │ │ └── server.properties # Broker config
169
+ │ └── controller/
170
+ │ └── server.properties # Controller config
171
+
172
+ ├── logs/ # Runtime logs + GC logs
173
+ ├── tmp/ # Java temp directory
174
+ └── scripts/management/ # Management scripts
175
+ ├── kafka_node.sh
176
+ └── kafka_tools.sh
177
+ ```
178
+
179
+ ### Ansible Repository Structure
180
+
181
+ ```
182
+ {{ ansible_base }}/ # Ansible base
183
+ ├── ansible.cfg
184
+ ├── README.md
185
+ ├── inventories/
186
+ │ ├── {{ env_name }}/
187
+ │ │ ├── hosts.yml
188
+ │ │ └── group_vars/
189
+ │ │ ├── all.yml # Shared config
190
+ │ │ ├── kafka_controller.yml # Controller-specific
191
+ │ │ └── kafka_broker.yml # Broker-specific
192
+ │ └── ...
193
+
194
+ ├── playbooks/
195
+ │ ├── 10-kafka-controllers.yml
196
+ │ ├── 20-kafka-brokers.yml
197
+ │ └── tasks/
198
+ │ ├── preflight.yml
199
+ │ ├── vault-bootstrap.yml
200
+ │ ├── vault-stage.yml
201
+ │ └── management.yml
202
+
203
+ ├── resources/
204
+ │ ├── confluent-{{ confluent_version }}.tar.gz
205
+ │ ├── override.yml
206
+ │ ├── secrets.yml # NOT in git - contains vault config
207
+ │ └── ec-overrides.md
208
+
209
+ └── scripts/management/
210
+ ```
211
+
212
+ ---
213
+
214
+ ## Path Reference
215
+
216
+ ### Critical Paths Quick Reference
217
+
218
+ | Purpose | Path Template |
219
+ | --------------------- | ------------------------------------------------------------ |
220
+ | **Ansible Base** | `{{ ansible_base }}/` |
221
+ | **Installation** | `{{ base_path }}/opt/confluent-{{ confluent_version }}/` |
222
+ | **Binary Path** | `{{ base_path }}/opt/confluent-{{ confluent_version }}/bin/` |
223
+ | **JAVA_HOME** | `{{ base_path }}/opt/{{ java_version }}` |
224
+ | **Controller Config** | `{{ base_path }}/etc/controller/server.properties` |
225
+ | **Broker Config** | `{{ base_path }}/etc/kafka/server.properties` |
226
+ | **Controller Data** | `{{ base_path }}/opt/data/controller` |
227
+ | **Broker Data** | `{{ base_path }}/opt/data` |
228
+ | **SSL Directory** | `{{ base_path }}/opt/ssl/` |
229
+ | **Security Props** | `{{ base_path }}/opt/ssl/security.properties` |
230
+ | **Logs Directory** | `{{ base_path }}/logs/` |
231
+ | **Systemd (User)** | `~/.config/systemd/user/` |
232
+ | **Vault Binary** | `{{ ansible_base }}/vault/vault` |
233
+
234
+ ### Service Names
235
+
236
+ | Component | Service Name | Systemd File |
237
+ | -------------- | ----------------------- | ------------------------------------------------------ |
238
+ | **Controller** | `confluent-kcontroller` | `~/.config/systemd/user/confluent-kcontroller.service` |
239
+ | **Broker** | `confluent-server` | `~/.config/systemd/user/confluent-server.service` |
240
+
241
+ ### Ports (Defaults)
242
+
243
+ | Service | Port Variable | Default |
244
+ | --------------- | -------------------------- | ------- |
245
+ | Controller | `{{ controller_port }}` | 9093 |
246
+ | Broker (Client) | `{{ broker_port }}` | 9443 |
247
+ | JMX Prometheus | `{{ jmx_port }}` | 7071 |
248
+ | Node Exporter | `{{ node_exporter_port }}` | 9100 |
249
+
250
+ ---
251
+
252
+ ## Vault Integration
253
+
254
+ ### Configuration
255
+
256
+ ```yaml
257
+ vault_address: "{{ vault_addr }}" # From environment
258
+ vault_namespace: "{{ vault_ns }}" # From environment
259
+ vault_mount: "{{ vault_kv_mount }}" # From environment
260
+ vault_path: "passwords/{{ env_name }}" # Environment-specific
261
+ vault_bin: "{{ ansible_base }}/vault/vault"
262
+ ```
263
+
264
+ ### Required Secrets
265
+
266
+ Vault must contain at path `passwords/{{ env_name }}`:
267
+
268
+ | Field | Purpose |
269
+ | --------------------- | ----------------------------------------- |
270
+ | `masterkey` | Secrets Protection master key |
271
+ | `security_properties` | Pre-encrypted security.properties content |
272
+
273
+ ### Bootstrap Workflow
274
+
275
+ ```bash
276
+ # Export Vault token (obtain via PrivX or your auth method)
277
+ export VAULT_TOKEN="${VAULT_TOKEN}"
278
+
279
+ # Run bootstrap for environment
280
+ cd {{ ansible_base }}
281
+ ansible-playbook playbooks/tasks/vault-bootstrap.yml \
282
+ -e vault_env={{ env_name }} \
283
+ -e "@resources/secrets.yml"
284
+ ```
285
+
286
+ ### Secrets Protection
287
+
288
+ Passwords in config files use SecurePass provider:
289
+
290
+ ```properties
291
+ config.providers=securepass
292
+ config.providers.securepass.class=io.confluent.kafka.security.config.provider.SecurePassConfigProvider
293
+
294
+ ssl.keystore.password=${securepass:{{ base_path }}/opt/ssl/security.properties:ssl.keystore.password}
295
+ ssl.key.password=${securepass:{{ base_path }}/opt/ssl/security.properties:ssl.key.password}
296
+ ssl.truststore.password=${securepass:{{ base_path }}/opt/ssl/security.properties:ssl.truststore.password}
297
+ ```
298
+
299
+ ---
300
+
301
+ ## Ansible Deployment
302
+
303
+ ### Environment Setup
304
+
305
+ ```bash
306
+ # SSH to ansible control node
307
+ export VAULT_TOKEN="${VAULT_TOKEN}"
308
+ cd {{ ansible_base }}
309
+ ```
310
+
311
+ ### Deploy Controllers
312
+
313
+ ```bash
314
+ ansible-playbook -i inventories/{{ env_name }}/hosts.yml \
315
+ playbooks/10-kafka-controllers.yml \
316
+ --limit {{ controller_host_1 }} \
317
+ -vv \
318
+ --skip-tags ec,package,sysctl,health_check \
319
+ -e "@resources/override.yml"
320
+ ```
321
+
322
+ ### Deploy Brokers
323
+
324
+ ```bash
325
+ ansible-playbook -i inventories/{{ env_name }}/hosts.yml \
326
+ playbooks/20-kafka-brokers.yml \
327
+ --limit {{ broker_host_1 }} \
328
+ -vv \
329
+ --skip-tags ec,package,sysctl,health_check \
330
+ -e "@resources/override.yml"
331
+ ```
332
+
333
+ ### Skip Tags Reference
334
+
335
+ | Tag | Purpose | When to Skip |
336
+ | -------------- | ------------------------- | -------------------- |
337
+ | `ec` | EC-specific modifications | Already applied |
338
+ | `package` | Package installation | Re-runs |
339
+ | `sysctl` | Sysctl tuning | No root access |
340
+ | `health_check` | Post-deploy checks | Manual verification |
341
+ | `systemd` | Service file updates | No changes needed |
342
+ | `filesystem` | Directory permissions | Already set |
343
+ | `privileged` | Root-requiring tasks | Non-root environment |
344
+
345
+ ### Dry Run
346
+
347
+ ```bash
348
+ ansible-playbook -i inventories/{{ env_name }}/hosts.yml \
349
+ playbooks/10-kafka-controllers.yml \
350
+ --check \
351
+ -e "@resources/override.yml"
352
+ ```
353
+
354
+ ---
355
+
356
+ ## EC Customizations
357
+
358
+ ### Summary of Modifications
359
+
360
+ All changes are documented in `{{ ansible_base }}/resources/ec-overrides.md` and tagged with `ec` in playbooks.
361
+
362
+ ### Key Customizations
363
+
364
+ | Area | Standard Confluent | EC Override |
365
+ | ------------------- | ------------------------------ | ------------------------------------ |
366
+ | **Systemd Scope** | System (`/etc/systemd/system`) | User (`~/.config/systemd/user`) |
367
+ | **Systemd Target** | `multi-user.target` | `default.target` |
368
+ | **User/Group** | Root ownership | `{{ kafka_user }}:{{ kafka_group }}` |
369
+ | **Java Install** | Role-managed | Pre-installed at custom path |
370
+ | **SSL Validation** | Permissive assertions | Debug messages (no fail) |
371
+ | **Storage Format** | Automatic | `--ignore-formatted` flag |
372
+ | **SASL/RBAC** | Configurable | Disabled (SSL-only) |
373
+ | **Support Metrics** | Enabled | Disabled |
374
+
375
+ ---
376
+
377
+ ## Service Management
378
+
379
+ ### Using kafka_node.sh
380
+
381
+ ```bash
382
+ # Start Kafka (auto-detects controller/broker)
383
+ {{ base_path }}/scripts/management/kafka_node.sh start
384
+
385
+ # Stop Kafka
386
+ {{ base_path }}/scripts/management/kafka_node.sh stop
387
+
388
+ # Check status
389
+ {{ base_path }}/scripts/management/kafka_node.sh status
390
+
391
+ # Restart
392
+ {{ base_path }}/scripts/management/kafka_node.sh restart
393
+ ```
394
+
395
+ ### Direct systemctl Commands
396
+
397
+ ```bash
398
+ # Controller operations
399
+ systemctl --user start confluent-kcontroller
400
+ systemctl --user stop confluent-kcontroller
401
+ systemctl --user status confluent-kcontroller
402
+ systemctl --user restart confluent-kcontroller
403
+
404
+ # Broker operations
405
+ systemctl --user start confluent-server
406
+ systemctl --user stop confluent-server
407
+ systemctl --user status confluent-server
408
+ systemctl --user restart confluent-server
409
+
410
+ # Reload after config changes
411
+ systemctl --user daemon-reload
412
+ ```
413
+
414
+ ---
415
+
416
+ ## SSL/TLS Configuration
417
+
418
+ ### Certificate Files
419
+
420
+ | File | Purpose | Location |
421
+ | --------------------------- | ------------------- | -------------------------- |
422
+ | `{{ keystore_filename }}` | Node identity | `{{ base_path }}/opt/ssl/` |
423
+ | `{{ truststore_filename }}` | CA certificates | `{{ base_path }}/opt/ssl/` |
424
+ | `security.properties` | Encrypted passwords | `{{ base_path }}/opt/ssl/` |
425
+
426
+ ### Listener Configuration
427
+
428
+ **Controller:**
429
+
430
+ ```properties
431
+ listeners=CONTROLLER://:{{ controller_port }}
432
+ listener.security.protocol.map=CONTROLLER:SSL
433
+ controller.listener.names=CONTROLLER
434
+ ```
435
+
436
+ **Broker:**
437
+
438
+ ```properties
439
+ listeners=SSL://:{{ broker_port }}
440
+ listener.security.protocol.map=SSL:SSL
441
+ advertised.listeners=SSL://{{ broker_host }}:{{ broker_port }}
442
+ security.inter.broker.protocol=SSL
443
+ ```
444
+
445
+ ### SSL Settings
446
+
447
+ ```properties
448
+ ssl.enabled.protocols=TLSv1.3,TLSv1.2
449
+ ssl.client.auth=required
450
+ ssl.principal.mapping.rules=RULE:^CN=(.*?),.*$/\\$1/L,DEFAULT
451
+ ```
452
+
453
+ ---
454
+
455
+ ## Troubleshooting
456
+
457
+ ### Common Issues
458
+
459
+ | Problem | Likely Cause | Solution |
460
+ | --------------------------------- | ---------------------- | --------------------------------------------------- |
461
+ | **Vault bootstrap fails** | Token expired/invalid | Re-authenticate via PrivX |
462
+ | **Controllers won't form quorum** | Network/SSL issue | Check listener reachability |
463
+ | **Brokers can't join** | Controller unreachable | Verify `controller.quorum.voters` |
464
+ | **Service won't start** | Missing master key | Check systemd override |
465
+ | **Permission denied** | Wrong owner | `chown {{ kafka_user }}:{{ kafka_group }}` on paths |
466
+
467
+ ### Validate Quorum
468
+
469
+ ```bash
470
+ {{ base_path }}/opt/confluent-{{ confluent_version }}/bin/kafka-metadata \
471
+ --snapshot {{ base_path }}/opt/data/controller/__cluster_metadata-0/00000000000000000000.log \
472
+ --command quorum
473
+ ```
474
+
475
+ ### Check Logs
476
+
477
+ ```bash
478
+ # Controller logs
479
+ tail -f {{ base_path }}/logs/controller.log
480
+
481
+ # Broker logs
482
+ tail -f {{ base_path }}/logs/server.log
483
+
484
+ # GC logs
485
+ tail -f {{ base_path }}/logs/gc.log
486
+
487
+ # Systemd journal
488
+ journalctl --user -u confluent-kcontroller -f
489
+ journalctl --user -u confluent-server -f
490
+ ```
491
+
492
+ ### Test SSL Connectivity
493
+
494
+ ```bash
495
+ # Test controller SSL
496
+ openssl s_client -connect {{ controller_host }}:{{ controller_port }} \
497
+ -cert {{ base_path }}/opt/ssl/client.crt \
498
+ -key {{ base_path }}/opt/ssl/client.key \
499
+ -CAfile {{ base_path }}/opt/ssl/ca.crt
500
+
501
+ # Test broker SSL
502
+ openssl s_client -connect {{ broker_host }}:{{ broker_port }} \
503
+ -cert {{ base_path }}/opt/ssl/client.crt \
504
+ -key {{ base_path }}/opt/ssl/client.key \
505
+ -CAfile {{ base_path }}/opt/ssl/ca.crt
506
+ ```
507
+
508
+ ---
509
+
510
+ ## Quick Reference Card
511
+
512
+ ```
513
+ ┌──────────────────────────────────────────────────────────────────────────┐
514
+ │ EC KAFKA DEPLOYMENT QUICK REFERENCE │
515
+ ├──────────────────────────────────────────────────────────────────────────┤
516
+ │ │
517
+ │ PATHS (configure via inventory) │
518
+ │ ───── │
519
+ │ Ansible: {{ ansible_base }}/ │
520
+ │ Confluent: {{ base_path }}/opt/confluent-{{ confluent_version }}/ │
521
+ │ Java: {{ base_path }}/opt/{{ java_version }}/ │
522
+ │ SSL: {{ base_path }}/opt/ssl/ │
523
+ │ Data: {{ base_path }}/opt/data/ │
524
+ │ Logs: {{ base_path }}/logs/ │
525
+ │ Systemd: ~/.config/systemd/user/ │
526
+ │ │
527
+ │ SERVICES │
528
+ │ ──────── │
529
+ │ Controller: systemctl --user {start|stop|status} confluent-kcontroller │
530
+ │ Broker: systemctl --user {start|stop|status} confluent-server │
531
+ │ │
532
+ │ PORTS (defaults) │
533
+ │ ───── │
534
+ │ Controller: {{ controller_port }} (SSL) │
535
+ │ Broker: {{ broker_port }} (SSL) │
536
+ │ JMX Export: {{ jmx_port }} │
537
+ │ │
538
+ │ DEPLOY │
539
+ │ ────── │
540
+ │ export VAULT_TOKEN="${VAULT_TOKEN}" │
541
+ │ cd {{ ansible_base }} │
542
+ │ ansible-playbook playbooks/10-kafka-controllers.yml \ │
543
+ │ -i inventories/{{ env_name }}/hosts.yml \ │
544
+ │ --limit <host> -e "@resources/override.yml" │
545
+ │ │
546
+ │ USER/GROUP: {{ kafka_user }}:{{ kafka_group }} │
547
+ │ │
548
+ └──────────────────────────────────────────────────────────────────────────┘
549
+ ```
550
+
551
+ ---
552
+
553
+ ## Sample Inventory Template
554
+
555
+ Create `inventories/<env_name>/hosts.yml`:
556
+
557
+ ```yaml
558
+ all:
559
+ children:
560
+ kafka_controller:
561
+ hosts:
562
+ { { controller_host_1 } }:
563
+ node_id: { { controller_id_1 } }
564
+ { { controller_host_2 } }:
565
+ node_id: { { controller_id_2 } }
566
+ { { controller_host_3 } }:
567
+ node_id: { { controller_id_3 } }
568
+
569
+ kafka_broker:
570
+ hosts:
571
+ { { broker_host_1 } }:
572
+ node_id: { { broker_id_1 } }
573
+ { { broker_host_2 } }:
574
+ node_id: { { broker_id_2 } }
575
+ { { broker_host_3 } }:
576
+ node_id: { { broker_id_3 } }
577
+ ```
578
+
579
+ > **Important:** Replace all `{{ variable }}` placeholders with actual values in your environment-specific inventory files (which should NOT be committed to git).