{"id":13489951,"url":"https://github.com/qunarcorp/open_dnsdb","last_synced_at":"2025-04-05T02:12:20.649Z","repository":{"id":41799231,"uuid":"166910337","full_name":"qunarcorp/open_dnsdb","owner":"qunarcorp","description":"OpenDnsdb 是去哪儿网OPS团队开源的基于Python语言的DNS管理系统","archived":false,"fork":false,"pushed_at":"2022-12-09T11:30:29.000Z","size":5401,"stargazers_count":420,"open_issues_count":31,"forks_count":157,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-03-29T01:14:54.576Z","etag":null,"topics":["bind9","dns","dnsmanager","ops"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qunarcorp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-22T02:05:53.000Z","updated_at":"2025-03-22T03:21:17.000Z","dependencies_parsed_at":"2023-01-25T21:01:51.211Z","dependency_job_id":null,"html_url":"https://github.com/qunarcorp/open_dnsdb","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qunarcorp%2Fopen_dnsdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qunarcorp%2Fopen_dnsdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qunarcorp%2Fopen_dnsdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qunarcorp%2Fopen_dnsdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qunarcorp","download_url":"https://codeload.github.com/qunarcorp/open_dnsdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276189,"owners_count":20912288,"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":["bind9","dns","dnsmanager","ops"],"created_at":"2024-07-31T19:00:38.402Z","updated_at":"2025-04-05T02:12:20.609Z","avatar_url":"https://github.com/qunarcorp.png","language":"Python","funding_links":[],"categories":["\u003ca id=\"170048b7d8668c50681c0ab1e92c679a\"\u003e\u003c/a\u003e工具","tools","运维相关管理系统"],"sub_categories":["\u003ca id=\"a695111d8e30d645354c414cb27b7843\"\u003e\u003c/a\u003eDNS","dns管理工具"],"readme":"![](https://img.shields.io/github/release/qunarcorp/open_dnsdb.svg)\n![](https://img.shields.io/github/license/qunarcorp/open_dnsdb.svg)\n![](https://img.shields.io/github/languages/code-size/qunarcorp/open_dnsdb.svg)\n# OpenDnsdb\n\n## 项目主页\n\nOpenDnsdb 项目相关文档:  [文档链接](../../wikis/home)\n\n\n## 简介\n\nOpenDnsdb 是去哪儿网OPS团队开源的DNS管理系统，用于添加、修改、删除zones/records.\n使用简单并可靠的方法管理View、ACL、网段等.\n详尽的日志，便于审计.\n\nOpenDnsdb并不是一个DNS服务器，而是一个对现有DNS服务器的管理系统，提供Web管理UI以及命令行工具等.\n\n对OpenDnsdb的操作，会生成DNS配置文件并同步给DNS服务器。也就是说OpenDnsdb的故障或不可用并不会对DNS服务本身造成任何影响.\n\nOpenDnsdb is an open source DNS management system for the OPS team. It is used to add, modify, and delete zones/records. Use simple and reliable methods to manage View, ACL, network segment, etc. Detailed logs for auditing.\n\nOpenDnsdb is not a DNS server, but a management system for existing DNS servers, providing Web management UI and command line tools.\n\nFor OpenDnsdb operations, a DNS configuration file is generated and synchronized to the DNS server. That is to say, the failure or unavailability of OpenDnsdb does not affect the DNS service itself.\n\n\n## 主要功能\n\n* 支持 Bind 9.\n* IP管理, 管理公司网段及ip，可以实现域名和ip的自动绑定\n* 域名管理, 域名的增、删、改、查.\n* View域名管理, view域名的增删改查、状态修改，view域名的迁移.\n* 配置管理, 管理zone文件，线上配置与数据库配置同步，修改配置自动完成部署.\n* 日志, 关键操作都有日志记录，并可通过页面进行查询，便于审查\n* 支持RESTful API, 支持Webhook.\n* 基于Python 3 开发, 支持Postgresql和SQLite.\n\n\n## 应用结构\n\n* docs/\n\t各种说明文档、手册, copyright/license等.\n\n* dnsdb_fe/\n\tweb ui\n\n* tools/\n\t同步脚本, 各种工具.\n\n* etc/\n\t开发、测试环境的配置文件, 配置模板等.\n\n* dnsdb_command.py\n\t数据库初始脚本\n\n* dnsdb/constant\n 常量设置，用到的正则匹配规则\n\n\n## 安装手册\n* 环境 Python:3.6.8  pip:19.0.3\n\n* 支持的浏览器: chrome, Firefox\n\n* 安装virtualenv: `pip install virtualenv`\n\n* 项目克隆\n\n* 目录创建：`mkdir -p /var/log/open_dnsdb/`\n\n    ```ini\n    ; 日志目录配置: etc/beta/common.conf\n    [log]\n    log-dir = /var/log/open_dnsdb/\n    ```\n\n* 切换到项目目录: `cd open_dnsdb `\n\n* 初始化项目python环境: \n\n    ```bash\n    $ python tools/install_venv.py -p /usr/bin/python3.6\n    # 命令行参数:\n    # \t-p 使用的python解释器版本, 确保使用virtualenv创建虚拟环境是python3.6+\n    #\t\t如果确认virtualenv命令是用python3安装的, 这个参数可以省略\n    ```\n\n* 启用虚拟环境\n\n    ```bash\n     $ source .venv/bin/activate\n     $ python -V \t# 确认python版本为3.6+\n    ```\n\n* 初始化数据库\n    *  数据库配置: etc/beta/common.conf\n    \t```ini\n    \t[DB]\n    \tconnection=sqlite:////usr/local/open_dnsdb/dnsdb.db\n    \t```\n    *  touch /usr/local/open_dnsdb/dnsdb.db 新建数据文件 \n    *  export FLASK_APP=dnsdb_command.py\n    *  export FLASK_ENV=beta\n    *  flask deploy (生成测试账号: test 密码:123456)\n\n* 生成程序控制脚本: tools/with_venv.sh python setup.py install\n\n* 安装supervisor用于管理python进程:\n  * 安装: sudo pip install supervisor\n        ```\n        # python3版本supervisor安装\n        pip install git+https://github.com/Supervisor/supervisor\n        ```\n\n  * 生成默认配置: echo_supervisord_conf \u003e /etc/supervisord.conf\n\n  * 修改配置文件 vim /etc/supervisord.conf\n    ```ini\n    [supervisord]\n    childlogdir=/var/log/open_dnsdb         ;日志文件位置\n    \n    [include]\n    files = /etc/supervisor/conf.d/*.conf\n    ```\n\n  * mkdir -p /etc/supervisor/conf.d\n\n  * 添加openDnsdb项目配配置: \n    * dnsdb: cp etc/beta/supervisor-dnsdb.conf /etc/supervisor/conf.d/open-dnsdb.conf\n    * updater(仅bind服务器需要): cp etc/beta/supervisor-updater.conf /etc/supervisor/conf.d/open-dnsdb-updater.conf\n\n  * 启动: supervisord -c /etc/supervisord.conf\n\n  * 查看是否启动成功: ps aux | grep supervisord\n\n  * supervisorctl -c /etc/supervisord.conf\n\n  \n\n## ChangeLog\n\n* v0.2 - 2019-03-21\n\n   **添加**\n\n   ​\t添加ipv6支持(暂不支持ipv6反解)\n\n   **修改**\n\n   ​\t升级python版本，支持python3.6+\n\n## 感谢\n\n感谢以下同学对项目修改提出的宝贵建议：\n\n* [wss434631143](https://github.com/wss434631143)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqunarcorp%2Fopen_dnsdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqunarcorp%2Fopen_dnsdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqunarcorp%2Fopen_dnsdb/lists"}