Comsat is a command line tool that enables you parallely execute your CI/CD commands in a containerized, distributed environment. It can greatly improve your CI/CD pipeline by allowing you to execute your test or build commands in parallel. Since everything is containerized, you no longer have to configure or setup any slave dependencies.
- Docker Engine or Docker Swarm
- Slaveless: No slaves to configure. Execution is done by creating a container of your code base on a node (or nodes if you're running a Swarm)
- Concurrency: Execute multiple commands at the same time. For example, a Rails app can execute it's test suite, rubocop and brakeman at the same time rather than in a the typical synchronous fashion.
Once you add a comsat.yml config file, execute the following:
comsat
If your comsat.yml looks like this
image: hacker_registration:ctest
ExitOnFailure: true
command:
- rubocop
- rspec
- brakeman
When you execute comsat
it will create 3 containers using the specified image and execute each command at the same time. Since ExitOnFailure
is set to true, if any of the containers exit unsuccessfully, we terminate the whole execution.
All output is sent to stdout.
In a yaml file, you specify the image you want to test and a list of commands to be executed. Then you execute comsat
which concurrently executes each of the commands in it's own container.
Sample comsat.yaml
Image: your-image-name
ExitOnFailure: true
Command:
- rspec
- rubocop
- Be able to specify a different DOCKER_HOST endpoint.
- Need a way to specify container dependencies (such as database dependency)
- Need a way to specify setup commands (such as creating or migrating a datbase)
This will require a change to the comsat.yml file. Proposed update:
postgres:
image: mongo
web:
image: myrailsapp:test
setup:
- rake db:create
- rake db:migrate
commands:
- rspec
- rubocop