当前位置:网站首页>Infrastructure is code: a change is coming
Infrastructure is code: a change is coming
2022-07-02 21:51:00 【Editorial Department of new programmer】
As an infrastructure automation method based on software development practice , Infrastructure is code (Infrastructure as
Code, It can be abbreviated as IaC) It is common nowadays , But facing the evolving technology and market demand , Infrastructure, that is, code, also needs to keep pace with the times , Especially in the current era of cloud primordial , Facing an unprecedented challenge and change .
Since the formation of the software industry , For decades , There will be some major events almost every once in a while , We can call it a paradigm shift . In this continuous transformation process , Software development puts forward increasingly stringent requirements for infrastructure management : Products should be able to keep up with market demand , The response speed of infrastructure must be improved ; Continuous delivery and DevOps The prevalence of , The product team is required to have higher autonomy in deployment and operation and maintenance ; The continuous iteration of technology makes the configuration of infrastructure more frequent and cumbersome …… As the above problems continue to intensify , It gradually derived the concept of infrastructure, namely code , That is, while ensuring the safety and reliability of infrastructure , It should also have the characteristics of flexible management .
be based on Thoughtworks Company Cloud practice leader Kief Morris stay 《 Infrastructure is code 》 The definition of infrastructure as code in the book :“ Infrastructure as code is a way to build and manage a dynamic infrastructure using new technologies . It puts the infrastructure 、 Tools and services and the management of infrastructure itself as a software system , Adopt software engineering practices to structure 、 Manage system changes in a safe way ”, We can understand it as an infrastructure automation method based on software development practice , It mainly emphasizes that the daily preparation and change of the system and its configuration are consistent and repeatable , Allow developers to manage virtualization infrastructure and ancillary services using configurations described in any language , At the same time, these configuration files are usually hosted in the source code base .
Evolution of infrastructure delivery channels
Infrastructure, that is, code, has developed so far , From concept to landing , From niche to popularity , Every promotion is inseparable from the changes in the software industry .
virtualization
In the early stages of virtualization , Developers need to document according to requirements , It takes a long waterfall development cycle to produce software . period , The operation and maintenance team needs to build servers 、 Provide infrastructure components 、 Install all software and complete configuration . However , In this period , There is usually no connection between the work of the development and operation and maintenance teams , Communication is mainly through task list and round-trip mail , Very inconvenient ( See the picture 1).

Agile and the beginning of development and operation
later , We have experienced agile movement , Followed by the development of operation and maintenance culture . Now , When developers send applications to the operation and maintenance team , A configuration manual will also be sent , Even more advanced teams will work together to develop automated tools ( See the picture 2). In the early days of infrastructure automation tools ,Chef and Puppet And other tools are very popular . This way is undoubtedly a great progress , But this tends to create a very isolated environment , Responsibility is also very decentralized .

Public cloud and container orchestration
With the popularity and automation of public cloud, more and more powerful , All this is gradually on track . Most o & M teams will choose Terraform, Compared with the situation a few years ago , It's a huge step forward , The number of infrastructure also increased exponentially .
As a whole , This method has been almost perfect for a long time , There are only two aspects missing :
The experience of the development and operation and maintenance team is slightly insufficient . Once there is a problem with the carefully created infrastructure , It requires a lot of labor and maintenance costs .
Developers must learn new languages , Strive to integrate operation and maintenance tools into the workflow . Community members gathered together , Propose creative solutions 、 Detect problems and improve system automation and observability . Come alone , All of these tools and projects they put forward are excellent , Unfortunately, there is no standard .
So how to improve it ? How to realize the leap again , Build greater 、 Better products ? answer : In the era of cloud primordial , Naturally, we should use containerization and container orchestration , In order to achieve narrow packaging ( Container image ) And runtime (Kubernetes Pod) Standardization of . For the sake of understanding , This article will be Crossplane For example , Explain how the infrastructure, that is, the missing link in code change, should be complemented .
Filling the infrastructure is the lack of code change
Open source cloud native control plane project Crossplane stay 2021 year 9 Month by month CNCF Technical Supervision Committee (TOC) Voted to upgrade it to CNCF The incubation program of , yes Upbound stay 2018 General control plane project under hybrid cloud environment developed in , On 2020 year 7 Month be CNCF Sandbox project .Crossplane Used across environments 、 colony 、 Region and cloud to manage cloud native applications and infrastructure , Its strength lies in , It uses cloud native open standards and the most popular tools , Convenient for developers ( Application team ) And operation and maintenance personnel ( Platform team ) Work together , At the same time, there is no need for interdependence ( See the picture 3).

