介绍

今天推荐一款完全免费的ETCD客户端,可以私有化部署: etcd-workbench

开源地址:https://github.com/tzfun/etcd-workbench Gitee地址:https://gitee.com/tzfun/etcd-workbench

下载

本地运行

从 官方Release 下载最新版的 jar 包,然后运行

java -jar etcd-workbench.jar

注意:你需要本地有 JDK 11+的版本。

运行后浏览器会自动打开 http://localhost:8002,它的操作界面都是在浏览器中,所以你也可以私有部署然后分配多账号多人使用,而不是简单的本地工具。

Docker部署

工具也提供了Docker部署的方式

Docker Hub镜像地址:https://hub.docker.com/r/tzfun/etcd-workbench

拉取镜像

docker pull tzfun/etcd-workbench

启动容器

docker run --name my-etcd-workbench -p 8002:8002 -d tzfun/etcd-workbench:latest

然后在你的浏览器中访问 http://localhost:8002 即可,更多镜像使用请前往 Docker Hub 查看

配置

多账号是通过配置实现的,你需要在部署的时候开启 Auth ,更多信息看配置文件吧,默认文件:etcd-workbench.conf

[server]

# Configure the port the service will run on.

port = 8002

# Configure the timeout for executing instructions to ETCD server, in milliseconds.

etcdExecuteTimeoutMillis = 3000

# Configure data storage directory.

dataDir = ./data

# If Authentication is turned on, in order to ensure that user data is not easily cracked,

# configure the data signature key to encrypt and protect it. It must be 16 characters.

configEncryptKey = etcdWorkbench@*?

[auth]

# If set to true, user must log in to use etcd workbench, and add the user field to configure the user.

# If set to false, all connection data can be used and shared by anyone!!!

enable = false

# If enabled authentication, add username and password with `user` field.

# Supports repeatedly adding multiple `user` fields.

user = username1:password1

user = username2:password2

[log]

# Base log level

level = INFO

# Customize the log level of the specified path.

levels = io.netty:INFO,io.grpc:INFO

# Configure log storage directory.

file = ./logs

# Configure log file name.

fileName = etcd-workbench

# Configure the log file rolling size. When this size is exceeded, a new file will be created to store the log.

# Unit MB

fileLimitSize = 10

# Support: `std` and `file`

printers = std,file

优势

相比于官方的客户端工具,这个工具有很多优势,比如在线编辑value(支持多语言)、版本对比、Auth开关、快捷复制Key、多账户管理session等等,弥补了很多使用ETCD做配置中心和服务发现组件时管理不方便的问题。

一般好用的第三方客户端工具都需要收费,这也是作者开发此工具的初衷,就是为了免费且好用!

截图

下面提供一些使用截图:

工具提供了黑色和白色两种主题,可根据个人喜好去选择,我还是比较喜欢黑色的,所以下面大部分是黑色背景截图。

白色主题

黑色主题 登录支持SSH Tunnel,这个非常实用,很多时候etcd server集群都是内网访问不对外开放的,要管理etcd便成为了一件麻烦事,经常要去跳板机连接server管理,而有了SSH Tunnel就可以代理通信,这也是很多 etcd 客户端没有的功能。

集群管理 keys管理 这个工具也提供了树状视图 新增 Key-Value

编辑器支持多种语言的高亮,同时支持Hex、Blob等数据查看,但是这两个似乎不支持编辑 支持查看一个Key多个版本对比(这个功能非常实用,能看到配置的所有变更记录)

你能对比这个key从创建到当前版本的所有Diff信息 ETCD用户管理 给用户授权角色 角色管理 给角色授权权限 同时也支持开启和关闭ETCD Server的身份认证功能,有这些功能基本上部署好ETCD Server后就可以直接用etcd-workbench接管后续的工作了,再也不用在server端或者配置脚本来设置root权限、管理角色等操作。

相关文章

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: