Python 包及环境管理工具 UV
之前 Python 主要是利用 Pyenv 做环境管理,pip 做包管理,接下来试试 UV
安装 UV
1 | curl -LsSf https://astral.sh/uv/install.sh | sh |
安装 Python
1 | # 显示已经安装或可安装版本 |
创建项目
1 | # 初始化项目,最低兼容3.10版本Python |
设置虚拟环境
1 | # 创建虚拟环境 |
安装卸载依赖
1 | # 安装 |
未完待续…
之前 Python 主要是利用 Pyenv 做环境管理,pip 做包管理,接下来试试 UV
1 | curl -LsSf https://astral.sh/uv/install.sh | sh |
1 | # 显示已经安装或可安装版本 |
1 | # 初始化项目,最低兼容3.10版本Python |
1 | # 创建虚拟环境 |
1 | # 安装 |
未完待续…
1 | # journalctl -u docker.service --since "10 minutes ago" |
1 | { |
网段不能以.0
结尾,只能以.1
结尾,因为需要一个实际地址分配给 docker0
网卡
Fluentd 向 ES 写入数据的时候如下报错:
1 | 2024-12-27 01:33:27 +0000 [warn]: #0 fluent/log.rb:381:warn: send an error event to @ERROR: error_class=Fluent::Plugin::ElasticsearchErrorHandler::ElasticsearchError error="400 - Rejected by Elasticsearch [error type]: illegal_argument_exception [reason]: 'Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [3000]/[3000] maximum shards open;'" location=nil tag="kubernetes.var.log.containers.dataops-ds-worker-fbc64df5f-k6xrm_dataops_dataops-ds-worker-494d705e1a173657644f86708f16041cf8d429038c969f1237d7f040bbaa313e.log" time=2024-12-27 01:33:21.135254232 +0000 |
1 | curl -X PUT -u admin:xxxxxx --insecure https://172.23.8.175:9200/_cluster/settings -H 'Content-Type: application/json' -d '{ |
1 | curl -X GET -u admin:xxxxxx --insecure https://172.23.8.175:9200/_cat/shards?v |
1 | # /etc/lsyncd.conf |
1 | # /usr/lib/systemd/system/lsyncd.service |
1 | # /usr/local/bin/coredns -dns.port=53 -conf /etc/coredns/Corefile |
1 | # /etc/coredns/Corefile |
1 | # /etc/coredns/jakehu.me |
如果增加了记录需要将 2017042745
加 1,让配置生效
CoreDNS 本身并不直接支持传统的主从配置(如 BIND 的 masters 和 slaves)。不过,以下几种方法可以实现类似的功能:
参考:
https://coredns.io/manual/toc/
参考官方文档:https://hexo.io/zh-cn/docs/github-pages
参考官方文档:https://hexo.io/zh-cn/docs/github-pages
1 | "scripts": { |
1 | name: Publish Hexo to gitpage |
ACCESS_TOKEN 变量需要在源码仓库 Settings->Secrets and variables->Actions
下进行设置
1 | SlaveConnectionPool no available Redis entries |
升级版本 3.27.0 以上
参考:https://github.com/redisson/redisson/blob/master/CHANGELOG.md
1 | cd /var/lib/kubelet/pki/ && openssl x509 -in kubelet.crt -text -noout |grep After |
1 | # ansible剧本 |
1 | kubectl rollout restart ds calico-node -n kube-system |
1 | # docker-compose.yaml |
WEB UI:http://10.168.140.45:8500/ui/dc1/services 可以直接访问 8500 端口
1 | log_level = "error" |
默认配置:
https://developer.hashicorp.com/consul/docs/agent/config/config-files
1 | # 结构类似于 |
服务注册文档:
https://developer.hashicorp.com/consul/api-docs/agent/service#register-service
1 | scrape_configs: |
参考: