随笔分类 -  terraform

1

使用terraform 生成自签名证书
摘要:terraform 是一个很不错的基础设施工具,我们可以用来做关于基础设施部署的事情,可以实现基础设施即代码 以下演示一个简单的自签名证书的生成(使用tls provider) main.tf 文件 resource "tls_private_key" "example" { algorithm = 阅读全文

posted @ 2019-05-29 10:31 荣锋亮 阅读(768) 评论(0) 推荐(0) 编辑

Kapitan 通用terraform&& kubernetes 配置管理工具
摘要:Kapitan 是一个通用的配置管理工具,可以帮助我们管理terraform 、kubernetes 以及其他的配置。 Kapitan 自生基于jsonnet 开发,对于我们日常进行软件的部署(tf以及k8s)是一个很方便的工具 一张参考图 说明 github 上对于Kapitan有详细的说明,对于 阅读全文

posted @ 2019-05-28 19:04 荣锋亮 阅读(863) 评论(0) 推荐(0) 编辑

使用terraform v0.12 生成gitlab repo 创建部署tf 文件
摘要:以前写过一个使用模版引擎+ rest 接口的模式,生成tf 文件,v0.12 直接提供了方便的json 处理函数 我们可以直接结合http 以及templatefile providers 方便的生成文件 rest api 格式 因为有一个数据格式的问题,在rest 接口中直接就暴露了parent 阅读全文

posted @ 2019-05-23 14:13 荣锋亮 阅读(1033) 评论(0) 推荐(0) 编辑

terraform v0.12.0 发布了
摘要:v0.12.0 相比以前的有好多新的特性,包括语法,以及函数增强,昨天还在折腾的一个json解码的问题,直接使用 v0.12.0 就可以解决了,同时也包含了for 操作处理同时官方文档对于v0.12.0 的使用也有比较详细的介绍,具体的 使用可以参考官方文档 参考资料 https://github. 阅读全文

posted @ 2019-05-23 12:38 荣锋亮 阅读(422) 评论(0) 推荐(0) 编辑

使用terraform 进行gitlab 代码仓库批量迁移
摘要:gitlab 的代码是在文件目录中,这个对于批量迁移很简单,只需要copy 文件夹(但是对于不同gitlab server 可能需要重新设置目录权限) 几个问题 大批量仓库tf resource问题 直接使用默认的不是很好,需要配置的比较多,解决方法,可以通过直接查询数据库数据,使用模版引擎生成tf 阅读全文

posted @ 2019-05-23 11:28 荣锋亮 阅读(672) 评论(0) 推荐(0) 编辑

转载一篇阿里云Terraform 开发指南
摘要:连接:https://www.jianshu.com/p/0aebea117cae 是一个比较详细的开发指南 阅读全文

posted @ 2019-04-19 09:26 荣锋亮 阅读(564) 评论(0) 推荐(0) 编辑

terraform 配置github module source
摘要:terraform 支持多种module 的source 配置 以下是一个简单的使用github source的demo 测试项目 项目结构 ├── init.tpl ├── main.tf 代码说明 main.tf 主要配置module block module "users" { source 阅读全文

posted @ 2019-03-27 11:04 荣锋亮 阅读(628) 评论(0) 推荐(0) 编辑

Module Sources
摘要:转自:https://www.terraform.io/docs/modules/sources.html 主要记录module source 的格式 The source argument in a module block tells Terraform where to find the so 阅读全文

posted @ 2019-03-27 11:03 荣锋亮 阅读(311) 评论(0) 推荐(0) 编辑

创建一个简单的terraform module
摘要:terraform module可以实现代码的复用,同时方便分享,下面创建一个简单的基于localfile && template provider 的module module 项目 一个简单基于模板生成curl 配置module 项目结构 ├── README.md ├── init.tpl ├ 阅读全文

posted @ 2019-03-27 10:46 荣锋亮 阅读(1697) 评论(0) 推荐(0) 编辑

Writing and playing with custom Terraform Providers
摘要:转自:https://petersouter.xyz/writing-and-playing-with-custom-terraform-providers/ I’ve been digging deeper on Terraform. It’s something I’ve tinkered wi 阅读全文

posted @ 2019-03-26 18:33 荣锋亮 阅读(568) 评论(0) 推荐(0) 编辑

Write your own Terraform provider: Part 1
摘要:转自:https://container-solutions.com/write-terraform-provider-part-1/ This is the first part of a series of blog posts that explain how to write Terrafo 阅读全文

posted @ 2019-03-26 18:32 荣锋亮 阅读(330) 评论(0) 推荐(0) 编辑

Creating Modules
摘要:转自官方文档,主要说明如何创建模块 https://www.terraform.io/docs/modules/index.html A module is a container for multiple resources that are used together. Modules can 阅读全文

posted @ 2019-03-26 15:47 荣锋亮 阅读(204) 评论(0) 推荐(0) 编辑

terraform plugin 版本以及changlog 规范
摘要:文章来自官方文章,转自:https://www.terraform.io/docs/extend/best-practices/versioning.html 里面包含了版本命名的规范,以及changlog 的编写,对于实际的开发具有很大的价值 Given the breadth of availa 阅读全文

posted @ 2019-03-25 19:05 荣锋亮 阅读(855) 评论(0) 推荐(0) 编辑

Terraform Detecting Drift
摘要:转自:https://www.terraform.io/docs/extend/best-practices/detecting-drift.html 这篇文章主要说明了对于资源如何处理 read&&create,可以让我们了解如何进行状态管理 One of the core challenges 阅读全文

posted @ 2019-03-25 17:20 荣锋亮 阅读(396) 评论(0) 推荐(0) 编辑

使用terraform-provider-s3 操作minio
摘要:尽管默认官方提供了s3 的操作,但是对于开源minio 无法支持,更多的是aws 的s3,社区提供了一个通用 s3 操作的provider(基于minio 的sdk) 环境准备 docker-compose 文件 version: "3" services: s3: image: minio/min 阅读全文

posted @ 2019-03-25 14:51 荣锋亮 阅读(556) 评论(0) 推荐(0) 编辑

Terraform 自定义provider 开发
摘要:内容来自官方文档,主要是进行学习自定义provider 开发的流程 开发说明 我们需要开发的有provider 以及resource 对于resource 我们需要进行crud 的处理,同时还需要进行状态的 处理 项目初始化 dep 使用dep 进行包管理 dep init provider pac 阅读全文

posted @ 2019-03-25 11:28 荣锋亮 阅读(1735) 评论(0) 推荐(0) 编辑

Writing Custom Providers
摘要:转自:https://www.terraform.io/docs/extend/writing-custom-providers.html 很详细,做为一个记录 In Terraform, a Provider is the logical abstraction of an upstream AP 阅读全文

posted @ 2019-03-25 09:02 荣锋亮 阅读(505) 评论(0) 推荐(0) 编辑

terraform 几个方便的工具
摘要:几个方便的terraform 工具,方便了解terraform terraform-docs 方便的查看资源的信息(支持markdown,json 格式),对于ci/cd 很方便 项目地址 https://github.com/segmentio/terraform-docs 安装 for mac 阅读全文

posted @ 2019-03-19 14:01 荣锋亮 阅读(2720) 评论(0) 推荐(0) 编辑

几张简单的terraform flow 图——可以快速了解terraform的使用
摘要:以下是一个简单额terraform flow 我们快速的了解terraform 的使用,基于流程 参考图 参考架构 简单使用流程 说明 从上图我们可以看出terraform 的使用 tf 内容编写 定义变量,定义输出(可选的) 编写主要的任务(main.tf) 执行terraform 的操作(资源生 阅读全文

posted @ 2019-03-19 13:31 荣锋亮 阅读(1507) 评论(0) 推荐(0) 编辑

terraform 阿里云基本使用
摘要:1. 预备环境 安装了terraform 的软件的操作系统(windows linux mac 均可) 具有阿里云账户的 access_key secret_key 2. 配置 // terraform 的配置相对比较随意,但是有几个必须注意的,文件后缀 tf 文件名不需要进行特殊说明 // 以下为 阅读全文

posted @ 2017-11-01 19:51 荣锋亮 阅读(8185) 评论(0) 推荐(0) 编辑

1

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示