{"id":17281545,"url":"https://github.com/sumory/confd","last_synced_at":"2025-10-28T20:33:27.061Z","repository":{"id":145420697,"uuid":"45307722","full_name":"sumory/confd","owner":"sumory","description":"configuration management","archived":false,"fork":false,"pushed_at":"2015-11-11T10:29:06.000Z","size":2732,"stargazers_count":43,"open_issues_count":0,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-27T23:12:40.596Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sumory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-31T15:49:30.000Z","updated_at":"2024-12-28T19:01:16.000Z","dependencies_parsed_at":"2023-04-12T13:45:05.745Z","dependency_job_id":null,"html_url":"https://github.com/sumory/confd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumory%2Fconfd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumory%2Fconfd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumory%2Fconfd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumory%2Fconfd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sumory","download_url":"https://codeload.github.com/sumory/confd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248860331,"owners_count":21173342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T09:46:11.355Z","updated_at":"2025-10-28T20:33:22.039Z","avatar_url":"https://github.com/sumory.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### confd\n\nconfd是一个统一配置管理工具，目前仍在开发中，基于本地文件存储的部署方式已经可以用于生产环境中。\n\n##### Features\n\n- [x] 基础解析：配置文件使用toml格式，模板数据分离\n- [x] 多种存储支持：local file、redis、zookeeper\n- [x] 两种运行模式：Debug或Daemon\n- [x] cli工具：修改store，批量更新配置\n- [ ] 更友好的交互方式，比如通过web界面\n- [ ] 分离server和client，提供客户端cli或API供拉取指定配置\n- [ ] 加密支持：store中存储的配置可加密，防止泄露\n\n##### Usage\n\n**安装**\n\n```\n#假设安装路径为/data/server/confd\n#go get获取依赖的第三方库 \n\nsh build.sh linux /data/server/confd\n#执行以上构建脚本后，在docs目录下生成了安装所需的文件\n#若build.sh增加了参数$2，则默认加载$2/data/config.toml作为confd运行所需的配置文件\n\ncd docs\nsh install.sh /data/server/confd\ncd /data/server/confd \n#注意修改${path}/data/config.toml里的ConfDir和ConnectAddr，前缀为/data/server/confd\n\n#然后使用confd、confd-cli即可\n```\n\n**使用**\n\n```\n.\n├── confd\n├── confd-cli\n├── data\n│   ├── config.toml\n│   └── filestore.toml\n├── meta\n│   ├── example_1.toml\n│   └── example_2.toml\n└── templates\n    └── example.tmpl\n```\n\n\n**confd**的使用：\n\n- 首先了解：\n    - confd的配置可参看[config.toml](./docs/files/config.toml), config.toml里的配置均可通过运行时指定flag来覆盖默认配置。\n    - confd.toml中指定的配置数据存储为“file”形式，即数据存储在同目录下filestore.toml文件中。\n    - 根据需要编辑模板，参考[example.tmpl](docs/files/example.tmpl)，模板中使用的变量目前只支持k/v形式。\n    - 根据需要编辑meta文件，参考[example_1.toml](docs/files/example_1.toml)，meta文件指定了生成最终配置文件时需要的模板文件、数据、最终文件地址等。\n- 命令\n    - `./confd`, 在各个meta文件指定的目的地址生成了需要的配置文件\n    - `./confd --debug=false`, 默认confd在后台运行，每10分钟重新生成一次全部的配置文件\n\n**confd-cli**的使用：\n\n- `confd-cli`是操作confd的命令行程序\n- 目前支持的子命令\n\n\t\u003ctable\u003e\n    \t\u003ctr\u003e\n        \t\u003ctd width=\"50%\"\u003e./confd-cli getall\u003c/td\u003e\n        \t\u003ctd width=\"50%\"\u003e获取当前所有配置需要的数据\u003c/td\u003e\n    \t\u003c/tr\u003e\n    \t\u003ctr\u003e\n        \t\u003ctd width=\"50%\"\u003e./confd-cli get key1\u003c/td\u003e\n        \t\u003ctd width=\"50%\"\u003e获取key1现在的值\u003c/td\u003e\n    \t\u003c/tr\u003e\n    \t\u003ctr\u003e\n        \t\u003ctd width=\"50%\"\u003e./confd-cli set key1 value1\u003c/td\u003e\n        \t\u003ctd width=\"50%\"\u003e设置key1值为value1\u003c/td\u003e\n    \t\u003c/tr\u003e\n    \t\u003ctr\u003e\n        \t\u003ctd width=\"50%\"\u003e./confd-cli delete key1\u003c/td\u003e\n        \t\u003ctd width=\"50%\"\u003e删除key1\u003c/td\u003e\n    \t\u003c/tr\u003e\n\t\u003c/table\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumory%2Fconfd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumory%2Fconfd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumory%2Fconfd/lists"}