Updating search API services
Update Search API service
-
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-search.yamlconfiguration file. For more information, see the installation guide.Important
If during a regular update of the search services 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-search.yamlconfiguration file. -
Run the command to update the service:
helm upgrade --version=VERSION --atomic --values ./values-search.yaml search-api 2gis-on-premise/search-apiIn the
--versionparameter, set theapi-platformcomponent version:- To update only the service or both service and data, use the new version that you specified in the DGCLI configuration file.
- To update only data, set the currently installed version.
Update Catalog APIs service
-
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-catalog.yamlconfiguration file. For more information, see the installation guide.Important
You can configure the process of importing new data for Catalog APIs. Use the
importersettings group of the configuration file. If during a regular update of the Catalog APIs 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-catalog.yamlconfiguration file. -
Run the command to update the service:
helm upgrade --version=VERSION --atomic --values ./values-catalog.yaml catalog-api 2gis-on-premise/catalog-apiIn the
--versionparameter, set theapi-platformcomponent version:- To update only the service or both service and data, use the new version that you specified in the DGCLI configuration file.
- To update only data, set the currently installed version.
Removing old data sets
If automatic creation of new schemas while importing objects data is enabled (see importer settings of the configuration file), the previous data set is not used after switching to a new set. To save disk space, old data sets should be removed. You can do it automatically as follows:
-
Set the
importer.cleaner.enabledparameter totrue. -
For the
importer.cleaner.versionLimitparameter, specify the number of old data sets to keep. For example,1indicates that not more than 3 schemas (the current, the previous, and the temporary one created during the import) are saved in the base and all the older ones are removed. Note that this limit cannot be less than1- otherwise, it will be impossible to return to the previous version when needed.