DevOps and AWS
A PERFECT MERGE REQUEST
whoami
• DevOps Engineer Team Lead,
Bluesentry IT
• Worked in IT for 11 years,
networking, sysadmin,
development
• All 5 AWS certifications
• @strongjz
Agenda
• Dev What? Ops who?
• Continuous Integration / Continuous Deployment
• How AWS enables CI/CD
• Demo
Agenda
• Dev What? Ops who?
• Continuous Integration / Continuous Deployment
• How AWS enables CI/CD
• Demo
What your CTO thinks DevOps is
What your Project Manager thinks DevOps is
What you think DevOps is
Probably….
IT in a nutshell
People
ProcessTechnology
A little closer?
People
Process
Technology
Automation
What DevOps really is
“DevOps isn’t about automation, just as
astronomy isn’t about telescopes.”
- Gene Kim, The DevOps Handbook: How to Create World-Class Agility, Reliability,
and Security in Technology Organizations
More so this….
“we’re hearing more lately: something called “DevOps.” Maybe everyone
attending this party is a form of DevOps, but I suspect it’s something
much more than that. It’s Product Management, Development, IT
Operations, and even Information Security all working together and
supporting one another.”
― Gene Kim, The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win
More so this….
“we’re hearing more lately: something called “DevOps.” Maybe everyone
attending this party is a form of DevOps, but I suspect it’s something
much more than that. It’s Product Management, Development, IT
Operations, and even Information Security all working together and
supporting one another.”
― Gene Kim, The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win
Culture?
Agenda
• Dev What? Ops who?
• Continuous Integration / Continuous Deployment
• How AWS enables CI/CD
• Demo
CI/CD
• Continuous – All day, Every day.
• Integration – This is my code, that’s your code,
Let’s get together.
• Deployment – Deploy to ALL the servers! Or
not
CI/CD Running Rules
8. Automate the deployment and rollback
2. Automate the build
7. Everyone can see the results of the build
6. Every commit to the mainline gets built
5. Commit early, commit often
4. Make the build self-testing
3. Keep the build fast
1. Maintain a code repository
Agenda
• Dev What? Ops who?
• Continuous Integration / Continuous Deployment
• How AWS enables CI/CD
• Demo
AWS Code*
• Commit
• Build
• Deploy
• Pipeline
AWS CodeCommit
• Encrypted at rest and in
transit
• All your favorite git
commands work
• Triggers
• “AWS github”
AWS CodeCommit Integrations
• CodeBuild
• Elastic Beanstalk
• Cloudformation
• CodePipeline
• Key management
• Lambda
• SNS
AWS CodeBuild
• Build Project
• Build Environment
• Build Spec
AWS CodeDeploy
• Agent based
• Supports Auto Scaling, Elastic Load balancers, CodePipeline
• 2 Levels of deployments. Code deployment then Traffic rerouting
AWS CodeDeploy
• Deployment Configuration
• Applications
• Deployment Group
• Application revisions
• Deployments
• Monitoring all this
AWS CodePipeline
• Revision
• Stages
• Action
• Type
• Transitions
• Deployments
AWS CodePipeline: Actions
• A build action that builds or transforms the items
• A test action that configures and runs automated tests
• A deploy action that deploys items to one or more servers, websites, or repositories
• An invoke action that runs functions
• As well as custom actions
AWS CodePipeline: Deploy
• Code Deploy
• Elastic Beanstalk
• OpsWorks
• Cloudformation
Agenda
• Dev What? Ops who?
• Continuous Integration / Continuous Deployment
• How AWS enables CI/CD
• Demo
CI/CD Running Rules
8. Automate the deployment and rollback Deploy
2. Automate the build *
7. Everyone can see the results of the build Pipeline
6. Every commit to the mainline gets built Pipeline
5. Commit early, commit often Commit
4. Make the build self-testing Deploy
3. Keep the build fast Build
1. Maintain a code repository Commit
Questions
Resources
• Code Commit - http://docs.aws.amazon.com/codecommit
• Code Build - http://docs.aws.amazon.com/codebuild
• Code Deploy - http://docs.aws.amazon.com/codedeploy
• Code Pipeline - http://docs.aws.amazon.com/codepipeline
• Demo - https://github.com/strongjz/golang-deployment-pipeline
• Project Phoenix - https://www.amazon.com/Phoenix-Project-DevOps-Helping-
Business/dp/0988262592
Demo Slides
Code Pipeline
Code Build
Code Build Logs
Code Pipeline Approval
Code Deploy
Code Deploy
Code Commit Costs
First 5 active users*
Each active user* above
the first 5
Free $1 per month
Receives:
•Unlimited repositories
•50 GB-month of storage
•10,000 Git
requests/month
Receives:
•Unlimited repositories
•10 GB-month of storage
per active user
•2,000 Git
requests/month per
active user
•Storage
•$0.06 per GB-month
•$0.001 per Git request
Code Build Costs
Code Deploy Costs
• For CodeDeploy on EC2: There is no additional
charge for code deployments to Amazon EC2
instances through AWS CodeDeploy.
For CodeDeploy On-Premises: You pay $0.02 per
on-premises instance update using AWS
CodeDeploy.
Code Pipeline Costs
You pay only for what you use. AWS CodePipeline costs $1
per active pipeline* per month.
An active pipeline is a pipeline that has existed for more than
30 days and has at least one code change that runs through
it during the month. There is no charge for pipelines that have
no new code changes running through them during the
month. An active pipeline is not prorated for partial months.
You may incur additional charges for storing and accessing
your pipeline artifacts in Amazon S3 and for triggering actions
from other AWS and third party services that you connect to
your pipeline.

DevOps and AWS - Code PaLOUsa 2017

  • 1.
    DevOps and AWS APERFECT MERGE REQUEST
  • 2.
    whoami • DevOps EngineerTeam Lead, Bluesentry IT • Worked in IT for 11 years, networking, sysadmin, development • All 5 AWS certifications • @strongjz
  • 3.
    Agenda • Dev What?Ops who? • Continuous Integration / Continuous Deployment • How AWS enables CI/CD • Demo
  • 4.
    Agenda • Dev What?Ops who? • Continuous Integration / Continuous Deployment • How AWS enables CI/CD • Demo
  • 5.
    What your CTOthinks DevOps is
  • 6.
    What your ProjectManager thinks DevOps is
  • 7.
    What you thinkDevOps is
  • 8.
  • 9.
    IT in anutshell People ProcessTechnology
  • 10.
  • 11.
    What DevOps reallyis “DevOps isn’t about automation, just as astronomy isn’t about telescopes.” - Gene Kim, The DevOps Handbook: How to Create World-Class Agility, Reliability, and Security in Technology Organizations
  • 12.
    More so this…. “we’rehearing more lately: something called “DevOps.” Maybe everyone attending this party is a form of DevOps, but I suspect it’s something much more than that. It’s Product Management, Development, IT Operations, and even Information Security all working together and supporting one another.” ― Gene Kim, The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win
  • 13.
    More so this…. “we’rehearing more lately: something called “DevOps.” Maybe everyone attending this party is a form of DevOps, but I suspect it’s something much more than that. It’s Product Management, Development, IT Operations, and even Information Security all working together and supporting one another.” ― Gene Kim, The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win
  • 15.
  • 18.
    Agenda • Dev What?Ops who? • Continuous Integration / Continuous Deployment • How AWS enables CI/CD • Demo
  • 19.
    CI/CD • Continuous –All day, Every day. • Integration – This is my code, that’s your code, Let’s get together. • Deployment – Deploy to ALL the servers! Or not
  • 20.
    CI/CD Running Rules 8.Automate the deployment and rollback 2. Automate the build 7. Everyone can see the results of the build 6. Every commit to the mainline gets built 5. Commit early, commit often 4. Make the build self-testing 3. Keep the build fast 1. Maintain a code repository
  • 21.
    Agenda • Dev What?Ops who? • Continuous Integration / Continuous Deployment • How AWS enables CI/CD • Demo
  • 22.
    AWS Code* • Commit •Build • Deploy • Pipeline
  • 23.
    AWS CodeCommit • Encryptedat rest and in transit • All your favorite git commands work • Triggers • “AWS github”
  • 24.
    AWS CodeCommit Integrations •CodeBuild • Elastic Beanstalk • Cloudformation • CodePipeline • Key management • Lambda • SNS
  • 25.
    AWS CodeBuild • BuildProject • Build Environment • Build Spec
  • 26.
    AWS CodeDeploy • Agentbased • Supports Auto Scaling, Elastic Load balancers, CodePipeline • 2 Levels of deployments. Code deployment then Traffic rerouting
  • 27.
    AWS CodeDeploy • DeploymentConfiguration • Applications • Deployment Group • Application revisions • Deployments • Monitoring all this
  • 28.
    AWS CodePipeline • Revision •Stages • Action • Type • Transitions • Deployments
  • 29.
    AWS CodePipeline: Actions •A build action that builds or transforms the items • A test action that configures and runs automated tests • A deploy action that deploys items to one or more servers, websites, or repositories • An invoke action that runs functions • As well as custom actions
  • 30.
    AWS CodePipeline: Deploy •Code Deploy • Elastic Beanstalk • OpsWorks • Cloudformation
  • 31.
    Agenda • Dev What?Ops who? • Continuous Integration / Continuous Deployment • How AWS enables CI/CD • Demo
  • 32.
    CI/CD Running Rules 8.Automate the deployment and rollback Deploy 2. Automate the build * 7. Everyone can see the results of the build Pipeline 6. Every commit to the mainline gets built Pipeline 5. Commit early, commit often Commit 4. Make the build self-testing Deploy 3. Keep the build fast Build 1. Maintain a code repository Commit
  • 33.
  • 34.
    Resources • Code Commit- http://docs.aws.amazon.com/codecommit • Code Build - http://docs.aws.amazon.com/codebuild • Code Deploy - http://docs.aws.amazon.com/codedeploy • Code Pipeline - http://docs.aws.amazon.com/codepipeline • Demo - https://github.com/strongjz/golang-deployment-pipeline • Project Phoenix - https://www.amazon.com/Phoenix-Project-DevOps-Helping- Business/dp/0988262592
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
    Code Commit Costs First5 active users* Each active user* above the first 5 Free $1 per month Receives: •Unlimited repositories •50 GB-month of storage •10,000 Git requests/month Receives: •Unlimited repositories •10 GB-month of storage per active user •2,000 Git requests/month per active user •Storage •$0.06 per GB-month •$0.001 per Git request
  • 43.
  • 44.
    Code Deploy Costs •For CodeDeploy on EC2: There is no additional charge for code deployments to Amazon EC2 instances through AWS CodeDeploy. For CodeDeploy On-Premises: You pay $0.02 per on-premises instance update using AWS CodeDeploy.
  • 45.
    Code Pipeline Costs Youpay only for what you use. AWS CodePipeline costs $1 per active pipeline* per month. An active pipeline is a pipeline that has existed for more than 30 days and has at least one code change that runs through it during the month. There is no charge for pipelines that have no new code changes running through them during the month. An active pipeline is not prorated for partial months. You may incur additional charges for storing and accessing your pipeline artifacts in Amazon S3 and for triggering actions from other AWS and third party services that you connect to your pipeline.

