Introduction to Terraform

» What is Terraform?

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions.

Terraform 是一个安全高效的创建、变更与融合基础设置的工具。Terraform
可以管理现有的解决方案、受欢迎的服务商解决方案以及内部定制的解决方案。

Configuration files describe to Terraform the components needed to run a single application or your entire datacenter. Terraform generates an execution plan describing what it will do to reach the desired state, and then executes it to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied.

配置文件向Terraform描述运行单个应用程序或整个数据中心所需的组件。Terraform生成一个执行计划,描述如何达到所需的状态,然后执行它来构建所描述的基础架构。随着配置更改,Terraform能够确定更改的内容,并创建可应用的增量执行计划。

The infrastructure Terraform can manage includes low-level components such as compute instances, storage, and networking, as well as high-level components such as DNS entries, SaaS features, etc.

Terraform可以管理的基础架构包括计算实例,存储和网络等低级组件,以及DNS条目,SaaS功能等高级组件。

Examples work best to showcase Terraform. Please see the use cases.

The key features of Terraform are:

» Infrastructure as Code

基础设施即代码

Infrastructure is described using a high-level configuration syntax. This allows a blueprint of your datacenter to be versioned and treated as you would any other code. Additionally, infrastructure can be shared and re-used.

基础架构使用高级配置语法进行描述。这描述了一副蓝图,可以让你的数据中心与其他代码一样被版本化和处理。另外,基础架构可以共享和重用。

» Execution Plans

执行计划

Terraform has a “planning” step where it generates an execution plan. The execution plan shows what Terraform will do when you call apply. This lets you avoid any surprises when Terraform manipulates infrastructure.

Terraform有一个“计划”步骤,它生成一个执行计划。当你调用应用程序时,执行计划显示Terraform将执行的操作。这可以避免任何因为Terraform操作基础设施产生的意外。

» Resource Graph

资源图

Terraform builds a graph of all your resources, and parallelizes the creation and modification of any non-dependent resources. Because of this, Terraform builds infrastructure as efficiently as possible, and operators get insight into dependencies in their infrastructure.

Terraform构建了所有资源的图表,并行了任何非依赖资源的创建和修改。因此,Terraform尽可能高效地构建基础架构,操作人员可以深入了解其基础架构中的依赖关系。

» Change Automation

变更自动化

Complex changesets can be applied to your infrastructure with minimal human interaction. With the previously mentioned execution plan and resource graph, you know exactly what Terraform will change and in what order, avoiding many possible human errors.

应用基础设施有复杂变更操作时,可以有最少的人为交互。通过前面提到的执行计划和资源图,您可以确切知道Terraform将会以什么顺序进行变更,从而避免很多可能的人为错误。

参考链接:
https://www.terraform.io/intro/index.html
https://github.com/hashicorp/terraform
http://www.infoq.com/cn/news/2015/05/hashimoto-modern-datacenter
(INFOQ的文章介绍的很详细)
https://github.com/alibaba/terraform-provider

核心摘要:

从企业的角度来看,一个典型的数据中心的资源使用是从单物理服务器发展而来的,经历了使用多个裸物理服务器,并最终发展成为使用多个虚拟机实例。这一进化的最新趋势是走向容器化。配置、部署和维护的复杂性一直随着这一演进而增加,人们对自动化的需求变得极为重要

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值