Updating maps API services
Updating MapGL JS services API
-
Fetch new installation artifacts.
-
In the DGCLI configuration file, specify:
- New version of the
api-platformcomponent (see API Platform releases). - Version of
corecomponent required to install the new API-Platform version (see the Dependencies subsection in the API Platform releases description).
- New version of the
-
For more settings, see DGCLI command-line arguments.
-
-
Check out breaking changes. If necessary, update the settings in the
values-mapgl.yamlconfiguration file. For more information, see the installation guide. -
Run the command to update the service:
helm upgrade --version=VERSION --atomic --values ./values-mapgl.yaml mapgl-js-api 2gis-on-premise/mapgl-js-apiIn the
--versionparameter, set the newapi-platformcomponent version that you specified in the DGCLI configuration file.
Updating Tiles API services
You can update the Tiles API service with or without simultaneously updating its data (the tiles themselves).
-
Fetch new installation artifacts.
-
In the DGCLI configuration file, specify:
- New version of the
api-platformcomponent (see API Platform releases). - Version of
corecomponent required to install the new API-Platform version (see the Dependencies subsection in the API Platform releases description).
- New version of the
-
Run the fetch command. Additionally you can specify the following flags:
- To update only the service image, add the
--only-appsflag after thepullcommand. - To update only data, add the
--only-dataflag after thepullcommand. - To update both service and data, run the command without the above flags.
For more settings, see DGCLI command-line arguments.
- To update only the service image, add the
-
-
Copy the path to a new manifest file from the command output and set it as a value to the
dgctlStorage.manifestparameter in thevalues-tiles.yamlconfiguration file. For more information, see the installation guide.Important
You can configure the process of importing new data for Tiles API. Use the
importersettings group of the configuration file. If during a regular update of the Tiles API service you do not want to import new data, use the same manifest as in the previous import. In other cases, using a new manifest is recommended. -
Check out breaking changes. If necessary, update other settings in the
values-tiles.yamlconfiguration file. -
Run the command to update the service:
-
To update only the service:
helm upgrade --version=VERSION --atomic --wait --timeout 7200s --values ./values-tiles.yaml tiles-api 2gis-on-premise/tiles-api --set importer.enabled=falseIn the
--versionparameter, set the newapi-platformcomponent version that you specified in the DGCLI configuration file. -
To update only data:
helm upgrade --version=VERSION --atomic --wait --timeout 7200s --values ./values-tiles.yaml tiles-api 2gis-on-premise/tiles-apiIn the
--versionparameter, set the currently installedapi-platformcomponent version. -
To update both the service and the data:
helm upgrade --version=VERSION --atomic --wait --timeout 7200s --values ./values-tiles.yaml tiles-api 2gis-on-premise/tiles-apiIn the
--versionparameter, set the newapi-platformcomponent version that you specified in the DGCLI configuration file.
-
Updating Tilegen API
-
Fetch new installation artifacts.
-
In the DGCLI configuration file, specify:
- New version of the
api-platformcomponent (see API Platform releases). - Version of
corecomponent required to install the new API-Platform version (see the Dependencies subsection in the API Platform releases description).
- New version of the
-
For more settings, see DGCLI command-line arguments.
-
-
Check out breaking changes. If necessary, update the settings in the
values-tilegen.yamlconfiguration file. For more information, see the installation guide. -
Run the command to update the service:
helm upgrade --version=VERSION --atomic --values ./values-tilegen.yaml tilegen-api 2gis-on-premise/tilegen-apiIn the
--versionparameter, set the newapi-platformcomponent version that you specified in the DGCLI configuration file.
Updating Floors API service
Remove the Floors API service. Starting from version 1.37.1, floor plans are provided as part of vector tiles, installing a separate service is no longer required.
Automatic deletion of old data
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:
-
Set the
importer.cleaner.enabledparameter totrue. -
Set the
importer.cleaner.limitparameter to the amount of old keyspaces to keep. For example,1means 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. -
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:
- Make sure that remote JMX access is enabled in your Cassandra configuration.
- Specify the
cassandra.credentials.jmxUserandcassandra.credentials.jmxPasswordparameter values. - Set the
importer.clearSnapshotsparameter totrue.