Maps API | On-Premise | 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. Fetch new installation artifacts.

  3. Check out breaking changes. If necessary, update the settings in the values-mapgl.yaml configuration file. See the example in the installation instructions.

  4. Run the command to update the service:

    helm upgrade --version=1.10.0 --atomic --values ./values-mapgl.yaml mapgl-js-api 2gis-on-premise/mapgl-js-api
    
  5. Test if the update succeeded.

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. Fetch new installation artifacts.

  3. Check out breaking changes. If necessary, update the settings in the values-mapgl.yaml configuration file. See the example in the installation instructions.

  4. Run the command to update the service:

    • To update the service only:
    helm upgrade --version=1.10.0 --atomic --wait --timeout 7200 --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.10.0 --atomic --wait --timeout 7200 --values ./values-tiles.yaml tiles-api 2gis-on-premise/tiles-api
    
  5. Test if the update succeeded.

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

  2. Fetch new installation artifacts.

  3. Check out breaking changes. If necessary, update the settings in the values-floors-api.yaml configuration file. See the example in the installation instructions.

  4. Run the command to update the service:

    helm upgrade --version=1.10.0 --atomic --values ./values-floors-api.yaml floors-api 2gis-on-premise/floors-api
    
  5. Test if the update succeeded.

To store data about tiles, the service uses Cassandra keyspaces.

If Cassandra's security settings allow automatic creation of keyspaces, a new keyspace is created during an upgrade and the service switches to it.

After switching, all the data in an older keyspace become obsolete. You can keep some of the previous keyspaces as a backup and delete the rest to free up disk space.

To automatically delete old data:

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

  2. Set the importer.cleaner.limit parameter to the amount of old keyspaces to keep. For example, 1 means that only one previous keyspace will be kept while all older ones will be deleted. In this case, you should reserve at least three keyspace sizes (temporary, current, and N previous ones) on the disk.

  3. By default, the deleted data 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. Specify the cassandra.credentials.jmxUser and cassandra.credentials.jmxPassword parameter values.
    3. Set the importer.clearSnapshots parameter to true.