Search API | On‑Premise | 2GIS Documentation
On‑Premise

Updating search API services

  1. Fetch new installation artifacts.

    • To update only the service image, add the --only-apps flag after the pull command.
    • To update only data, add the --only-data flag after the pull command.
    • To update both service and data, run the command without flags above.

    To get artifacts for the Search API service only, add --services=search after the pull command. Without this parameter artifacts for all services will be fetched by default.

    See the reference of DGCLI command-line arguments.

  2. Copy the path to a new manifest file from the command output and set it as a value to the dgctlStorage.manifest parameter in the values-search.yaml configuration file. For more information, see the service installation instructions.

    Important

    If during a regular update of the search services you do not want to import new data, specify the manifest used for the previous import. In other cases, using a new manifest is recommended.

  3. Check out breaking changes. If necessary, update other settings in the values-search.yaml configuration file.

  4. Run the command to update the service:

    • To update the service only or both service and data:

      helm upgrade --version=1.32.0 --atomic --values ./values-search.yaml search-api 2gis-on-premise/search-api
      
    • To update data only, set the currently installed On-Premise version to the --version parameter:

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

  1. Fetch new installation artifacts.

    • To update only the service image, add the --only-apps flag after the pull command.
    • To update only data, add the --only-data flag after the pull command.
    • To update both service and data, run the command without flags above.

    To get artifacts for the Catalog APIs service only, add --services=catalog after the pull command. Without this parameter artifacts for all services will be fetched by default.

    See the reference of DGCLI command-line arguments.

  2. Copy the path to a new manifest file from the command output and set it as a value to the dgctlStorage.manifest parameter in the values-catalog.yaml configuration file. For more information, see the service installation instructions.

    Important

    You can configure the process of importing new data for Catalog APIs. Use the importer settings group of the configuration file. If during a regular update of the Catalog APIs service you do not want to import new data, specify the manifest used for the previous import. In other cases, using a new manifest is recommended.

  3. Check out breaking changes. If necessary, update other settings in the values-catalog.yaml configuration file.

  4. Run the command to update the service:

    • To update the service only or both service and data:

      helm upgrade --version=1.32.0 --atomic --values ./values-catalog.yaml catalog-api 2gis-on-premise/catalog-api
      
    • To update data only, set the currently installed On-Premise version to the --version parameter:

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

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:

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

  2. For the importer.cleaner.versionLimit parameter, specify the number of old data sets to keep. For example, 1 indicates 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 than 1 - otherwise, it will be impossible to return to the previous version when needed.