Space On-Premises Help

Kubernetes Installation

This topic shows how to install Space On-Premises to a custom Kubernetes cluster using Helm.

Installation requirements

Kubernetes

Version 1.21 or later

Helm

Version 3.6.0 or later

Cluster workers

The cluster has at least five workers.

  • OS: Linux

  • Platform: x86_64/amd64

  • Recommended min resources: 4 CPU cores and 8GB memory

Namespace

A dedicated Kubernetes namespace.

Ingress controller

An Ingress controller already exists in the cluster and watches for objects of a specific IngressClass.

Ingress TCP Proxy Mode

In addition to Server Name Indication (SNI), the Ingress controller also supports proxying of TCP traffic.

DNS

The domain names of the Space application, Packages, and VCS services already exist as well as the corresponding TLS certificates.

Storage

MinIO or another S3-compatible storage, Elasticsearch, PostgreSQL, and Redis already exist, the corresponding access credentials are already configured.

Supported versions:

  • MinIO RELEASE.2021-09-09T21-37-07Z – RELEASE.2022-03-05T06-32-39Z

  • Elasticsearch 7.11.1 – 8.2.3

  • PostgreSQL 12.2 – 14.3

  • Redis 4.0.2 – 7.0.2

User permissions

You have administrator permissions to the Kubernetes namespace.

Plan your installation

For the successful operation of Space On-Premises, we recommend that you think through some technical decisions in advance.

Storage organization

The storage organization is crucially important when it comes to the system scalability. Space On-Premises supports two ways to organize storage subsystems:

Shared

Space On-Premises components (the Space application, Packages, VCS) share the same storage subsystems (the event bus, the search database, the application database). This way is easier to implement, but over time, the performance of such a solution will decrease. Nevertheless, it may be a viable option for small organizations.

Distributed

Space On-Premises components use different storage subsystems. Depending on the load, storage can scale. Planning is essential for deploying a distributed storage:

  • When planning, be sure to consider future maintenance efforts.

  • Estimate the storage needs for every Space component at least three years in advance. The ObjectStorage available space should be sensible compared to the expected usage, keeping in mind that it is used for packages, repositories, images, files, etc.

  • The ObjectStorage ingress, if any, should have a permissive body size limit.

  • Persistent volumes should be autoscaling compatible.

Data backup and recovery

At the moment, Space On-Premises doesn't offer any built-in tools for data backup or recovery. We recommend that you follow the industry best practices for each Space storage subsystem.

Basic considerations:

  • PostgreSQL, MinIO/S3-compatible storage – user data that must be backed up.

  • Elasticsearch – index of PostgreSQL and MinIO/S3-compatible storage data. Although the database index can be rebuilt, it can take considerable time. We recommend backing up Elasticsearch content if you have a significant amount of data stored in PostgreSQL and/or MinIO/S3-compatible storage.

  • Redis – only temporary user data. No need to back up.

  • When planning the backup solution from the infrastructural point of view, take the need to store 1 petabyte of data as a starting assumption. This will help you find the best approach and evaluate the constraints of your existing procedures and tools.

  • PostgreSQL, MinIO/S3-compatible storage, and Elasticsearch are backed up separately. The data in the backups depend on each other. That's why, when restoring these data, it is important that the restored MinIO backup is made later than the PostgreSQL backup, and the Elasticsearch backup later than the MinIO backup.

Rotation of secrets

During the Space On-Premises installation, almost every user-provided input is treated as a secret: The Space configuration populates a corresponding Kubernetes secret object. During the deployment, Kubernetes injects this object to the most-appropriate Space application component.

If required, you can overwrite the internal secret object with user-managed secrets using the externalSecretName key. Make sure that each external secret contains all necessary keys and values. Otherwise, a particular Space application component will fail to start.

For the information on which keys are required for particular secrets, refer to the /space/templates/space/secrets directory in the Space On-Premises Helm chart.

For instance, to overwrite the S3-storage configuration for the Space application, create an external secret based on the s3.secret.yaml file (the values must be Base64-encoded):

apiVersion: v1 kind: Secret type: Opaque metadata: name: my-new-space-s3 namespace: kube-space labels: app.kubernetes.io/component: space data: SPACE_STORAGE_REGION: "ZXUtd2VzdC0xCg==" SPACE_STORAGE_BUCKET_NAME: "YnVja2V0LW5hbWU=" SPACE_STORAGE_BUCKET_CREATED: "dHJ1ZQ==" SPACE_STORAGE_URL: "aHR0cHM6Ly9zMy5hd3MuY29t" SPACE_STORAGE_ACCESS_KEY: "SUFJRUlVQUlkaGFranNkbmFrbGpzZG4=" SPACE_STORAGE_SECRET_KEY: "QVg8Pk5JTEpTT0lISlJPTEFLIlM6TCJMPkRtYW5rZWl3dWZyZGg="

Space Automation workers

Space Automation is a Space CI/CD server. The Space On-Premises version of Automation supports two types of workers (machines that run CI/CD jobs):

  • Self-hosted workers – machines hosted by Space users. In this case, users take full responsibility for configuring and registering such machines in their Space instance. Support for self-hosted workers comes out of the box – no additional configuration during the installation is required.

  • Kubernetes workers – This is a counterpart of Space cloud workers. In the case of Space On-Premises, the workers are created on-demand inside the Kubernetes cluster by Compute-service. By default, Compute-service is disabled. Therefore, if you want to use Kubernetes workers in your Space On-Premises instance, you must explicitly enable the service.

If you decide to go with Kubernetes workers, take the following considerations into account.

Compute-service pod resources

Compute-service creates worker pods for Automation containers in one of the three possible configurations:

  • regular: 2 vCPU, 7800 MB

  • large: 4 vCPU, 15600 MB

  • xLarge: 8 vCPU, 31200 MB

It makes sense to allocate resources for Compute-service in multiples of the configurations listed above. For example, if a job doesn't request any resources explicitly, Space will create a regular pod with 2 vCPU and 7800 MB. If a job requests 3 vCPU and 8000 MB, Space will create a large pod with 4 vCPU and 15600 MB. So, a node with 8 vCPU and 32 GB can run four regular, two large, and one xLarge jobs.

Autoscaling policy

As a cluster administrator, you are responsible for defining the auto-scaling policy for the nodes in that cluster. For this purpose, you can use any existing auto-scaler plugin for Kubernetes. The recommended approach is to auto-scale based on the resource usage (CPU/memory) when less than 20-30% of resources are left free. The auto-scaling policy affects how fast new Automation jobs will be started.

Privileged mode for worker containers

The work of Space Automation is arranged by a worker application that runs in a Kubernetes pod. The application starts Automation run environments in the pod and manages dynamic volumes with environment data. The run environments are also Docker containers, meaning that the worker application has to start these nested containers in the --privileged mode (the mode is required for Docker in Docker). The containers and user processes in these containers are isolated by the Kubernetes pod bounds. This might be a potential security issue if your company employs a zero-trust policy. In this case, you can use Sysbox for the isolation of worker containers (the --privileged mode will not be required).

K8s workers
CSI storage

Compute-service can operate Kubernetes volumes and snapshots via the Container Storage Interface (CSI). This can be any CSI-compatible storage provided by AWS, GCP, Azure, and so on. Though using the CSI is optional, it allows moving IOPS load from Kubernetes nodes to isolated volumes and changing disk space for workers on the flight. To get these features, you must set up the CSI driver in your target Kubernetes cluster before installing Space.

Perform production installation of Space On-Premises

