ddns_client, used with coredns/etcd
Project description
DDNS
采用以下开源项目作为核心实现:
- CoreDNS: https://coredns.io/
- Etcd: https://etcd.io/
获取公网IP接口(多个容错):
日志/指标方案支持以下:
- fluentd: https://github.com/fluent/fluentd
- prometheus: https://github.com/prometheus/prometheus
- netdata/statsd: https://github.com/netdata/netdata, https://github.com/statsd/statsd
部署方案支持以下:
- systemd: https://github.com/systemd/systemd
- docker: https://github.com/moby/moby
- k8s: https://github.com/kubernetes/kubernetes
其他参数支持:
- pid
客户端采用技术:
- python3.6: https://docs.python.org/3.6/
- logging/asyncio:
- uvloop: https://github.com/MagicStack/uvloop
- etcd: https://github.com/kragniz/python-etcd3
fluentd: https://github.com/fluent/fluent-logger-python#使用tcp通信, 与架构兼容性不好- fluentd: https://docs.fluentd.org/input/udp
- statsd: https://github.com/jsocol/pystatsd
- prometheus: https://github.com/prometheus/client_python
- aiohttp: https://github.com/aio-libs/aiohttp
- color: https://github.com/tartley/colorama, https://github.com/xolox/python-coloredlogs
实现方案考虑
coredns + /etc/hosts + python server/clientcoredns + etcd + python client
最终方案选择
降低对环境的耦合, 不对 /etc/hosts 进行操作(简单性能一般), 最终采用 coredns + etcd + python client 方案。
部署方案考虑
支持以下方案(平台支持: linux/amd64+arm64):
- 二进制/systemd
- Docker/docker-compose/docker-swarm
- k8s
周边生态考虑
支持以下项目:
-
参数配置
-
日志输出:
- 标准输出/错误
- 日志文件(根据信号支持重新打开): logging
- fluentd输出: fluentd-python
-
指标输出:
- http/https: prometheus
- netdata/statsd: statsd-python
-
信号处理:
- 重启加载日志
- stop/quit/reopen/reload
运行流程图
读取配置文件:
运行:
安装部署
# brotlipy(aiohttp[speedup]) requirements
apt install -y build-essential python3.6-dev libffi-dev
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ddns_client-0.8.tar.gz
(7.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ddns_client-0.8-py3-none-any.whl
(20.7 kB
view details)
File details
Details for the file ddns_client-0.8.tar.gz.
File metadata
- Download URL: ddns_client-0.8.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f24881889413b4398fafa4db5e033b8c25ecf578c7ecc9ab3915b98e3c0ec9f7
|
|
| MD5 |
17b7230fdea17735f58687dca13d847f
|
|
| BLAKE2b-256 |
48cf442e5e5a3333457346cc83a5898bba4619facd1d36223206b350d9217587
|
File details
Details for the file ddns_client-0.8-py3-none-any.whl.
File metadata
- Download URL: ddns_client-0.8-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48b6cab032cd565bcb049f82a7d31b605cfceaed7a96b7046003925ba8919967
|
|
| MD5 |
d6f4dddad44a93dd31e1d03c7c8e7eb2
|
|
| BLAKE2b-256 |
2ccff92d4aac445c290dd60393bb27ba14c892e6dd01a264363cd1c2125802ca
|