Skip to content

Commit 5c8bb4d

Browse files
authored
Merge pull request #2 from emteelb/mat/add-step-2-collect-migration-info
add collecting info instructs for v1 -> v2 upgrading
2 parents a684b4a + 5c2fafb commit 5c8bb4d

File tree

4 files changed

+718
-2
lines changed

4 files changed

+718
-2
lines changed

content/mvp.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,14 @@ p {
251251
pre {
252252
margin: 1rem 0;
253253
max-width: var(--width-card-wide);
254-
padding: 1rem 0;
255254
}
256255

257256
pre code,
258257
pre samp {
259258
display: block;
260259
max-width: var(--width-card-wide);
261260
padding: 0.5rem 2rem;
262-
white-space: pre-wrap;
261+
overflow-x: scroll;
263262
}
264263

265264
small {

migration/1-migrate-db.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<li><a href="/migration/">Migration ▾</a>
1717
<ul>
1818
<li>1. Migrate Database</li>
19+
<li><a href="2-collect-information.html">2. Collect Information</a></li>
1920
</ul>
2021
</li>
2122
<li><a href="/helm.html">Operator v1</a></li>

migration/2-collect-information.html

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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: [&quot;linstor-op-cs&quot;]
74+
Found LinstorSatelliteSets: [&quot;linstor-op-ns&quot;]
75+
Found LinstorCSIDrivers: [&quot;linstor-op&quot;]
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=&#39;{{.data.MASTER_PASSPHRASE}}{{&quot;\n&quot;}}&#39;</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

Comments
 (0)