[-h|--help] [-g|-o|-r|-i|-d|-y]
Options:
-h|--help : help. Show help.
-o|--organization : organization name. (Default: organization)
-g|--geocoder : geocoder. Set geocodio as Geocoder provider
-d|--delete-google-conf : delete Google config keys. Delete them if they are not used anymore
-y|--non-interactive : non-interactive. Assume yes for all questions (no prompt).
Examples:
carto-builder-ds-providers.sh geocodio -g -y
carto-builder-ds-providers.sh (Default: Interactive mode)
- Please, would you like to set [geocodio] as your [Geocoder] provider ? (Y/N) Y
```
Note
Please use --delete-google-conf option with caution. Remove Google
configuration keys, only if you are confident that no other Google
service within CARTO installation are being used.
Note
This tool **must be used** along with
lds\_providers\_lds , in order to complete
LDS provider configuration.
### LDS Providers (LDS configuration)
Located in **LDS server**.
Third parties such as HERE, Mapbox, TomTom or Geocodio need additional
configurations for api keys and need this tool for such configurations.
This is an advanced tool that offers several configuration options for
each provider. For most deployments, it should be enough to configure
the provider keys.
Available options:
- save: saves configuration for Mapbox/TomTom/Here/Geocodio including
the information provided by tool parameters.
- show: shows current configuration for Mapbox/TomTom/Here/Geocodio.
- check\_connectivity: performs a connectivity check between LDS
server and LDS provider URL. It attempts to establish a connection
to the already configured Mapbox/TomTom/Here URL.
- Some Here deployments bring a Here Offline implementation,
indicating that the URL is available through the local network
instead of off the Internet.
``` bash
cartoctl exec -- carto-dataservices-configure-providers.rb save
Usage: ./carto-dataservices-configure-providers.rb show [provider]
./carto-dataservices-configure-providers.rb save [provider] [section] [options]
./carto-dataservices-configure-providers.rb check_connectivity [provider]
Shows or saves configuration and checks connectivity where the provider can be mapbox, tomtom, here or geocodio
Use "carto-dataservices-configure-providers.rb command --help" to get more options
```
#### Configuring Mapbox
The mandatory configuration for this provider requires an API key, in
order for CARTO LDS to perform requests to Mapbox. There are other
options, such as **timeouts**, in cases where you want to limit the time
for a Mapbox request.
Available
services:
- geocoder
- routing
- matrix
- isochrone
``` bash
cartoctl exec -- carto-dataservices-configure-providers.rb save mapbox geocoder
Usage: ./carto-dataservices-configure-providers.rb save mapbox geocoder [options]
Saves configuration merging defaults, global configuration and given arguments (in that order)
--api-keys [api keys]
--monthly-quota [monthly quota]
--service-base-url [service base url]
--service-connect-timeout [service connect timeout]
--service-read-timeout [service read timeout]
--service-max-retries [service max retries]
--config-file [config file]
--no-save Does not save config to /etc config file
--current Saves current config. Use this option to create a configuration based in defaults and config with no further arguments
--quiet Suppresses output of configuration
--no-connection-check Suppresses connection check
--help Show this message
cartoctl exec -- carto-dataservices-configure-providers.rb save mapbox geocoder --api-keys xxxxxxxxxxxxxxxxx
{
"geocoder": {
"api_keys": [
"xxxxxxxxxxxxxxxxx"
],
"monthly_quota": 99999999999
},
"routing": {
"api_keys": [
],
"monthly_quota": 99999999999
},
"matrix": {
"api_keys": [
],
"monthly_quota": 99999999999
},
}
```
#### Configuring TomTom
The mandatory configuration for this provider requires an API key, in
order for CARTO LDS to perform requests to TomTom. There are other
options, such as **timeouts**, in cases where you want to limit the time
for a TomTom request.
Available
services:
- geocoder
- routing
- isolines
``` bash
cartoctl exec -- carto-dataservices-configure-providers.rb save tomtom geocoder
Usage: ./carto-dataservices-configure-providers.rb save tomtom geocoder [options]
Saves configuration merging defaults, global configuration and given arguments (in that order)
--api-keys [api keys]
--monthly-quota [monthly quota]
--service-base-url [service base url]
--service-connect-timeout [service connect timeout]
--service-read-timeout [service read timeout]
--service-max-retries [service max retries]
--config-file [config file]
--no-save Does not save config to /etc config file
--current Saves current config. Use this option to create a configuration based in defaults and config with no further arguments
--quiet Suppresses output of configuration
--no-connection-check Suppresses connection check
--help Show this message
cartoctl exec -- carto-dataservices-configure-providers.rb save tomtom geocoder --api-keys xxxxxxxxxxxxxxxxx
{
"geocoder": {
"api_keys": [
"xxxxxxxxxxxxxxxxx"
],
"monthly_quota": 99999999999
},
"routing": {
"api_keys": [
],
"monthly_quota": 99999999999
},
"isolines": {
"api_keys": [
],
"monthly_quota": 99999999999
},
}
```
#### Configuring Geocodio
The mandatory configuration for this provider requires an API key, in
order for CARTO LDS to perform requests to Geocodio. There are other
options, such as **timeouts**, in cases where you want to limit the time
for a Geocodio request.
Available
services:
- geocoder
``` bash
cartoctl exec -- carto-dataservices-configure-providers.rb save geocodio geocoder
Usage: ./carto-dataservices-configure-providers.rb save geocodio geocoder [options]
Saves configuration merging defaults, global configuration and given arguments (in that order)
--api-keys [api keys]
--monthly-quota [monthly quota]
--service-base-url [service base url]
--service-connect-timeout [service connect timeout]
--service-read-timeout [service read timeout]
--service-max-retries [service max retries]
--config-file [config file]
--no-save Does not save config to /etc config file
--current Saves current config. Use this option to create a configuration based in defaults and config with no further arguments
--quiet Suppresses output of configuration
--no-connection-check Suppresses connection check
--help Show this message
cartoctl exec -- carto-dataservices-configure-providers.rb save geocodio geocoder --api-keys xxxxxxxxxxxxxxxxx
{
"geocoder": {
"api_keys": [
"xxxxxxxxxxxxxxxxx"
],
"monthly_quota": 99999999999
}
}
```
#### Configuring HERE
The mandatory configuration options for this provider require an
**api-id** and **app-code**, that allow CARTO LDS to perform requests to
HERE. There are other options, such as **timeouts**, in cases where you
want to limit how much time a Here request can take, or
**service-json-url**, if you want to customize the HERE service URL.
Available
services:
- geocoder
- isolines
``` bash
cartoctl exec -- carto-dataservices-configure-providers.rb save here geocoder
Usage: ./carto-dataservices-configure-providers.rb save here geocoder [options]
Saves configuration merging defaults, global configuration and given arguments (in that order)
--app-id [app id]
--app-code [app code]
--geocoder-cost-per-hit [geocoder cost per hit]
--service-json-url [service json url]
--service-connect-timeout [service connect timeout]
--service-read-timeout [service read timeout]
--service-max-retries [service max retries]
--service-gen [service gen]
--config-file [config file]
--no-save Does not save config to /etc config file
--current Saves current config. Use this option to create a configuration based in defaults and config with no further arguments
--quiet Suppresses output of configuration
--no-connection-check Suppresses connection check
--help Show this message
cartoctl exec -- carto-dataservices-configure-providers.rb save here geocoder --app-id XXXXXXX --app-code YYYYYYYY --service-json-url "http://carto-here-test.com" --no-connection-check
{
"geocoder": {
"app_id": "XXXXXXX",
"app_code": "YYYYYYYY",
"geocoder_cost_per_hit": "1",
"service": {
"json_url": "http://carto-here-test.com"
}
},
"isolines": {
"app_id": "",
"app_code": ""
}
}
```
Note
If the key value starts with a dash `-`, a format `key='value'` **must
be used**.
### Enabling Data Observatory Analysis
Located in **Builder server**.
Setting `CARTO_DS_ANALYSIS_DOBSERVATORY` config key to **true** enables
the LDS Data Observatory analysis, in order to make them available in
Builder's web interface.
Steps:
1. Update `CARTO_DS_ANALYSIS_DOBSERVATORY` in `~/carto/config.yml`
accordingly
``` ini
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_PORT
value: "5433"
- name: CARTO_DS_ANALYSIS_DOBSERVATORY
value: "true"
package: []
tasks: []
```
2. Refresh **builder templates** and restart **builder service**
Note
Builder service will be restarted, therefore it will be unavailable for
a few seconds.
``` bash
cartoctl nodes roles refresh-templates \
--restart-services \
--release-path /opt/carto/tools \
builder
Starting reload process on node node01.carto.lan
Reloading role builder
Restarting service builder ✔
Successfully reloaded builder
```
Note
You must apply this tool after loading the Data Observatory the first
time after installation at
observatory\_database\_lds
### Loading Data Observatory Database
Located in **LDS server**.
This tool loads the Data Observatory database into the LDS server. First
you must upload a Data Observatory dump file to the LDS server, that
will be used to extract the information and dump it into LDS database.
You can use this tool to keep your Data Observatory information
**updated**: Upload the brand new Data Observatory dump file to the LDS
server and use this tool to dump it.
``` bash
cartoctl exec -- carto-dataservices-observatory.sh \
load-data /tmp/obs_2018_04_18_e0da59b211.dump
[INFO] creating database:
ok
[INFO] adding extensions to the database:
ok
[INFO] importing data:
ok
[INFO] creating indices:
ok
[INFO] configuring user grants:
ok
[INFO] updating dataservices configuration:
ok
[INFO] observatory data successfully loaded
```
Note
After running this tool for the very first time, ensure that you enable
the LDS Data Observatory analysis at
lds\_do.
### Enabling LDS Geocoding Analysis
Located in **Builder server**.
Setting `CARTO_DS_ANALYSIS_GEOCODER` config key to **true** enables the
LDS internal geocoder analysis, in order to make it available in
Builder's web interface.
Steps:
1. Update `CARTO_DS_ANALYSIS_GEOCODER` in `~/carto/config.yml`
accordingly
``` ini
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_PORT
value: "5433"
- name: CARTO_DS_ANALYSIS_GEOCODER
value: "true"
package: []
tasks: []
```
2. Refresh **builder templates** and restart **builder service**
Note
Builder service will be restarted, therefore it will be unavailable for
a few seconds.
``` bash
cartoctl nodes roles refresh-templates \
--restart-services \
--release-path /opt/carto/tools \
builder
Starting reload process on node node01.carto.lan
Reloading role builder
Restarting service builder ✔
Successfully reloaded builder
```
Note
You must apply this tool after loading the Geocoder database the first
time after installation at
geocoding\_database\_lds.
### Loading LDS Geocoding Database
Located in **LDS server**.
CARTO provides some internal geocoding functions that must be loaded
with this tool, in order to get the most out of CARTO LDS.
1. Upload a tar file containing the geocoding data to the LDS server
2. Use this tool to load the data into the LDS database.
The tool can work either with a gzipped tar file, or an uncompressed
folder.
``` bash
cartoctl exec -- carto-dataservices-geocoder.sh \
load-data /tmp/geocoder_dumps
[INFO] loading data from /data-dataservices/tmp.4dSou7Wny9/geocoder_dumps/admin0_synonyms.sql:
SET
SET
SET
SET
SET
SET
SET
COPY 1332
--------
43957
(1 row)
ok
[INFO] loading data from /data-dataservices/tmp.4dSou7Wny9/geocoder_dumps/admin1_decoder.sql:
...
...
```
Note
If both `geocoder` and `geocoder-patch` files are provided you must load
first the `geocoder` one and then the `geocoder-patch`.
For example, if you are provided with `geocoder-0.0.1.tar.gz` and
`geocoder-patch-0.0.1-20181019.tar.gz` files, you must load first
`geocoder-0.0.1.tar.gz` and then `geocoder-patch-0.0.1-20181019.tar.gz`.
Note
After running this tool for the very first time, ensure that you enable
the LDS Geocoding analysis at
lds\_geocoding.