Skip to content

Commit 7707b9c

Browse files
Phase navigation for Migration Assistant (#10805) (#10854)
1 parent 2084164 commit 7707b9c

20 files changed

+291
-235
lines changed

_data/migration-scenarios.yml

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,108 +2,108 @@ scenarios:
22
- title: "Scenario 1: Backfill only"
33
steps:
44
- title: "Assessment"
5-
url: "/migration-assistant/migration-phases/assessment/"
5+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/assessment/"
66
- title: "Deploy"
7-
url: "/migration-assistant/migration-phases/deploy/"
7+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/"
88
substeps:
9-
- title: "Verify backfill components"
10-
url: "/migration-assistant/migration-phases/deploy/verifying-backfill-components/"
11-
- title: "Configuration options"
12-
url: "/migration-assistant/migration-phases/deploy/configuration-options/"
139
- title: "IAM and security groups for existing clusters"
14-
url: "/migration-assistant/migration-phases/deploy/iam-and-security-groups-for-existing-clusters/"
10+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/iam-and-security-groups-for-existing-clusters/"
11+
- title: "Configuration options"
12+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/configuration-options/"
13+
- title: "Verify backfill components"
14+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/verifying-backfill-components/"
1515
- title: "Create a snapshot"
16-
url: "/migration-assistant/migration-phases/create-snapshot/"
16+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/create-snapshot/"
1717
- title: "Migrate metadata"
18-
url: "/migration-assistant/migration-phases/migrate-metadata/"
18+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/"
1919
substeps:
2020
- title: "Managing type mapping deprecation"
21-
url: "/migration-assistant/migration-phases/migrate-metadata/handling-type-mapping-deprecation/"
21+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/handling-type-mapping-deprecation/"
2222
- title: "Handling breaking changes in field types"
23-
url: "/migration-assistant/migration-phases/migrate-metadata/handling-field-type-breaking-changes/"
23+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/handling-field-type-breaking-changes/"
2424
- title: "Transform flattened to flat_object"
25-
url: "/migration-assistant/migration-phases/migrate-metadata/transform-flattened-flat-object/"
25+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/transform-flattened-flat-object/"
2626
- title: "Transform string to text/keyword"
27-
url: "/migration-assistant/migration-phases/migrate-metadata/transform-string-text-keyword/"
27+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/transform-string-text-keyword/"
2828
- title: "Transform dense_vector to knn_vector"
29-
url: "/migration-assistant/migration-phases/migrate-metadata/transform-dense-vector-knn-vector/"
29+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/transform-dense-vector-knn-vector/"
3030
- title: "Backfill"
31-
url: "/migration-assistant/migration-phases/backfill/"
31+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/backfill/"
3232
- title: "Teardown"
33-
url: "/migration-assistant/migration-phases/remove-migration-infrastructure/"
33+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/remove-migration-infrastructure/"
3434

3535
- title: "Scenario 2: Live capture only"
3636
steps:
3737
- title: "Assessment"
38-
url: "/migration-assistant/migration-phases/assessment/"
38+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/assessment/"
3939
- title: "Deploy"
40-
url: "/migration-assistant/migration-phases/deploy/"
40+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/"
4141
substeps:
4242
- title: "IAM and security groups for existing clusters"
43-
url: "/migration-assistant/migration-phases/deploy/iam-and-security-groups-for-existing-clusters/"
43+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/iam-and-security-groups-for-existing-clusters/"
4444
- title: "Configuration options"
45-
url: "/migration-assistant/migration-phases/deploy/configuration-options/"
45+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/configuration-options/"
4646
- title: "Verify live capture components"
47-
url: "/migration-assistant/migration-phases/deploy/verifying-live-capture-components/"
47+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/verifying-live-capture-components/"
4848
- title: "Reroute traffic from the source to the Capture Proxy"
49-
url: "/migration-assistant/migration-phases/reroute-source-to-proxy/"
49+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/reroute-source-to-proxy/"
5050
- title: "Migrate metadata"
51-
url: "/migration-assistant/migration-phases/migrate-metadata/"
51+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/"
5252
substeps:
5353
- title: "Managing type mapping deprecation"
54-
url: "/migration-assistant/migration-phases/migrate-metadata/handling-type-mapping-deprecation/"
54+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/handling-type-mapping-deprecation/"
5555
- title: "Handling breaking changes in field types"
56-
url: "/migration-assistant/migration-phases/migrate-metadata/handling-field-type-breaking-changes/"
56+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/handling-field-type-breaking-changes/"
5757
- title: "Transform flattened to flat_object"
58-
url: "/migration-assistant/migration-phases/migrate-metadata/transform-flattened-flat-object/"
58+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/transform-flattened-flat-object/"
5959
- title: "Transform string to text/keyword"
60-
url: "/migration-assistant/migration-phases/migrate-metadata/transform-string-text-keyword/"
60+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/transform-string-text-keyword/"
6161
- title: "Transform dense_vector to knn_vector"
62-
url: "/migration-assistant/migration-phases/migrate-metadata/transform-dense-vector-knn-vector/"
62+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/transform-dense-vector-knn-vector/"
6363
- title: "Replay captured traffic"
64-
url: "/migration-assistant/migration-phases/replay-captured-traffic/"
64+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/replay-captured-traffic/"
6565
- title: "Reroute traffic from the Capture Proxy to the target"
66-
url: "/migration-assistant/migration-phases/reroute-traffic-from-capture-proxy-to-target/"
66+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/reroute-traffic-from-capture-proxy-to-target/"
6767
- title: "Teardown"
68-
url: "/migration-assistant/migration-phases/remove-migration-infrastructure/"
68+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/remove-migration-infrastructure/"
6969

7070
- title: "Scenario 3: Live capture with backfill"
7171
steps:
7272
- title: "Assessment"
73-
url: "/migration-assistant/migration-phases/assessment/"
73+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/assessment/"
7474
- title: "Deploy"
75-
url: "/migration-assistant/migration-phases/deploy/"
75+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/"
7676
substeps:
7777
- title: "IAM and security groups for existing clusters"
78-
url: "/migration-assistant/migration-phases/deploy/iam-and-security-groups-for-existing-clusters/"
78+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/iam-and-security-groups-for-existing-clusters/"
7979
- title: "Configuration options"
80-
url: "/migration-assistant/migration-phases/deploy/configuration-options/"
80+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/configuration-options/"
8181
- title: "Verify backfill components"
82-
url: "/migration-assistant/migration-phases/deploy/verifying-backfill-components/"
82+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/verifying-backfill-components/"
8383
- title: "Verify live capture components"
84-
url: "/migration-assistant/migration-phases/deploy/verifying-live-capture-components/"
84+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/deploy/verifying-live-capture-components/"
8585
- title: "Reroute traffic from the source to the Capture Proxy"
86-
url: "/migration-assistant/migration-phases/reroute-source-to-proxy/"
86+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/reroute-source-to-proxy/"
8787
- title: "Create a snapshot"
88-
url: "/migration-assistant/migration-phases/create-snapshot/"
88+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/create-snapshot/"
8989
- title: "Migrate metadata"
90-
url: "/migration-assistant/migration-phases/migrate-metadata/"
90+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/"
9191
substeps:
9292
- title: "Managing type mapping deprecation"
93-
url: "/migration-assistant/migration-phases/migrate-metadata/handling-type-mapping-deprecation/"
93+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/handling-type-mapping-deprecation/"
9494
- title: "Handling breaking changes in field types"
95-
url: "/migration-assistant/migration-phases/migrate-metadata/handling-field-type-breaking-changes/"
95+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/handling-field-type-breaking-changes/"
9696
- title: "Transform flattened to flat_object"
97-
url: "/migration-assistant/migration-phases/migrate-metadata/transform-flattened-flat-object/"
97+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/transform-flattened-flat-object/"
9898
- title: "Transform string to text/keyword"
99-
url: "/migration-assistant/migration-phases/migrate-metadata/transform-string-text-keyword/"
99+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/transform-string-text-keyword/"
100100
- title: "Transform dense_vector to knn_vector"
101-
url: "/migration-assistant/migration-phases/migrate-metadata/transform-dense-vector-knn-vector/"
101+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/migrate-metadata/transform-dense-vector-knn-vector/"
102102
- title: "Backfill"
103-
url: "/migration-assistant/migration-phases/backfill/"
103+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/backfill/"
104104
- title: "Replay captured traffic"
105-
url: "/migration-assistant/migration-phases/replay-captured-traffic/"
105+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/replay-captured-traffic/"
106106
- title: "Reroute traffic from the Capture Proxy to the target"
107-
url: "/migration-assistant/migration-phases/reroute-traffic-from-capture-proxy-to-target/"
107+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/reroute-traffic-from-capture-proxy-to-target/"
108108
- title: "Teardown"
109-
url: "/migration-assistant/migration-phases/remove-migration-infrastructure/"
109+
url: "{{site.url}}{{site.baseurl}}/migration-assistant/migration-phases/remove-migration-infrastructure/"
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
{%- comment -%}
2+
This include generates Previous Phase and Next Phase sections for migration phase pages.
3+
It uses the migration scenarios data to determine the flow and relationships.
4+
{%- endcomment -%}
5+
6+
{%- assign current_page_url = page.url | remove: '/index' -%}
7+
{%- assign scenarios = site.data.migration-scenarios.scenarios -%}
8+
9+
{%- comment -%}Find previous phases for each scenario{%- endcomment -%}
10+
{%- assign prev_phase_info = '' | split: '' -%}
11+
12+
{%- for scenario in scenarios -%}
13+
{%- assign found_current = false -%}
14+
{%- assign step_number = 0 -%}
15+
{%- assign prev_step = null -%}
16+
{%- assign prev_step_number = 0 -%}
17+
18+
{%- for step in scenario.steps -%}
19+
{%- assign step_number = step_number | plus: 1 -%}
20+
{%- assign clean_step_url = step.url | replace: '{{site.url}}{{site.baseurl}}', '' -%}
21+
22+
{%- if clean_step_url == current_page_url -%}
23+
{%- assign found_current = true -%}
24+
{%- if prev_step -%}
25+
{%- capture prev_phase_data -%}{{ prev_step.url }}|{{ prev_step.title }}|{{ scenario.title }}|{{ prev_step_number }}{%- endcapture -%}
26+
{%- assign prev_phase_info = prev_phase_info | push: prev_phase_data -%}
27+
{%- endif -%}
28+
{%- break -%}
29+
{%- endif -%}
30+
31+
{%- comment -%}Check substeps too{%- endcomment -%}
32+
{%- if step.substeps -%}
33+
{%- for substep in step.substeps -%}
34+
{%- assign clean_substep_url = substep.url | replace: '{{site.url}}{{site.baseurl}}', '' -%}
35+
{%- if clean_substep_url == current_page_url -%}
36+
{%- assign found_current = true -%}
37+
{%- capture prev_phase_data -%}{{ step.url }}|{{ step.title }}|{{ scenario.title }}|{{ step_number }}{%- endcapture -%}
38+
{%- assign prev_phase_info = prev_phase_info | push: prev_phase_data -%}
39+
{%- break -%}
40+
{%- endif -%}
41+
{%- endfor -%}
42+
{%- if found_current -%}
43+
{%- break -%}
44+
{%- endif -%}
45+
{%- endif -%}
46+
47+
{%- assign prev_step = step -%}
48+
{%- assign prev_step_number = step_number -%}
49+
{%- endfor -%}
50+
{%- endfor -%}
51+
52+
{%- comment -%}Remove duplicates from prev_phase_info{%- endcomment -%}
53+
{%- assign unique_prev_phases = '' | split: '' -%}
54+
{%- for phase_data in prev_phase_info -%}
55+
{%- assign phase_parts = phase_data | split: '|' -%}
56+
{%- assign phase_url = phase_parts[0] -%}
57+
{%- assign is_duplicate = false -%}
58+
59+
{%- for unique_phase_data in unique_prev_phases -%}
60+
{%- assign unique_parts = unique_phase_data | split: '|' -%}
61+
{%- if unique_parts[0] == phase_url -%}
62+
{%- assign is_duplicate = true -%}
63+
{%- break -%}
64+
{%- endif -%}
65+
{%- endfor -%}
66+
67+
{%- unless is_duplicate -%}
68+
{%- assign unique_prev_phases = unique_prev_phases | push: phase_data -%}
69+
{%- endunless -%}
70+
{%- endfor -%}
71+
72+
{%- comment -%}Find next phases for each scenario{%- endcomment -%}
73+
{%- assign next_phase_info = '' | split: '' -%}
74+
75+
{%- for scenario in scenarios -%}
76+
{%- assign step_number = 0 -%}
77+
{%- assign current_step_index = -1 -%}
78+
79+
{%- comment -%}Find the index of the current step in this scenario{%- endcomment -%}
80+
{%- for step in scenario.steps -%}
81+
{%- assign step_number = step_number | plus: 1 -%}
82+
{%- assign clean_step_url = step.url | replace: '{{site.url}}{{site.baseurl}}', '' -%}
83+
84+
{%- comment -%}Check if this step matches the current page{%- endcomment -%}
85+
{%- if clean_step_url == current_page_url -%}
86+
{%- assign current_step_index = step_number -%}
87+
{%- endif -%}
88+
89+
{%- comment -%}Also check substeps{%- endcomment -%}
90+
{%- if step.substeps -%}
91+
{%- for substep in step.substeps -%}
92+
{%- assign clean_substep_url = substep.url | replace: '{{site.url}}{{site.baseurl}}', '' -%}
93+
{%- if clean_substep_url == current_page_url -%}
94+
{%- assign current_step_index = step_number -%}
95+
{%- endif -%}
96+
{%- endfor -%}
97+
{%- endif -%}
98+
{%- endfor -%}
99+
100+
{%- comment -%}If we found the current step in this scenario, find the next step{%- endcomment -%}
101+
{%- if current_step_index > 0 -%}
102+
{%- assign next_step_index = current_step_index | plus: 1 -%}
103+
{%- assign step_number = 0 -%}
104+
105+
{%- for step in scenario.steps -%}
106+
{%- assign step_number = step_number | plus: 1 -%}
107+
{%- if step_number == next_step_index -%}
108+
{%- capture next_phase_data -%}{{ step.url }}|{{ step.title }}|{{ scenario.title }}|{{ step_number }}{%- endcapture -%}
109+
{%- assign next_phase_info = next_phase_info | push: next_phase_data -%}
110+
{%- break -%}
111+
{%- endif -%}
112+
{%- endfor -%}
113+
{%- endif -%}
114+
{%- endfor -%}
115+
116+
{%- comment -%}Remove duplicates from next_phase_info{%- endcomment -%}
117+
{%- assign unique_next_phases = '' | split: '' -%}
118+
{%- for phase_data in next_phase_info -%}
119+
{%- assign phase_parts = phase_data | split: '|' -%}
120+
{%- assign phase_url = phase_parts[0] -%}
121+
{%- assign scenario_title = phase_parts[2] -%}
122+
{%- assign is_duplicate = false -%}
123+
124+
{%- for unique_phase_data in unique_next_phases -%}
125+
{%- assign unique_parts = unique_phase_data | split: '|' -%}
126+
{%- if unique_parts[0] == phase_url and unique_parts[2] == scenario_title -%}
127+
{%- assign is_duplicate = true -%}
128+
{%- break -%}
129+
{%- endif -%}
130+
{%- endfor -%}
131+
132+
{%- unless is_duplicate -%}
133+
{%- assign unique_next_phases = unique_next_phases | push: phase_data -%}
134+
{%- endunless -%}
135+
{%- endfor -%}
136+
137+
138+
{%- comment -%}Display Previous Phase section{%- endcomment -%}
139+
{%- if unique_prev_phases.size > 0 %}
140+
141+
## Previous phase
142+
143+
{%- if unique_prev_phases.size == 1 -%}
144+
{%- assign phase_data = unique_prev_phases[0] -%}
145+
{%- assign phase_parts = phase_data | split: '|' %}
146+
{%- assign clean_prev_url = phase_parts[0] | replace: '{{site.url}}{{site.baseurl}}', '' %}
147+
148+
The previous phase in the migration process was:
149+
150+
**[{{ phase_parts[1] }}]({{ site.url }}{{ site.baseurl }}{{ clean_prev_url }})**
151+
152+
{%- else %}
153+
154+
The previous phase depends on your migration scenario:
155+
156+
{% for phase_data in unique_prev_phases -%}
157+
{%- assign phase_parts = phase_data | split: '|' %}
158+
{%- assign clean_prev_url = phase_parts[0] | replace: '{{site.url}}{{site.baseurl}}', '' -%}
159+
- **{{ phase_parts[2] }}** (Step {{ phase_parts[3] }}): [{{ phase_parts[1] }}]({{ site.url }}{{ site.baseurl }}{{ clean_prev_url }})
160+
{% endfor %}
161+
{%- endif %}
162+
{%- endif %}
163+
164+
{%- comment -%}Display Next Phase section{%- endcomment -%}
165+
{%- if unique_next_phases.size > 0 %}
166+
167+
## Next phase
168+
169+
{%- if unique_next_phases.size == 1 -%}
170+
{%- assign phase_data = unique_next_phases[0] -%}
171+
{%- assign phase_parts = phase_data | split: '|' %}
172+
{%- assign clean_next_url = phase_parts[0] | replace: '{{site.url}}{{site.baseurl}}', '' %}
173+
174+
The next phase in the migration process is:
175+
176+
**[{{ phase_parts[1] }}]({{ site.url }}{{ site.baseurl }}{{ clean_next_url }})**
177+
178+
For a complete overview of all migration phases, see [Migration phases]({{ site.url }}{{ site.baseurl }}/migration-assistant/migration-phases/).
179+
180+
{%- else %}
181+
182+
The next phase depends on your migration scenario:
183+
184+
{% for phase_data in unique_next_phases -%}
185+
{%- assign phase_parts = phase_data | split: '|' %}
186+
{%- assign clean_next_url = phase_parts[0] | replace: '{{site.url}}{{site.baseurl}}', '' -%}
187+
- **{{ phase_parts[2] }}** (Step {{ phase_parts[3] }}): [{{ phase_parts[1] }}]({{ site.url }}{{ site.baseurl }}{{ clean_next_url }})
188+
{% endfor %}
189+
190+
For a complete overview of all migration phases, see [Migration phases]({{ site.url }}{{ site.baseurl }}/migration-assistant/migration-phases/).
191+
192+
{%- endif %}
193+
{%- endif %}

0 commit comments

Comments
 (0)