GithubHelp home page GithubHelp logo

cloudemprise / demo-cert-devops-codedeploy-ec2-github Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 50 KB

The repository contains artifacts and reference material related to an AWS CodeDepoly deployment project and its auxiliary components. These components are used to perform a deployment of a sample application to an EC2 Instance from GitHub.

License: MIT License

Shell 95.60% HTML 4.40%
aws aws-codedeploy aws-codedeploy-agent aws-cloudformation bash-script

demo-cert-devops-codedeploy-ec2-github's Introduction

demo-cert-devops-codedeploy-ec2-github

The repository contains artifacts and reference material related to an AWS CodeDepoly deployment project and its auxiliary components. These components relate to a dual GitHub & AWS CodeCommit repository that is used to perform an AWS CodeDeploy infrastructure sampling.


Overview

This repository contains artifacts and reference material related to an AWS CodeDeploy demonstration that deploys a sample application revision from a GitHub repository to a single Amazon EC2 instance running Amazon Linux 2. It elaborates on the following tutorial: Use CodeDeploy to deploy an application from GitHub

Integrating CodeDeploy with GitHub

CodeDeploy supports GitHub. AWS CodeDeploy can deploy application revisions stored in GitHub repositories for type EC2/On-Premises deployments only. The authorization process involves interacting with the AWS Console to give each application permission using OAuth.

AWS CodeDeploy Agent

For type EC2/On-Premises deployments, the AWS CodeDeploy service requires that an agent be installed on the target instance. The CodeDeploy agent communicates outbound using HTTPS over port 443 and is not required for deployments that use the Amazon ECS or AWS Lambda compute platform. Log file can be found here: /var/log/aws/codedeploy-agent.

For the simplicity of convenience, this demonstration manually installs the agent via the Userdata Script facility of the Launch Template CloudFormation nested stack.

This agent could very well be be installed using AWS Systems Manager and is in fact the recommended method for installing and updating the CodeDeploy agent. There is a very handy AWS Systems Manager service integration that can set up installation and scheduled updates via the AWS Console when you manually create a Deployment Group. Don't forget to include the Managed Policy: AmazonSSMManagedInstanceCore within your service role.

Infrastructure As Code

A stand-alone solution records the complete infrastructure definition and takes the form of nested AWS CloudFormation templates. These are provisioned via a bash script that orchestrate the creation of all the Cloud resource components required in this demonstration and comprise the following:

automation/
├── cfn-templates
│   ├── demo-cert-devops-codedeploy-sample-github-cfn-dev-deploy.yaml.(DEPLOYMENT)
│   ├── demo-cert-devops-codedeploy-sample-github-cfn-ec2-lt.yaml.....(LAUNCH TEMPLATE)
│   ├── demo-cert-devops-codedeploy-sample-github-cfn-ec2-pub.yaml....(EC2 INSTANCE)
│   ├── demo-cert-devops-codedeploy-sample-github-cfn-iam.yaml........(IAM ROLES)
│   ├── demo-cert-devops-codedeploy-sample-github-cfn-vpc-sg.yaml.....(SECURITY GROUP)
│   ├── demo-cert-devops-codedeploy-sample-github-cfn-vpc.yaml........(VPC)
│   └── demo-cert-devops-codedeploy-sample-github-cfn.yaml............(TOP LEVEL)
└── provision-infrastructure-cfn-templates.sh.........................(BASH SCRIPT)

Reference:

Relevant APIs:

AWS CodeDeploy

create-application

create-deployment-group

create-deployment

create-deployment-config

get-deployment-instance

get-deployment-config


push

demo-cert-devops-codedeploy-ec2-github's People

Contributors

cloudemprise avatar

Watchers

 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.