Files
floci/.github/workflows
Priamo Germosen 29e262e783 feat(emr-containers): run a managed endpoint's Jupyter Enterprise Gateway (#9232)
An EMR on EKS managed endpoint ran nothing: it was ACTIVE at once with no
serverUrl, so no Jupyter client could start a kernel on it, and its
session tokens opened nothing.

- With runner-mode docker, an endpoint runs a Jupyter Enterprise Gateway,
  which "provides the remote kernel lifecycle management capability that
  interactive clients need", in a container of its release's
  notebook-spark image on Amazon ECR Public, the base image of
  interactive endpoints. That image holds jupyter_server and ipykernel but
  no Enterprise Gateway, so a program of Floci's own serves the gateway's
  kernels API on jupyter_server, passing a kernel the KERNEL_ variables
  of its start request's env, as Jupyter Enterprise Gateway does.
- Its kernels are the image's python3, and spark-python-kubernetes, whose
  spark and sc are a Spark session in Spark's local mode on Floci's S3,
  with the endpoint's execution role, KERNEL_EXTRA_SPARK_OPTS going to
  its spark-submit.
- The endpoint is CREATING until the gateway answers, then ACTIVE with
  its serverUrl and the guide's "Endpoint created successfully. It took
  m Minutes s Seconds". DeleteManagedEndpoint makes it TERMINATING until
  the gateway has stopped. A gateway that fails, and one a restart left,
  end it TERMINATED_WITH_ERRORS with INTERNAL_ERROR.
- serverUrl is a path of the endpoint's own on Floci's port. A request
  there goes on to the gateway, its kernels' WebSocket tunnelled, when it
  carries a live token GetManagedEndpointSessionCredentials gave for that
  endpoint, as a token parameter or an Authorization: token header, as
  Jupyter Enterprise Gateway 2.6.0 takes one; any other gets that
  gateway's 401 {"reason": "Unauthorized", "message": ""}.
- SessionServers, which runs EMR Serverless's and EMR's Spark Connect
  servers and keeps their tokens, runs the gateways too, a token given
  for one endpoint reaching no other. CloudFront's WebSocket splice moves
  to WebSocketUpgrades, which the gateway's tunnel shares.
- gateway-image-template replaces the notebook image's registry.
2026-11-23 06:39:56 -04:00
..