jupyterhub.services.service
A service is a process that talks to JupyterHub.
managed by JupyterHub (always subprocess, no custom Spawners)
always a long-running process
managed services are restarted automatically if they exit unexpectedly
managed by external service (docker, systemd, etc.)
do not need to be long-running processes, or processes at all
Public route will always be /services/service-name
url specified in config
if port is 0, Hub will select a port
admin: tokens will have admin-access to the API
not admin: tokens will only have non-admin access (not much they can do other than defer to Hub for auth)
An externally managed service running on a URL:
{ 'name': 'my-service', 'url': 'https://host:8888', 'admin': True, 'api_token': 'super-secret', }
A hub-managed service with no URL:
{ 'name': 'cull-idle', 'command': ['python', '/path/to/cull-idle'] 'admin': True, }
Service
jupyterhub.services.service.
An object wrapping a service specification for Hub API consumers.
A service has inputs:
the name of the service
whether the service should have administrative privileges
The URL where the service is/should be. If specified, the service will be added to the proxy at /services/:name
Whether this service should be allowed to complete oauth with logged-in users without prompting for confirmation.
If a service is to be managed by the Hub, it has a few extra options:
Command for JupyterHub to spawn the service. Only use this if the service should be a subprocess. If command is not specified, it is assumed to be managed by a
Additional environment variables for the service.
The name of a system user to become. If unspecified, run as the same user as the Hub.
kind
The name of the kind of service as a string
‘managed’ for managed services
‘external’ for external services
managed
Am I managed by the Hub?