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

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.
  • a previous CARTO Builder installation. CARTO LDS will be installed in the same server where CARTO Builder is already running.

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

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

Where version is the version of the file provided.

2) Before running the installer, we need to edit the configuration file. See Pre configuration <#pre-configuration> section below. 3) Run the installer, with sudo (or as root):

1
2
cd carto-dataservices-<version>-rhel-6-x86_64
sudo ./carto-setup.sh dataservices

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.

Monit is a service supervision tool that permanently watches CARTO LDS services, making sure that they are always up and running. It is installed by default, and you can manage this installation with the CARTO_MONIT config key.

The following is the default config for DATASERVICES (LDS). See Configuration options <#installation-configuration-option-keys-reference>lds-configuration for a complete reference.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
CARTO_VERSION="2.0.0"

CARTO_CLIENT_BUILD="carto"

# We will define data and snapshot paths from these two
CARTO_DATA_ROOT_PATH="/data-lds"
CARTO_SNAPSHOT_ROOT_PATH="/data-lds"

CARTO_LOG_PATH="/data-lds/log"
CARTO_BACKUP_PATH="/backup"

#=====================================
## Dataservices
#=====================================
# Allowed BIND IP Configuration (CARTO_XXXX_BIND): | "127.0.0.1" | "192.168.1.64" | "0.0.0.0"
# Set this parameter to either 0.0.0.0 or the specific IP address where LDS PostgreSQL is listening:

CARTO_DATASERVICES_BIND="0.0.0.0"
CARTO_DATASERVICES_PORT="5433"
CARTO_DATASERVICES_USER="geocoder_api"
CARTO_DATASERVICES_DB="db_dataservices"

CARTO_DS_GEOCODER_LOG_PATH="$CARTO_LOG_PATH/dataservices/geocoder.log"
CARTO_DS_ROUTING_LOG_PATH="$CARTO_LOG_PATH/dataservices/routing.log"
CARTO_DS_ISOLINES_LOG_PATH="$CARTO_LOG_PATH/dataservices/isolines.log"
CARTO_DS_DO_LOG_PATH="$CARTO_LOG_PATH/dataservices/data_observatory.log"
CARTO_DS_MIN_LOG_LEVEL="info"
CARTO_DS_LOG_FILE_PATH="$CARTO_LOG_PATH/dataservices/dataservices.log"

#=====================================
## Monit
#=====================================
CARTO_MONIT=true

#=====================================
## Builder
#=====================================
## REQUIRED: Uncomment the line below and set it to the IP address where Redis is installed.

#CARTO_REDIS_ADDRESS=""
CARTO_REDIS_PORT="6379"
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-dataservices.config setup file, and indicates if they are modifiable.

It is important to note that in an upgrade, these variables will be ignored if they are already set in global /etc/carto-dataservices.config

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_MONIT Yes Sets if monit will be used as processes watchdog
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