Giter Site home page Giter Site logo

aws-meetup-ci-cd's Introduction

Pipeline Implementation

1. Fork the repository

2. Create S3 bucket to store pull request source code

  • Create a buccket called "aws-meetup-sources" with versioning enabled

3. Create the required roles and policies

  • Create a new policy called "aws-meetup-lambda" with the permissions below:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "logs:*"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:logs:*:*:*"
        },
        {
            "Action": [
                "codepipeline:PutJobSuccessResult",
                "codepipeline:PutJobFailureResult"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}
  • Create a new role called "aws-meetup-build" to be used by codebuild with the "AdministrationAccess" policy
  • Create a new role called "aws-meetup-cloudformation" to be used by cloudformation with the "AdministrationAccess" policy
  • Create a new role called "aws-meetup-codepipeline" to be used by codepipeline
  • Create a new role called "aws-meetup-lambda" with the policy "aws-meetup-lambda-policy" to be used by lambda
  1. Create lambda function to trigger tests
  • Create a new lambda function called "aws-meetup-runtests"
  • Set "Python 2.7" as runtime
  • Use the role "aws-meetup-lambda"
  • Use the script stored in "config/lambda-runtests.py"
  1. Create lambda function to clean pull request bucket
  • Create a new lambda function called "aws-meetup-cleanup"
  • Set "Python 2.7" as runtime
  • Use the role "aws-meetup-lambda"
  • Use the script stored in "config/lambda-cleanup.py"
  1. Create batch job to run tests
  • TODO
  1. Create a codebuild project to build the application
  • You must create it from the codepipeline editor (to use codepipeline as sources)
  • Create a codebuild project called "aws-meetup-build"
  • In the environment section use an ubuntu managed image with node.js runtime
  • Use the existent role called "aws-meetup-build"
  • As buildspec use the file "config/codebuild-build.yml"
  1. Create a codebuild project to build the application
  • You must create it from the codepipeline editor (to use codepipeline as sources)
  • Create a codebuild project called "aws-meetup-cleanup"
  • In the environment section use an ubuntu managed image with base runtime
  • Use the existent role called "aws-meetup-build"
  • As buildspec use the file "config/codebuild-cleanup.yml"
  1. Create codebuild project to generate a codepipeline for each pull request
  • Create a codebuild project called "aws-meetup-handler"
  • Select github as provider
  • Select "Repository in my Github account" and grant access to codebuild
  • Select the forked repository
  • Enable "github webhooks" and select the pull request events to trigger the build
  • In the environment section use an ubuntu managed image with base runtime
  • Use the existent role called "aws-meetup-build"
  • As buildspec use the file "config/codebuild-handler.yml"
  • Set a S3 artifact using the bucket "aws-meetup-sources", enable semantic versioning and remove artifact encryption

Notes:

  • To create a codepipeline role you need to create the role from the new codepipeline editor
  • To create a codebuild project with codepipeline sources you must create it from the codepipeline editor

aws-meetup-ci-cd's People

Contributors

leonjalfon1 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.