Migrate from Linux install

StackState Self-hosted v5.1.x

Overview

This document describes how to migrate data from the Linux install of StackState to the Kubernetes or OpenShift install.

High level steps

To migrate from the Linux install to the Kubernetes or OpenShift install of StackState, the following high level steps need to be performed:

  1. Install StackState on Kubernetes.

  2. Migrate StackState configuration and topology data (StackGraph) from the Linux install to the Kubernetes or OpenShift install.

  3. Migrate telemetry data (Elasticsearch) from the Linux install to the Kubernetes or OpenShift install.

Incoming data from agents (Kafka) and node synchronisation data (Zookeeper) won't be copied.

After the migration:

  1. Run both instances of StackState side by side for a number of days to ensure that the new instance runs correctly.

  2. Stop the Linux install for StackState.

  3. Remove the Linux install for StackState.

Step 2 - Migrate StackState configuration and topology data (StackGraph)

Prerequisites

Before you start the migration procedure, make sure you have the following information and tools available:

Export StackGraph data

To export the StackGraph data, execute the regular StackState Linux backup procedures as described below.

  1. Ensure that the StackGraph node is up and running.

  2. Login to the StackState node as user root.

  3. Stop the StackState service:

  4. Create a directory to store the exported data:

  5. Export the StackGraph data by creating a backup:

  6. Copy the file /opt/stackstate/migration/sts-export.graph to a safe location.

  7. Start the StackState service:

Import StackGraph data

To import the StackGraph data into the Kubernetes/OpenShift installation, the same MinIO (min.io)arrow-up-right component that is used for the backup/restore functionality will be used.

circle-info

Note that the StackState automatic Kubernetes backup functionality should not be enabled until after the migration procedure has completed.

  1. Enable the MinIO component by adding the following YAML fragment to the values.yaml file that is used to install StackState

    Include the credentials to access the MinIO instance:

    • Replace MINIO_ACCESS_KEY with 5 to 20 alphanumerical characters.

    • Replace MINIO_SECRET_KEY with 8 to 40 alphanumerical characters.

  1. Run the appropriate helm upgrade command for your installation to enable MinIO.

  2. Start a port-forward to the MinIO service in your StackState instance:

  3. In a new terminal window, configure the MinIO client to connect to that MinIO service:

  4. Verify that access has been configured correctly:

    The output should be empty, as we haven't created any buckets yet.

    If the output isn't empty, the automatic backup functionality has been enabled. Disable the automatic backup functionality and configure MinIO as described above (i.e. not as a gateway to AWS S3 or Azure Blob Storage and without any local storage).

  5. Create the bucket that is used to store StackGraph buckets:

    The output should look like this:

  6. Upload the backup file created in the previous step when StackGraph data was exported from the Linux install:

    The output should look like this:

  7. Verify that the backup file was uploaded to the correct location:

    The output should look like this:

    Most importantly, the backup file uploaded in the previous step should be listed here.

  8. Restore the backup:

    The output should look like this:

  9. Remove the YAML snippet added in step 1 and run the appropriate helm upgrade command for your installation to disable MinIO.

Step 3 - Migrate telemetry data (Elasticsearch)

To migrate Elasticsearch data from the Linux install to the Kubernetes or OpenShift install, use the functionality reindex from remote (elastic.co)arrow-up-right.

Notes:

  • To access the Elasticsearch instance that runs as part of the Kubernetes or OpenShift installation for StackState, execute the following command:

    and access it on http://localhost:9200.

  • To modify the elasticsearch.yml configuration file, use the Helm chart value stackstate.elasticsearch.esConfig.

    For example:

See also

Last updated