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 ability to update the running image, parameters, and configuration of a given service #2057

Open
h4ck3rk3y opened this issue Jan 17, 2024 · 6 comments
Labels
cli For bugs relating to the CLI feature request nice to have Nice to have feature

Comments

@h4ck3rk3y
Copy link
Contributor

Background & motivation

ethpandaops/ethereum-package#465
ethpandaops/ethereum-package#458

There have been some requests from users of the Ethereum Package to change a service in the network when it comes to its underlying image or arguments so that they don't have to recreate the testnet

Desired behaviour

An update_service api that allows you to change image or other arguments of a given service

How important is this to you?

Nice to have; this feature would make using Kurtosis more enjoyable.

What area of the product does this pertain to?

CLI: the Command Line Interface

@github-actions github-actions bot added cli For bugs relating to the CLI nice to have Nice to have feature labels Jan 17, 2024
@h4ck3rk3y
Copy link
Contributor Author

idempotent runs might solve for this!

@mieubrisse
Copy link
Collaborator

Hey @h4ck3rk3y ! yep, I think enclave updating (formerly known as idempotent runs 😆 ) would solve for this - just re-throw an updated configuration at the enclave

@h4ck3rk3y
Copy link
Contributor Author

Yep! idempotent runs / updates do solve this. Everything but the affected instructions get skipped.

@h4ck3rk3y
Copy link
Contributor Author

Waiting for @barnabasbusa to confirm if this is enough for now; will close this if so

@h4ck3rk3y
Copy link
Contributor Author

Currently proposed workflow is arg tweaking and re-running against the same enclave

participants:
  - el_client_type: geth
    cl_client_type: lighthouse
  - el_client_type: geth
    cl_client_type: lighthouse
  - el_client_type: geth
    cl_client_type: lighthouse
    el_client_image: "ethereum/client-go:v1.13.10"

Changing the 10 to 11 and back to 10, seems to work on my machine

@tedim52
Copy link
Contributor

tedim52 commented Apr 11, 2024

Enclave edits should address this issue but I've tried running an updated config against an existing enclave and enclave edits aren't working. Something triggers entire enclave to be rerun even when changing arg to just add an additional service. Unsure if it's something in the package or a bug in enclave edit logic. I've done a deep dive for a few hours and found some potential issues but haven't root caused yet. LMK if you're seeing otherwise though @h4ck3rk3y @barnabasbusa

github-merge-queue bot pushed a commit that referenced this issue Apr 25, 2024
## Description

Adds `set_service` instruction which can be used to override the service
config of a service added earlier in the plan. This can be really useful
for two cases:
1. A user wants to set a specific image (or other config) for a service
in a package but the package author has not made the image configurable.
This can be done by appending `set_service` to the plan.
ex.
```
postgres = import_module("github.com/kurtosis-tech/postgres-package/main.star")

def run(plan, args):
    postgres.run(plan)
    plan.set_service(name="postgres", config=ServiceConfig(image="postgres:bullseye"))
```
2. A user wants to swap out the image (or other config) of a service
running in an enclave. This can be done by appending `set_service` to
the plan and enclave editing.
ex. 
https://www.loom.com/share/f88d0f5555dd49b0aeabc55c5ed41d43

This instruction has some functionality missing such as overriding
ports, env vars, and cmd/entrypoint as these require special handling of
future references and handling consecutive set service instructions
properly but functionality can be added iteratively in future PRs.

## Is this change user facing?
YES

## References:
#2057
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli For bugs relating to the CLI feature request nice to have Nice to have feature
Projects
None yet
Development

No branches or pull requests

3 participants