Code Monkey home page Code Monkey logo

azurator-sample's Introduction

Welcome to your beanstalk-maven-plugin archetype project!

About

For up to date information, see http://docs.ingenieux.com.br/project/beanstalker/

This project was generated from the elasticbeanstalk-dropwizard-webapp-archetype.

As it is, it is a boilerplate code for a generic, modern webapp using Amazon Web Services' Elastic Beanstalk Service with Docker and Dropwizard

We hope you like it. If you run into any problems, please let us know by the mailing list or the issue tracker

Setting up your Maven Build

TL;DR: Set AWS_ACCESS_KEY and AWS_SECRET_KEY from your environment.

Create / Edit your settings.xml as suggested in the Security Page

This project, as is, supports modes 1-2 (settings.xml), and it looks by default for aws.amazon.com.

Don't worry, you're likely to do it once for each and every machine you plan to build. :)

Configuring your Project

We suggest convention over configuration, but anyway. The only setting you're likely to set is your cnamePrefix and ```environmentRef```` properties on your pom.xml file.

Make sure you pick something unique and unlikely to conflict with other users.

It is also interesting to review the parameters in the properties section.

Deploying

Simply call mvn deploy -Pfast-deploy

If your environment is Ready (Green or Red), it will deploy. If not, a new version will get published.

You can always launch a new environment...

Launching an Environment

If you did the previous step, it will create a new elastic beanstalk application for you in AWS Console. You can launch and environment right away with:

mvn beanstalk:create-environment

Or you could use the console. From the console, click in "Launch New Environment". In this dialog, not all options are available, so initially set the Health Check URL to the /debug handler:

/services/api/v1/debug

Don't launch it yet, though. We have some tips...

Deploy versus Fast-Deploy

There are two variables involved when deploying into AWS Elastic Beanstalk:

  • Git versus S3 (we chose git in this project)
  • Downtime or Zero-Downtime

Since we already made your life simpler by choosing git over S3, you have two profiles to pick according to your needs:

  • Production: mvn -Pdeploy deploy will do a zero-downtime deploy. No downtime, but uses more resources
  • Development: mvn -Pfast-deploy deploy will do a plain git deploy. It will incur downtime, but uses less resources

Environment / Configuration Tips:

  • We suggest you save your environment into a configuration template once you're happy. We suggest envname-yyyymmdd-nn, where NN is a number which gets incremented.

Hint: Use mvn beanstalk:tag-environment to do this. If you want to launch a new environment based on this template, simply use mvn beanstalk:create-environment -Dbeanstalk.templateName=envname-yyyymmdd-nn

Setting the Proper Health Check URL

Besides that, make sure you can map to an SSH Key you already have, so you are able to log into your EC2 Instance and troubleshoot any problems (unlikely, but better safe than sorry).

Ok, now you can launch.

Once the application is launched (and there's a Green Icon), click in "Edit Configuration" and set your applications AWS Access Key / Shared Key, then you can set set the proper Health Check URL:

/health/check

SCM Notes

Git Fast-Deploy

Please never commit the contents of your tmp-git-staging directory.

Its there to cache locally and enable fast deployments into elastic beanstalk via the git backend.

(if you look closely, thats the reason for both .gitignore and .hgignore files)

Code Notes

Health Check

The health check code tries to poll DynamoDB, S3, and EC2. If your EC2 keys are IAM-limited, comment-out the relevant sections.

Misc Notes

We hope beanstalk-maven-plugin helps your life easier, and find it fun and easy as much as we do.

btw, why not donate to beanstalker?

Thank you.

azurator-sample's People

Contributors

aldrinleal avatar

Stargazers

Tim Bart avatar

Watchers

 avatar James Cloos avatar  avatar

azurator-sample's Issues

๐Ÿงš๐Ÿค– Pixeebot Activity Dashboard

DashList

๐Ÿ‘‹ This dashboard summarizes my activity on the repository, including available improvement opportunities.

Recommendations

Last analysis: Jun 12 | Next scheduled analysis: Jun 19

Open

โœ… Nice work, you're all caught up!

Available

โœ… Nothing yet, but I'm continuing to monitor your PRs.

Metrics

What would you like to see here? Let us know!

Resources

๐Ÿ“š Quick links
Pixee Docs | Codemodder by Pixee

๐Ÿงฐ Tools I work with
Sonar, CodeQL, Semgrep

๐Ÿš€ Pixee CLI
The power of my codemods in your local development environment. Learn more

๐Ÿ’ฌ Reach out
Feedback | Support


โค๏ธ Follow, share, and engage with Pixee: GitHub | LinkedIn | Slack

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.