I have several Scala applications that I want to deploy in a Docker multi-container environment on Amazon's Elastic Beanstalk.
It seems like the whole process is a bit more complicated that I was expecting. So I'm really looking forward to hear some feedback for best practices and other ways to improve my entire process and be able to "automate" some steps (if possible).
This is my current process:
- To generate my projects' artifacts I'm using the sbt-docker plugin. This plugin generates the projects artifacts (jars and Dockerfile) under [app-route]/target/docker.
- I upload these artifacts (jars and Dockerfile) into a git repository (currently doing this "manually").
- As Amazon's Elastic Beanstalk requires for Docker multi-containers, I need an online repository to "host" the images: Could be Docker-Hub or Quay.io. Either require me to have a git repository in which it can find the artifacts to be able to generate the project's image.
- Having created the multi-container environment in Elastic Beanstalk, I proceed to upload the Dockerrun.aws.json file as detailed in Amazon's documentation and also the .ebextensions/elb-listeners.config file with the settings of the ports (Since I'm running multiple apps)
- Magic! Amazon generates my environment. Same url, different ports for all my apps (as specified in the configuration files in step 4.
I would love to find a way to automate step 2. Since this requires me to have an extra repo per each app. I have my apps hosted in a git repo, and I have an "extra" repo per each where I host the artifacts generated in step 1 to be able to do step 3.