Basic installation on a VM
To get your DataLens instance up and running, follow the steps below.
How to download the distribution archive
The distribution is issued to the organization. You can look up the org_id in Cloud Center.
Tip
For more information about organizations and how to create one, see this Yandex Identity Hub guide.
Once you get a distribution for your organization, you can proceed with the download.
-
Click the download link.
-
Download the latest distribution version.
-
Read the license agreement and click Continue.
-
Copy the link you get.
-
On the target VM, run the following command by substituting the link:
curl -L https://clck.ru/<...> -o datalens-enterprise.tar -
Create a directory and unpack the archive into it:
mkdir -p ./datalens-enterprise tar -xvf datalens-enterprise.tar --directory ./datalens-enterprise -
Navigate to the directory you created. You will use it to complete the next steps.
cd ./datalens-enterprise
Running the distribution
-
Make sure you are in the distribution folder,
./datalens-enterprise. -
Run the installation command using the
datalens-course.localdomain.Your main installation management tool is the
./init.shscript. For a basic installation on a clean VM, provide it the following keys:-
--k3s-install: Commands the script to install the local lightweight K3s 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 usingnip: to do this, enter the IP address of your machine and add.nip.io, e.g.,192.168.10.2.nip.io. -
--ingress-tlsand--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-genThis process will take a few minutes. The script will install K3s, push Docker images into it, and deploy all DataLens components.
-
-
Wait for the installation to complete. At the end, you will see a message about a successful release deployment.
-
If you are using a
.localdomain, add the<VM IP address> datalens-course.localline to your local/etc/hostsfile so that the browser can find the server. -
Then open the interface at
https://datalens-course.local. Accept the risk, as you are using a self-signed certificate, and log in with theadminusername and the obtained password.
To change installation options, e.g., to add the ability to download --files, you do not need to download the distribution again: simply run the installation command one more time. This time, you do not need to provide --k3s-install since 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. You do not need to provide --k3s-install when reinitializing since the K3s cluster is already installed.
Managing 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
Save the password. If you lose it, you can reset it and generate a new one.
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 regenerate them using the
--auth-rsa-genflag. 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.
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 features in DataLens separately to ensure the basic installation uses minimal resources.
To enable additional features (ChartEditor or file connections), follow the instructions in the README.md file and append the initialization string with the --editor and --files flags. Result:
./init.sh --k3s-install --ingress-domain <domain> --ingress-tls --ingress-tls-gen --editor --files
Mirroring Docker images
If the VM does not have internet access, but you have an internal Docker Registry (e.g., Harbor, Nexus, Yandex Container Registry), first upload the images from the distribution there using this command:
# docker-config.json: File with registry access details
# 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 so that Kubernetes downloads images from it, rather than from local storage.
Summary
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.