Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add minimalist golang tool to allow for waku simulation compose generation #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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