Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DevOps On AWS - Farouq Mousa

DevOps On AWS - Farouq Mousa

DevOps On AWS - By Farouq Mousa.pdf

Avatar for AWS MENA Community

AWS MENA Community

September 25, 2020
Tweet

More Decks by AWS MENA Community

Other Decks in Technology

Transcript

  1. Farouq Mousa AWS Solutions Architect | DevOps Engineer | Genesys

    Consultant | AWS UG Leader at Palestine @farouqmousa @farouqmousa
  2. DevOps and Continuous Delivery • Automated deployments • Repeatable and

    safer • Smaller change sizes • Deploy morefrequently • Faster feedback loops • Learn and reactquicker • Deliver more value
  3. Benefits of CodeDeploy • Automate yourdeployments • Fully managed serverlessservice

    • Free withinAWS • $0.02 per on-premises instanceupdate • Centralize control • Versatile
  4. Application The core component CodeDeploy Components Deployment Group A target

    for your deployment Deployment Roll out anapp revision
  5. Compute platform EC2/On-premises, AWS Lambda, Amazon ECS A uniquename An

    identifier that isunique inside its AWS account A CodeDeploy Application
  6. ECS An ECS cluster + An ECS service + A

    load balancer + Target Group 1 + Target Group 2 Lambda Lambda function name EC2/On-premises Autoscaling groups EC2 instance tags On-premises hosts Deployment Groups
  7. Deployment group Targets for the deployment A CodeDeploy Deployment Deployment

    configuration Such as “One At A Time” Revision An application version Deployment type “In Place” or “Blue-Green”
  8. ECS AppSpec file Task Definition version Container name Container port

    Lambda AppSpec file Function name Function alias Version info EC2/On-premises GitHub commit ID or Zip file in S3 Revisions
  9. version: 0.0 os: linux files: - source: /src destination: /var/www/html

    hooks: BeforeInstall: - location: scripts/before_install.sh timeout: 300 runas: root AppSpec File: appspec.yml
  10. #!/bin/bash -xe yum install -y ruby cd /opt curl -O

    https://aws-codedeploy-us-east- 1.s3.amazonaws.com/latest/install chmod +x ./install ./install auto Install CodeDeploy - Red Hat
  11. • Software licensing • CI software upgrades • Underlying host

    management • Agent configurations • Hand crafted build projects • Queued builds Traditional CI
  12. Continuous Integration • DevOps and agile processes • Helps prevent

    merge conflicts • Triggers off code commits • Static code analysis • Compiles code • Runs tests • Packages and publishes artifacts • Catch and fix problems quicker
  13. Benefits of CodeBuild • Fully managed build service • Elastic

    scaling • Pay only for build time used • CLI and API driven • Define builds as code • Tightly knit AWS integrations • Extensible
  14. Sends notifications Runs tests Static code analysis Compiles code Runs

    builds How Is CodeBuild Used in a CI/CD pipeline? 1 2 3 4 6 Publishes Artifacts 5
  15. Build project The definition ofyour project Build or Build run

    An execution of your Build project CodeBuild Components
  16. version: 0.2 env: variables: key: “value” parameter-store: key: “value” phases:

    build: commands: - compile commands - test commands artifacts: files: - target/messageUtil-1.0.jar Build Spec File:buildspec.yml
  17. Continuous Delivery Pipelines • A Continuous Delivery tool • Define

    your entire release process • Ties together disparate systems • Flows Code out to production
  18. Benefits of CodePipeline • Fully managed pipeline service • Pay

    only for active pipelines • Tightly tightly AWS integrations • Third party developer tool actions • Extensible via Lambda and custom actions
  19. Artifacts Bundles of code produced by astage and ingested by

    another stage Transitions The connections between stages Stages A collection of action groups that contain actions Pipeline Components
  20. A CodePipeline Stage Action Group Actions Pipeline Stage Action Group

    Actions runOrder: 1 runOrder: 1 runOrder: 2 runOrder: 2
  21. Visualizing CodePipeline Transition Source Stage Action Group G itHub action

    Build Stage Action Group C o deB uild action Deploy Stage Action Group C o deD eploy action Transition Pipeline
  22. CloudWatch Events A configured rule can route CodePipeline event info

    to one or more targets CodeDeploy Triggers Publish to an S N S topic when deployment events occur for a deployment group Pipeline Execution Monitoring