Add option to run Circuitbreaker for each LND Node
Closed this issue · 5 comments
Add the ability to run a custom version of circuitbreaker alongside each LND node in warnet. Circuitbreaker can be run using the following command:
circuitbreaker --network=regtest --rpcserver={lnd host:lnd port} --tlscertpath={path to LND cert} --macaroonpath={path to LND admin.macaroon}
For my purposes, I'll need to be able to copy in pre-populated databases into the circuitbreaker containers, so it would be very helpful to be able to provide a path to the database that needs to be mounted. This database needs to be in place before circuitbreaker starts (otherwise it'll create its own, empty database), not sure how that works in a kubernetes world.
The database is located at ~/circuitbreaker/circuitbreaker.db
in the using AppDataDir to determine the home directory. This base directory can also be customized with --configdir
if required.
Seems pretty handy that this is already dockerised. Should make it nice and simple to run as another container in the same pod as Bitcoin Core and LND.
If I understand k8s correctly, the way we should be looking to approach this is to run an initContainer
in each pod. This can contain the various config files/databases, and can mount them to file(s) which are mounted and shared with the main container(s) (Core, LND, Circuitbreaker) before they start up.
Hey @carlaKC can you confirm that this linked circuitbreaker the exact version you want to be running in warnet?
Hey @carlaKC can you confirm that this linked circuitbreaker the exact version you want to be running in warnet?
This is the version I'd like to run, but will it be difficult to update? Totally possible that I need to do a bugfix between now and running the simulations as we test things out.
Ah no that will be fine.
I was just more wondering "are they using some custom patched version of this, that we need to build docker images for dynamically, or can I rely on the existing images". It sounds like we should be able to rely on pulling a pre-built image from a registry though.
Gotcha, you pull from carlakirkcohen/circuitbreaker:endorsement-experiment. Definitely don't need to worry about building docker images.