In the previous post, I have show you how to install jupyterhub, then on this post I will try to show you how to configure jupyterhub using configuration file
lets begin with the understanding that jupyterhub has default configuration that will be used when there's no configuration file provided.
This config will generate jupyterhub_config.py file which provide all the configuration options for jupyterhub, all of the option is initially commented, so you can uncomment to activate the options, here's the preview of the config file
lets begin with the understanding that jupyterhub has default configuration that will be used when there's no configuration file provided.
Create Jupyterhub config file
you can spawn the configuration file for jupyterhub by running thissvision@svision:~$ sudo jupyterhub --generate-config Writing default config to: jupyterhub_config.py svision@svision:~$ ls jupyterhub_config.py
This config will generate jupyterhub_config.py file which provide all the configuration options for jupyterhub, all of the option is initially commented, so you can uncomment to activate the options, here's the preview of the config file
# Configuration file for jupyterhub. #------------------------------------------------------------------------------ # Configurable configuration #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ # LoggingConfigurable configuration #------------------------------------------------------------------------------ # A parent class for Configurables that log. # # Subclasses have a log trait, and the default behavior is to get the logger # from the currently running Application. #------------------------------------------------------------------------------ # SingletonConfigurable configuration #------------------------------------------------------------------------------ # A configurable that only allows one instance. # # This class is for classes that should only have one instance of itself or # *any* subclass. To create and retrieve such a class use the # :meth:`SingletonConfigurable.instance` method. #------------------------------------------------------------------------------ # Application configuration #------------------------------------------------------------------------------ # This is an application. # The date format used by logging formatters for %(asctime)s # c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S' # The Logging format template # c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s' # Set the log level by value or name. # c.Application.log_level = 30 ...
Run Jupyterhub with config file
you can play around with the configuration all you want and then to run jupyterhub with the configuration you can supply the configuration file location using "-f"sudo jupyterhub -f jupyterhub_config.py
Interesting configuration options
The following is some interesting configuration options that administrator might use- c.JupyterHub.port, default is 8000 : this is the public facing port of jupyterhub where you can access the notebook
- c.JupyterHub.hub_port, default is 8081 : this is the port where jupyterhub process will run
- c.JupyterHub.confirm_no_ssl, default is false : if you set true then jupyterhub wont ask if you run jupyterhub without ssl, if your server is accessible by anyone make sure you set this to false
No comments :
Post a Comment