Book Image

Effective DevOps with AWS - Second Edition

By : Yogesh Raheja, Giuseppe Borgese, Nathaniel Felsen
Book Image

Effective DevOps with AWS - Second Edition

By: Yogesh Raheja, Giuseppe Borgese, Nathaniel Felsen

Overview of this book

The DevOps movement has transformed the way modern tech companies work. Amazon Web Services (AWS), which has been at the forefront of the cloud computing revolution, has also been a key contributor to the DevOps movement, creating a huge range of managed services that help you implement DevOps principles. Effective DevOps with AWS, Second Edition will help you to understand how the most successful tech start-ups launch and scale their services on AWS, and will teach you how you can do the same. This book explains how to treat infrastructure as code, meaning you can bring resources online and offline as easily as you control your software. You will also build a continuous integration and continuous deployment pipeline to keep your app up to date. Once you have gotten to grips will all this, we'll move on to how to scale your applications to offer maximum performance to users even when traffic spikes, by using the latest technologies, such as containers. In addition to this, you'll get insights into monitoring and alerting, so you can make sure your users have the best experience when using your service. In the concluding chapters, we'll cover inbuilt AWS tools such as CodeDeploy and CloudFormation, which are used by many AWS administrators to perform DevOps. By the end of this book, you'll have learned how to ensure the security of your platform and data, using the latest and most prominent AWS tools.
Table of Contents (15 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

Preface

The DevOps movement has transformed the way modern tech companies work. Amazon Web Services (AWS), which has been at the forefront of the cloud computing revolution, has also been a key contributor to the DevOps movement, creating a huge range of managed services that help you implement DevOps principles.

In this book, you'll understand how the most successful tech start-ups launch and scale their services on AWS, and learn how you can do the same, too. This book explains how to treat infrastructure as code, meaning you can bring resources online and offline as easily as you control your software. You will also build a continuous integration and continuous deployment pipeline to keep your app up to date.Once you have got to grips will all this, you'll move on to learning how to scale your applications to offer maximum performance to users even when traffic spikes, by using the latest technologies such as containers. In addition to this, you'll get insights into monitoring and alerting, so you can make sure your users have the best experience when using your service. In the concluding chapters, you'll cover inbuilt AWS tools such as CodeDeploy and CloudFormation, which are used by many AWS administrators to perform DevOps.By the end of this book, you'll have learned how to ensure the security of your platform and data using the latest and most prominent AWS tools.

Who this book is for

This book is for you if you are a developer, DevOps engineer, or you work in a team which wants to build and use AWS for software infrastructure. Basic computer science knowledge is required to get the most out of this book.

What this book covers

Chapter 1, The Cloud and DevOps Revolution, this chapter will set the foundation to anyone about the need of DevOps and Cloud Journey. An in depth understanding of DevOps culture, DevOps Terminology and AWS ecosystem will be gained to start and prepare the roadmap for future chapters.

Chapter 2, Deploying Your First Web Application, this chapter will demonstrate AWS infrastructure provisioning in simplest form with some of the best AWS authentication practices. We will create a simple web application and understand how to host the application on AWS in the easiest form and finally will terminate the instance. This whole process will be implemented using AWS cli utility and will be automated in further chapter to understand how manual tasks can be automated using different available AWS and other famous services and products.

Chapter 3, Treating Your Infrastructure as Code, this chapter will focus on Automating Provisioning using AWS native utility CloudFormation and the techniques used to create CloudFormation templates. Then we will introduce a Configuration Management system to automate application deployments with Ansible.

Chapter 4, Infrastructure as Code with Terraform, this chapter will focus on understanding the fundamentals of Terraform. We will provision our first AWS instance using Terraform templates and then extend the power of Terraform to deploy the application using another Terraform Template. Finally we will understand AWS provisioning using Terraform by integrate it with Ansible automation for application deployments.

Chapter 5, Adding Continuous Integration and Continuous Deployment, this chapter will focus on building CI/CD pipelines using AWS DevOps services with Automated Testing Framework. We will prepare a technology framework using multiple tools like Version Control, Continuous Integration, Automated Testing tools, AWS native DevOps tools and Infrastructure Automation tools to understand how fail fast and fail often lead to an robust production environment.

Chapter 6, Scaling Your Infrastructure, this chapter will introduce other useful cost effective AWS services to build scalable AWS infrastructure with performance oriented vision. AWS services like Elastic Cache, CloudFront, SQS, Kinesis and so on will be used to build our application Framework.

Chapter 7, Running Containers in AWS,  this chapter will introduce one of the most niche technologies in the market Docker. We will get started with the understanding of container using Docker with all of the essential concepts. Here we will build AWS container environment with ECS and build a complete framework of ECS for our application. At last we will build a complete CI/CD pipeline to deploy AWS ECS services using AWS DevOps tool set.

Chapter 8, Hardening the Security of Your AWS Environment, this chapter will focus on identifying and securing your AWS environment using AWS auditing services, AWS IAM services for managing and providing limited access as per roles, strengthening AWS VPC model and finally protecting against ransomware and other vulnerabilities.

Chapter 9, Monitoring and Alerting, this chapter will focus on building a monitoring framework for your AWS environment using AWS CloudWatch service. We will use some of the famous dashboard tools for visualization of logs. Finally a notification framework will be created using AWS SNS services to notify the users about the health of your AWS environment to take corrective actions. For this chapter refer to https://www.packtpub.com/sites/default/files/downloads/Monitoring_and_Alerting.pdf.

To get the most out of this book

The software required for this book are as follows:

  • AWS Management Console
  • AWS compute services
  • AWS IAM
  • AWS CLI setup
  • JavaScript for the web application

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Effective-DevOps-with-AWS-Second-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out! 

The codes can also be found at following repositories:

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://www.packtpub.com/sites/default/files/downloads/9781789539974_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Click on the start button and search for settings option."

A block of code is set as follows:

var http = require("http") http.createServer(function (request, response) {
// Send the HTTP header
// HTTP Status: 200 : OK
// Content Type: text/plain
response.writeHead(200, {'Content-Type': 'text/plain'})
// Send the response body as "Hello World" response.end('Hello World\n')
}).listen(3000)

// Console will print the message console.log('Server running')

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

$ aws ec2 describe-instance-status --instance-ids i-057e8deb1a4c3f35d --output text| grep -i SystemStatus

SYSTEMSTATUS ok

Any command-line input or output is written as follows:

$ aws ec2 authorize-security-group-ingress \--group-name HelloWorld \--protocol tcp \--port 3000 \--cidr 0.0.0.0/0

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "In this menu, find the feature called Windows Subsystem for Linux (Beta)."

Note

Warnings or important notes appear like this.

Note

Tips and tricks appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packt.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packt.com.