惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
H
Help Net Security
B
Blog RSS Feed
G
Google Developers Blog
博客园 - 司徒正美
MongoDB | Blog
MongoDB | Blog
量子位
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
P
Proofpoint News Feed
小众软件
小众软件
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
V
V2EX
月光博客
月光博客
C
Check Point Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
A
Arctic Wolf
Help Net Security
Help Net Security
Schneier on Security
Schneier on Security
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Palo Alto Networks Blog
T
Tenable Blog
L
LangChain Blog
Attack and Defense Labs
Attack and Defense Labs
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
Forbes - Security
Forbes - Security
F
Fortinet All Blogs
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
大猫的无限游戏
大猫的无限游戏
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Y
Y Combinator Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
NISL@THU
NISL@THU
GbyAI
GbyAI
博客园 - Franky
S
Secure Thoughts
有赞技术团队
有赞技术团队
PCI Perspectives
PCI Perspectives
U
Unit 42

博客 on 打工人日志

k8s RKE2 cilium L2 + envoy gateway 安装配置 k8s RKE2 vSphere 存储配置 OpenClaw 全能指南:从安装到进阶自动化实战 (2026 最终版) Kubernetes — skywalking + banyanDB APM监控部署 Kubernetes — promtail + loki + grafana 日志系统部署 k8s master 节点 Unauthorized Kubernetes — metalLB + Traefik 部署 Kubernetes — SSL 证书自动更新 Kubernetes — RKE2 + kube-vip + cilium 部署 使用TLSv1.3 升级nginx和openssl Proxmox VE(PVE) 更新到最新版本 kindle 邮件发送失败,错误代码E999 metallb + ingress-nginx + argocd 本地部署 iStoreOS(旁路由)使用openclash实现dns劫持 异常流量分析:图片库服务黑客入侵 openwrt 硬盘扩容 搭建ip地址检索服务 Kubernetes — k8s 手动安装 1.17.9 SELinux 问题:导致端口无法创建,无法访问 【福利】免费!本地部署!去除视频中移动的物体 通知:《打工人日报》迁移到独立板块 KyBook 3 | calibre-web - IOS系统最佳图书伴侣 Tmux 安装和使用教程 DockerHub 加速镜像部署 - 使用cloudflare 代理 docker的零停机部署 SD-webui 批量处理图片 ubuntu 安装 ComfyUI ubuntu 安装 stable-diffusion-webui 测试策略:微服务架构 单元测试:测试单元质量提升 端到端测试:模拟用户体验 Kubernetes — containerd 安装和部署 CI/CD 可观察性-基于grafana Argo cd 安装和部署 linux服务器进程打开文件过多导致服务异常 使用 ElasticSearch Curator 7天定期删除日志 sonarqube docker安装和配置 SSH 通过 443 端口连接 GitHub iOS 17 「待机显示」适配普通 iPhone(非 Pro/Max),屏幕在充电时常亮 GNU/Linux 一键更换系统软件源脚本 解决Elasticsearch索引只读(read-only) 【福利】埃隆·马斯克传 [沃尔特·艾萨克森] 在线下载 【破解】小鹏P5和小鹏G9开启adb和网络adb Kubernetes — kubecost 分析 Kubernetes 成本 3D Gaussian Splatting:3D模型渲染 Linux 系统收包流程以及内核参数优化 2023亚运会电竞门票民购买指南(报名+抽签) Vue3 + vite + nginx项目部署后404问题 大麦抢票辅助软件(福利 TFBOYS十年之约演唱会 2023 全机位 视频) 黑群晖最新安装教程 Ansible部署ceph集群 最好的微信朋友圈集赞神器-福利推荐 推荐一下 容器云资源 2010年的天涯神贴聊房价 如何礼貌回绝不合理的需求 nginx 配置和编译 github 国内代理访问下载 使用scrapy-redis实现增量爬取 逆境和成长-2022年终总结 优雅的使用Conda管理python环境 Jenkins 编译Android apk 流水线 Kubernetes — 更新证书 shell功能脚本集合 Nexus3 使用和部署 githubAction set-output弃用错误 Kubernetes — Rook云存储介绍和部署 Kubernetes — 基于K8S搭建Ceph分布式存储 Kubernetes — 探针和生命周期 Kubernetes — 开放标准(OCI、CRI、CNI、CSI、SMI、CPI)概述 kubernetes 部署插件 (Flannel、Web UI、CoreDNS、Ingress Controller) Cloudflare Zero Trust 内网穿透 k8s CNI 问题 连接认证失效 k8s.gcr.io国内无法连接解决方法 headscale 部署使用 羊了个羊小程序 破解通关 K8S 问题排查:cgroup 内存泄露问题 RocketMQ k8s部署 4主4从集群 docker 问题处理 kubernetes 存储 linux服务器 删除空间却未释放 kubernetes 从1.23.x 升级到 1.24.x 编写 kubernetes 资源描述文件 nginx ssh-key connection exception kubernetes manual expansion VSCode插件推荐=> Code Runner ant build.xml 编写 kubernetes 调度过程 记录一次上门打散工 k8s本地联调神器kt-connect Ant中如何添加第三方jar包依赖 OpenELB:让k8s私有环境对外暴露端口 linux 网络测速 安装 docker 出现 ERROR: Unsupported distribution 'ol' 问题 logrotate 日志滚动的使用 nginx 编译参数详解 nginx 重写规则 rewrite模块 nginx.conf 配置文件详解 rsync 文件同步 163企业邮箱设置教程 2021年第50周记
安装配置 Terraform
2021-12-27 · via 博客 on 打工人日志

