Giter Site home page Giter Site logo

harness-aws-elastic-beanstalk's Introduction

AWS Elastic Beanstalk Continuous Delivery with Harness.io

A Custom Deployment type for harness.io that allows you to empower your developers and DevOps teams with the world class capabilities from Harness, such as Automatic Rollbacks, pipeline templates, governance, verification and much more on your Beanstalk applications! To use this, you need to have the Custom Deployments feature enabled in your account. Talk with your Customer Success Manager or Harness Support.

This repo contains Harness Config as Code configuration. If you already have Git Sync enabled in your environment, you can just clone this repo and push the files to your repo, just changing the accountName folder to your actual Account Name, or run the upload.sh script in this repo to push all this configuration to your account automatically!

If you prefer to use the script to upload the templates, you should define the following env variables before running:

Script Usage:

export HARNESS_ACCOUNT_NAME=yourAccountName
export HARNESS_ACCOUNT_ID=yourAccountID
export HARNESS_API_KEY=your api key with permissions on template library

./upload.sh

If you see a output like this, you are good to go!

  "metaData": {},
  "resource": {
    "responseStatus": "SUCCESS",
    "errorMessage": "",
    "filesStatus": [
      {
        "yamlFilePath": "Setup/Template Library/se-luisredda/Elastic Beanstalk/Rollback Elastic Beanstalk.yaml",
        "status": "SUCCESS",
        "errorMssg": ""
      },
      {
        "yamlFilePath": "Setup/Template Library/se-luisredda/Elastic Beanstalk/AWS Elastic Beanstalk.yaml",
        "status": "SUCCESS",
        "errorMssg": ""
      },
      {
        "yamlFilePath": "Setup/Template Library/se-luisredda/Elastic Beanstalk/Deploy AWS Beanstalk.yaml",
        "status": "SUCCESS",
        "errorMssg": ""
      }
    ]
  },
  "responseMessages": []
}

Creating your Elastic Beanstalk Services, Environments, Workflows and More

Before get started, let's take a look on what we have created on Harness Template Library:

On "Elastic Beanstalk Folder":

  • AWS Elastic Beanstalk: Custom Deployment specification that allows you to control how Harness fetch the instance names (EC2 instances) and the Infrastructure Variables like your EB Environment Name, Region and STS Role if you would like to deploy from a single delegate into multiple AWS Accounts,
  • Deploy AWS Beanstalk: Service Command that specify each deployment Step like Create EB App Version, Update Environment and Steady State Check
  • Rollback Elastic Beanstalk: Rollback script template to include in the workflow rollback strategy. Work in progress to use only the Service Command above.

Harness Service

  • Create a new service and select the "AWS Elastic Beanstalk" deployment type.
  • Add your artifact in your service from a S3 source

Harness Environment

  • On your Harness Environment, you can add one infrastructure definition per Elastic Beanstalk environment.
    • Environment Name (Mandatory): Your Beanstalk Environment Name.
    • AWS Region (Mandatory): Region where you will deploy.
    • STS Role (Optional): ARN of the role that you want to assume to deploy (Ex: in another account). This follow the same principle as we do in AWS Cloud Provider.

Harness Workflows

  • Create a Workflow and select the Service and Environment you just created. You will see the "Fetch instances" step, that will execute the template to fetch the beanstalk instances. You should KEEP it before any other step.
  • Add a new step and link the "Deploy AWS Beanstalk" service command from Template Library. If you have many delegates, pick your delegate selector and make sure that the Delegate have the AWS CLI and JQ installed.
  • In the rollback steps, link the "Rollback Elastic Beanstalk" template.

You are good to go and start deploying your Beanstalk services with Harness!

harness-aws-elastic-beanstalk's People

Contributors

luisredda 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.