kerrigan

所属分类:后台框架
开发工具:Python
文件大小:27KB
下载次数:0
上传日期:2021-07-27 08:02:28
上 传 者sh-1993
说明:  基于Tornado实现的一套配置中心,可基于分项目、环境管理配置,语法高亮、对比历史版本、快速回滚等,并提供Restful风格的API
(A set of configuration centers based on Tornado, which can be configured based on sub project and environment management, syntax highlighting, historical version comparison, fast rollback, etc., and provide Restful style API)

文件列表:
Dockerfile (1184, 2021-03-31)
LICENSE (35149, 2021-03-31)
__init__.py (130, 2021-03-31)
biz (0, 2021-03-31)
biz\applications.py (444, 2021-03-31)
biz\handlers (0, 2021-03-31)
biz\handlers\__init__.py (130, 2021-03-31)
biz\handlers\config_handler.py (31473, 2021-03-31)
db_sync.py (887, 2021-03-31)
doc (0, 2021-03-31)
doc\nginx_ops.conf (433, 2021-03-31)
doc\requirements.txt (12, 2021-03-31)
doc\supervisor_ops.conf (501, 2021-03-31)
docker-compose.yml (225, 2021-03-31)
libs (0, 2021-03-31)
libs\__init__.py (130, 2021-03-31)
libs\base_handler.py (1299, 2021-03-31)
libs\get_config.py (4807, 2021-03-31)
models (0, 2021-03-31)
models\__init__.py (130, 2021-03-31)
models\kerrigan.py (3049, 2021-03-31)
settings.py (1831, 2021-03-31)
startup.py (722, 2021-03-31)

## 配置中心 ### 部署文档 #### 创建数据库 ```sql create database `codo_kerrigan` default character set utf8mb4 collate utf8mb4_unicode_ci; ``` - 初始化表结构 ```bash python3 /var/www/kerrigan/db_sync.py ``` #### 修改配置 - 对settings 里面的配置文件进行修改 - 修改 doc/nginx_ops.conf 的server_name 例如 改为 kerrigan.opendevops.cn ,当然你也可以直接用IP - 修改 doc/supervisor_ops.conf 内容来控制进程数量 #### 编译镜像 ```bash docker build . -t kerrigan_image ``` #### docker 启动 > 默认映射出了8030端口 ```bash docker-compose up -d ``` #### 启动后访问地址为 kerrigan.opendevops.cn:8030 #### 测试 ```bash curl -I -X GET -m 10 -o /dev/null -s -w %{http_code} http://kerrigan.opendevops.cn:8030/are_you_ok/ ### 返回200 就代表成功了 ``` ### 注册网关 用户登录 URI鉴权是通过网关来处理的。 > 参考[api网关](https://github.com/ss1917/api-gateway/blob/master/README.md) ### 调用示例 - 已经封装成类, 并写了获取配置的示例,和生成配置文件示例,具体参考脚本内容 - libs/get_config.py ## License Everything is [GPL v3.0](https://www.gnu.org/licenses/gpl-3.0.html).

近期下载者

相关文件


收藏者