Giter Site home page Giter Site logo

aws-eb-demo's Introduction

AWS Elastic Beanstalk Demo

Deploying a Dockerized Spring Boot application to AWS Elastic Beanstalk.

Getting started

  1. Install the AWS Elastic Beanstalk CLI

  2. Configure the AWS Elastic Beanstalk CLI:

     eb init --platform docker-17.09.1-ce --region eu-west-2 aws-eb-demo
    
  3. Create the environment in AWS, selecting the defaults when prompted:

     eb create
    

    WARNING: You will be charged for these resources until they are destroyed.

  4. Visit the outputted environment CNAME, e.g. http://aws-eb-demo-dev.eu-west-2.elasticbeanstalk.com/

Manual deployment

To manually deploy the project to AWS:

mvn clean package
docker build -t markhobson/aws-eb-demo .
docker login
docker push markhobson/aws-eb-demo
eb deploy

Continuous deployment

We'll use CircleCI for continuous deployment.

  1. Add the project

  2. Add environment variables for your Docker Hub credentials:

    • DOCKER_REGISTRY_USERNAME
    • DOCKER_REGISTRY_PASSWORD
  3. Add environment variables for your AWS credentials and region:

    • AWS_ACCESS_KEY_ID
    • AWS_SECRET_ACCESS_KEY
    • AWS_DEFAULT_REGION

The job builds the project within the Docker container .circleci/images/primary/Dockerfile. If you need to rebuild this:

docker build -t markhobson/aws-eb-demo-primary .circleci/images/primary
docker login
docker push markhobson/aws-eb-demo-primary

Destroying

To terminate the environment in AWS:

eb terminate --force aws-eb-demo-dev

You will no longer be charged for these resources.

aws-eb-demo's People

Contributors

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