4 [hasScrollingContent]="true"
5 (overlaySelected)="closeModal()">
6 <cds-modal-header (closeSelect)="closeModal()">
7 <h3 cdsModalHeaderHeading
8 data-testid="rgw-multisite-wizard-header"
9 i18n>Set up Multi-site Replication</h3>
15 [columnNumbers]="{'lg': 2, 'md': 2, 'sm': 2}"
16 class="indicator-wrapper">
17 <cd-wizard [stepsTitle]="stepTitles"></cd-wizard>
21 [columnNumbers]="{'lg': 14, 'md': 14, 'sm': 14}">
22 <form [formGroup]="multisiteSetupForm"
25 <ng-container [ngSwitch]="currentStep?.stepIndex">
26 <div *ngSwitchCase="0"
28 <ng-container *ngIf="environment.build === 'ibm'; else defaultAlert">
29 <cd-alert-panel type="info"
31 This wizard enables you to set up multi-site replication within your
32 Ceph environment. If you have already added another cluster to your
33 multi-cluster setup, you can select that cluster in the wizard to
34 automate the replication process. If no additional cluster is currently
35 added, the wizard will guide you through creating the necessary realm,
36 zonegroup, and zone, and provide a realm token. This token can be used
37 later to manually import into a desired cluster to establish replication
42 <ng-template #defaultAlert>
43 <cd-alert-panel type="info"
45 This wizard enables you to set up multi-site replication within your
46 Ceph environment.It will guide you through creating the necessary realm,
47 zonegroup, and zone, and provide a realm token. This token can be used
48 later to manually import into a desired cluster to establish replication
53 <div class="form-group row"
54 *ngIf="showConfigType && isMultiClusterConfigured">
55 <label class="cd-col-form-label required"
57 i18n>Realm configuration mode</label>
58 <div class="col-md-auto custom-checkbox form-check-inline ms-3">
59 <input class="form-check-input"
60 formControlName="configType"
63 (change)="onConfigTypeChange()"
65 <label class="custom-check-label"
67 i18n>Create new realm/zonegroup/zone</label>
69 <div class="col-md-auto custom-checkbox form-check-inline">
70 <input class="form-check-input"
71 formControlName="configType"
74 (change)="onConfigTypeChange()"
75 value="existingRealm">
76 <label class="custom-check-label"
78 i18n>Select existing realm</label>
81 <div class="form-group row"
82 *ngIf="multisiteSetupForm.get('configType').value === 'existingRealm' && showConfigType && isMultiClusterConfigured">
83 <label class="cd-col-form-label"
85 i18n>Select Realm</label>
86 <div class="cd-col-form-input">
87 <select class="form-select"
89 formControlName="selectedRealm">
90 <option *ngFor="let realm of realmList"
97 <div *ngIf="multisiteSetupForm.get('configType').value === 'newRealm' || !showConfigType">
98 <div class="form-group row">
99 <label class="cd-col-form-label required"
101 i18n>Realm Name</label>
102 <div class="cd-col-form-input">
103 <input class="form-control"
106 formControlName="realmName">
108 <span i18n>Enter a unique name for the Realm. The Realm is a logical grouping of all your Zonegroups.</span>
110 <span class="invalid-feedback"
111 *ngIf="multisiteSetupForm.showError('realmName', formDir, 'required')"
112 i18n>This field is required.</span>
113 <span class="invalid-feedback"
114 *ngIf="multisiteSetupForm.showError('realmName', formDir, 'uniqueName')"
115 i18n>This realm name is already in use. Choose a unique name.</span>
118 <div class="form-group row">
119 <label class="cd-col-form-label required"
121 i18n>Zone Group Name</label>
122 <div class="cd-col-form-input">
123 <input class="form-control"
126 formControlName="zonegroupName">
128 <span i18n>Enter a name for the Zonegroup. Zonegroup will help you identify and manage the group of zones.</span>
130 <span class="invalid-feedback"
131 *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'required')"
132 i18n>This field is required.</span>
133 <span class="invalid-feedback"
134 *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'uniqueName')"
135 i18n>This zonegroup name is already in use. Choose a unique name.</span>
138 <div class="form-group row">
139 <label class="cd-col-form-label required"
140 for="zonegroup_endpoints"
141 i18n>Zonegroup Endpoints</label>
142 <div class="cd-col-form-input">
143 <cd-select-badges id="zonegroup_endpoints"
144 [data]="rgwEndpoints.value"
145 [options]="rgwEndpoints.options"
146 [customBadges]="true">
149 <span i18n>Select the endpoints for the Zonegroup. Endpoints are the URLs or IP addresses from which the rgw gateways in that zonegroup can be accessed. You can select multiple endpoints in case you have multiple rgw gateways in a zonegroup</span>
155 <ng-container *ngSwitchCase="1">
156 <div *ngIf="multisiteSetupForm.get('configType').value === 'newRealm'"
158 <div class="form-group row">
159 <label class="cd-col-form-label required"
161 i18n>Zone Name</label>
162 <div class="cd-col-form-input">
163 <input class="form-control"
166 formControlName="zoneName">
168 <span i18n>Enter a unique name for the Zone. A Zone represents a distinct data center or geographical location within a Zonegroup.</span>
170 <span class="invalid-feedback"
171 *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'required')"
172 i18n>This field is required.</span>
173 <span class="invalid-feedback"
174 *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'uniqueName')"
175 i18n>This zone name is already in use. Choose a unique name.</span>
178 <div class="form-group row">
179 <label class="cd-col-form-label required"
181 i18n>Zone Endpoints</label>
182 <div class="cd-col-form-input">
183 <cd-select-badges id="zone_endpoints"
184 [data]="rgwEndpoints.value"
185 [options]="rgwEndpoints.options"
186 [customBadges]="true"></cd-select-badges>
188 <span i18n>Select the endpoints for the Zone. Endpoints are the URLs or IP addresses from which the rgw gateways in that zone can be accessed. You can select multiple endpoints in case you have multiple rgw gateways in a zone</span>
192 <div class="form-group row">
193 <label class="cd-col-form-label required"
195 i18n>Username</label>
196 <div class="cd-col-form-input">
197 <input class="form-control"
200 formControlName="username"
201 ngbTooltip="White spaces at the beginning and end will be trimmed"
205 <span i18n>Specify the username for the system user.</span>
207 <cd-alert-panel type="info"
209 <span i18n>This user will be created automatically as part of the process, and it will have the necessary permissions to manage and synchronize resources across zones.</span>
211 <span class="invalid-feedback"
212 *ngIf="multisiteSetupForm.showError('username', formDir, 'required')"
213 i18n>This field is required.</span>
214 <span class="invalid-feedback"
215 *ngIf="multisiteSetupForm.showError('username', formDir, 'notUnique')"
216 i18n>This username is already in use. Choose a unique name.</span>
220 <div *ngIf="isMultiClusterConfigured && (multisiteSetupForm.get('configType').value === 'existingRealm')"
222 <ng-container *ngTemplateOutlet="replicationTemplate"></ng-container>
225 <ng-container *ngSwitchCase="2">
226 <div *ngIf="multisiteSetupForm.get('configType').value === 'newRealm'"
228 <ng-container *ngIf="isMultiClusterConfigured; else newRealmReviewTemplate">
229 <ng-container *ngTemplateOutlet="replicationTemplate"></ng-container>
232 <div *ngIf="multisiteSetupForm.get('configType').value === 'existingRealm' && isMultiClusterConfigured"
234 <ng-container *ngIf="!loading; else loadingTemplate">
235 <ng-container *ngIf="!setupCompleted; else progressCompleteTemplate">
236 <ng-container *ngTemplateOutlet="reviewTemplate"></ng-container>
241 <ng-template #newRealmReviewTemplate>
242 <ng-container *ngTemplateOutlet="reviewTemplate"></ng-container>
244 <ng-template #replicationTemplate>
245 <div class="form-group row">
246 <label class="cd-col-form-label required"
248 i18n>Replication Cluster</label>
249 <div class="cd-col-form-input">
250 <select class="form-select"
252 [(ngModel)]="selectedCluster"
253 formControlName="cluster"
255 <option *ngFor="let cluster_detail of clusterDetailsArray"
256 [value]="cluster_detail.name">
257 {{ cluster_detail.cluster_alias }} - {{ cluster_detail.name }}
261 <span i18n>Choose the cluster where you want to apply this multisite configuration. The selected cluster will integrate the defined Realm, Zonegroup, and Zones, enabling data synchronization and management across the multisite setup.</span>
263 <cd-alert-panel type="info"
265 <span i18n>Before submitting this form, please verify that the selected cluster has an active RGW (Rados Gateway) service running.</span>
269 <div class="form-group row">
270 <label class="cd-col-form-label required"
271 for="replicationZoneName"
272 i18n>Replication Zone Name</label>
273 <div class="cd-col-form-input">
274 <input class="form-control"
276 id="replicationZoneName"
277 name="replicationZoneName"
278 formControlName="replicationZoneName">
280 <span i18n>Replication zone represents the zone to be created in the replication cluster where your data will be replicated.</span>
282 <span class="invalid-feedback"
283 *ngIf="multisiteSetupForm.showError('replicationZoneName', formDir, 'required')"
284 i18n>This field is required.</span>
288 <div *ngSwitchCase="3"
290 <div *ngIf="isMultiClusterConfigured">
291 <ng-container *ngIf="!loading; else loadingTemplate">
292 <ng-container *ngIf="!setupCompleted; else progressCompleteTemplate">
293 <ng-container *ngTemplateOutlet="reviewTemplate"></ng-container>
304 <button cdsButton="secondary"
305 name="skip-cluster-selection"
308 *ngIf="stepTitles[currentStep.stepIndex]['label'] === 'Select Cluster' && multisiteSetupForm.get('configType').value === 'newRealm'"
310 <button cdsButton="secondary"
311 (click)="onPreviousStep()"
312 [attr.aria-label]="showCancelButtonLabel()"
313 i18n>{{ showCancelButtonLabel() }}</button>
314 <button cdsButton="primary"
315 (click)="onNextStep()"
318 i18n>{{ showSubmitButtonLabel() }}
319 <cds-loading [isActive]="loading"
329 <ng-template #nonMultiClusterTemplate>
330 <ng-container *ngIf="!loading; else loadingTemplate">
331 <ng-container *ngIf="!setupCompleted else exportTokenTemplate">
332 <ng-container *ngTemplateOutlet="reviewTemplate"></ng-container>
337 <ng-template #loadingTemplate>
338 <ng-container *ngTemplateOutlet="progressTemplate"></ng-container>
341 <ng-template #progressCompleteTemplate>
342 <div *ngIf="isMultiClusterConfigured && !stepsToSkip['Select Cluster']; else exportTokenTemplate">
343 <div class="text-center text-success"
345 Multi-site replication setup is complete.
350 <ng-template #progressTemplate>
351 <cd-progress [value]="executingTask?.progress"
352 [description]="executingTask?.name?.replace('progress/Multisite-Setup:', '')?.split('||')[0]?.trim()"
353 [subDescription]="executingTask?.name?.replace('progress/Multisite-Setup:', '')?.split('||')[1]?.trim()">
357 <ng-template #exportTokenTemplate>
358 <div *ngFor="let realminfo of realms">
359 <div class="form-group row">
360 <label class="cd-col-form-label"
362 i18n>Realm Name</label>
363 <div class="cd-col-form-input">
364 <input id="realmName"
367 [value]="realminfo.realm"
370 <span i18n>Name of the realm that will be involved in replication.</span>
374 <div class="form-group row">
375 <label class="cd-col-form-label"
378 <div class="cd-col-form-input">
379 <input id="realmToken"
382 [value]="realminfo.token"
385 <cd-copy-2-clipboard-button [source]="realminfo.token"
387 </cd-copy-2-clipboard-button>
389 <span i18n>This field displays the token needed to import the multisite configuration into a secondary cluster. Copy this token securely and use it on the secondary cluster to replicate the current multisite setup. Ensure that the token is handled securely to prevent unauthorized access.</span>
393 <hr *ngIf="realms.length > 1">
397 <ng-template #reviewTemplate>
398 <cd-alert-panel type="warning"
401 During the automation process, the RGW module will be enabled on both the source and target clusters, if it is not already enabled.
402 This action may cause a temporary downtime (5-10 seconds) on each cluster.
405 <ng-container [ngSwitch]="multisiteSetupForm.get('configType').value">
406 <ng-container *ngSwitchCase="'newRealm'">
407 <ng-container *ngTemplateOutlet="newRealmInfo"></ng-container>
408 <ng-container *ngTemplateOutlet="replicationInfo"></ng-container>
410 <ng-container *ngSwitchCase="'existingRealm'">
411 <ng-container *ngTemplateOutlet="existingRealmInfo"></ng-container>
412 <ng-container *ngTemplateOutlet="replicationInfo"></ng-container>
417 <ng-template #newRealmInfo>
418 <div class="form-group row">
419 <label class="cd-col-form-label"
420 i18n>Realm Name:</label>
421 <div class="cd-col-form-input mt-2 text-muted"><b>{{ multisiteSetupForm.get('realmName').value }}</b></div>
423 <div class="form-group row">
424 <label class="cd-col-form-label"
425 i18n>Zonegroup Name:</label>
426 <div class="cd-col-form-input mt-2 text-muted"><b>{{ multisiteSetupForm.get('zonegroupName').value }}</b></div>
428 <div class="form-group row">
429 <label class="cd-col-form-label"
430 i18n>Zonegroup Endpoints:</label>
431 <div class="cd-col-form-input mt-2 text-muted"><b>{{ rgwEndpoints.value.join(', ') }}</b></div>
433 <div class="form-group row">
434 <label class="cd-col-form-label"
435 i18n>Zone Name:</label>
436 <div class="cd-col-form-input mt-2 text-muted"><b>{{ multisiteSetupForm.get('zoneName').value }}</b></div>
438 <div class="form-group row">
439 <label class="cd-col-form-label"
440 i18n>Zone Endpoints:</label>
441 <div class="cd-col-form-input mt-2 text-muted"><b>{{ rgwEndpoints.value.join(', ') }}</b></div>
443 <div class="form-group row">
444 <label class="cd-col-form-label"
445 i18n>Username:</label>
446 <div class="cd-col-form-input mt-2 text-muted"><b>{{ multisiteSetupForm.get('username').value }}</b></div>
450 <ng-template #existingRealmInfo>
451 <div class="form-group row">
452 <label class="cd-col-form-label"
453 i18n>Selected Realm:</label>
454 <div class="cd-col-form-input mt-2 text-muted"><b>{{ multisiteSetupForm.get('selectedRealm').value }}</b></div>
458 <ng-template #replicationInfo>
459 <div *ngIf="isMultiClusterConfigured && !stepsToSkip['Select Cluster']">
460 <div class="form-group row">
461 <label class="cd-col-form-label"
462 i18n>Selected Replication Cluster:</label>
463 <div class="cd-col-form-input mt-2 text-muted"><b>{{ selectedCluster }}</b></div>
465 <div class="form-group row">
466 <label class="cd-col-form-label"
467 i18n>Replication Zone Name:</label>
468 <div class="cd-col-form-input mt-2 text-muted"><b>{{ multisiteSetupForm.get('replicationZoneName').value }}</b></div>