Effective DevOps with AWS
Yogesh Raheja Giuseppe Borgese Nathaniel Felsen更新时间:2021-07-23 16:28:16
最新章节:Leave a review - let other readers know what you think封面
Title Page
Copyright and Credits
Effective DevOps with AWS Second Edition
Packt Upsell
Why subscribe?
Packt.com
Contributors
About the authors
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
The Cloud and DevOps Revolution
Thinking in terms of the cloud and not infrastructure
Deploying your own hardware versus in the cloud
Cost analysis
Just-in-time infrastructure
The different layers of a cloud
Adopting a DevOps culture
The origin of DevOps
The developers versus operations dilemma
Too much code changing at once
Differences in the production environment
Communication
Key characteristics of a DevOps culture
Source control everything
Automating testing
Automating infrastructure provisioning and configuration
Automating deployment
Measuring everything
Deploying in AWS
How to take advantage of the AWS ecosystem?
How does AWS synergize with a DevOps culture?
Summary
Questions
Further reading
Deploying Your First Web Application
Technical requirements
Creating and configuring your account
Signing up
Enabling MFA on the root account
Creating a new user in IAM
Installing and configuring the command-line interface (CLI)
Installing WSL (Windows only)
Installing the AWS CLI package
Configuring the AWS CLI
Creating our first web server
Amazon Machine Images (AMIs)
Instance types
Security groups
Generating your SSH keys
Launching an EC2 instance
Connecting to the EC2 instance using SSH
Creating a simple Hello World web application
Installing Node.js
Running a Node.js Hello World application
Turning our simple code into a service using upstart
Terminating our EC2 instance
Summary
Questions
Further reading
Treating Your Infrastructure as Code
Technical requirements
Managing your infrastructure with CloudFormation
Getting started with CloudFormation
AWS CloudFormation Designer
CloudFormer
Recreating our Hello World example with CloudFormation
Using Troposphere to create a Python script for our template
Creating the stack in the CloudFormation console
Adding our template to a source control system
Updating our CloudFormation stack
Updating our Python script
Updating our stack
Change sets
Deleting our CloudFormation stack
Adding a configuration management system
Getting started with Ansible
Installing Ansible on your computer
Creating our Ansible playground
Creating our Ansible repository
Executing modules
Running arbitrary commands
Ansible playbooks
Creating a playbook
Creating roles to deploy and start our web application
Creating the playbook file
Executing a playbook
Canary-testing changes
Running Ansible in pull mode
Installing Git and Ansible on our EC2 instance
Configuring Ansible to run on localhost
Adding a cron job to our EC2 instance
Integrating Ansible with CloudFormation
Monitoring
Summary
Questions
Further reading
Infrastructure as Code with Terraform
Technical requirements
What is Terraform?
Getting started with Terraform
Terraform and AWS for automated provisioning
Deployment using AWS Management Console
Deployment using AWS CLI
Creating our Terraform repository
First Terraform template for AWS instance provisioning
A second Terraform template for deploying a Hello World application
Integrating AWS Terraform and Ansible
Terraform with Ansible using a push-based approach
Terraform with Ansible using the pull-based approach
Summary
Questions
Further reading
Adding Continuous Integration and Continuous Deployment
Technical requirements
Building a CI pipeline
Creating a Jenkins server using Ansible and CloudFormation
Creating the Ansible playbook for Jenkins
Creating the CloudFormation template
Launching the stack and configuring Jenkins
Preparing our CI environment
Creating a new GitHub organization and repository
Creating a GitHub personal access token
Adding the access token to the credentials in Jenkins
Creating the Jenkins job to automatically run the builds
Implementing the helloworld application using our CI environment
Initializing the project
Creating a functional test using Mocha
Developing the remainder of the application
Creating the CI pipeline in Jenkins
Productionizing the CI pipeline
Building a continuous deployment pipeline
Creating new web servers for continuous deployment
Importing a custom library to Ansible for AWS CodeDeploy
Creating a CodeDeploy Ansible role
Creating the web server CloudFormation template
Launching our web server
Integrating our helloworld application with CodeDeploy
Creating the IAM service role for CodeDeploy
Creating the CodeDeploy application
Adding the CodeDeploy configuration and scripts to our repository
Building our deployment pipeline with AWS CodePipeline
Creating a continuous deployment pipeline for staging
Integrating Jenkins to our CodePipeline pipeline
Updating the IAM profile through CloudFormation
Installing and using the CodePipeline Jenkins plugin
Adding a test stage to our pipeline
Building a continuous delivery pipeline for production
Creating the new CloudFormation stack for production
Creating a CodeDeploy group to deploy to production
Adding a continuous delivery step to our pipeline
Strategies to practice continuous deployments in production
Fail fast
Canary deployment
Feature flags
Summary
Questions
Further reading
Scaling Your Infrastructure
Technical requirements
A monolithic application
What is a monolithic application?
Associating a DNS name
Scaling a monolithic application
Advantages of a monolith
The database
Moving the database to the RDS
Choose the RDS type
Backup
Multi-AZ
ElastiCache
Elastic Load Balancer (ELB)
Choosing the right ELB
Deploying the balancer
Step 1 – open the access for the port 8080 from the whole VPC CIDR
Step 2 – Creating the ALB and associate to the EC2 machine
Step 3 – creating an alias for the ELB
Step 4 – removing the Apache software from the machine
Configuring the SSL certificate
ALB and integration with Auth0
Pre-warming a load balancer
Access/error logs
The next step
Moving the state outside the EC2 machine
Pushing the logs out
Configure Auto Scaling
Moving our example inside Auto Scaling
Preparing the image
Using the wizard launch configuration part
Auto Scaling group part
Scaling policies
Modifying the Auto Scaling group
Removing the manually created instance from the balancer
Using microservices and serverless
Summary
Questions
Further reading
Running Containers in AWS
Technical requirements
Dockerizing our Hello World application
Getting started with Docker
Docker fundamentals
Docker in action
Creating our Dockerfile
Using the EC2 container service
Creating an ECR repository to manage our Docker image
Creating an ECS cluster
Creating an ALB
Creating our ECS hello world service
Creating a CI/CD pipeline to deploy to ECS
Creating our production ECS cluster
Automating the creation of containers with CodeBuild
Creating our deployment pipeline with CodePipeline
Adding the CloudFormation template to our code base
Creating a CloudFormation template for CodePipeline
Starting and configuring our CloudFormation stack
Summary
Questions
Further reading
Hardening the Security of Your AWS Environment
Technical requirements
IAM security
Root account
Root account password
Delete your root access keys
Setting up a password policy for IAM users
Creating an administrator group and a personal IAM user
AmazonEC2FullAccess policy
Final security status
CloudTrail
VPC Flow Logs
Creating the flow log for one subnet
Verifying the flow logs
VPC Flow Log consideration
VPC subnets
Routing and subnet types
Accessing private subnets
What to place in which subnet?
Identifying subnets from the web console
Endpoint routing
AWS WAF
Web application playground
Allow a sub-URL to be accessible only from an IP
Testing with the command line
Identifying the WAF from the web console
Blocking DoS/DDoS attacks
Creating AWS WAF with Terraform
DDoS attach consideration
WAF for SQL Injection (SQLi)
Summary
Questions
Further reading
Assessment
Chapter 1: The Cloud and DevOps Revolution
Chapter 2: Deploying Your First Web Application
Chapter 3: Treating Your Infrastructure as Code
Chapter 4: Infrastructure as Code with Terraform
Chapter 5: Adding Continuous Integration and Continuous Deployment
Chapter 6: Scaling Your Infrastructure
Chapter 7: Running Containers in AWS
Chapter 8: Hardening the Security of Your AWS Environment
Other Books You May Enjoy
Leave a review - let other readers know what you think
更新时间:2021-07-23 16:28:16