Skip to main content

Manage JupyterHub profiles

Profiles let you choose the image, the resources, and the S3 or Lakehouse access of the notebook servers that your users start. Create a profile, give it access to the Lakehouse catalog if it needs one, then assign it to users and groups.

Prerequisites​

Open the profile pages​

  1. Sign in to JupyterHub as a user with the Admin role.
  2. In the menu bar, select Services → profiles.

The JupyterHub Profile Manager opens with three tabs: Profile List, Create Profile, and Profile Assignments.

Create a profile​

  1. Open the profile pages. See Open the profile pages.
  2. Select the Create Profile tab.
  3. Under Profile Configuration, fill in the fields, as described in Profile configuration.
  4. Set the Required Environment Variables, as described in Environment variables.
  5. Add any Additional Environment Variables that the notebook server needs.
  6. Under Kubernetes Configuration, set the CPU and memory of the notebook server.
  7. Under Available Worker Pools, select at least one worker pool.
  8. Under Spark Catalogs, turn on Enable Multi-Catalog if you need it.
  9. Make sure Active profile is selected to make the profile active as soon as it is created.
  10. Select Create Profile.

Create New Profile form of an earlier version with the Profile Name, Slug, Image, environment variable, Kubernetes Configuration, Available Worker Pools, and Active profile fields and the Create Profile button

The new profile appears on the Profile List tab. See View the profile list.

Profile configuration​

FieldDescription
Profile NameRequired. The name of the profile, for example Python Data Science.
SlugRequired. A short ID of the profile. Only lowercase letters, numbers, and hyphens, with no spaces or special characters, for example python-datascience.
ImageThe image that the notebook server runs. The list has three PySpark images with Spark 3.5.0: one with Lakehouse, one with Lakehouse and Open Metadata, and one with Lakehouse and Ranger integrated.
Default Catalog NameThe default catalog of the profile. Letters, numbers, hyphens, and underscores only. Default: iceberg.

Environment variables​

Under Required Environment Variables, set these variables.

VariableDescription
MODESelect local, the only option.
S3_ACCESSIBLESelect true to use S3, or false if you do not use S3. With true, the form adds S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY, and LAKEHOUSE_ENABLED.
OPENMETADATA_ENABLEDSelect true to turn on the Open Metadata integration of the notebook server, or false.

With S3_ACCESSIBLE set to true, fill in these variables.

VariableDescription
S3_ENDPOINTThe URL endpoint of the S3 service.
S3_ACCESS_KEYThe access key ID that authenticates with the S3 service. The input is hidden. To reach the Lakehouse catalog, enter the Access Key of the FPT Object Storage sub user. See Create a sub user and its access key.
S3_SECRET_KEYThe secret access key that authenticates with the S3 service. The input is hidden. To reach the Lakehouse catalog, enter the Secret Key of the same sub user.
LAKEHOUSE_ENABLEDSelect true to connect to the Lakehouse, or false if you do not use a Lakehouse connection. With true, the form adds the catalog variables below.

With LAKEHOUSE_ENABLED set to true, fill in these variables.

VariableDescription
CATALOG_TYPEThe type of metadata catalog: hive or nessie. With nessie, the form adds NESSIE_DEFAULT_BRANCH.
CATALOG_URIThe URI that connects to the metadata catalog.
SPARK_WAREHOUSE_DIRThe path of the warehouse directory for Apache Spark.
RANGER_ENABLEDSelect true to turn on the Ranger integration of the notebook server, or false. It appears when you select the image with Lakehouse and Ranger integrated.
NESSIE_DEFAULT_BRANCHWith CATALOG_TYPE set to nessie. The default branch of the Nessie catalog.

Other fields​

