Deployment is done via a set of terraform modules whose functionality is to set up a "simplified infrastructure" in which all different services composing ArmoniK.Core may interact with each other. Each module takes care of fetching the necessary docker images, in case of the external dependencies of the code, e.g., database, queue, etc. And either building or fetching existing images of the different components of ArmoniK.Core.
In order the facilitate the deployment without the burden of defining dozens of terraform variables, we make use of the just command runner, which among many useful functionalities, allows us to pass variables to our make
-like recipes.
The following command shows all the available recipes, with all the parameters that you can pass to each.
cd [ArmoniK.Core repository]
just
Some of the main recipes include:
- Build recipes : allow to build one or more docker images.
- Deploy recipes : allow to deploy ArmoniK.Core or specific components of it.
- Destroy recipes: allow to destroy a deployment.
Here is the full recipe for deployment:
just tag=<tag> queue=<queue> worker=<worker> object=<object> replicas=<replicas> partitions=<number of partitions> local_images=<bool> build-deploy
The main parameters for the recipes are:
- tag: tag of the docker images.
- worker: worker that runs the tasks
- object: object storage that stores tasks data and results
- queue: queue used by ArmoniK.Core to publish messages
- replicas: number of polling agents / workers to be replicated
- partitions: number of partitions
- local_images: to let terraform build the docker images locally.
To see the options for those parameters, please refer to the output of the just command.
The build-deploy
recipe allows to build the images and then deploying them.
But there are some recipes that build the images such as build-all
. The images which are built with this command can be deployed later with the deploy
recipe.
If you deploy with the option local_images=true
, this allows to update existing images in case of modifications, without the need to build them again.
Note that the tag parameter is used to select images that will be deployed. The default value is set to test
, but you can select another tag: either to fetch existing images already built in local, or to use the images of a specific release of ArmoniK.Core or a specific branch. See dockerhubaneo for all the versions.