Skip to content

Support executing cells in different gRPC Executor Services - Ephemeral Containers #593

Description

@jlewi

Feature Request

  • Let the user deploy the gRPC executor service in a container
  • Let the user select in vscode which executor different cells should run in
    • So different cells can run in different executors

Motivation

Frequently when working with Kubernetes and containers you need to kubectl exec into a container and run some commands. This is even more common now with ephemeral containers.

An example is [verifying GKE Workload Identity] (https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity#verify). Typically you would start a pod and the kubectl exec and run gcloud commands to test access.

What I'd like is to be able to write a playbook that has a mix of steps that run in different executors e.g.

  1. kubectl apply pod.yaml (runs locally)
  2. gcloud auth list (runs inside the container)

What you can do today

kubectl exec

You can run kubectl exec in a code cell. The output window is interactive and you can enter commands into it. This is pretty nice; especially as it doesn't block other cells from executing. However there are a couple disadvantages

  • The user would have to copy paste commands into the exec shell to execute them; rather than just executing a code cell
  • vscode has weird UX issues that make this less than ideal
    *. It doesn't seem possible to resize the output cell to show more lines of the terminal
    • When you scroll in vscode with the scroll wheel vscode switches between scrolling through the doc and through the output window which is very annoying

Set gRPC custom address

Using RunMe settings you can set a custom address for the executor and so could point it at a gRPC server running in a container.

I think its a bit cumbersome to constantly switch back and forth between the settings page to change where a cell would execute.

Desired UX

I'd like to be able to easily configure different parts of the document to run on different executors. Ideally I'd like to be able to do this without having to dig through the menus as that disrupts the flow. I think one option would be to have code blocks that contain RunMe configuration and are identified by a suitable language Id; e.g. runmeconfig. In the block you could then have yaml to configure runme e.g

grpcExecutor: 1234.1233.123.123

This would configure all subsequent cells to use that executor. It could then be switched back to the local executor

grpcExecutor: ""

Notably, I don't think you should have to execute these cells in order to apply the configuration. The semantics should be that the configuration automatically applies to all cells that come after them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions