Launching our web server

As before, we are going to launch our instance using CloudFormation. Note that we are calling this first stack helloworld-staging. We will first look at CodeDeploy as a way to deploy our code to a staging environment. We will use this name in CodeDeploy as a way to target the deployments to that specific stack:

$ aws cloudformation create-stack 
          --capabilities CAPABILITY_IAM 
          --stack-name helloworld-staging 
          --template-body file://nodeserver-cf.template 
          --parameters  ParameterKey=KeyPair,ParameterValue=EffectiveDevOpsAWS 
  

In a few minutes, our instance will be ready.

We are at an important point in our DevOps transformation. Now that we have created very generic nodejs web servers with the ability to deploy code easily onto them, we are really close to a realistic environment that effective companies traditionally use to deploy and run their services. The fact that we are able to very simply create those environments on demand is key to their success.

When architecting services, always make sure that the infrastructure can be recreated easily. Being able to troubleshoot an issue is great, but being able to rebuild a service host quickly and stop the user impact is often even more desirable.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset