kimxogus / sbt-elastic-beanstalk   0.7.0

Apache License 2.0 GitHub

sbt 1.0 plugin for elasticbeanstalk distribution

Scala versions: 2.12
sbt plugins: 1.0

sbt-elastic-beanstalk-plugin

Download

Creates a distribution of your Scala/Play/Akka app for deployment on AWS Amazon Web Services) Elastic Beanstalk. Forked from kipsigman/sbt-elastic-beanstalk

Features

  • Build deployable zip for AWS (Amazon Web Services) Elastic Beanstalk environments with Docker config
    • Works with any Scala, Play Framework, or Akka application
    • Extends SBT Native Packager Docker plugin
    • Allows addition of Elastic Beanstalk config (Dockerrun.aws.json)

Installation

Add the following to your project/plugins.sbt file:

addSbtPlugin("io.xogus" % "sbt-elastic-beanstalk" % "0.7.0")

In your build.sbt enable the plugin.

enablePlugins(ElasticBeanstalkPlugin)

Usage

  1. Add build.sbt settings for the SBT Native Packager Docker plugin.

example (for a Play app):

packageName in ElasticBeanstalk := "zip-file-name",
elasticBeanstalkSources in ElasticBeanstalk := Seq(
  baseDirectory.value / ".ebextensions",      // add .ebextensions folder
  baseDirectory.value / "Dockerrun.aws.json"  // add Dockerrun.aws.json file
),
dockerLabels := Map(
 "maintainer" -> "Taehyun Kim <[email protected]>"
),
dockerExposedPorts := Seq(9000),
dockerBaseImage := "java:latest"
  1. Create distribution for upload to Elastic Beanstalk:
sbt elastic-beanstalk:dist
  1. The elastic-beanstalk:dist command will output the location of your deployable zip. Upload to your Elastic Beanstalk environment.
  2. Enjoy a beer or re-watch the original "Point Break."

Sample projects

Here are some sample projects using this plugin which may be helpful in getting started.