Basic installation for a quick start and test environment

Basic installation on a VM

Note

Below is an example of deploying the basic setup.

  1. Click the download link.

  2. Select a relevant distribution version.

  3. Read the license agreement and click Continue.

  4. Copy the link you get.

  5. On the target VM or server, run the following command by substituting the link:

    curl -L https://clck.ru/<...> -o datalens-enterprise.tar
    
  6. Create a directory and unpack the archive into it:

    mkdir -p ./datalens-enterprise
    tar -xvf datalens-enterprise.tar --directory ./datalens-enterprise
    
  7. Navigate to the directory you created. You will use it to complete the next steps.

    cd ./datalens-enterprise
    

Running the distribution

  1. Make sure you are in the distribution folder, ./datalens-enterprise.

  2. Run the installation command using the datalens-course.local domain.

    Your main installation management tool is the ./init.sh script. For a basic installation on a clean VM, provide the following keys:

    • --k3s-install: Commands the script to install K3s, the local lightweight Kubernetes distribution.
    • --ingress-domain <domain>: Specifies the domain name for access to DataLens, e.g., datalens-course.local. You can also use automatic DNS configuration with nip: to do this, enter your VM IP address and add .nip.io, e.g., 192.168.10.2.nip.io.
    • --ingress-tls and --ingress-tls-gen: Enable HTTPS and automatically generate a self-signed SSL certificate for the specified domain.
    # Replace <domain> with your domain. For test purposes, `datalens-course.local` or the IP address of the VM + `.nip.io` will do.
    # You need to run the command from the distribution folder, `./datalens-enterprise`.
    ./init.sh \
    --k3s-install \
    --ingress-domain datalens-course.local \
    --ingress-tls \
    --ingress-tls-gen
    

    This process will take a few minutes. The script will install K3s, push Docker images into it, and deploy all DataLens components.

  3. Wait for the installation to complete. At the end, you will see a message about a successful release deployment.

  4. If you are using a .local domain, add the <VM_IP_address> datalens-course.local line to your local /etc/hosts file so that the browser can find the server.

  5. Then open the interface at https://datalens-course.local. Accept the risk as a user of a self-signed certificate and log in as admin with the password you were given earlier (the command to get the password is provided below).

To change the installation settings, e.g., to add the ability to download --files, you do not have to download the distribution again: simply re-run the ./init.sh script containing the settings. You do not have to provide --k3s-install again because the K3s cluster has already been created.

Updating a distribution

To update, simply unpack the new version over the old one and initialize again. You can leave the initialization string unchanged, but add the --k3s-image-load parameter. When reinitializing, you do not have to provide --k3s-install because the K3s cluster has already been created.

Getting administrator access

On first installation, the system will automatically generate a complex password for the admin user. To get it, run this command:

./init.sh --get-admin-password

If you lose your password, you can use the same command to get it.

Managing keys and secrets

DataLens uses the following types of keys:

  • RSA keys for the authentication service
    The private key is used to sign user tokens, and the public key, to verify them. The keys are generated automatically on first installation. If required, you can re-generate them using the --auth-rsa-gen flag.

  • CONTROL_API_CRYPTO_KEY
    The key is used to encrypt sensitive data (passwords or tokens) in connection fields. It is generated and saved automatically. If this key is lost, DataLens will not be able to decrypt existing connection credentials. In which case you need to reset the encryption key and re-enter all passwords.

    # Resetting the CONTROL_API_CRYPTO_KEY encryption key
    ./init.sh --pg /init/us-restore.sh --reset-crypto-key
    

You do not need to manage these keys manually during a basic installation, but make sure you know what they are used for.

Additional features

You need to enable some DataLens features separately to ensure the basic installation uses minimal resources.

To enable additional features (Editor or file connections), follow the instructions in the README.md file and add the --editor and --files flags to the initialization string. Result:

./init.sh --ingress-domain <domain> --ingress-tls --ingress-tls-gen --editor --files

Mirroring Docker images

If your VM does not have internet access but you have an internal Docker registry (e.g., Harbor, Nexus, or Yandex Container Registry), first, push the images from the distribution to the registry using this command:

# `docker-config.json`: File with registry access credentials
# `registry.my-company.tech`: Registry address
./init.sh \
--docker-image-load \
--docker-image-push \
--docker-registry registry.my-company.tech \
--docker-config ./help/docker-config.example.json

When installing on the target system, specify this registry for Kubernetes to pull images from it rather than a local storage.

Distribution structure

Warning

The ./init.sh script is a single entry point for distribution deployment and the execution of auxiliary scripts.

This script uses standard kubectl and helm (package manager for Kubernetes) commands. To display the list of pods, you can run this command: sudo k3s kubectl get pods -n datalens-enterprise or ./init.sh --kubectl get pods. All available deployment configuration options are described in the helm/values.yaml file.

Tip

If something goes wrong, check the pods with the help of /init.sh --k9s.

Distribution content

  • CHANGELOG.md: List of changes for all release versions.

  • EULA.md: End user license agreement. It describes the terms of use of the software.

  • README.md: Main guides on installation and configuration.

  • datalens-enterprise-images.txt: List of Docker images and their versions used in the distribution.

  • datalens-enterprise-images.tar.gz: Docker image archive.

  • init.sh: Main script for distribution deployment and administration.

  • meta.json: Current release metadata, including key component versions and release checksums.

  • bin/: Contains executables of the following utilities:

    • kubectl: Tools for interaction with a Kubernetes cluster.
    • helm: Package manager for Helm chart management.
    • helm-diff: Auxiliary utility for Helm release management; helps display the changelog during updates.
    • stern: Log viewing utility in a Kubernetes cluster.
    • k9s: Kubernetes cluster administration utility with a visual interface inside the terminal.
    • prgz: Utility that displays the progress of unpacking archives inside a distribution. Keeps the SSH session up and running while unpacking.
    • yq: Tool for processing and parsing of JSON and YAML files.
  • helm/: Contains Helm charts and deployment templates:

    • Chart.yaml: Main Helm chart info.
    • values.yaml: Configuration file with default values.
    • templates/: Kubernetes manifest templates (deployment, service, volume, etc.).
  • help/: Contains auxiliary guides and configuration examples:

    • docs/id-sync.md/pdf/html: Guide on how to set up a script to synchronize user groups with external providers.
    • docs/ldap.md/pdf/html: Guide on how to set up integration with LDAP.
    • docs/oidc.md/pdf/html: Guide on how to set up integration with OpenID, compatible with an external authentication provider, using Keycloak as an example.
    • auth-provider-config.example.json: Example of a configuration for authentication providers.
    • docker-config.example.json: Example of a configuration for accessing a private Docker image registry.
    • idp-sync.js: Example of synchronizing user groups from an external IdP (Identity Provider) system.
    • values.example.yaml: Example of a completed configuration file with correctly escaped values. The values ​​are for illustration only and cannot be used for deployment as shown here.
  • k3s/: Contains resources to install a K3s cluster in full offline mode:

    • install.sh: K3s cluster installation and configuration script.
    • k3s: K3s cluster management utility.
    • k3s-images.tar.zst: Archive with system images for a K3s cluster.

Results

You have deployed and signed in to a DataLens On-premises instance. You have learned how to use the ./init.sh script to quickly set and manage the administrator password.