Configuring the number of workspaces that a user can run

This article describes how to configure the number of workspaces that a user can run simultaneously.

Using the Operator to configure the number of workspaces that a user can run

This procedure describes how to configure Che to run more than one workspace simultaneously. By running multiple workspaces, users can use different work environments simultaneously.

Prerequisites
  • You have installed an instance of Che by using the Operator.

  • The combination of PVC strategy and access mode meets the following criteria:

    • ReadWriteMany access mode and an arbitrary PVC strategy

    • ReadWriteOnce access mode and per-workspace or unique PVC strategy

  • You have determined the value of the <number-of-workspaces> placeholder.

    If the value is -1, an unlimited number of workspaces can run per user. If the value is a positive integer, users can run as many workspaces as the value of the integer. The default value is 1.

Procedure
  1. In the CheCluster Custom Resource server settings, configure the number of workspaces that a user can run by adding the CHE_LIMITS_USER_WORKSPACES_RUN_COUNT property to customCheProperties:

    apiVersion: org.eclipse.che/v1
    kind: CheCluster
    # ...
    spec:
      server:
        # ...
        customCheProperties:
          CHE_LIMITS_USER_WORKSPACES_RUN_COUNT: "<number-of-workspaces>"

Using ConfigMap to configure the number of workspaces that a user can run

This procedure describes how to configure Che to run more than one workspace simultaneously. By running multiple workspaces, users can use different work environments simultaneously.

Prerequisites
  • You have installed an instance of Che by using Helm and the default namespace eclipse-che.

  • The combination of PVC strategy and access mode meets the following criteria:

    • ReadWriteMany access mode and an arbitrary PVC strategy

    • ReadWriteOnce access mode and per-workspace or unique PVC strategy

  • You have determined the value of the <number-of-workspaces> placeholder.

    If the value is -1, an unlimited number of workspaces can run per user. If the value is a positive integer, users can run as many workspaces as the value of the integer. The default value is 1.

Procedure
  1. To configure the number of workspaces that a user can run simultaneously, run:

    $ helm upgrade che -n eclipse-che --set \
    che.limits.userWorkspacesRunCount=<number-of-workspaces>