CARTO can be installed on a local server, or set of servers, either directly or using our commercial installer.

Installing CARTO On-Premises LDS

Installation

Warning
SELinux must be disabled, otherwise we cannot guarantee the stability of the current installation.

The CARTO LDS installer artifact can be used to setup CARTO LDS in the following scenarios:

  • a fresh installed Red Hat server
  • a previous compatible running version (CARTO LDS). An upgrade will be performed in this case.

1) Unpack the tar.gz file of the Builder installer

1
tar xfz carto-dataservices-<version>-rhel-7-x86_64.tar.gz

Where version is the version of the file provided.

2) Initialize the configuration database and install the license

1
2
cd carto-dataservices-<version>-rhel-7-x86_64
sudo ./cartoctl init --license license1.lic
Note
A CARTO license is required in this step. Please, contact CARTO if you need a license.
Note
As LDS is installed to extend Builder capabilities, we strongly recommend at this point to use the `~/carto/config.yml` file generated during the builder installation.

3) Add Dataservices role configuration to ~/carto/config.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
nodes:
- hostname: node01-lds.carto.lan
  user:
    privileges: true
    ssh_key: id_rsa
    command: /bin/sudo
  role:
  - name: dataservices
    release: ""
    installed: false
    env:
    - name: CARTO_DATASERVICES_ADDRESS
      value: 4.4.4.4
    - name: CARTO_DATASERVICES_BIND
      value: 0.0.0.0
    - name: CARTO_REDIS_ADDRESS
      value: 5.5.5.5
    package: []
    task: []
Note
Connectivity between LDS server and redis (`CARTO_REDIS_ADDRESS`) must be allowed otherwise LDS services won't work.

4) Perform the installation with sudo (or as root):

1
sudo ./cartoctl nodes install

5) If the installation was successful, you will see the message below, otherwise please check ~/carto.log looking for errors.

1
2
3
4
5
6
7
8
9
10
11
12
Starting installation...
 Starting install process on node node01.carto.lan
 Roles configured on this node: [dataservices]
 Installing role dataservices on node01.carto.lan

   <--- Snipping content here --->

   Reloading templates ✔
   Enabling service dataservices ✔
   Starting service dataservices ✔
Successfully installed dataservices
The installation has been successfully completed

6) Go to Builder server and add the config block below to ~/.carto/config.yml, under nodes section:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
- hostname: node01.carto.lan
  user:
    privileges: true
    ssh_key: id_rsa
    command: /bin/sudo
  role:
  - name: dataservices
    release: ""
    installed: false
    env:
    - name: CARTO_DATASERVICES_ADDRESS
      value: 4.4.4.4
    - name: CARTO_DATASERVICES_PORT
      value: "5433"
    - name: CARTO_DS_ANALYSIS_GEOCODER
      value: "false"
    - name: CARTO_DS_ANALYSIS_HIRES
      value: "false"
    - name: CARTO_DS_ANALYSIS_ISOLINES
      value: "false"
    - name: CARTO_DS_ANALYSIS_ROUTING
      value: "false"
    - name: CARTO_DS_ANALYSIS_DOBSERVATORY
      value: "false"

7) Continue with LDS Configuration in Builder server lds_configuration

Pre-Configuration

CARTO LDS has some default parameters that will help run all of the components correctly. However, it is recommended to review these parameters and change them before running the installer. Some of the initial configurations cannot be modified once the product is installed.

The following is the default config for DATASERVICES (LDS). See lds_keys_reference for a complete reference.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
nodes:
- hostname: node01-lds.carto.lan
  user:
    privileges: true
    ssh_key: id_rsa
    command: /bin/sudo
  role:
  - name: dataservices
    release: ""
    installed: false
    env:
    - name: CARTO_DATASERVICES_ADDRESS
      value: 4.4.4.4
    - name: CARTO_DATASERVICES_BIND
      value: 0.0.0.0
    - name: CARTO_REDIS_ADDRESS
      value: 5.5.5.5
    package: []
    task: []
Warning
The default value in CARTO\_DATASERVICES\_BIND configures the LDS server to allow connections from any host. This is a common scenario if you are installing CARTO LDS on a separate server. Ensure that your server is behind a firewall that blocks any undesirable access. For reference, this server should only receive connections from Builder's PostgreSQL server. In case there are several network interfaces attached to this server, CARTO\_DATASERVICES\_BIND could be set to a specific IP address where LDS PostgreSQL will be listening.
Warning
CARTO\_REDIS\_ADDRESS must be configured before running the installation. The value must be the IP address where Redis is installed. Make sure that CARTO\_REDIS\_BIND is set to 0.0.0.0 in that server and use a firewall to block any other undesirable connection.

Installation Configuration Option Keys Reference

CARTO LDS is highly configurable on installation time. The different sections of the documentation mention many option keys that modify the behavior of the product. The following table contains a reference of the keys that can be found in ~/.carto/config.yml setup file and whether they are modifiable or not.

Note
To get the default value for any given option key, please execute `/opt/carto/tools/bin/cartoctl registry`
Variable Name Modifiable Description
CARTO_DATA_ROOT_PATH Yes Filesystem path where data and config will be stored
CARTO_SNAPSHOT_ROOT_PATH Yes Filesystem path where upgrade snapshots will be stored
CARTO_LOG_PATH Yes Filesystem path for logs
CARTO_BACKUP_PATH Yes Filesystem path for backups done with backup tool
CARTO_DATASERVICES_BIND Yes LDS Postgres process bind address
CARTO_DATASERVICES_PORT Yes LDS Postgres process bind port
CARTO_DATASERVICES_USER Yes LDS Postgres user
CARTO_DATASERVICES_DB Yes LDS postgresql database
CARTO_DS_GEOCODER_LOG_PATH Yes Geocoding information file log
CARTO_DS_ROUTING_LOG_PATH Yes Routing information file log
CARTO_DS_ISOLINES_LOG_PATH Yes Isolines information file log
CARTO_DS_DO_LOG_PATH Yes Data Observatory information file log
CARTO_DS_MIN_LOG_LEVEL Yes LDS min log level. Set to debug to have extra info
CARTO_DS_LOG_FILE_PATH Yes Debug log path
CARTO_REDIS_ADDRESS Yes Redis server address
CARTO_REDIS_PORT Yes Redis server port
CARTO_HTTP_PROXY Yes Determines the http proxy to be used expressed as: http://proxy_ip:proxy_port
CARTO_HTTPS_PROXY Yes Determines the https proxy to be used expressed as: http(s)://proxy_ip:proxy_port
CARTO_NO_PROXY Yes Comma separated list of IPs and URLs that won’t connect through the configured proxy expressed, for example: “localhost, 127.0.0.1, 0.0.0.0”
CARTO_VERSION No Version of BUILDER installed
CARTO_CLIENT_BUILD No Determines the type of build