当前位置:网站首页>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 .
边栏推荐
- Cloud computing technology [1]
- 记录一下微信、QQ、微博分享web网页功能
- Structure array, pointer and function and application cases
- How to prevent your jar from being decompiled?
- 技术人创业:失败不是成功,但反思是
- Jar package startup failed -mysql modify the default port number / set password free enter
- MySQL inserts Chinese data and reports an error. Set the default collation
- Analysis of neural network
- Construction and maintenance of business website [3]
- MySQL learning record (3)
猜你喜欢

How is LinkedList added?

GEE:(二)对影像进行重采样
![[Yu Yue education] reference materials of analog electronic technology of Nanjing Institute of information technology](/img/2f/bb99836bb3ad725483f30531ff4d53.jpg)
[Yu Yue education] reference materials of analog electronic technology of Nanjing Institute of information technology

发现你看不到的物体!南开&武大&ETH提出用于伪装目标检测SINet,代码已开源!...

It is said that this year gold three silver four has become gold one silver two..

Technical solution of vision and manipulator calibration system

D4:非成对图像去雾,基于密度与深度分解的自增强方法(CVPR 2022)

How to test the process of restoring backup files?

System (hierarchical) clustering method and SPSS implementation

Daily book -- analyze the pain points of software automation from simple to deep
随机推荐
D4: unpaired image defogging, self enhancement method based on density and depth decomposition (CVPR 2022)
[shutter] shutter layout component (wrap component | expanded component)
[shutter] statefulwidget component (pageview component)
The difference between include < > and include ""
[shutter] shutter layout component (fractionallysizedbox component | stack layout component | positioned component)
[C language] [sword finger offer article] - replace spaces
How to center the positioned text horizontally and vertically
PIP audit: a powerful security vulnerability scanning tool
Research Report on crude oil tanker industry - market status analysis and development prospect forecast
[shutter] shutter page Jump (route | navigator | page close)
How to write a good program when a big book speaks every day?
Unexpectedly, there are such sand sculpture code comments! I laughed
MySQL learning record (9)
beginning
Market trend report, technical innovation and market forecast of China's Micro pliers
[shutter] shutter layout component (opacity component | clipprect component | padding component)
China's noise meter market trend report, technical dynamic innovation and market forecast
How do I access the kubernetes API?
Research Report on minimally invasive medical robot industry - market status analysis and development prospect prediction
Basic knowledge of tree and binary tree (detailed illustration)
