Datalore 2023.5 Help

Set up a proxied environment (HTTP proxy available)

Follow the procedure below to run Datalore in a proxied environment.

Set up a proxied environment

  1. Rebuild the datalore-database-command image.

    • # cat Dockerfile FROM jetbrains/datalore-database-command:2023.5 COPY init_databases_env.sh /opt/datalore/init_databases_env.sh
    • Add the -Dhttps.proxyHost=... -Dhttps.proxyPort=... options to the JVM commandline. See the init_database_env.sh examples below.

      # cat init_databases_env.sh #!/bin/bash set -ex export DATALORE_HOME=/opt/datalore databases_lib_target_dir=$DATALORE_HOME/databases_lib_dir datagrip_driver_dir=$DATALORE_HOME/datagrip.driver.path MAX_HEAP_SIZE=${MAX_HEAP_SIZE:-512m} source setenv.sh export DATABASES_JAVA_OPTS="$MEMORY_JAVA_OPTS ${JIGSAW_JAVA_OPTS[*]} \ -Dhttps.proxyHost=IP_ADDR_OF_YOUR_PROXY -Dhttps.proxyPort=PORT_OF_YOUR_PROXY \ -Djava.util.logging.config.file=${DATALORE_HOME}/logging.properties \ -Dlogback.configurationFile=${DATALORE_HOME}/logback.xml \ -Didea.home.path=${databases_lib_target_dir} \ -Ddatagrip.driver.path=${datagrip_driver_dir} \ -Dathena.aws.credentials.provider.jar.path=athena-aws-credentials-provider.jar \ -cp ${databases_lib_target_dir}/* \ "
  2. Rebuild the datalore-agent image.

    1. Run the command below:

      # cat Dockerfile FROM jetbrains/datalore-agent:2023.5 COPY on_agent_start.sh /opt/datalore/on_agent_start.sh
    2. Set the HTTP_PROXY and HTTPS_PROXY environment variables and pass them to the agent containers.

    3. Edit the /opt/datalore/on_agent_start.sh file as shown in the code below:

      java_opts=("-Dhttps.proxyHost=IP_ADDR_OF_YOUR_PROXY" "${java_opts[@]}") java_opts=("-Dhttps.proxyPort=PORT_OF_YOUR_PROXY" "${java_opts[@]}")
  3. After the above-mentioned custom images are rebuilt and pushed, configure the Datalore server environment by adding the DATABASES_COMMAND_IMAGE variable to the datalore.values.yaml file and restart Datalore.

    Examples

    docker-compose.yaml

    services: datalore: image: jetbrains/datalore-server:2023.5 ports: - "8080:8080" expose: [ "8081", "5050", "4060" ] networks: - datalore-agents-network - datalore-backend-network volumes: - "datalore-storage:/opt/data" - "/var/run/docker.sock:/var/run/docker.sock" environment: #DATALORE_PUBLIC_URL: "https://datalore.example.com" DB_PASSWORD: "changeme" DATABASES_DOCKER_NETWORK: "datalore-agents-network" SQL_SESSION_DOCKER_NETWORK: "datalore-agents-network" DATABASES_COMMAND_IMAGE: "datalore-db-command-custom:latest"

    datalore.values.yaml

    dataloreEnv: DATABASES_COMMAND_IMAGE: "datalore-db-command-custom:latest" agentsConfig: .... databaseSecret: password: "password"
Last modified: 02 October 2023