Weitere ähnliche Inhalte Ähnlich wie Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (20) Mehr von Amazon Web Services (20) Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
DevOps Essentials: An Introductory Workshop on CI/CD Practices
John Pignata
Startup Solutions Architect
2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What to expect from the session
• Workshop
• Overview
• Outcomes
• What is DevOps?
• AWS Code Services
• AWS DevOps Portfolio
3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
This is a hands-on workshop, not a presentation
AWS Dev Tools Four Exercises Prerequisites
4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Workshop outcomes
Opportunity to kick-start your DevOps transformation journey
Embrace continuous integration and continuous deployment in AWS
• Learn a prescriptive approach to build, deploy, scale, and accelerate cloud adoption using AWS Dev Tools
Embrace infrastructure as code and DevOps pipelines
• Make your software release process fast, automated, and reliable
Improve developer productivity
• Reduce the overall time to market for new product capabilities
5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is DevOps?
Cultural philosophies
Practices
Tools
Shared responsibility
Ownership
Visibility and communication
6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Benefits of DevOps
Reliability
Speed
Scale
Rapid deliveryImproved collaboration
Security
7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Integration
tests with other
systems
• Load testing
• UI tests
• Penetration
testing
Release processes have four major phases
Source Build Test Production
• Check-in
source code
such as .java
files
• Peer review
new code
• Compile code
• Unit tests
• Style checkers
• Code metrics
• Create
container
images
• Deployment
to production
environments
8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Continuous integration
Continuous delivery
Continuous deployment
Release processes levels
Source Build Test Production
9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
AWS CodePipelineAWS CodeCommit AWS CodeBuild AWS CodeDeploy
AWS CodeStar
10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Software release steps
11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Software release steps
AWS CodeCommit
12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Software release steps
AWS CodeBuild
13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
buildspec.yml Example
version: 0.1
environment_variables:
plaintext:
JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-amd64"
phases:
install:
commands:
- apt-get update -y
- apt-get install -y maven
pre_build:
commands:
- echo Nothing to do in the pre_build phase...
build:
commands:
- echo Build started on `date`
- mvn install
post_build:
commands:
- echo Build completed on `date`
artifacts:
type: zip
files:
- target/messageUtil-1.0.jar
discard-paths: yes
• Variables to be used by phases
of build
• Examples for what you can do in
the phases of a build:
• You can install packages or run
commands to prepare your
environment in ”install”
• Run syntax checking,
commands in “pre_build”
• Execute your build
tool/command in “build”
• Test your app further or ship a
container image to a repository
in post_build
• Create and store an artifact in S3
14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Third-party
tooling
Software release steps
15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Software release steps
AWS CodeDeploy
16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
appspec.yml Example
version: 0.0
os: linux
files:
- source: /
destination: /var/www/html
permissions:
- object: /var/www/html
pattern: “*.html”
owner: root
group: root
mode: 755
hooks:
ApplicationStop:
- location: scripts/deregister_from_elb.sh
BeforeInstall:
- location: scripts/install_dependencies.sh
ApplicationStart:
- location: scripts/start_httpd.sh
ValidateService:
- location: scripts/test_site.sh
- location: scripts/register_with_elb.sh
• Remove/add instance to ELB
• Install dependency packages
• Start Apache
• Confirm successful deploy
• More!
• Send application files to one
directory and configuration
files to another
• Set specific permissions on
specific directories & files
17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Source Build Test Production
Third-party
tooling
AWS CodeCommit AWS CodeBuild AWS CodeDeploy
AWS CodePipeline
AWS Code Services
Software release steps
18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Third-party
tooling
Software release steps
AWS CodeCommit AWS CodeBuild AWS CodeDeploy
AWS CodePipeline
AWS CodeStar
19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon CloudWatch
AWS CloudTrail
Monitoring
and Logging
AWS DevOps Portfolio
AWS CodeCommit
AWS CodeDeploy
AWS CodePipeline
Software Development and
Continuous Delivery Toolchain
AWS CloudFormation
AWS OpsWorks
AWS Config
Infrastructure
as Code
AWS CodeBuild
AWS CodeStar
AWS OpsWorks for
Chef Automate
AWS X-Ray
20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Architecture
Availability Zone #1
Prod Server
web app
server
AWS cloud
virtual private cloud
Public Subnet
AWS
CloudFormation
AWS
CodeCommit
AWS
CodeDeploy
AWS
CodePipeline
Internet
Gateway
permissions
role
Dev Server
web app
server
AWS
CodeBuild
Git Credential
IAM
Credential
Buildspec.yml Appspec.yml
AWS
Lambda
(Test Function)
AWS IAM
DevOps Admin
21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Let’s get started!
Lab materials
https://github.com/awslabs/aws-devops-essential
22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
aws.amazon.com/activate
Everything and Anything Startups
Need to Get Started on AWS