-
Notifications
You must be signed in to change notification settings - Fork 0
/
migration.html
396 lines (369 loc) · 21.1 KB
/
migration.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Migrating Applications — K10 0.5-beta documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.5-beta',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Kanister: Application-Level Data Management" href="kanister.html" />
<link rel="prev" title="Restoring Applications" href="restore.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="migrating-applications">
<span id="migration"></span><h1>Migrating Applications<a class="headerlink" href="#migrating-applications" title="Permalink to this headline">¶</a></h1>
<div class="contents local topic" id="migration-overview">
<p class="topic-title first">Migration Overview</p>
<ul class="simple">
<li><a class="reference internal" href="#introduction" id="id1">Introduction</a></li>
<li><a class="reference internal" href="#migration-configuration" id="id2">Migration Configuration</a><ul>
<li><a class="reference internal" href="#object-storage-configuration" id="id3">Object Storage Configuration</a></li>
<li><a class="reference internal" href="#cross-account-configuration" id="id4">Cross-Account Configuration</a><ul>
<li><a class="reference internal" href="#aws" id="id5">AWS</a></li>
<li><a class="reference internal" href="#google-cloud" id="id6">Google Cloud</a></li>
</ul>
</li>
<li><a class="reference internal" href="#kanister-configuration" id="id7">Kanister Configuration</a></li>
</ul>
</li>
<li><a class="reference internal" href="#import-export-profiles" id="id8">Import/Export Profiles</a><ul>
<li><a class="reference internal" href="#export-profile" id="id9">Export Profile</a></li>
<li><a class="reference internal" href="#import-profile" id="id10">Import Profile</a></li>
</ul>
</li>
<li><a class="reference internal" href="#exporting-applications" id="id11">Exporting Applications</a></li>
<li><a class="reference internal" href="#importing-applications" id="id12">Importing Applications</a></li>
</ul>
</div>
<div class="section" id="introduction">
<h2><a class="toc-backref" href="#id1">Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
<p>The ability to move an application across clusters is an extremely
powerful feature that enables a variety of use cases including
Disaster Recovery (DR), Test/Dev with realistic data sets, and
performance testing in isolated environments.</p>
<p>In particular, the K10 platform is being built to support
application migration in a variety of different and overlapping
contexts:</p>
<ul class="simple">
<li><strong>Cross-Namespace</strong>: The entire application stack can be migrated
across different namespaces in the same cluster (covered in
<a class="reference internal" href="restore.html"><span class="doc">restoring applications</span></a>).</li>
<li><strong>Cross-Cluster</strong>: The application stack is migrated across
non-federated Kubernetes clusters.</li>
<li><strong>Cross-Account</strong>: Migration can additionally be enabled across
clusters running in different accounts (e.g., AWS accounts) or
projects (e.g., Google Cloud projects).</li>
<li><strong>Cross-Region</strong>: Migration can further be enabled across different
regions of the same cloud provider (e.g., US-East to US-West).</li>
<li><strong>Cross-Cloud</strong>: Finally, migration can be enabled across different
cloud providers (e.g., AWS to Azure).</li>
</ul>
</div>
<div class="section" id="migration-configuration">
<h2><a class="toc-backref" href="#id2">Migration Configuration</a><a class="headerlink" href="#migration-configuration" title="Permalink to this headline">¶</a></h2>
<p>Some additional infrastructure configuration is needed before
migration between two clusters can be enabled.</p>
<ul class="simple">
<li><strong>Required</strong>: Object storage configuration</li>
<li><strong>Use-Case Specific</strong>: Cross-account and Kanister configuration</li>
</ul>
<div class="section" id="object-storage-configuration">
<h3><a class="toc-backref" href="#id3">Object Storage Configuration</a><a class="headerlink" href="#object-storage-configuration" title="Permalink to this headline">¶</a></h3>
<p>For two non-federated clusters to share data, we need to create an
object storage bucket (e.g., <code class="docutils literal"><span class="pre">k10-migrate</span></code>) that is owned and
writable by the role or account the source K10 deployment is running
as. The bucket also needs to be readable by the role or account of the
destination deployment. This bucket is used to store metadata about
the application restore points that have been selected for migration
between clusters.</p>
<p>Further, if the source and destination clusters are in different
regions of the cloud provider, it is <strong>essential</strong> that this shared
object storage bucket is created in the same region as the destination
cluster as we use that to determine where artifacts (e.g., snapshot
copies) should be copied.</p>
</div>
<div class="section" id="cross-account-configuration">
<h3><a class="toc-backref" href="#id4">Cross-Account Configuration</a><a class="headerlink" href="#cross-account-configuration" title="Permalink to this headline">¶</a></h3>
<p>The following configuration is <strong>only</strong> required if cross-account
migration is needed.</p>
<div class="section" id="aws">
<h4><a class="toc-backref" href="#id5">AWS</a><a class="headerlink" href="#aws" title="Permalink to this headline">¶</a></h4>
<p>If cross-account volume migration is desired, K10 needs an IAM user
created within the destination account (e.g., <code class="docutils literal"><span class="pre">k10migrate</span></code>). The
<a class="reference external" href="http://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html">AWS account ID</a>
is also needed. During the creation of the migration profile, the
username should be specified as <code class="docutils literal"><span class="pre"><AWS</span> <span class="pre">Account</span> <span class="pre">ID>/<User</span> <span class="pre">Name></span></code></p>
<p>In an AWS environment, K10 grants access to snapshots stored in the
source account to the destination account. If the destination cluster
is in a different region, K10 will make a cross-region copy of the
underlying EBS snapshots before sharing access.</p>
</div>
<div class="section" id="google-cloud">
<h4><a class="toc-backref" href="#id6">Google Cloud</a><a class="headerlink" href="#google-cloud" title="Permalink to this headline">¶</a></h4>
<p>Currently, due to underlying provider limitations, migration is only
supported among different clusters in the same project and therefore
no additional configuration is required.</p>
</div>
</div>
<div class="section" id="kanister-configuration">
<h3><a class="toc-backref" href="#id7">Kanister Configuration</a><a class="headerlink" href="#kanister-configuration" title="Permalink to this headline">¶</a></h3>
<p>The <a class="reference internal" href="kanister.html"><span class="doc">Kanister framework</span></a>, described later, stores
application-level artifacts in an object store. If Kanister artifacts
are migrated across clusters, the destination cluster currently needs
read access to the all object storage buckets that are being used to
store artifacts.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The above requirement for the Kanister object storage bucket
to be shared will go away in an upcoming release in favor of only
using the object storage bucket configured above for migration.</p>
</div>
</div>
</div>
<div class="section" id="import-export-profiles">
<h2><a class="toc-backref" href="#id8">Import/Export Profiles</a><a class="headerlink" href="#import-export-profiles" title="Permalink to this headline">¶</a></h2>
<p>To enable the export and import of applications, you are required to
create a profile on each side of the transfer. Profile creation can be
accessed from the <code class="docutils literal"><span class="pre">Config</span> <span class="pre">Profiles</span></code> icon in the top-right corner of
the dashboard.</p>
<div class="section" id="export-profile">
<h3><a class="toc-backref" href="#id9">Export Profile</a><a class="headerlink" href="#export-profile" title="Permalink to this headline">¶</a></h3>
<p>To move data to another cluster, simply click <code class="docutils literal"><span class="pre">Create</span> <span class="pre">New</span> <span class="pre">Profile</span></code>
on the profiles page and select <code class="docutils literal"><span class="pre">Export</span></code>. We recommend using the
target cluster name as the profile name to make it easier to access
later.</p>
<p>As mentioned earlier, exporting data requires an object storage
location. You are therefore required to pick an object storage
provider, a region for the bucket, and the bucket name. If a bucket
with the specific name does not exist, it will be created in the
specified region.</p>
<blockquote>
<div><a class=""
data-lightbox="group-5d070237-1d12-4ee3-bfcd-c3c5cdf1da05"
href="_images/config_profile_export.png"
title=""
data-title=""
><img src="_images/config_profile_export.png"
class=""
width="100%"
height="auto"
alt=""/>
</a></div></blockquote>
<p>When you hit create, the config profile will be created and you will
see a profile similar to the following:</p>
<blockquote>
<div><a class=""
data-lightbox="group-8abcd99c-1247-4ee0-be3b-d808df19876e"
href="_images/config_profile_example.png"
title=""
data-title=""
><img src="_images/config_profile_example.png"
class=""
width="100%"
height="auto"
alt=""/>
</a></div></blockquote>
</div>
<div class="section" id="import-profile">
<h3><a class="toc-backref" href="#id10">Import Profile</a><a class="headerlink" href="#import-profile" title="Permalink to this headline">¶</a></h3>
<p>To import data into a cluster, we also need to create a import
profile. Currently, this is just used to guide policy creation and
requires no parameters but we do recommend using the source cluster
name as the profile name.</p>
<blockquote>
<div><a class=""
data-lightbox="group-6bcb4c1b-43b4-486c-a074-d6372fa53db0"
href="_images/config_profile_import.png"
title=""
data-title=""
><img src="_images/config_profile_import.png"
class=""
width="100%"
height="auto"
alt=""/>
</a></div></blockquote>
</div>
</div>
<div class="section" id="exporting-applications">
<h2><a class="toc-backref" href="#id11">Exporting Applications</a><a class="headerlink" href="#exporting-applications" title="Permalink to this headline">¶</a></h2>
<p>The workflow for exporting applications into another cluster is very
similar to the workflow followed for <a class="reference internal" href="restore.html"><span class="doc">restoring applications</span></a>. You simply go over to the Namespaces page, click on the
dropdown, and select <code class="docutils literal"><span class="pre">Export</span> <span class="pre">Namespace</span></code>.</p>
<blockquote>
<div><a class=""
data-lightbox="group-98901d23-ca24-4845-a560-8d3b42ed7e1d"
href="_images/namespaces_manual.png"
title=""
data-title=""
><img src="_images/namespaces_manual.png"
class=""
width="100%"
height="auto"
alt=""/>
</a></div></blockquote>
<p>After a restore point is selected, you will be presented with
information about the application snapshot being migrated (e.g., time,
originating policy, artifacts) and, more importantly, the option to
configure the destination by selecting a migration profile.</p>
<blockquote>
<div><a class=""
data-lightbox="group-b7c5d32f-6687-4beb-b5f0-e984c59fa462"
href="_images/migration_export.png"
title=""
data-title=""
><img src="_images/migration_export.png"
class=""
width="100%"
height="auto"
alt=""/>
</a></div></blockquote>
<p>A migration profile, as defined above, specifies where the exported
data and metadata will be stored. This profile contains the name of
the cluster that we are migrating data to and the location of an
object storage bucket (e.g., using AWS S3, Google Cloud Storage, or
any other S3-compliant object store) to export the needed data.</p>
<p>Simply select any of the migration profiles you might have previously
created and then click on <code class="docutils literal"><span class="pre">Export</span></code>. After confirming the export, you
will be presented with a confirmation dialog. It is <strong>essential</strong> that
you copy the text block presented here because it will be required to
securely create an import policy on the destination cluster.</p>
<blockquote>
<div><a class=""
data-lightbox="group-a7a0f41e-114b-400b-872c-11f5e2151db6"
href="_images/migration_textblock.png"
title=""
data-title=""
><img src="_images/migration_textblock.png"
class=""
width="100%"
height="auto"
alt=""/>
</a></div></blockquote>
</div>
<div class="section" id="importing-applications">
<h2><a class="toc-backref" href="#id12">Importing Applications</a><a class="headerlink" href="#importing-applications" title="Permalink to this headline">¶</a></h2>
<p>Importing an application snapshot is again very similar to the policy
workflow for <a class="reference internal" href="protect.html"><span class="doc">protecting applications</span></a>. From the
<code class="docutils literal"><span class="pre">Policies</span></code> page, simply select <code class="docutils literal"><span class="pre">Create</span> <span class="pre">a</span> <span class="pre">New</span> <span class="pre">Policy</span></code>.</p>
<blockquote>
<div><a class=""
data-lightbox="group-7d4c3d47-05a3-4638-9f41-8203e674d890"
href="_images/migration_import_policy.png"
title=""
data-title=""
><img src="_images/migration_import_policy.png"
class=""
width="100%"
height="auto"
alt=""/>
</a></div></blockquote>
<p>To import applications, you need to select <code class="docutils literal"><span class="pre">Import</span> <span class="pre">App</span> <span class="pre">Data</span></code> for the
action. While you need to also specify a frequency for the import,
this simply controls how often to check the shared object storage
location. If data within the object store is not refreshed at the same
frequency, no duplicated work will be performed.</p>
<p>You will also need to paste the text block presented by the
destination cluster during export to allow us to create the data
export/import relationship for this application across these
clusters. Finally, similar to the export workflow, the permissions
profile also need to be selected but, as mentioned earlier, the
destination cluster only needs read and list permissions on all the
data in the shared object store.</p>
<p>After the <code class="docutils literal"><span class="pre">Create</span> <span class="pre">Policy</span></code> button is clicked, the system will start
scheduling jobs based on the policy definition. If new data is
detected, it will be imported into the cluster, automatically
associated with the application stack already running, and be made
available as a restore point. The normal workflow for <a class="reference internal" href="restore.html"><span class="doc">restoring
applications</span></a> can be followed and, when given the choice,
simply select a restore point that is tagged with the policy name used
above to create the import policy.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo">
<a href="index.html">
<img class="logo" src="_static/kasten.png" alt="Logo"/>
</a>
</p>
<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Documentation Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quick Start</a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">K10: Install</a></li>
<li class="toctree-l1"><a class="reference internal" href="overview.html">Dashboard Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="protect.html">Protecting Applications</a></li>
<li class="toctree-l1"><a class="reference internal" href="restore.html">Restoring Applications</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Migrating Applications</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#introduction">Introduction</a></li>
<li class="toctree-l2"><a class="reference internal" href="#migration-configuration">Migration Configuration</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#object-storage-configuration">Object Storage Configuration</a></li>
<li class="toctree-l3"><a class="reference internal" href="#cross-account-configuration">Cross-Account Configuration</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#aws">AWS</a></li>
<li class="toctree-l4"><a class="reference internal" href="#google-cloud">Google Cloud</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#kanister-configuration">Kanister Configuration</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#import-export-profiles">Import/Export Profiles</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#export-profile">Export Profile</a></li>
<li class="toctree-l3"><a class="reference internal" href="#import-profile">Import Profile</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#exporting-applications">Exporting Applications</a></li>
<li class="toctree-l2"><a class="reference internal" href="#importing-applications">Importing Applications</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="kanister.html">Kanister: Application-Level Data Management</a></li>
<li class="toctree-l1"><a class="reference internal" href="restrictions.html">Restrictions</a></li>
<li class="toctree-l1"><a class="reference internal" href="testdrive.html">Test Drive</a></li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2017, Kasten, Inc.
</div>
</body>
</html>