Skip to content

Installing prerequisites

Before setting up Lens on your local system, ensure you meet the following requirements.

Dependency Purpose
Docker Runs Lens in an isolated environment on your local system.
Docker Compose Configures and manages multi-container Docker applications for Lens.
Postman App/Postman VSCode Extension Queries and tests Lens to ensure your setup functions correctly.
VS Code Builds and manages Lens Model YAMLs as a code editor.

Docker

Docker is required to run Lens in an isolated environment on a local system. This guide provides instructions for installing Docker if it is not already installed. If Docker is already installed, you can jump to the next step in the setup process.

Check for existing installation

Before proceeding with the installation, verify whether Docker is already installed on the system by running the following command in the terminal or command prompt:

docker --version

If Docker is installed, a version number similar to the following will be displayed:

Docker version 20.10.7, build f0df350

If Docker is not installed, follow the appropriate installation guide for particular operating system:

  • Linux: Follow the installation guide for the Docker engine for Linux here: Install Docker on Linux. It is recommended that you install the Docker Desktop version.
  • Windows: Follow the installation guide of the Docker engine for Windows here: Install Docker on Windows.
  • macOS: Follow the installation guide of the Docker engine for Linux here: Install Docker on macOS.

Docker login

Before pulling or pushing images from or to a private repository, it is necessary to log in to Docker Hub using the command line. The docker login command can be used to authenticate with Docker Hub by providing the Docker Hub username and password.

docker login --username=${DOCKERHUB_USERNAME}
docker login --username=lensuser01

After executing the command, replacing ${DOCKERHUB_USERNAME} with the actual Docker Hub username, the system will prompt for the Docker account password.

docker login --lensuser01
Password:

#expected_output

WARNING! Your password will be stored unencrypted in /home/tomandjerry/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

Pull the image

To pull a Docker image from a registry, use the docker pull command. If no tag is specified, Docker will automatically pull the latest version of the image. This command is required to fetch images from public or private registries.

docker pull [REGISTRY_HOST/]USERNAME/IMAGE[:TAG]
docker pull lensuser01/lens2:0.35.55-01    

Docker compose

Lens utilizes Docker Compose to configure multi-container Docker applications through a YAML manifest file. This guide outlines the process for checking an existing Docker Compose installation, installing it if needed, and validating the installation.

Checking for existing installation

Before installing Docker Compose, it is advisable to check if it is already installed on the system.

docker-compose --version
This command will return the installed version of Docker Compose, if present. For example:

docker-compose version 1.29.2, build 5becea4c

Installing Docker compose

If Docker Compose is not installed, refer to the following link to install Docker Compose.

Visual Studio Code

Visual Studio Code (VS Code) must be installed on the local system to create a Lens model effectively. Below are the links for installing VS Code on various operating systems.

Installation links by Operating System

Python

Lens utilizes the Python programming language for tasks such as setting up directory structures and creating virtual environments for managing workloads and dependencies. To begin using Lens, Python must be installed on the system.

Checking for existing installation

python3 --version
#Expected_Output
Python 3.8.14

Installing Python

If Python is not already installed on the system, follow the steps below to download and install the appropriate version.

  1. Access the installation guide: Visit the Python Installation Guide. This guide provides detailed instructions for installing Python on various operating systems, including Windows, macOS, and Linux.

  2. Download Python: From the guide, select the link corresponding to the operating system and download the latest version of Python.

  3. Install Python: Run the downloaded installer. Be sure to check the box that says "Add Python 3.x to PATH" before clicking "Install Now". This step is crucial as it makes Python accessible from the command line.

  4. Verify installation: After installation, open a command line interface and run the following command to check the installed version of Python. The expected output should be Python 3.X or another version that is greater than 3.7.

    python3 -V
    #Expected_Output
    Python 3.8.14
    
  5. Update Python: If installed version of Python is older than 3.7, follow the guide on Updating Python to upgrade to a newer version that meets the Lens prerequisites.

Postman

Postman is a tool that allows data developers to perform querying and testing within the Lens environment by sending API requests through an intuitive user interface. Follow the Postman Installation Guide to install Postman on your local system.

Install Postman VS Code extension:

Alternatively, you can also install Postman Extension on your Code Editor.

  • Search for Postman in the VS Code Extensions Marketplace and install the Postman extension.

  • Open the extension within VS Code to start creating and sending requests directly from the editor.

Postman Extension
  • Once installed, you can access the Postman extension by clicking on the Postman icon in the Activity Bar on the side of VS Code.

With all prerequisites including Docker, VS Code, Python, and Postman installed, you are now ready to build Lens models on your system.

Next steps

Lens Model Folder Setup