安装配置 Terraform

安装

  1. macOS 苹果系统安装
1#安装
2brew tap hashicorp/tap
3brew install hashicorp/tap/terraform
4# 更新
5brew update
6brew upgrade hashicorp/tap/terraform
7#验证安装
8terraform -help
  1. windows 系统安装
1#安装
2choco install terraform
3#直接到这个url里下载64位系统
4https://www.terraform.io/downloads
5#验证安装
6terraform -help
  1. Linux 安装
1curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
2sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
3sudo apt-get update && sudo apt-get install terraform
4#验证安装
5terraform -help
1wget -O- https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo | sudo tee /etc/yum.repos.d/hashicorp.repo
2sudo yum install terraform -y

terrafrom 控制 proxmox 虚拟机

来源:https://github.com/Telmate/terraform-provider-proxmox

首先你要有一台 pve 主机

安装过程本篇文章就不想了,主要是要写一下关于他的配置
https://pve.proxmox.com/pve-docs/

  1. 下载
1wget https://github.com/Telmate/terraform-provider-proxmox/releases/download/v2.9.3/terraform-provider-proxmox_2.9.3_linux_amd64.zip
2unzip terraform-provider-proxmox_2.9.3_linux_amd64.zip

编写 terrafrom 程序

  1. 虚拟机 main.tf
 1terraform {
 2  required_version = ">= 0.14"
 3  required_providers {
 4    proxmox = {
 5      source  = "telmate/proxmox"
 6    }
 7  }
 8}
 9
10provider "proxmox" {
11  # 配置选项
12    pm_tls_insecure = true
13    pm_api_url = "https://localhost:8006/api2/json"
14    pm_user = "root@pam"
15    pm_password = "passwd"
16    pm_otp = ""
17}
18
19# 创建VM
20resource "proxmox_vm_qemu" "cloudinit-test" {
21    name = "terraform-test-vm"
22    desc = "A test for using terraform and cloudinit"
23
24    #节点名称必须与集群内的名称相同
25    #这可能不包括 FQDN
26    target_node = "pve"
27
28    #新虚拟机的目标资源池
29    pool = "pool0"
30
31    #从中克隆这个虚拟机的模板名称
32    clone = "node0"
33
34    #为这个虚拟机激活 QEMU 代理
35    agent = 1
36
37    os_type = "cloud-init"
38    cores = 2
39    sockets = 1
40    vcpus = 0
41    cpu = "host"
42    memory = 2048
43    scsihw = "lsi"
44
45    #设置磁盘
46    disk {
47        size = 32
48        type = "virtio"
49        storage = "local-lvm"
50        storage_type = "lvmthin"
51        iothread = 1
52        ssd = 1
53        discard = "on"
54    }
55
56    #设置网络接口并分配一个 vlan 标签:256
57    network {
58        model = "virtio"
59        bridge = "vmbr0"
60        tag = 256
61    }
62}
  1. 运行 terrafrom
1# 初始化
2terraform init
3# 查看产生的变更
4terraform plan
5# 运行
6terraform apply

配置

配置这个 terraform 我们这个需要持续更新,首先我们先配置 Azure 吧

Azure 配置

  1. 安装 azurecli
1# linux
2curl -L https://aka.ms/InstallAzureCli | bash
3apt install azure-cli
4# macOS
5brew update && brew install azure-cli
  1. 登录 azure
1# 中国区azure
2az cloud set --name AzureCloud
3az login -u <账户> -p <密码>
4
5#海外azure
6az cloud set --name AzureChinaCloud
7az login -u <账户> -p <密码>
  1. 创建 terrafrom 代码 创建 main.tf
 1# 正在使用的 Azure 提供程序源和版本
 2terraform {
 3    required_version = ">=0.12"
 4
 5    required_providers {
 6        azurerm = {
 7            source = "hashicorp/azurerm"
 8            version = "~>2.0"
 9        }
10    }
11}
12# 配置 Microsoft Azure 提供程序
13provider "azurerm" {
14  features {}
15}
16
17# 资源组前缀
18resource "random_pet" "rg-name" {
19  prefix    = var.resource_group_name_prefix
20}
21
22# 创建资源组
23resource "azurerm_resource_group" "rg" {
24  name      = random_pet.rg-name.id
25  location  = var.resource_group_location
26}

创建 variable.tf

1variable "resource_group_name_prefix" {
2  default       = "rg"
3  description   = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
4}
5
6variable "resource_group_location" {
7  default = "eastus"
8  description   = "Location of the resource group."
9}