Skip to content

Commit dcb118e

Browse files
authored
Merge pull request #4 from emteelb/mat/add-migration-instructions-step-4
add step 4 migration instructs Op v1 -> Op v2
2 parents fac579f + bcb6f3b commit dcb118e

File tree

4 files changed

+154
-2
lines changed

4 files changed

+154
-2
lines changed

migration/1-migrate-db.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<li>1. Migrate Database</li>
1919
<li><a href="2-collect-information.html">2. Collect Information</a></li>
2020
<li><a href="3-remove-operator-v1.html">3. Remove Operator v1</a></li>
21+
<li><a href="4-install-operator-v2.html">4. Install Operator v2</a></li>
2122
</ul>
2223
</li>
2324
<li><a href="/helm.html">Operator v1</a></li>

migration/2-collect-information.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<li><a href="1-migrate-db.html">1. Migrate Database</a></li>
1919
<li>2. Collect Information</li>
2020
<li><a href="3-remove-operator-v1.html">3. Remove Operator v1</a></li>
21+
<li><a href="4-install-operator-v2.html">4. Install Operator v2</a></li>
2122
</ul>
2223
</li>
2324
<li><a href="/helm.html">Operator v1</a></li>
@@ -49,7 +50,7 @@ <h2>Prerequisites</h2>
4950
<li><a href="https://jqlang.github.io/jq/download/">jq</a> - a command-line JSON processor</li>
5051
</ul>
5152

52-
<h2>Running the Data Collection Script</h2>
53+
<h2 id="running-the-data-collection-script">Running the Data Collection Script</h2>
5354
<p>
5455
To collect the necessary information to migrate resources in your Operator v1 deployment to an upgraded
5556
Operator v2 deployment, you can run a script provided by LINBIT.
@@ -101,7 +102,7 @@ <h2>Running the Data Collection Script</h2>
101102
A copy of the identified resources in your current deployment is saved in a file named <code>v2-resources.yaml</code>.
102103
</p>
103104

104-
<h2>Collecting Helm-Generated Secrets</h2>
105+
<h2 id="collecting-helm-generated-secrets">Collecting Helm-Generated Secrets</h2>
105106
<p>
106107
Helm automatically generates a passphrase for LINSTOR. Once LINSTOR is initialized with the passphrase, the
107108
LINSTOR Controller will not be able fully start without supplying the passphrase.

migration/3-remove-operator-v1.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<li><a href="1-migrate-db.html">1. Migrate Database</a></li>
1919
<li><a href="2-collect-information.html">2. Collect Information</a></li>
2020
<li>3. Remove Operator v1</li>
21+
<li><a href="4-install-operator-v2.html">4. Install Operator v2</a></li>
2122
</ul>
2223
</li>
2324
<li><a href="/helm.html">Operator v1</a></li>