The instructions below use the following names (they will be different for your installation):

  • The Kubernetes namespace is kube-space.

  • The domain names of the Space application components are:

    • Space application: portal.space.local

    • Packages: packages.space.local

    • VCS: git.space.local

  1. Create and save the space.masterSecret key:

    openssl rand -base64 32

    Sample output:

    RMmPPfeJMOUkUpPHncPduaB/q/zae0D1/pzkyyqsBWg=

  2. Create and save the space.webHookSecret key:

    openssl rand -base64 32

    Sample output:

    TNyTnI/cJB+RNfrtLJ+a1tB8J6IUOTLSL0qWatzbbhU=

  3. Create and save the space.oauth.messageEncodingKey key:

    openssl rand -base64 16

    Sample output:

    P7fD4x3s5t4Gtor1dYgpjw==

  4. Create and save the space.oauth.encodingKey2fa key

    openssl rand -base64 16

    Sample output:

    iHKa0NUFgNYNhECbREGeLA==

  5. Create and save the space.oauth.encodingKey key:

    openssl rand -base64 16

    Sample output:

    UesLKkayxPdzFhkcMazXZA==

  6. Create and save the space.oauth.messageSigningRsaPrivate and space.oauth.messageSigningRsaPublic certificates:

    openssl genrsa 4096 2> /dev/null | openssl pkcs8 -topk8 -nocrypt > messageSigningRsa.key cat messageSigningRsa.key| openssl rsa -pubout 2> /dev/null

    Sample output (the public key):

    -----BEGIN PUBLIC KEY----- MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAt+fhiHhMEXFb9GvG5B3lFSTSZ4Rk9nIHXogvk4Kb16H5GIBeil2T+maOF0FT6xMu+Qxc90iZ4CAmkUcTMUyda5J+W6lYdkEKwg9o5WERsHfxIr3e63DgasGBpDemgJwpUOhBjjFCaOcAN0ivP03grkKKdHXaT6vWqShGJKiaPaz56bDPtPR1XNnB8GfUtAAy0T6rx86h5NKUd3W1ms3i355BEhPji9TUbcXxspIWj5wQpkiPZ/QI3uIkpdizlaXNbZQHkxXL/J65QkNbSioVY0ggTna0TiTPEic2/QvV8LD6e066PP6fyN54F1JTKTdT6HlKF+5EG5NOXe6gTclgef0F4XtiSSngxqx/khi9vVLX6vtYYrQiIVn62XBEAm6pAQzNWt7IcFXQnF2lw3J7hlcwhJBFTDoiKoXGBkqOG/+TlwvXIRDMZp5SkEqOpYNYdsTZGUgf1Hc9/lKXeq9OSbTSLQtfWNHC25UO58X+w4ceuUIrRfnWK3qX5jTeENzM8MHo7dz1r815kDOUGnpyZqsC5UwXch9xUMAxRShtN998xw7kCYcNxckPDvMMjdKgPDU8oaMybW5+GVD5qakM0ZqrPr6uPjzoUYmm1zD9L08CAwEAAQ== -----END PUBLIC KEY-----

    The private key is saved to messageSigningRsa.key.

  7. Create and save the space.oauth.accessTokenRsaPrivate and space.oauth.accessTokenRsaPublic certificates:

    openssl genrsa 4096 2> /dev/null | openssl pkcs8 -topk8 -nocrypt > accessTokenRsa.key cat accessTokenRsa.key | openssl rsa -pubout 2> /dev/null

    Sample output (the public key):

    -----BEGIN PUBLIC KEY----- MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEArzdHZTfdMxCPONs/ASKxoLZhSqwn81nY9WsLBkbKnKG3HDEQY0hy1odYWi/O1LDHHjGEOFHpJxjT1k119Wy0RcUik42BLUcpwUiZoPKetlJQV27vxkGJk/KhYqIuinUTRVCLx1B4ES/9De/j8AySNvonsyohjTNFI5Bn1AJZH7Ch7fc8mKaXd/vhCYCCEF8NcCcAsV9a3zDc4lzAVL+YsOY/FCC9WMT/Qq7zbYTrpBCir2ql+oxWaoa6fB3wtTjabTgDdIFg3COy9+6Z5KR21kKCuuC/I/sn7LXBs32NyHQcDYjuzo5xoHUPY7Q3TGnPfCr98pxhL7041fqVmfN+wM37n/+VGX5tT71DgN9yB+Q+32IwmBLGcmE3Hx8fzZhXT96ATyXN06UyQPCf6a5pgi4qGk1tJrLxGVSympyHZ/gGX52JFJQAtH3XR7aOl2Fv6sYQLP7ZUOQ6oNTa2bSL56ZlHy7NV+RDpROYxhsg5Z/kHYedA0PZ292mQqz/2QTcLKAz0IC4K6IAxyFQhsIcrdBBt/kPzjjz0+9rjSAKf7K9esegqOFGwPiI6Jz8Yu9hKK6N+d+unsbHEXswonjwIBmBZ8+p4o+io+7tzmOm2ViBc4SnzW1Ojl6OkUxK0f1oTD2YCHafmV4ICILK6EbL8e8CLJ9fWYIo6YpBqIQk5P8CAwEAAQ== -----END PUBLIC KEY-----

    The private key is saved to accessTokenRsa.key.

  8. Create and save the space.vcs.token key:

    openssl rand -base64 32

    Sample output:

    T+a5yNn8VUf8VslAKXsJ8qFyo6Txxm92k6Khnd9RbaY=

  9. Create and save the packages.oauth.clientSecret key:

    openssl rand -base64 32

    Sample output:

    7I3b50sJz6q0g1GUa4GHQDJQypxKPiWKJtdSQSA+u1s=

  10. Provide data for the local administrator account. The local administrator will be the first administrator account in your Space On-Premises instance. The most important account settings are space.localAdministrator.username and space.localAdministrator.password: You will need these credentials to log in to Space after the installation is finished.

    For the space.localAdministrator.password key, you can use your own password or generate a random one with:

    openssl rand -base64 8

    Sample output:

    waPL7YEhAxw=

    When logging in to Space, provide this value as is – although the output is a Base64-encoded value, you must not decode it back.

  11. Create a values.yaml file with deployment configuration. In the file, specify the generated key and certificate values from previous steps. For instance, in our example, the file will look like follows:

    space: ingress: hostname: "portal.space.local" enabled: true selfSigned: true tls: true masterSecret: "RMmPPfeJMOUkUpPHncPduaB/q/zae0D1/pzkyyqsBWg=" webHookSecret: "TNyTnI/cJB+RNfrtLJ+a1tB8J6IUOTLSL0qWatzbbhU=" localAdministrator: firstName: "Administrator" lastName: "Administrator" username: "admin" password: "waPL7YEhAxw=" email: "admin@space.local" oauth: messageEncodingKey: "P7fD4x3s5t4Gtor1dYgpjw==" encodingKey2fa: "iHKa0NUFgNYNhECbREGeLA==" encodingKey: "UesLKkayxPdzFhkcMazXZA==" messageSigningRsaPublic: "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAt+fhiHhMEXFb9GvG5B3lFSTSZ4Rk9nIHXogvk4Kb16H5GIBeil2T+maOF0FT6xMu+Qxc90iZ4CAmkUcTMUyda5J+W6lYdkEKwg9o5WERsHfxIr3e63DgasGBpDemgJwpUOhBjjFCaOcAN0ivP03grkKKdHXaT6vWqShGJKiaPaz56bDPtPR1XNnB8G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Nbv6wokt/cVepSPObQgzq6Swy4WR" database: name: "space" hostname: "postgresql" port: "5432" username: "spaceServiceAccount" password: "password" organization: name: "Company &Co" eventbus: hostname: "redis" port: "6379" objectStorage: region: "us-west-1" bucketName: "space-packages" url: "http://minio:9000" accessKey: "spaceServiceAccount" secretKey: "password" mail: enabled: true username: "spaceMailUser" password: "MailServerPassword" hostname: "mail.space.local" port: "1025" settings: fromAddress: "mailer@no-reply.space.local" elastic: search: hostname: "elasticsearch" port: "9200" audit: hostname: "elasticsearch" port: "9200" metrics: hostname: "elasticsearch" port: "9200" vcs: token: "T+a5yNn8VUf8VslAKXsJ8qFyo6Txxm92k6Khnd9RbaY=" externalUrl: "https://portal.space.local" altUrls: "http://portal.space.local" packages: oauth: clientId: "space-to-packages" clientSecret: "7I3b50sJz6q0g1GUa4GHQDJQypxKPiWKJtdSQSA+u1s=" externalUrl: "https://packages.space.local" automation: logs: storage: region: "us-west-1" bucketName: "space-packages" url: "http://minio:9000" accessKey: "spaceServiceAccount" secretKey: "password" worker: storage: region: "us-west-1" bucketName: "space-packages" url: "http://minio:9000" accessKey: "spaceServiceAccount" secretKey: "password" dslCompiler: storage: region: "us-west-1" bucketName: "space-packages" url: "http://minio:9000" accessKey: "spaceServiceAccount" secretKey: "password" packages: ingress: hostname: "packages.space.local" enabled: true selfSigned: true tls: true database: name: "space" hostname: "postgresql" port: "5432" username: "spaceServiceAccount" password: "password" eventbus: hostname: "redis" port: "6379" objectStorage: region: "us-west-1" bucketName: "space-packages" url: "http://minio:9000" accessKey: "spaceServiceAccount" secretKey: "password" elastic: search: hostname: "elasticsearch" port: "9200" externalUrl: "https://packages.space.local" oauth: clientId: "space-to-packages" clientSecret: "7I3b50sJz6q0g1GUa4GHQDJQypxKPiWKJtdSQSA+u1s=" space: externalUrl: "https://portal.space.local" vcs: storage: eventbus: hostname: "redis" port: "6379" objectStorage: region: "us-west-1" bucketName: "space-vcs" url: "http://minio:9000" accessKey: "spaceServiceAccount" secretKey: "password" database: name: "space" hostname: "postgresql" port: "5432" username: "spaceServiceAccount" password: "password" secrets: spaceAccessKey: "T+a5yNn8VUf8VslAKXsJ8qFyo6Txxm92k6Khnd9RbaY=" externalUrl: "https://git.space.local" spaceExternalUrl: "https://portal.space.local" ingress: hostname: "git.space.local" enabled: true selfSigned: true tls: true
  12. (Optional) Enable Compute-service to make available running Automation workers inside the Kubernetes cluster. You can skip this step and enable Compute-service at any time after the installation is complete.

  13. Deploy the created configuration:

    1. Add the chart repository:

      helm repo add jetbrains-space-onpremises \ https://charts.on-premises.service.jetbrains.space/stable
    2. Run the deployment:

      helm install jb-space jetbrains-space-onpremises/space --namespace kube-space -f values.yaml
    export HELM_EXPERIMENTAL_OCI=1 helm install jb-space \ oci://public.registry.jetbrains.space/p/space-on-premises/helm/space \ --version 2023.1.0 \ --namespace kube-space \ -f values.yaml
  14. Configure the TCP proxy for the VCS Ingress, namely, configure the Ingress Controller map. If you use Kubernetes Nginx Ingress Controller, follow this guide.

  15. Verify that all Space domain names resolve to the Ingress load balancer:

    nslookup portal.space.local nslookup packages.space.local nslookup git.space.local

  16. Verify the state of Space pods:

    kubectl -n kube-space get po

    The Space pods must have the Running state. On average, it takes about 2 minutes after deployment for a pod to become active. If the pods are not Running, you can try finding the cause with the following commands:

    kubectl -n kube-space get event

    and

    kubectl -n kube-space describe po "${POD_NAME}"
  17. Open your Space On-Premises instance in a browser. When logging in to Space, use the credentials created in one of the previous steps.

  18. Perform post-installation administration activities:

