Masterclass - Getting Started with AWS DevOps

Page 1

Master Class – Getting started with AWS DevOps Brian Wu NetCom Learning

1998-2020 1998-2021 NetComLearning Learning 1998-2022 NetCom ©©

www.netcomlearning.com || (888) info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com 563-8266 | aws@netcomlearning.com


AGENDA Introduction to DevOps Understand the implementation of DevOps culture and techniques in the AWS Cloud Basic understanding of Infrastructure Automation

Explore AWS CloudFormation template and its structure, parameters, stacks, updates, importing resources, and drift detection Q&A session with the speaker

©©1998-2021 1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Introduction to DevOps DevOps is a combination of cultural philosophies, practices, and tools that combine software development with information technology operations. These practices enable companies to deliver new application features and improved services to customers at a higher velocity. Test

Dev

Ops

Security

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com www.netcomlearning.com | | info@netcomlearning.com | 1-888-563-8266


Amazon development transformation In the beginning Monolithic Does everything

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Monolithic challenges • Single, large platform • Long development cycles • Complexity with scaling

• Failures affect entire architecture (monolith model) • Refactoring to fix failures or bugs (increased deployment cycle)

5

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Comparison of monolithic & microservice architectures Monolith

Microservice

Does everything

Does one thing Completely independent APIs

APIs

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Understand the implementation of DevOps culture and techniques in the AWS Cloud

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Factors driving the DevOps transformation

Cultural philosophy

Practices and patterns

Tools (and automation)

Organizational mindset alignment, engineering enablement, and builder empowerment 1998-2022 NetCom Learning ©©1998-2020 NetCom Learning

Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com www.netcomlearning.com | | info@netcomlearning.com | 1-888-563-8266


DevOps culture

DevOps is about removing the barriers With DevOps, teams work together to optimize both the productivity of developers and the reliability of operations

People over process over tools

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com | | info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Two-pizza teams for increased collaboration Pizza Team 1

Dev team

Ops team

Pizza Team 2

Pizza Team 3

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Small-team properties Full ownership Full accountability Adherence to “DevOps” principles Focused innovation

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


DevOps practices and techniques (Process)

Continuous integration

Continuous delivery

Microservices

Infrastructure as code

Monitoring and logging

Communication and collaboration

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Monoliths before microservices Developers

Services

Delivery Pipelines

Build

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

Test

Release

Monitor

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Optimizing for DevOps: microservices Microservices are an architectural and organizational approach that is composed of small independent services optimized for DevOps. • Small

• Decoupled • Owned by self-contained teams

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Microservice architecture • Microservice architecture

• Characteristics • Minimal function services • Deployed separately, but interact together

Completely independent

• Fit for purpose-based data options • Organized around business capabilities

APIs

• State is externalized • Choice of technology for each microservice

Process notes

• Serverless and automated operational model APIs

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Microservices Developers

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

Services

Delivery Pipelines Build

Test

Release

Monitor

Build

Test

Release

Monitor

Build

Test

Release

Monitor

Build

Test

Release

Monitor

Build

Test

Release

Monitor

Build

Test

Release

Monitor

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Example of Monolithic vs Microservice

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


CI/CD

Code

Build

Test

Provision

Deploy

Monitor

Continuous integration Continuous delivery Continuous deployment ©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Release processes major phases

Source

• •

Check-in source code Peer review new code

Build

• • • • •

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

Compile code Unit tests Style checkers Code metrics Create container images

Test

• • • •

Integration tests • with other systems Load testing UI tests Penetration testing

Deploy

Deployment to production environments

Monitor

• Monitor in production to quickly detect unusual activity or errors

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


CI/CD Tools

Prometheus

Amazon CloudWatch Container Insights

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Explore AWS Cloud Formation Template & its Structure, Parameters, Stacks, Updates, Importing Resources, & Drift Detection

1998-2022 NetCom Learning ©©1998-2020 NetCom Learning

Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com www.netcomlearning.com | | info@netcomlearning.com | 1-888-563-8266


Why Automate? • Reduce human error (avoiding deviations from configuration standards) • Faster releases and response times • Creation of multiple identical environment

• Versioned and managed just like application source code Maintain • Compliance with policy as code • Can be tracked, validated, and reconfigured (all through automation)

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Basic understanding of Infrastructure Automation User

Infrastructure as code

AWS Cloud VPC

Availability Zone

Resources: VPC: … InternetGateway: … PublicSubnet: … AppServer: … DNSRecord: … WebServerGroup: … Type: “AWS:: AutoScaling…”

Public subnet

Amazon Route 53

Amazon CloudFront

Internet gateway

App Load Balancer

Auto Scaling

Public subnet

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Structure of AWS CloudFormation template: YAML format YAML --AWSTemplateFormatVersion: "2020-01-09"

Format Version (opt): Corresponding AWS CloudFormation template version

Description: String

Description (opt): A text string

Parameters: set of parameters

Parameters (opt): Inputs into template

Mappings: set of mappings

Mappings (opt): Static variables; key-value pairs

Conditions: set of conditions

Conditions (opt): Controls for if and when certain resources are created or updated

Transform: set of transforms

Transform (opt): Specifies the version of AWS SAM to use

Resources: set of resources

Resources (req): AWS assets to create

Outputs: set of outputs

Outputs (opt): Values of custom resources created by template (URLs, username, etc.)

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


AWS CloudFormation stacks • Create your stacks through the console or AWS CLI • Common parameters include: • ClientRequestToken • OnFailure • TimeoutInMinutes • Import existing resources

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Stacks: Layered architecture approach A layered architecture Front end

web interface, admin interface, analytics dashboard

Backend

customers, campaigns, products, marketing collateral, analytics

Shared

databases, common monitoring or alarms, subnets, security groups

Base network

VPCs, internet gateways, VPNs, NAT gateways

Identity

IAM users, groups, roles

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Update your stack by using Change sets • Use change sets to: • Preview proposed changes to a stack • Determine how they affect your running resources • Verify whether your changes delete or replace any critical resources

• AWS CloudFormation makes changes to your stack only when you decide to run the change set

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Using change sets to update a stack

Create change set

Original stack

View change set

Change set

Run change set

Change set

AWS CloudFormation updates stack

Create additional change sets

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Detecting drifts on stacks Status of the stack's actual configuration compared to its expected configuration: • DRIFTED • NOT_CHECKED • IN_SYNC

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Monitor and logging • Observe and track large sets of data from applications and infrastructure • Operational visibility and insight • Collect metrics

• Improve performance

©©1998-2020 NetCom Learning 1998-2022 NetCom Learning

www.netcomlearning.com || info@netcomlearning.com | 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Thank you

1998-2019 NetCom Learning ©©1998-2021 1998-2022 NetCom Learning

www.netcomlearning.com | www.netcomlearning.com | | info@netcomlearning.com | || 1-888-563-8266 Interested in training? Contact us! | www.netcomlearning.com (888) 563-8266 | aws@netcomlearning.com


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.