Git Product home page Git Product logo

codo-dns's Introduction

域名管理

简介:

本服务用来管理DNS,目前仅支持BIND

功能

  • 可视化配置bind服务
  • 支持多区域智能解析
  • 支持多台DNS服务(agent修改配置文件,不强依赖DNS的数据库)
  • 简单的规则校验(如果BIND校验区域文件不通过,则当前区域文件不生效)
  • 对操作日志进行记录
  • 对域名进行监控(暂无)

页面展示

域名列表

menus

区域解析列表

menus

操作日志

menus

添加解析

menus

同步配置文件

menus

项目部署

创建数据库

create database `codo_dns` default character set utf8mb4 collate utf8mb4_unicode_ci;
  • 初始化表结构
python3 /var/www/codo_dns/db_sync.py

修改配置

  • 对settings 里面的配置文件进行修改 主要为数据库地址 和bind的初始化文件,启动的时候如果数据库不存在bind的初始配置,就会写入数据库
  • 修改 doc/nginx_ops.conf 的server_name 例如 改为 dns.opendevops.cn ,当然你也可以直接用IP
  • 修改 doc/supervisor_ops.conf 内容来控制进程数量

编译镜像

docker build . -t codo_dns_image

docker 启动

默认映射出了8060端口

docker-compose up -d

启动后访问地址为 dns.opendevops.cn:8060

测试

curl -I -X GET -m  10 -o /dev/null -s -w %{http_code}  http://dns.opendevops.cn:8060/are_you_ok/
### 返回200 就代表成功了

注册网关 用户登录 URI鉴权是通过网关来处理的(必须,莫忘)。

参考api网关

BIND部署(centos7)

BIND 搭建

多区域支持

  • 把doc下的所有的named 开头的文件放入 bind服务器的 /var/named/chroot/etc/ 目录下
  • 这里是和 settings 下的默认bind配置文件进行关联

自定义区域

略。。。 请自行研究文档

获取最新配置 (在BIND服务器上)

  • 建议放入系统crontab 中, 日志请自行重定向, 并且建议报错发送报错日志

  • 修改配置相关参数

    • api_url 就是你系统API地址 比如 https://demo.opendevops.cn/api/
    • auth_key 为登录令牌,获取和使用方法详见 admin模块,创建一个用户,赋值权限,并获取其toekn

    • 下面三个URI的GET权限/dns/v2/dns/bind/domain/ /dns/v2/dns/bind/zone/ /dns/v1/dns/bind/conf/

    • 下面为 获取配置的脚本 ,在项目的 libs目录下。
    • domain_sync.py 使用python3 执行 python3 domain_sync.py
  • 你也可以自己根据接口开发

域名监控

暂无

License

Everything is GPL v3.0.

codo-dns's People

Contributors

ss1917 avatar ysicing avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.