(Optional) Enable Compute-service

You can enable Compute-service during the Space On-Premises installation or at any time later. This is required only if you want Space to run Automation workers inside the Kubernetes cluster. See considerations on Kubernetes workers.

Prerequisites
  1. Compute-service requires creating the additional {space-namespace}-automation-jobs namespace. Do one of the following:

    • Provide helm with permission to create additional namespaces. In this case, {space-namespace}-automation-jobs will be created automatically.

    • Manually create {space-namespace}-automation-jobs and provide helm with administrator permissions for this namespace.

  2. Define an auto-scaling policy for the cluster, e.g., using static nodes or an auto-scaling plugin. See considerations

  1. (Optional) Set up the Container Storage Interface (CSI) driver.

    Compute-service can operate Kubernetes volumes via the CSI which gives several benefits. To set up the CSI driver, create instances of VolumeSnapshotClass and StorageClass with required parameters and pass their names to computeservice.storageClassName and computeservice.volumeSnapshotClassName in your values.yaml file.

    For example, for AWS:

    apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshotClass metadata: name: csi-aws-vsc driver: ebs.csi.aws.com deletionPolicy: Delete --- apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ebs-sc provisioner: ebs.csi.aws.com volumeBindingMode: WaitForFirstConsumer
  2. (Optional) Set up Sysbox.

    By default, Space will run Automation worker containers in the --privileged mode (the containers will have root privileges on the host system). If you want to avoid this due to security reasons, you can use Sysbox as an alternative. See considerations

    The Sysbox installation process depends on the type of your Kubernetes cluster. Follow the official Sysbox installation instructions

  3. Create and save the computeservice.oauth.clientSecret key:

    openssl rand -base64 32

    Sample output:

    Lz4JawsX4v7zRvFpzhxGGWH8UhNmtz7+xqsn6dtn+Ys=

  4. Enable Compute-service by adding the following configuration to values.yaml:

    computeservice: enabled: true oauth: clientSecret: "Lz4JawsX4v7zRvFpzhxGGWH8UhNmtz7+xqsn6dtn+Ys=" database: name: "crcltdevdb" hostname: "postgresql" port: "5432" username: "root" password: "circlet"
  5. If you use CSI storage in your cluster (see step 1), add the following lines to the computeservice configuration in values.yaml:

    computeservice: worker: defaultVolumeGb: 50

    The defaultVolumeGb defines how much disk space in GB is allocated in the CSI storage. The value should be approximately equal to the planned user workload. This space will be shared between all running Automation jobs, i.e., this is total space required for downloaded project references, compilation process, and so on.

    If defaultVolumeGb is 0 or not specified, Space will allocate disk space for Automation jobs on the Compute-service nodes inside the cluster.

  6. If you use Sysbox (see step 2), add the following lines to the computeservice configuration in values.yaml:

    computeservice: worker: sysbox: enabled: true
Last modified: 11 January 2023