Maps API | Urbi On-Prem | 2GIS Documentation

Updating maps API services

  1. Make sure that a newer version of MapGL JS API service exists in the Docker Registry. See On-Premise releases.

  2. Update settings in the values-mapgl.yaml configuration file, if necessary. See the example in the installation instructions.

  3. Run the command to update the service:

    helm upgrade --version=1.4.5 --atomic --values ./values-mapgl.yaml mapgl-js-api 2gis-on-premise/mapgl-js-api
    

You can update the Tiles API service with or without simultaneously updating its data (the tiles themselves).

  1. Make sure that a newer version of Tiles API service exists in the Docker Registry. See On-Premise releases.

    If you are going to update data as well, make sure that the artifacts storage contains the newer dataset. See Installation artifacts lifecycle.

  2. Update settings in the values-tiles.yaml configuration file, if necessary. See the example in the installation instructions.

  3. Run the command to update the service:

  • To update the service only:

    helm upgrade --version=1.4.5 --atomic --values ./values-tiles.yaml tiles-api 2gis-on-premise/tiles-api --set importer.enabled=false
    
  • To update both the service and the data:

    helm upgrade --version=1.4.5 --atomic --values ./values-tiles.yaml tiles-api 2gis-on-premise/tiles-api
    

    After each update, the newly downloaded tiles are stored in a new Cassandra keyspace. The name of the keyspace is constructed based on:

    • the data type (web or raster),
    • the Cassandra cluster name,
    • the Unix time when the manifest was generated.

    Keyspace name example: dgis_tileserver_web_test_1653477379.

    All the data in an older keyspace become obsolete after a successful switch to a new keyspace. It is recommended to remove older keyspaces to free up disk space. You can do this automatically as follows:

    1. Set the importer.cleaner.enabled setting to true.

    2. Set the importer.cleaner.limit setting to the amount of old keyspaces to keep. For example, 1 means that only one obsolete keyspace will be kept while all older ones will be deleted. Note that it is not permitted to set the limit lower than 1, as this would result in deletion of the current keyspace at the time of running helm upgrade.

    3. By default, the deleted data will still occupy disk space as a Cassandra table snapshot. You can delete the obsolete snapshots manually by using nodetool clearsnapshot, or you can configure automatic deletion via JMX:

      1. Make sure that remote JMX access is enabled in your Cassandra configuration.
      2. Set the cassandra.credentials.jmxUser and cassandra.credentials.jmxPassword values.
      3. Set the importer.clearSnapshots value to true.