Deployment Options

Deployment Options

Operations

Configuring proxy

When the instance is going to be installed behind a proxy it is necessary to:

  • Configure the noProxy policy for Docker:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    
    # /root/.docker/config.json
    {
        "auths": {},
        "credHelpers":
        {
                "asia.gcr.io": "gcr",
                "eu.gcr.io": "gcr",
                "gcr.io": "gcr",
                "marketplace.gcr.io": "gcr",
                "us.gcr.io": "gcr"
        },
        "proxies": {
                "default":
                {
                    "httpProxy": "http://192.168.3.4:1234",
                    "httpsProxy": "http://192.168.3.4:1234",
                    "noProxy": "127.0.0.1,localhost,carto.lan"
                }
        }
    }
    
  • Configure http-proxy for Docker:
    1
    2
    3
    4
    5
    
    # /etc/systemd/system/docker.service.d/http-proxy.conf
    [Service]
    Environment="HTTP_PROXY=https://192.168.3.4:1234"
    Environment="HTTPS_PROXY=https://192.168.3.4:1234"
    Environment="NO_PROXY=127.0.0.1,localhost"
    
  • Redirect host to the proper domain:
    1
    2
    3
    
    # /etc/hosts
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 carto.lan
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 carto.lan
    

Stopping CARTO services

Executing this command from the CARTO installer folder would stop all CARTO services while keeping all persisted data:

1
docker-compose down

Configuring for server resources

In cases of high concurrency, increasing the server’s number of CPUs and/or memory, and raising the number of instances of a specific service can help to improve performance. Follow the next steps for configuring the number of instances for a specific service:

  • Edit .env and find this block:
    1
    2
    3
    4
    
    CARTO_SQL_API_INSTANCES=1
    CARTO_MAPS_API_INSTANCES=1
    CARTO_UI_BUILDER_INSTANCES=1
    CARTO_CLOUD_API_INSTANCES=1
    
  • Set the number of instances for each service and rebuild the containers with docker-compose up -d --force-recreate

Installing a new license

Installing a new license will be necessary after a renewal of the contract, or after a trial period has ended. Make sure that your new license file (provided by our team) is in license/acme-onprem.lic and run:

1
2
3
4
5
6
source .env && docker run --rm \
    --name install-license \
    --network "${COMPOSE_PROJECT_NAME}_default" \
    -v "$(pwd)/license/${CARTO_CLOUD}.lic:/root/.carto/carto.lic" \
    gcr.io/cartodb-onprem-artifacts/cartoctl:latest \
    license install

Upgrading to a new version

CARTO On-Premises can be upgraded with just a few steps. To proceed, you should ask Support team for your upgrade files.

First you’ll need to perform a backup of your data:

  1. Stop Docker containers
1
docker-compose stop
  1. Create a backup of the current version’s logs
1
docker-compose logs -t > backup.log
  1. Copy the current configuration files.
1
cp -r /previous/installation/folder /carto-backup
  1. Make a backup with the content of the folder located in /var/lib/docker/volumes that contains the docker volumes used to execute the CARTO services.
1
cp -r /var/lib/docker/volumes /var/lib/docker/backup-volumes

At this point everything is ready to proceed with the upgrade, so you may need to follow these steps:

  1. Unzip the new customer package in the location where you want to store all files and configurations.
1
unzip Customer_Package_new.zip -d /new/installation/folder
  1. Navigate to the installation folder.
1
cd /new/installation/folder
  1. Give execution permissions to the install script.
1
chmod +x install.sh
  1. Modify /new/installation/folder/.env parameters' CARTO_DOMAIN and CARTO_GOOGLE_SERVICE_ACCOUNT to match the ones that you can find on /previous/installation/folder/.env.
  2. Copy the .env.customer from the previous installation folder to the upgraded one.
1
cp /previous/installation/folder/.env.customer /new/installation/folder
  1. Delete the docker containers and volumes from the previous installation running the following command inside the old installation folder:
1
docker-compose down -v
  1. Remove the Data Services' volume executing this command:
1
2
source .env
docker volume rm ${COMPOSE_PROJECT_NAME}_dataservices

Your environment is now ready to be upgraded, so following the installation process from the new configuration folder you can complete the CARTO OnPremise upgrade.