terraform实践
简介
实现基础设施即代码的工具。方便多云环境重复部署。
安装
下载cli https://www.terraform.io/downloads
1 | terraform -version |
实现基础设施即代码的工具。方便多云环境重复部署。
下载cli https://www.terraform.io/downloads
1 | $ terraform -version |
这里有一些DevOps各环节的技术选型
开发 | workflows/pipeline | 包管理 | ci | cd | progressive delivery tool(渐进式交付) | service mesh | 基础设施 |
---|---|---|---|---|---|---|---|
kt-connect | argo-workflows | Helm | GitLab/GitHub | argo cd | Argo Rollouts | istio | OpenTofu |
Jenkins file | Jenkins | Flagger | Linkerd | terraform | |||
Apache Airflow | Spinnaker | zadig | crossplane | ||||
Ingress
Feature | Apisix | Contour | Gloo | NGINX | Skipper | Traefik |
---|---|---|---|---|---|---|
Canary deployments (weighted traffic) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
A/B testing (headers and cookies routing) | ✔️ | ✔️ | ✔️ | ✔️ | ➖ | ➖ |
Blue/Green deployments (traffic switch) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Webhooks (acceptance/load testing) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Manual gating (approve/pause/resume) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Request success rate check (L7 metric) | ✔️ | ✔️ | ✔️ | ➖ | ✔️ | ✔️ |
Request duration check (L7 metric) | ✔️ | ✔️ | ✔️ | ➖ | ✔️ | ✔️ |
Custom metric checks | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
目前Kubernetes Gateway API并没有特别好的选型方案
最好能使用API Gateway来进行流量控制
各网关进度:
https://gateway-api.sigs.k8s.io/implementations/
Ps.无需安装其他工具
使用apisix-ingress可以使灰度颗粒度更细
可通过jenkins pipeline 控制流水线
配置OpenVPN
配置数据卷,生成配置文件。预计网段人数不多,使用192.168.0.0/24网段,但需要注意的是在配置固定IP时,掩码必须为/30,因此固定IP需要注意正确配置。#配置数据卷
创建挂载目录
1 | mkdir -p /home/openvpn |