Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

Java Spark application, with continuous delivery integration, using GitFlow, CircleCI, EB cli and AWS ElasticBeanstalk.

License

Notifications You must be signed in to change notification settings

romajs-demos/demo-spark-eb-ci

Repository files navigation

demo-spark-eb-ci

This is a simple demo Java Spark application, with continuous delivery integration, using GitFlow, CircleCI, EB cli and AWS ElasticBeanstalk.

CircleCI codecov

Featuring

  • Spark
  • Gradle
  • Jar with dependencies (shadowJar)
  • AWS ElasticBeanstalk deployment with EB cli
  • CircleCI integration with EB cli
  • EB cli and GitFlow branch integration
  • Code coverage

To do

  • Swagger documentation
  • SwaggerUI
  • Spark Auto-reload
  • eb deploy -l $(gradle properties | grep version | cut -c 10-)

Deployment

To start deployment this application to your AWS ElasticBeanstalk environments, you will need:

Then by simply making changes and pushing to theese branches (<master>, <release> and <develop>), CircleCI will update your enviroments automatically.

Continuous integration

Git branch ElasticBeanstalk enviroment
master demo-spark-eb-ci
release demo-spark-eb-ci-hml
develop demo-spark-eb-ci-dev

Development

Requirements

  • Java JDK 8
  • Gradle
  • EB cli

Deployment

To deploy to your enviroments manually you will need:

Then run the eb cli deploy command:

eb deploy <your-eb-enviroment> --profile <your-eb-cli-profile>

Useful commands

Description Command
Build ./gradlew build
Build w/ dependencies (shadow/jar) ./gradlew shadowJar
Test ./gradlew test
Run ./gradlew run or java -jar ./build/libs/demo-spark-eb-ci-shadow.jar
ElasticBeanstalk initialization eb init
Create EB application eb create <your-eb-enviroment>

Further configuration

After your environment has been create/deployed, you need to edit your security groups rules

Single instance

<your-sg-ec2>

Inbound
Type Protocol Port range Source Description
Custom TCP Rule TCP 4567 0.0.0.0/0

<your-sg-elb>

Auto-scaling

(with load balancer)

<your-sg-ec2>

Inbound
Type Protocol Port range Source Description
Custom TCP Rule TCP 4567 <your-sg-elb>

<your-sg-elb>

Outbound
Type Protocol Port range Source Description
Custom TCP Rule TCP 4567 <your-sg-ec2>

<your-elb>

Listeners
Load Balancer Protocol Load Balancer Port Instance Protocol Instance Port Cipher SSL Certificate
HTTP 80 HTTP 4567

About

Java Spark application, with continuous delivery integration, using GitFlow, CircleCI, EB cli and AWS ElasticBeanstalk.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published