Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
166 views
in Technique[技术] by (71.8m points)

amazon web services - How to deploy Infrastructure as Code on AWS

Had a question regarding infrastructure as code on AWS.

Wondering how to do this (the process of deploying) and also why is this an efficient method for architecture? Also, are there other methods that should be looked at over this?

I am looking to deploy this for a startup I am working for and need assistance in getting this going. Any help is appreciated.

Thank you.

question from:https://stackoverflow.com/questions/65713203/how-to-deploy-infrastructure-as-code-on-aws

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

From What is AWS CloudFormation?:

AWS CloudFormation is a service that helps you model and set up your Amazon Web Services resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS. You create a template that describes all the AWS resources that you want (like Amazon EC2 instances or Amazon RDS DB instances), and AWS CloudFormation takes care of provisioning and configuring those resources for you. You don't need to individually create and configure AWS resources and figure out what's dependent on what; AWS CloudFormation handles all of that.

So, instead of manually creating each bit of architecture (network, instances, queues, storage, etc), you can define them in a template and CloudFormation will deploy them. It is smart enough to mostly know the correct order of creation (eg creating the network before creating an Amazon EC2 instance within the network) and it can also remove resources when the 'stack' is no longer required.

Other benefits:

  • The template effectively documents the infrastructure
  • Infrastructure can be checked into a source code repository, and versioned
  • Infrastructure can be repeatedly and consistently deployed (eg Test environment matches Production environment)
  • Changes can be made to the template and CloudFormation can update the 'stack' by just deploying the changes

There are tools (eg https://former2.com/) that can generate the template from existing infrastructure, or just create it from code snippets taken from the documentation.

Here's an overview: Simplify Your Infrastructure Management Using AWS CloudFormation - YouTube

There are also tools like Terraform that can deploy across multiple cloud services.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...