Closed david415 closed 2 months ago
@david415 The goal here is to integrate the build steps directly into the Docker build process, rather than building the server components and plugins outside of Docker and then copying the binaries into the Docker image. Right?
@david415 The goal here is to integrate the build steps directly into the Docker build process, rather than building the server components and plugins outside of Docker and then copying the binaries into the Docker image. Right?
@amitbasuri The goal is to configure our github CI (in this opt repo) to run a docker mixnet such that the Provider nodes are running our "http_proxy server plugin" --> https://github.com/0KnowledgeNetwork/opt/tree/main/server_plugins/cbor_plugins/http_proxy/cmd/http_proxy
Currently the only way to run a docker mixnet is with the docker/Makefile inside the katzenpost monorepo ( this repo https://github.com/katzenpost/katzenpost/ ). Here we need some kind of alternative way to run the docker mixnet... because the katzenpost docker makefile doesn't let us start the mixnet with our own http proxy plugin... unless we fork katzenpost. we are trying to avoid forking katzenpost.
The Katzenpost monorepo https://github.com/katzenpost/katzenpost/ does it's github CI with this config: https://github.com/katzenpost/katzenpost/blob/main/.github/workflows/go.yml
We want some of the same functionality:
The goal of this ticket is to make Github CI work for us with this git repo. We do not want to test all of katzenpost like in the above workflows/go.yml file. For now the goal is simply to configure our github CI to run a dockerized katzenpost mixnet... and run a simple ping test against the mixnet. In the katzenpost CI we are running a simple ping test like this:
https://github.com/katzenpost/katzenpost/blob/main/.github/workflows/go.yml#L81
In particular we wish to do:
It's easy to run genconfig:
If you look at
voting_mix/docker-compose.yml
you'll see entries like this:which means there needs to be a docker image called
katzenpost-alpine_go_mod
.The recipe to generating that docker image is in our docker makefile, here:
https://github.com/katzenpost/katzenpost/blob/main/docker/Makefile
However the docker makefile also runs the katzenpost mix server makefile:
https://github.com/katzenpost/katzenpost/blob/main/server/Makefile
As you can see, those
testnet-build
andtestnet-build
are specific to docker and assist in creating the desired docker image. Our particular use case for the katzenpost mixnet does not require any of the server plugins except our own http_proxy. That means we do not want to execute some of the lines within the server makefile such as:Instead we must build our http_proxy plugin and move it into the docker volume during image creation.
Build our http_proxy plugin here: https://github.com/0KnowledgeNetwork/opt/tree/main/server_plugins/cbor_plugins/http_proxy/cmd/http_proxy
Deploy http_proxy with it's config, here: https://github.com/0KnowledgeNetwork/opt/blob/main/server_plugins/cbor_plugins/http_proxy/http_proxy_config.toml
And note that the katzenpost provider toml config has to have a section to enable the http_proxy server plugin:
Note that this repo has a modified fork of genconfig which does enable the above http_proxy config:
https://github.com/0KnowledgeNetwork/opt/blob/main/genconfig/main.go#L202
But it also writes the http_proxy_config.toml... and we probably want to instead copy that from elsewhere.