in my opinion ,Crossplane It has the following characteristics :
firstly , Based on the Kubernetes above , and Kubernetes Its real strength lies in its powerful API Model and control plane logic ( Control cycle ), therefore Crossplane adopt Kubernetes The control plane of connects the application team and the platform team , Enables seamless collaboration , This is the biggest advantage .
second , It realizes the transformation from infrastructure as code to infrastructure as data . The difference between the two is , Infrastructure, that is, code, needs to be written to describe the configuration of the application , Infrastructure, that is, data, can write pure data files (Kubernetes Of YAML), And submit it to the control component (Kubernetes Operator for ) Encapsulate and execute configuration logic .
chart 4 by Crossplane Component model and its basic interaction .

To complement the infrastructure is the missing link in the code change ,Crossplane The combination function of is particularly suitable : Use Crossplane The composite function of helps abstract the complexity of the infrastructure , Transfer to the platform team , Thus reducing the burden on developers . The specific practice is as follows .
First , need AWS, And configure on the local machine CLI( notes : If you want to understand deployment components and Kubernetes Resource model , Need to have AWS Basic knowledge of ). It needs to be installed locally VS Code And remote container plug-ins devcontainer, If you use Windows System , It will take WSL2( For specific installation settings, please refer to Crossplane Website shows ).
After installation , One can be deployed RDS example —— A kind of AWS managed Kubernetes resources , Be similar to Pod、 Services and replica sets , It can be done by Octant Or command line tool to check the progress of deployment . And then , Redeployment EKS colony , Many components need to be created , Such as VPC、 subnet 、IAM role 、 Node pool 、 Routing table 、 Gateway, etc. . This process may be troublesome , Not an ideal developer experience , But what is called “ Sharpening a knife never misses a woodcutter ”.
The step of creating necessary components cannot be omitted , Developers are deploying EKS Other tasks during clustering are greatly reduced .
- There is no need to master the huge and complex EKS The overall architecture , Just understand some of the components ( See the picture 5), Leave complex and error prone work to specialized Kubernetes And the platform team of cloud providers .

- After the relevant preparations are completed , Deploy EKS Clustering becomes very simple , Just one command :kubectl create -f ./aws( If successfully deployed , See the picture 6 state ).

Conclusion
overall , The reason why I think Crossplane It can make up for the lack of infrastructure, that is, code change , Not only is it integrated into the development and operation culture , Promotes loosely coupled collaboration between application teams and platform teams , Its resource model 、 pack 、 The configuration has been carefully considered , It also has some special advantages :
Composable infrastructure
self-service
Improve automation
Standardized collaboration
General language (Kubernetes API)
Because of these advantages , It gives full play to the potential of Cloud Computing , It can transfer the complexity of the basic configuration to the professional platform team , Liberate the development and operation and maintenance personnel from the more error prone tasks . meanwhile , Through and with Kubernetes The tight integration of ,Crossplane It also further promoted the transformation of infrastructure, namely code, in the era of cloud Nativity , The concept of infrastructure as code has been raised to a new level .
The authors introduce :Piotr Zaniewski, The current comforte AG senior DevOps Architects , Have more than 10 Years of experience in software related positions , Focus on Cloud Architecture 、 Software development and skills , Once used Microsoft Azure、Google Cloud Design hybrid cloud platform with other technologies , Help the entire organization achieve digital transformation .
This article has been translated by the author , Original address :https://itnext.io/infrastructure-as-code-the-next-big-shift-is-here-9215f0bda7ce
This article from the 《 New programmers · Cloud native and comprehensive digital practices 》. stay 《 New programmers 003》 in , We focus on “ Developers in the cloud native era ” And “ Full digital transformation ” Two themes . Ali 、 Bytes to beat 、 NetEase 、 Well quickly 、 The enablers of cloud native technology of Internet giants such as Amazon , From the technical definition 、 Technology application 、 Practice case sharing, etc , Fully analyze the cloud native data with the hard core output of directly hitting the kernel , Help developers quickly find technology paradigms suitable for their own development in the cloud native era .
meanwhile , We will also talk to Microsoft 、 Intel 、 Huawei 、 Schneider 、 Siemens and other first companies to start digital transformation report , Fresh cases shared by more than a dozen technical experts , A glimpse of Finance 、 The new retail 、 Digital transformation achievements in industrial Internet of things and other fields , Help developers who pay more attention to digital transformation learn from the experience of pioneers .
Read more information and technology related articles , Welcome to scan the QR code below or click to subscribe 《 New programmers 003》 Paper book + e-book .
边栏推荐
- Research Report on market supply and demand and strategy of Chinese garden equipment industry
- MySQL learning record (8)
- China plastic bottle and container market trend report, technological innovation and market forecast
- Unexpectedly, there are such sand sculpture code comments! I laughed
- PIP version update timeout - download using domestic image
- Construction and maintenance of business websites [6]
- Gbase8s database type
- 读博士吧,研究奶牛的那种!鲁汶大学 Livestock Technology 组博士招生,牛奶质量监测...
- Redis distributed lock failure, I can't help but want to burst
- Micro SD Card Industry Research Report - market status analysis and development prospect forecast
猜你喜欢

How to write a good program when a big book speaks every day?

Technical solution of vision and manipulator calibration system

GEE:(二)对影像进行重采样
![[CV] Wu Enda machine learning course notes | Chapter 12](/img/c8/9127683b6c101db963edf752ffda86.jpg)
[CV] Wu Enda machine learning course notes | Chapter 12
![[shutter] shutter layout component (opacity component | clipprect component | padding component)](/img/6b/4304be6a4c5427dcfc927babacb4d7.jpg)
[shutter] shutter layout component (opacity component | clipprect component | padding component)
![[shutter] shutter layout component (physicalmodel component)](/img/6a/f8161fb7c8e9012456622f1920da64.gif)
[shutter] shutter layout component (physicalmodel component)

MySQL learning record (4)

Etcd raft protocol

tinymce可视化编辑器增加百度地图插件

The difference between include < > and include ""
随机推荐
: last child does not take effect
Redis distributed lock failure, I can't help but want to burst
Research Report on crude oil tanker industry - market status analysis and development prospect forecast
Structure array, pointer and function and application cases
Record the functions of sharing web pages on wechat, QQ and Weibo
China plastic box market trend report, technological innovation and market forecast
Landingsite eband B1 smoke test case
[Jianzhi offer] 56 - ii Number of occurrences of numbers in the array II
Cardinality sorting (detailed illustration)
China's log saw blade market trend report, technological innovation and market forecast
如何防止你的 jar 被反编译?
Blue Bridge Cup Winter vacation homework (DFS backtracking + pruning)
Construction and maintenance of business websites [7]
【零基础一】Navicat下载链接
Daily book CSO advanced road first exposed
It is said that this year gold three silver four has become gold one silver two..
[use of pointer and pointer and array]
System (hierarchical) clustering method and SPSS implementation
图像基础概念与YUV/RGB深入理解
Accounting regulations and professional ethics [16]