migration/4-install-operator-v2.html

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
<!DOCTYPE html>
2+
<html lang="en" xmlns="http://www.w3.org/1999/html">
3+
<head>
4+
<title>Removing the LINSTOR Operator v1 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><a href="2-collect-information.html">2. Collect Information</a></li>
20+
<li><a href="3-remove-operator-v1.html">3. Remove Operator v1</a></li>
21+
<li>4. Install Operator v2</li>
22+
</ul>
23+
</li>
24+
<li><a href="/helm.html">Operator v1</a></li>
25+
</ul>
26+
</nav>
27+
28+
<h1 id="installing-linstor-operator-v2">Installing LINSTOR Operator v2</h1>
29+
</header>
30+
<main>
31+
<article>
32+
<p>
33+
After <a href="./3-remove-operator-v1.html">removing the LINSTOR Operator v1 deployment</a>, you can install
34+
LINSTOR Operator v2.
35+
</p>
36+
37+
<p>
38+
You can deploy the LINSTOR Operator v2 by using either the
39+
<a href="https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization">Kustomize</a> tool,
40+
integrated with <code>kubectl</code>, or else by using Helm and a LINBIT Helm chart.
41+
</p>
42+
43+
<p>This is the last step when migrating the LINSTOR Operator from version 1 (v1) to version 2 (v2).</p>
44+
45+
<h2 id="prerequisites">Prerequisites</h2>
46+
<p>
47+
To install the LINSTOR Operator v2 into your current deployment, you will need to install the following
48+
tools:
49+
</p>
50+
51+
<ul>
52+
<li><a href="https://kubernetes.io/docs/tasks/tools/">kubectl</a></li>
53+
<li><a href="https://docs.helm.sh/docs/intro/install/">Helm</a></li>
54+
</ul>
55+
56+
<h2 id="deploying-linstor-operator-v2-by-using-kustomize">Deploying LINSTOR Operator v2 by Using Kustomize</h2>
57+
<p>
58+
You can use <code>kubectl</code> and the built-in <code>kustomize</code> feature to deploy LINSTOR Operator
59+
v2.</p>
60+
61+
<p>
62+
For instructions on how to do this, refer to the documentation in the
63+
<em><a href="https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#s-kubernetes-creating-operator-v2-kustomize">LINSTOR User’s Guide</a></em>.
64+
Follow the user’s guide instructions for deploying the Operator v2, After deploying the Operator, return to
65+
this page (Step 4) and continue to the “Deploying the LINBIT SDS Cluster” instructions below.
66+
</p>
67+
68+
<h2 id="deploying-linstor-operator-v2-by-using-helm">Deploying LINSTOR Operator v2 by Using Helm</h2>
69+
<p>You can also use Helm to deploy LINSTOR Operator v2.</p>
70+
71+
<p>
72+
Instructions on how to do this are also in the
73+
<em><a href="https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#s-kubernetes-creating-operator-helm">LINSTOR User’s Guide</a></em>.
74+
Follow the user’s guide instructions for deploying the Operator v2, After deploying the Operator, return to
75+
this page (Step 4) and continue to the “Deploying the LINBIT SDS Cluster” instructions below.
76+
</p>
77+
78+
<h2 id="deploying-the-linbit-sds-cluster">Deploying the LINBIT SDS Cluster</h2>
79+
<p>
80+
LINBIT SDS is the term that describes a LINSTOR and DRBD deployment. The LINSTOR
81+
Operator is a part of a LINBIT SDS deployment in Kubernetes. After deploying the
82+
LINSTOR Operator v2, you can fully deploy LINBIT SDS in your Kubernetes cluster by using the resources that
83+
you generated in <a href="./2-collect-information.html#running-the-data-collection-script">Step 2</a>.
84+
</p>
85+
86+
<h3 id="creating-a-secret">Creating a Secret</h3>
87+
<p>
88+
When installing the LINSTOR Operator v1 by using Helm, Helm automatically generates a passphrase for LINSTOR.
89+
After Helm initializes LINSTOR with the passphrase, the LINSTOR controller will not be able to fully start
90+
without supplying the passphrase. In <a href="./2-collect-information.html#collecting-helm-generated-secrets">Step 2</a> of the migration
91+
instructions, you collected the passphrase from your existing Operator v1 deployment. You will use that
92+
passphrase to create a secret that you can use to migrate your resources into the Operator v2 deployment.
93+
</p>
94+
<p>To create the secret, enter the following commands:</p>
95+
<pre><code><span class="console">PASSPHRASE=&lt;passphrase-collected-from-kubectl-get-secrets-command-in-step-2&gt;</span>
96+
<span class="console">cat &lt;&lt; EOF | kubectl apply -f - --server-side</span>
97+
apiVersion: v1
98+
kind: Secret
99+
metadata:
100+
name: linstor-op-passphrase
101+
namespace: linbit-sds # Change the namespace here
102+
data:
103+
MASTER_PASSPHRASE: $PASSPHRASE
104+
EOF
105+
<span class="console">unset PASSPHRASE</span></code></pre>
106+
107+
<p>Output from a successful <code>kubectl apply</code> command will show that the secret was applied.</p>
108+
<pre><code>secret/linstor-op-passphrase serverside-applied</code></pre>
109+
110+
<h3 id="applying-resources">Applying Resources</h3>
111+
<p>
112+
Next, apply the resources that you collected in a <code>v2-resources.yaml</code> file by running the
113+
collection script in the <a href="./2-collect-information.html#running-the-data-collection-script">Step 2</a>
114+
instructions.
115+
</p>
116+
117+
<pre><code class="console">kubectl apply -f v2-resources.yaml --server-side</code></pre>
118+
119+
<p>Output from a successful command will show that your resources were created.</p>
120+
121+
<pre><code>linstorcluster.piraeus.io/linstorcluster serverside-applied
122+
linstorsatelliteconfiguration.piraeus.io/host-networking serverside-applied
123+
linstorsatelliteconfiguration.piraeus.io/linstor-op-ns serverside-applied</code></pre>
124+
125+
<p>Now the cluster will come up, using the existing data to restore the cluster state.</p>
126+
127+
<h2 id="verifying-cluster-state">Verifying Cluster State</h2>
128+
<p>
129+
Before verifying your cluster state, you can change your <code>kubectl</code> command context to the
130+
<code>linbit-sds</code> namespace, by entering the following command:
131+
</p>
132+
133+
<pre><code class="console">kubectl config set-context --current --namespace=linbit-sds</code></pre>
134+
135+
<p>Next, you can check the cluster state by using various <code>linstor</code> command line client commands:</p>
136+
<pre><code><span class="console">kubectl exec deploy/linstor-controller -- linstor node list</span>
137+
<span class="console">kubectl exec deploy/linstor-controller -- linstor storage-pool list</span>
138+
<span class="console">kubectl exec deploy/linstor-controller -- linstor resource list-volumes</span>
139+
<span class="console">kubectl exec deploy/linstor-controller -- linstor error-reports list</span></code></pre>
140+
141+
<p>
142+
You can also
143+
<a href="https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#s-kubernetes-basic-configuration-and-deployment">provision new volumes</a>,
144+
to verify that the cluster is operational.
145+
</p>
146+
</article>
147+
</main>
148+
</body>
149+
</html>

0 commit comments

Comments
 (0)