When packaging lambda functions using docker and docker-compose (the default mode of juniper). Make sure that if the developer trying to build the artifacts has docker installed.
This feature is meant to provide clear feedback to a user when the build fails due to a missing dependency.
If docker is missing when executing juni build notify the user and gracefully exit
If docker-compose is missing when executing juni build notify the user and gracefully exit
Keep in mind the issue in which docker might not be a hard requirement of juniper. In that case, make sure that the validation step, is only invoked when the manifest has docker=true.
How
Implement a validation step in juniper that will validate when running juniper in docker mode, that docker and docker-compose are available. If these are not present, clearly notify the user.
Think about using the subprocess module in python as a way to invoke a docker/docker-compose command. Run the version commands on each dependency to validate the services are running and installed.
Why
Providing clear feedback to a user is fundamental in the adoption of the tool. Nothing more frustrating that getting random exceptions due to dependency misconfigurations.
What
When packaging lambda functions using docker and docker-compose (the default mode of juniper). Make sure that if the developer trying to build the artifacts has docker installed. This feature is meant to provide clear feedback to a user when the build fails due to a missing dependency.
If docker is missing when executing
juni build
notify the user and gracefully exit If docker-compose is missing when executingjuni build
notify the user and gracefully exitKeep in mind the issue in which docker might not be a hard requirement of juniper. In that case, make sure that the validation step, is only invoked when the manifest has
docker=true
.How
Implement a validation step in juniper that will validate when running juniper in docker mode, that docker and docker-compose are available. If these are not present, clearly notify the user.
Think about using the
subprocess
module in python as a way to invoke a docker/docker-compose command. Run the version commands on each dependency to validate the services are running and installed.Why
Providing clear feedback to a user is fundamental in the adoption of the tool. Nothing more frustrating that getting random exceptions due to dependency misconfigurations.