Editor's Notes

  • #10 People – teams, silos Process – tickets, back and forth, lots of non value add Technology
  • #11 Automation removes some barriers to processes. Cloud builds, API Removes some of the hurdles of silo mindset
  • #15 DevOps is more about this….
  • #16 Culture
  • #17 Tools help us to change culture, Galileo Telescope changed are world view That tool, well process really is CI/CD But….
  • #20 Continuous delivery is a software development methodology where the release process is automated. Every software change is automatically built, tested, and deployed to production. Before the final push to production, a person, an automated test, or a business rule. Continuous integration is a software development practice where members of a team use a version control system and integrate their work frequently to the same location, such as a master branch. Each change is built and verified by means of tests and other verifications in order to detect any integration errors as quickly as possible. Continuous integration is focused on automatically building and testing code, as compared to continuous delivery, which automates the entire software release process up to production Services
  • #24 repositories are encrypted at rest as well as in transit Triggers – SNS and Lambda
  • #25 CodeBuild – source repo for code Elastic Beanstalk – deploy code from commit into eb resources Cloudformation – create or update a stack or change set in CFN CodePipeline – source for a deployment Key management - AWS CodeCommit uses AWS KMS to encrypt Lambda – fire lambda events based on commits SNS – sends notifications about commits.
  • #27 https://stelligent.com/2016/01/15/automating-aws-codedeploy-provisioning-in-cloudformation/ CodeDeployDefault.AllAtOnce CodeDeployDefault.HalfAtATime  In the example of nine instances, it will deploy to up to four instances at a time. The overall deployment succeeds if deployment to five or more instances succeed; otherwise, the deployment fails. CodeDeployDefault.OneAtATime
  • #28  Deployment Configuration – How code gets there and when All at once Half One at a time Applications - container around all the attributes Deployment Group – EC2 instances or ASG Application revisions – version of files to deploy Deployments – process of deploying and how. In Place – app stopped and new version installed Blue Green – new instance and latest version placed the traffic rerouted Automated or manual rollback Monitoring all this
  • #29 Revision – Change in source, multiple revision can be ran thru a single pipeline but only one per stage , S3, CodeCommit, Github Stage – build stage, testing stage, all actions must be run to be considered complete Action – some task to be performed Type – Transition – moving from one stage to the next Deployments -
  • #30 Type - Source build Codebuild, Cloudbees. Jenkins. SolanCI. Team City Test – Codebuild, Apica BlaseMeter, Ghost inspector, HPE stormrunner load, runscope Deploy - CFN, Codedeploy , Elastic beanstalk, opsworks, Xebia labs Approval – Manually Invoke – Lambda functions create a custom action, you must also create a job worker that will poll AWS CodePipeline for job requests for this custom action, execute the job, and return the status result to AWS Code pipeline
  • #31 AWS CodeDeploy: Type or choose the name of an existing AWS CodeDeploy application in Application name and the name of a deployment group for that application in Deployment group, and then choose Next step. Alternatively, you can create an application, deployment group, or both by choosing those links in AWS CodeDeploy. AWS Elastic Beanstalk: Type or choose the name of an existing Elastic Beanstalk application in Application name and an environment for that application in Environment name, and then choose Next step. Alternatively, you can create an application, environment, or both by choosing those links in Elastic Beanstalk.   AWS OpsWorks: Type or choose the name of the stack you want to use in Stack and the layer that your target instances belong to in Layer. In App, choose the application that you want to update and deploy. If you need to create an app, choose create a new one in AWS OpsWorks.Services CFN – create or update a stack, also create a change set on a stack
  • #35 Commit Pipeline http://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-simple-codecommit.html Deploy https://github.com/awslabs/aws-codedeploy-samples/tree/master/applications/SampleApp_Linux Go sample Code Build http://docs.aws.amazon.com/codebuild/latest/userguide/sample-go-hw.html Codepipeline Blog annoucement https://aws.amazon.com/blogs/aws/category/code-pipeline/