Configuration
Management And
Automation
Atul Kumar Aryan
Author & Cloud Expert AWS Expert
Atul Kumar
⮚ 20 Years working on Oracle as Certified Cloud Architect
⮚ Help Customers Migrating to Cloud & Integrations
⮚ Author & Speaker
⮚ Helped thousands of individuals to learn Cloud
https://k21academy.com/youtube © Copyright 2021| K21 Academy | All Rights Reserved
2
2
Aryan: AWS Expert
⮚ Working on AWS since 2013
⮚ Certified AWS Architect
⮚ Work for the Top Cloud Professional Services
provider in the world as AWS Solution Architect &
AWS DevOps Professionals.
https://k21academy.com/youtube © Copyright 2021| K21 Academy | All Rights Reserved
3
Making Most Of Training
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
Getting Help
[email protected]
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
5
Making Best of Your Training
⮚ Live Interactive Session
⮚ FREE Unlimited Retake for Next 1 Years
⮚ FREE On-Job Support for next 1 Years
⮚ Ask Questions & Make Session Interactive
⮚ Add Yourself in WhatsApp Group
⮚ Live Session Details http://k21academy.com/live
⮚ Ask as Many Questions as you can & make session interactive
⮚ Do Lots of Hands-On
⮚ Learn at your own Pace & Look How Far You have come
⮚ Share WIN
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
6
AWS SAA-C02
Module Agenda
Agenda: Module
➢ Need of CloudFormation ➢AWS Ops Works Stack
➢CloudFormation and its components ➢Components of AWS Ops Works Stack
➢Templates in CloudFormation ➢AWS OpsWorks for Puppet Enterprise
➢Stack in CloudFormation ➢Elastic Beanstalk
➢Installation of LAMP server in EC2 via CloudFormation ➢Components of Elastic Beanstalk
➢AWS OpsWorks and its Lifecycle events ➢Beanstalk v/s OpsWorks v/s Cloud Formation
➢AWS Ops Works services
➢OpsWorks for Chef Automate
➢Cookbooks and Recipies
➢Ops Works for Chef Automate
➢Cookbooks and Recipies
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
8
CloudFormation
Why Do We Need AWS CloudFormation?
➢ An application on the AWS may require a
certain set of resources and managing these
resources is not an easy task even it consumes
more time
➢ This management part can be skipped if we
make use of AWS CloudFormation
➢ Hence, using CloudFormation we can manage,
create and provide all these resources at
the same place
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
10
What is CloudFormation?
AWS CloudFormation automates and simplifies the task of repeatedly and predictably creating groups of
related resources that power your applications.
https://k21academy.com/youtube © Copyright 2021| K21 Academy | All Rights Reserved
11
Components Of
CloudFormation
CloudFormation- Components
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
13
Templates And Stack In
CloudFormation
Templates In CloudFormation
Templates in AWS CloudFormation are the formatted text files represented in JSON or YAML which describes your
AWS Infrastructure Using AWS CloudFormation designer or any text editor tool you can create, modify and view
these templates
Major element of AWS
CloudFormation Templates:
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
15
Template Structure
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
16
Sample Template- Create An EC2
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
17
Sample Template- Create An EC2
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
18
Sample Template- Create An EC2
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
19
Stack In CloudFormation
Stack is a collection of AWS resources
➢These resources are created, deleted or updated in stack and it is
defined by AWS CloudFormation template
➢A stack can be nested with another stack and this results into
hierarchy of stacks
➢The top-level stack is called as root stack, all other stacks in hierarchy
belong to root stack
➢Every nested stack has a parent stack and in case of first level root
stack is the parent stack
➢Example- X is the root stack for all plus parent stack for Y. Y is parent
stack to Z
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
20
OpsWorks
Why Do We Need OpsWorks?
➢Suppose you want to change properties file of 1000 servers running at a time
➢With the help of OpsWorks tools you can do it seamlessly
➢All you have to do is only once deploy the changes and it will replicate them across all the components
➢The reasons why should we choose OpsWorks are-
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
22
What Is AWS OpsWorks?
AWS OpsWork is a configuration management service that provides managed instances of Chef and Puppet
➢The automated platforms like Chef and Puppet permits the
user to use code so as to automate their server
configurations
➢It makes easy to manage complete application Lifecycle
including resource provisioning, configuration, management,
application deployment, software updates, monitoring and
access control
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
23
OpsWorks Lifecycle
Events
OpsWorks Lifecycle Event
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
25
AWS OpsWorks
Services
AWS OpsWorks Services
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
27
AWS OpsWorks For
Chef Automate
AWS OpsWorks For Chef Automate
➢AWS Ops Works for Chef is a configuration
management service which provides Chef server
and lets the service operate it along with backups
and software updates
➢It is compatible with Chef’s Supermarket
cookbooks and recipes plus supports the tools like
knife and test kitchen
➢It is mainly used by people looking for a
configuration management experience i.e. fully
compatible with Chef including all community
scripts and tooling
➢It helps you in automating entire Infrastructure
and managing them across multiple end points
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
29
Cookbook
➢A cookbook is like a package” for Chef recipes
➢It contains all the recipes, files, templates, libraries, etc. required to configure a portion of your Infrastructure
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
30
Recipes
Recipes are the codes written in Ruby language and attached to the layer
They are also known as configuration files that describe resources(building blocks of chef) and their desired state
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
31
AWS OpsWorks Stacks
AWS OpsWorks Stacks
➢AWS OpsWorks Stacks lets you manage applications and servers on AWS
and on-premises
➢ Using it you can model your application as a stack containing different
layers, such as load balancing, database, and application server
➢The OpsWorks Stacks service helps you model, provision, and manage your
applications on AWS using the embedded Chef solo client that is installed on
Amazon EC2 Instances on your behalf
➢It is mainly used by System administrators and ops-minded developers who
are looking for a powerful end-to-end configuration management solution
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
33
Components Of
OpsWorks Stacks
Components Of OpsWorks - Stacks
➢ Stack is top level of AWS OpsWorks entity
➢It mainly represents set of resources that we want to
manage collectively
Example-EC2 instances, EBS volumes, Load Balancers
➢It handles tasks like managing applications and
cookbooks, to the group of instances
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
35
Components Of OpsWorks - Layer
➢Every stack contains one or more layers.
➢Each layer represents stack components, like a load
balancer or a set of application servers
➢Each layer and a stack must have at least one instance
and can optionally have multiple instances
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
36
Components Of OpsWorks - Instances
➢ An instance represents a computing resource, like Amazon EC2 instance, which
handles the work of serving applications
➢Types of Instances Supported in AWS OpsWorks
24/7 Instances: You have to start these instances and they keep running until you
stop them
Time-Based Instances: Instances run by AWS Ops Works on a specified daily and
weekly schedule. Here, stack automatically adjust the number of instances to
accommodate predictable usage patterns
Load-Based Instances: These instances are turned on and off by OpsWorks based on
specified load metrics such as CPU utilization
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
37
Components Of OpsWorks - Apps
➢An AWS OpsWorks app represents code that you want to run on
an application server
➢The app contains the information required to deploy the code to
the appropriate application server instances
➢You can deploy apps in the following ways:
• Automatically: When you start instances, AWS Ops Works
automatically runs the instance’s deploy recipes
• Manually: If you have a new app or want to update an existing
one, you can manually run the online instances deploy recipes
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
38
AWS OpsWorks For
Puppet Enterprise
AWS OpsWorks For Puppet Enterprise
➢It lets you to create AWS managed master servers
➢Master server manages nodes in infrastructure, holds information of
those nodes and acts as central repository for puppet modules
➢Modules are the reusable and sharable units of puppet code, containing
instructions about infrastructure configuration
➢Its serve to provision full stack automation for managing tasks like
software and Os configuration, package installation, database setup and
more
➢It is mainly used by people In search of managed configuration
management experience i.e. compatible with puppet along with all
puppet forge modules for puppet enterprise without operational over
head
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
40
Elastic Beanstalk
What Is Elastic Beanstalk?
Elastic Beanstalk is a web hosting platform offered by Amazon
➢Elastic Beanstalk is used as a PaaS for deploying and scaling web
applications and services
➢These web applications and services are developed via programming
languages such as Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker
web applications
➢The servers like Apache, Tomcat, IIS and Nginx are used for deployment
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
42
Why Do We Need Elastic Beanstalk?
➢When a developer deploys an application using Elastic
Beanstalk, it automates services such as Load Balancing,
Provisioning servers, Auto Scaling, creating environments to run
Versions of applications, maintaining security, basic health checks
and monitoring
➢The AWS Toolkit for Visual Studio and the AWS Toolkit for
Eclipse allow you to deploy your application to AWS Elastic
Beanstalk and manage it without leaving your IDE
➢Hence, developers can focus on developing their application
and are set free from deployment-oriented tasks
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
43
Features Of Elastic Beanstalk
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
44
Components Of Elastic Beanstalk
➢An application is collection of environments, versions and environment
configuration
➢An application in Elastic Beanstalk is conceptually similar to a folder
➢Example: tomcat-webapp
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
45
Components Of Elastic Beanstalk
➢An Application Version refers to a specific labeled iteration of deployable code
for a web application
➢An App version points to an Amazon S3 object that contains the deployable code
such as a Java WAR file
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
46
Components Of Elastic Beanstalk
➢ Environment is the place where you actually launch your application
➢When you launch an Elastic Beanstalk environment, Beanstalk starts assigning
various AWS resources to your application
➢Each Environment runs only a single application version at a time
➢Example: tomcat-webapp-dev, tomcat-webapp-prod
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
47
Components Of Elastic Beanstalk
➢There are two types of tier: Web Server Tier and Worker Tier
➢Web Server tier serves HTTP requests
➢Worker tier looks after background-processing and background tasks
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
48
Components Of Elastic Beanstalk
➢Elastic Beanstalk reports the health of a web server environment depending on
how the application which is running in it responds to the health check
➢It uses four colors' to describe the status —
Environment is being updated
Passed recent health check
Failed one or more checks
Failed three or more checks
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
49
Beanstalk V/S
OpsWorks V/S
CloudFormation
Beanstalk V/s OpsWorks V/s
CloudFormation
https://k21academy.com/youtube © Copyright 2021 | K21 Academy | All Rights Reserved
51
Find Us
https://www.facebook.com/K21Academy
http://twitter.com/k21Academy
https://www.linkedin.com/company/k21academy
https://www.youtube.com/k21academy
www.k21academy.com/community © Copyright 2021 | K21 Academy | All Rights Reserved