Some functionalities in CARTO require the running of certain tasks periodically (e.g. setting up a cron job). This section describes such tasks, their usage, and how to configure them.
To set up a cron job to be executed under a given user (e.g. carto
),
run the following command:
1
crontab -u carto -e
This will allow you to edit the crontab for that user using your default
editor ($EDITOR
), then all you need is just to paste the cron you want
to run into that file (see below).
Sync tables is a feature within CARTO Builder that allows users to set up automatic table synchronization of datasets uploaded from external services. It is done as a background job in a Resque.
However, for this feature to work in an On-Premise installation, a rake task that checks for tables that need to be synced and enqueues them to be later processed by a Resque worker needs to be executed.
This rake task is meant to be run as a cron job (ideally every minute, running it less often may cause update lag).
1
*/1 * * * * /opt/carto/builder-tools/embedded/bin/carto-builder-exec-rake.sh cartodb:sync_tables
CARTO_VERSION >= 3.0.1
)A rake task is required to periodically clean expired OAuth tokens. A reasonable schedule would be to run it every minute.
1
*/1 * * * * /opt/carto/builder-tools/embedded/bin/carto-builder-exec-rake.sh cartodb:oauth:destroy_expired_oauth_keys
To disable telemetry in your CARTO installation, please follow the instructions below:
1
2
3
4
sudo /opt/carto/tools/bin/cartoctl config set --fqdn "$(hostname --fqdn)" --role builder CARTO_BUILDER_PUBSUB_ENABLED false
node=node01.carto.lan old=true new=false
sudo /opt/carto/tools/bin/cartoctl nodes roles refresh-templates --release-path /opt/carto/tools builder resque
1
2
3
4
5
6
sudo /opt/carto/tools/bin/cartoctl nodes services stop platter
Services on carto-enterprise-byol-test1-vm:
platter stopped
sudo systemctl disable platter
Removed symlink /etc/systemd/system/multi-user.target.wants/platter.service
Enabling HTTPs (CARTO_VERSION >= 4.1.0
) ~~~~~~~~~~~~~~~~~~
SSL
certificate (setupssl)1
2
3
4
sudo /opt/carto/tools/bin/cartoctl exec /opt/carto/tools/bin/carto-builder-ssl.sh /tmp/solutions.crt /tmp/solutions.key
Services on node01.carto.lan:
nginx restarted
SSL certificate successfully installed
HTTPs
1
2
sudo /opt/carto/tools/bin/cartoctl config set --fqdn "$(hostname --fqdn)" --role builder CARTO_BUILDER_SSL_REQUIRED true
node=node01.carto.lan old=true new=true
builder
service1
2
3
4
5
sudo /opt/carto/tools/bin/cartoctl nodes roles refresh-templates --release-path /opt/carto/tools --restart-services builder
Starting reload process on node node01.carto.lan
Reloading role builder
Restarting service builder
Successfully reloaded builder