FieldDescription
Additional Environment VariablesOther environment variables of the notebook server. Enter the variable name in KEY and its value in Value, then select +. Select Secret to hide the value: the profile card shows it as ****.
CPU GuaranteeUnder Kubernetes Configuration. The CPU cores guaranteed to the profile when it starts, for example 1.0, 1.5, or 0.25.
CPU LimitThe maximum CPU cores the profile can use, for example 2.0, 2.5, or 0.5.
Memory GuaranteeThe memory guaranteed to the profile when it starts, for example 256M or 512M.
Memory LimitThe maximum memory the profile can use, for example 512M or 1024M.
Available Worker PoolsRequired. The computes of the Processing Service where the profile can be scheduled, listed as processing-<compute name> with their Nodes, Avg CPU, and Avg Mem. If you select none, the form shows "At least one worker pool must be selected".
Enable Multi-CatalogA switch under Spark Catalogs.
Active profileMakes the profile Active as soon as it is created. Default: selected.

Give a profile access to the Lakehouse catalog​

To let users reach the Lakehouse catalog, create a sub user in FPT Object Storage and give it access to the folder of the bucket that holds the catalog. Then enter the keys of the sub user in S3_ACCESS_KEY and S3_SECRET_KEY of the profile.

Create a sub user and its access key​

  1. Sign in to the FPT Cloud console at https://console.fptcloud.com/, then select Object Storage.

  2. In Object Storage Management, select the Sub User tab.

  3. Select Create SubUser.

    Object Storage Management page with the Sub User tab and the Create SubUser button

  4. In the New SubUser form, enter a Name.

  5. In Access level for the sub user, select Full.

  6. Select Create.

    New SubUser form with the Name and Access level for the sub user fields and the Create button

  7. In the sub user list, open the details of the sub user.

  8. Select Generate Key.

    Access key created dialog with the Access Key and Secret Key fields, a warning that the secret key is shown only once, and the Confirm access key button

  9. In the Access key created dialog, copy the Access Key and the Secret Key, and store them in a safe place.

  10. Select Confirm access key.

warning

The secret key is shown only once. Store it before you close the dialog.

The Access Key goes in S3_ACCESS_KEY and the Secret Key in S3_SECRET_KEY of the profile. For more about sub users and their keys, see Manage SubUsers.

Allow the sub user on the catalog folder​

  1. In Object Storage Management, select the Buckets tab.

  2. In the row of the bucket, select Config in the Action column.

    Buckets tab of Object Storage Management with the Action menu of a bucket open and the Config option

  3. Select the Bucket Policy tab.

  4. Select Add Policy Statement.

    Bucket Policy tab of a bucket with the Policy Statement table, the Add Policy Statement button, and the Update button

  5. In Add Policy Statement, fill in the fields, as described in the table below.

  6. Select Add.

  7. Select Create for a new policy, or Update if the bucket already has one.

FieldDescription
SidThe ID of the statement.
EffectAllow.
PrincipalThe sub users that get access.
ActionSelect Action, then select All S3 Actions.
Resource (ARN)The resource, in ARN format, that points the sub user to exactly the folder that holds the catalog it may access.

For example, the statement in the screenshot gives access to the lakehouse folder of a bucket with these resources:

arn:aws:s3:::<BUCKET-NAME>
arn:aws:s3:::<BUCKET-NAME>/lakehouse
arn:aws:s3:::<BUCKET-NAME>/lakehouse/*

For more about bucket policies, see Manage permissions.

Assign a profile to users and groups​

  1. Open the profile pages. See Open the profile pages.
  2. Select the Profile Assignments tab.
  3. In the list of profiles, select the profile.
  4. In Add User, select a user from the users of JupyterHub.
  5. In Add Group, select a group from the groups of JupyterHub.
  6. Select Save Changes.

Profile Assignments tab with a profile open, the Add User and Add Group lists, the assigned users, and the Save Changes button

The profile lists the assigned users under Users and the assigned groups under Groups. As an admin, you see the assignments of every profile.

View the profile list​

  1. Open the profile pages. See Open the profile pages.
  2. Select the Profile List tab.

Each profile has a card with its name and status, for example Active, its Slug, Default Catalog, and Image, its Kubernetes limits, its Worker Pools, and its Environment Variables. Secret values show as ****. Select the eye icon to show a masked value, such as S3_SECRET_KEY.

Profile List tab of an earlier version with the card of a profile showing its Active status, Slug, Image, Kubernetes resources, Worker Pools, Environment Variables, and the Edit and Delete buttons

Select Edit to change the profile, or Delete to remove it.

Next steps​