AKHQ Nomad 部署方案

背景

通过我们将竞品横向对比之后选择了 AKHQ,本文试图描述 AKHQ 的部署方案。

部署 & 配置方案

  • AKHQ on DockerHub,镜像支持 x86 和 arm64 两种架构,此处我们选择 arm64

  • 此组件基于 Micronaut 框架开发,无外部依赖,为无状态的 HTTP 服务,部署较为简单

  • 官方文档:https://akhq.io/docs

  • 代码库:https://github.com/tchiotludo/akhq Star:2.6K

Kafka 集群配置

官方文档 Cluster configuration

connections: 
    doc-kafka1: #自定义集群名称 
        properties: bootstrap.servers: "localhost:9093,localhost:9094,localhost:9095" 
    doc-kafka2: 
        properties: bootstrap.servers: "localhost:9092"

端口配置

官方文档 Debug & Monitoring

endpoints: 
    all: 
        port: {{ env "NOMAD_PORT_lb" }} # 此端口提供 metrics 和健康检查 
micronaut: 
    server: 
        port: {{ env "NOMAD_PORT_http" }} # 此端口提供 HTTP 服务

SSO 接入服务配置

官方文档 LDAP

security:
    enabled: true
    intercept-url-map: #URL 拦截配置 
        - pattern: "/ui/login/**" 
          access: "isAnonymous()"
        - pattern: "/ui/static/**" 
          access: "isAnonymous()" 
        - pattern: "/ui/**"
          access: "isAuthenticated()" 
        - pattern: "/api/**" 
          access: "isAuthenticated()" 
        - pattern: "/swagger/**" 
          access: "isAuthenticated()" 
    ldap: 
        default: 
            enabled: true 
            context: 
                server: 'ldaps://ldap.seayoo.com:636' 
                managerDn: '' 
                managerPassword: '' 
            search: 
                filter: "uid={0}" 
            groups: 
                enabled: false 
                filter: "uid={0}"

RBAC 配置

  • 权限的配置主要分为 groups 和 ldap 两个 block

    • 在 groups 下配置角色组的名字和权限

    • 在 ldap 下配置配置用户所属的组

security:
  default-group: topic-reader # Default groups for all the user even unlogged user
  groups:
    admin: # unique key
      name: admin # Group name
      roles: # roles for the group
        - group/delete
        - group/offsets
        - group/offsets/update
        - group/read
        - node/config
        - node/config/update
        - node/read
        - topic/config
        - topic/config/update
        - topic/data
        - topic/data/delete
        - topic/data/insert
        - topic/data/read
        - topic/delete
        - topic/insert
        - topic/read
    topic-reader: # unique key
      name: topic-reader # Group name
      roles: # roles for the group
        - group/read
        - node/read
        - topic/read
        - topic/data/read
  # Ldap Groups configuration (when using ldap)
  ldap:
    default-group: topic-reader
    users:
      - username: zhangdong7 # ldap user id
        groups: # Akhq groups list
          - topic-reader
      - username: zhangdong17
        groups:
          - admin

Nomad 配置

本地调试阶段的 nomad job 已经初步验证通过,参考 MR: Add nomad job and vars for AKHQ.

测试情况

在本地环境测试时,设置 CPU 为 200 MHZ,Memory 设置为 1024 MB

  • 正常查看 Topic 数据

 

  • 开启 live tail 模式

  • live tail 操作相对其他操作应该是更耗 CPU 和 Memory,是一种持续消费 Topic 行为

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值