Deployment with docker-compose
Docker is a great way to get SOTA running in a clean, reproducible way.
sbt can build and publish local docker images to test with, and docker-compose combined with some ATS-provided images makes sure all of SOTA’s dependencies are taken care of.
Deploying with docker-compose should be quite straightforward. Assuming docker is running on the deployment system,
docker-compose -p sota -f deploy/docker-compose/[filename].yml up should get you a running SOTA system. This depends on the following images:
External images provided by ATS
When you run docker-compose, it will first search for those images locally, and if it does not find them, it will pull the ones ATS has published on Docker Hub. To ensure you’re running the latest code, you can build the images locally with
sbt docker:publishLocal. To check for updates on the published images, you can do a
docker-compose -f deploy/docker-compose/[filename].yml pull, or simply
docker pull [image name] to update an individual image.
There are three docker-compose files included in the git repo, under
docker-compose.ymlcontains the default SOTA Server components.
core-rvi.ymlcontains the additional RVI server node with environment overrides for the SOTA Core server.
client-rvi.ymlcontains the additional RVI client node for testing with the SOTA Client
To start the base SOTA Server, run
docker-compose -f docker-compose.yml up. To start the SOTA Server with an RVI backend node, run
docker-compose -f docker-compose.yml -f core-rvi.yml up. To start the SOTA Server with both RVI backend and device nodes, run
docker-compose -f docker-compose.yml -f core-rvi.yml -f client-rvi.yml up.
If you want to deploy to the cloud, docker-compose can also help you do that. The easiest way is to use docker-machine’s AWS driver to create and deploy to a remote host.