|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en" xmlns="http://www.w3.org/1999/html"> |
| 3 | +<head> |
| 4 | + <title>Collecting Information About the Current Deployment</title> |
| 5 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 7 | + <link rel="stylesheet" href="/content/mvp.css"/> |
| 8 | + <link rel="icon" href="/content/symbol.svg"/> |
| 9 | +</head> |
| 10 | +<body> |
| 11 | +<header> |
| 12 | + <nav> |
| 13 | + <img alt="Logo" src="/content/linbit_sds.svg" height="70"/> |
| 14 | + <ul> |
| 15 | + <li><a href="/">Operator v2</a></li> |
| 16 | + <li><a href="/migration/">Migration ▾</a> |
| 17 | + <ul> |
| 18 | + <li><a href="1-migrate-db.html">1. Migrate Database</a></li> |
| 19 | + <li>2. Collect Information</li> |
| 20 | + </ul> |
| 21 | + </li> |
| 22 | + <li><a href="/helm.html">Operator v1</a></li> |
| 23 | + </ul> |
| 24 | + </nav> |
| 25 | + |
| 26 | + <h1>Collecting Information About the Current Deployment</h1> |
| 27 | +</header> |
| 28 | +<main> |
| 29 | + <article> |
| 30 | + <p> |
| 31 | + Before you upgrade a LINSTOR Operator v1 deployment to Operator v2, and remove the old v1 deployment, |
| 32 | + collect information on the state of your cluster. You will use this collected information from your |
| 33 | + Operator v1 deployment when you deploy Operator v2. Doing this ensures that the new upgraded deployment will |
| 34 | + have a compatible configuration with your old deployment. |
| 35 | + </p> |
| 36 | + |
| 37 | + <p> |
| 38 | + This is the second step when migrating the LINSTOR Operator from version 1 (v1) to version 2 (v2). |
| 39 | + </p> |
| 40 | + |
| 41 | + <h2>Prerequisites</h2> |
| 42 | + <p> |
| 43 | + To collect information about your current deployment, you will need to install the following tools: |
| 44 | + </p> |
| 45 | + |
| 46 | + <ul> |
| 47 | + <li><a href="https://kubernetes.io/docs/tasks/tools/">kubectl</a> - to read the cluster state</li> |
| 48 | + <li><a href="https://jqlang.github.io/jq/download/">jq</a> - a command-line JSON processor</li> |
| 49 | + </ul> |
| 50 | + |
| 51 | + <h2>Running the Data Collection Script</h2> |
| 52 | + <p> |
| 53 | + To collect the necessary information to migrate resources in your Operator v1 deployment to an upgraded |
| 54 | + Operator v2 deployment, you can run a script provided by LINBIT. |
| 55 | + </p> |
| 56 | + |
| 57 | + <!-- For local development, try running "cat migration/collect.sh | bash -s" --> |
| 58 | + <pre><code class="console">curl --proto '=https' --tlsv1.2 -sSf https://charts.linstor.io/migration/collect.sh | bash -s</code></pre> |
| 59 | + |
| 60 | + <p> |
| 61 | + When you run the script, the script will ask you if you want to keep modifications made with the LINSTOR |
| 62 | + Operator. For each modification, the script will show you the proposed change to the deployed resources and |
| 63 | + ask you for confirmation before making a change. |
| 64 | + </p> |
| 65 | + |
| 66 | + <p> |
| 67 | + The script will also tell you about values in your deployment that cannot automatically be migrated, along |
| 68 | + with recommended actions, in case you need to keep the modification. |
| 69 | + </p> |
| 70 | + |
| 71 | + <p>Example output from the script is as follows:</p> |
| 72 | + <pre><code>Using kubectl context: kubernetes-admin@kubernetes |
| 73 | +Found LinstorControllers: ["linstor-op-cs"] |
| 74 | +Found LinstorSatelliteSets: ["linstor-op-ns"] |
| 75 | +Found LinstorCSIDrivers: ["linstor-op"] |
| 76 | +Found LINSTOR Controller passphrase secret |
| 77 | +--- Default resource |
| 78 | ++++ Updated resource |
| 79 | +@@ -3,4 +3,5 @@ kind: LinstorCluster |
| 80 | + metadata: |
| 81 | + name: linstorcluster |
| 82 | + spec: |
| 83 | ++ linstorPassphraseSecret: linstor-op-passphrase |
| 84 | + patches: [] |
| 85 | +Apply the patch (Y/n)? y |
| 86 | +[...] |
| 87 | +------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 88 | +| The following non-default values have not been converted: | |
| 89 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 90 | +| Resource | Key | Recommended Action | Value | |
| 91 | +|---------------------|--------------------------------|-----------------------------------------------------|----------------------------------------------------| |
| 92 | +------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 93 | + |
| 94 | +--------------------------------------------------------------------------------------------- |
| 95 | +| After upgrading, apply the following resources. They have been saved to v2-resources.yaml | |
| 96 | +--------------------------------------------------------------------------------------------- |
| 97 | +[...]</code></pre> |
| 98 | + |
| 99 | + <p> |
| 100 | + A copy of the identified resources in your current deployment is saved in a file named <code>v2-resources.yaml</code>. |
| 101 | + </p> |
| 102 | + |
| 103 | + <h2>Collecting Helm-Generated Secrets</h2> |
| 104 | + <p> |
| 105 | + Helm automatically generates a passphrase for LINSTOR. Once LINSTOR is initialized with the passphrase, the |
| 106 | + LINSTOR Controller will not be able fully start without supplying the passphrase. |
| 107 | + </p> |
| 108 | + |
| 109 | + <p> |
| 110 | + To migrate the generated passphrase to LINSTOR Operator v2, create a backup of the secret by entering the |
| 111 | + following command: |
| 112 | + </p> |
| 113 | + <pre><code># kubectl get secrets linstor-op-passphrase -ogo-template='{{.data.MASTER_PASSPHRASE}}{{"\n"}}'</code></pre> |
| 114 | +<p>Output from the command will show a generated passphrase. Save the passphrase for later use.</p> |
| 115 | + </article> |
| 116 | +</main> |
| 117 | +</body> |
| 118 | +</html> |
0 commit comments