Skip to Content
语义软件设计
book

语义软件设计

by Eben Hewitt
September 2022
Beginner to intermediate
321 pages
4h 50m
Chinese
China Electric Power Press Ltd.
Content preview from 语义软件设计
216
9
9.3
基础设施即代码
基础设施即代码(
Infrastructure as Code
,简称
IaC
)允许你通过纯文本,以声明式
的方式描述你想要创建的基础设施。软件系统会读取这些声明,并建立相应的基础
设施。你不需要协商合同,招募采购部门,并提前花费大量资金,通过不可重复且
难以可视化的流程建立数据中心。在
IaC
的帮助下,你可以使用配置语法,通过纯
文本定义整个数据中心。这些文本就是数据中心的蓝图。
IaC
具有以下几点巨大的
优势:
全面了解数据中心的情况,以及支撑应用程序和服务的所有组件。
只需简单地修改区域或地区名称,即可跨多个云区域重复部署数据中心。
此外,其他团队也可以共享和重用基础设施的定义,方便项目快速启动。
由于基础设施的定义是纯文本文件,所以可以(并且应该)存储到代码库中,
这意味着
IaC
定义可以实施版本控制。如果出现异常,可以将整个数据中心回
滚到上一次正常工作的状态。
基础设施环境的测试也更加容易。你可以(并且应该)编写一系列测试来检查
基础设施的健康状况和合规性。
可以将管治定义为代码,检查资源是否已正确配置、标记并符合指南。
鉴于这些原因,我们认为
IaC
是解构软件系统设计中的一个重要元素。业务应用程
序领域中的一切都可以是代码,而且也应该是代码,这样就可以通过
API
呈现,而
且还可以通过自动化流程调用。
以下是一些流行的实现
IaC
的工具:
使用
Vagrant
https://www.vagrantup.com
)之类的工具配置本地和远程系统。
Vagrant ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

金融中的人工智能

金融中的人工智能

Posts & Telecom Press, Jeffrey Ng, Subhash Shah
移动端机器学习实战

移动端机器学习实战

Posts & Telecom Press, Karthikeyan NG
精通数据科学算法

精通数据科学算法

Posts & Telecom Press, David Natingga

Publisher Resources

ISBN: 9787519870300