Skip to content

Conversation

@vpavlin
Copy link
Member

@vpavlin vpavlin commented Aug 18, 2023

This PR defines a manifest which can be used to generate a full Docker Compose manifest with some environment preparation (volume dirs creation per service, prometheus config generation etc.).

Example manifest can be seen in default.yaml
The struct is defined in types.go

You can build the CLI by running

make build

The resulting binary is ./bin/wakusim

Running:

./bin/wakusim gen

will produce a directors default/ with all the necessary files. You can enter the directory then and run compose

cd default/
docker compose up

You can have multiple simulation files - e.g. very_large_simulation.yaml and execute the generationy by running

./bin/wakusim gen -s very_large_simulation

which will generate all the artifacts in ./very_large_simulation/, where you can run compose up then.

TODOs:

  • Verify the simulation name vs. the manifest file name
  • Add launch sub command to execute docker compose up
  • Add clean sub command to clean up the simulation dir
  • Write docs (e.g. manifest details, how do volumes work)
  • Think about whether it is a good idea to hardcode the service definition for monitoring in code (probably not, although it is not changing often...)
  • Parameterize exposed port(s) for monitoring and others, so that it is possible to run multiple simulations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant