This is a Kurtosis Starlark Package that allows you to spin up an etcd instance.
This assumes you have the Kurtosis CLI installed
Simply run
kurtosis run github.com/kurtosis-tech/etcd-package
Click to see configuration
You can configure this package using a JSON structure as an argument to the kurtosis run
function. The full structure that this package accepts is as follows, with default values shown (note that the //
lines are not valid JSON and should be removed!):
{
// The name to give the new etcd service
"etcd_name": "etcd",
// The image to run
"etcd_image": "softlang/etcd-alpine:v3.4.14",
// The client port number to listen on and advertise
"etcd_client_port": 2379,
// Additional environment variables that will be set on the container
"etcd_env_vars": {}
}
These arguments can either be provided manually:
kurtosis run github.com/kurtosis-tech/etcd-package '{"etcd_image":"softlang/etcd-alpine:v3.4.14"}'
or by loading via a file, for instance using the args.json file in this repo:
kurtosis run github.com/kurtosis-tech/etcd-package --enclave etcd "$(cat args.json)"
Kurtosis Packages can be used within other Kurtosis Packages, through what we call composition internally. Assuming you want to spin up etcd and your own service together you just need to do the following
etcd_module = import_module("github.com/kurtosis-tech/etcd-package/main.star")
# main.star of your package
def run(plan, argument_1, optional_argument=""):
plan.print("spinning up the etcd service inside the enclave")
# this will spin up etcd and return the output of the etcd package
optional_etcd_args = {}
etcd_service = etcd_module.run(plan, optional_etcd_args)
plan.print("etcd is running on {}:{}".format(etcd_service["hostname"], etcd_service["port"]))
...