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 <cd-alert-panel type="info"
30 This wizard enables you to set up multi-site replication within your
31 Ceph environment.If you have already added another cluster to your
32 multi-cluster setup, you can select that cluster in the wizard to
33 automate the replication process.If no additional cluster is currently
34 added, the wizard will guide you through creating the necessary realm,
35 zonegroup, and zone, and provide a realm token.This token can be used
36 later to manually import into a desired cluster to establish replication
39 <div class="form-group row">
40 <label class="cd-col-form-label required"
42 i18n>Realm Name</label>
43 <div class="cd-col-form-input">
44 <input class="form-control"
46 placeholder="Realm name..."
49 formControlName="realmName">
51 <span i18n>Enter a unique name for the Realm. The Realm is a logical grouping of all your Zonegroups.</span>
53 <span class="invalid-feedback"
54 *ngIf="multisiteSetupForm.showError('realmName', formDir, 'required')"
55 i18n>This field is required.</span>
56 <span class="invalid-feedback"
57 *ngIf="multisiteSetupForm.showError('realmName', formDir, 'uniqueName')"
58 i18n>The chosen realm name is already in use.</span>
61 <div class="form-group row">
62 <label class="cd-col-form-label required"
64 i18n>Zone Group Name</label>
65 <div class="cd-col-form-input">
66 <input class="form-control"
68 placeholder="Zone group name..."
71 formControlName="zonegroupName">
73 <span i18n>Enter a name for the Zonegroup. Zonegroup will help you identify and manage the group of zones.</span>
75 <span class="invalid-feedback"
76 *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'required')"
77 i18n>This field is required.</span>
78 <span class="invalid-feedback"
79 *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'uniqueName')"
80 i18n>The chosen zone group name is already in use.</span>
83 <div class="form-group row">
84 <label class="cd-col-form-label required"
85 for="zonegroup_endpoints"
86 i18n>Zonegroup Endpoints</label>
87 <div class="cd-col-form-input">
88 <cd-select-badges id="zonegroup_endpoints"
89 [data]="rgwEndpoints.value"
90 [options]="rgwEndpoints.options"
91 [customBadges]="true">
94 <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>
99 <div *ngSwitchCase="1"
101 <div class="form-group row">
102 <label class="cd-col-form-label required"
104 i18n>Zone Name</label>
105 <div class="cd-col-form-input">
106 <input class="form-control"
108 placeholder="Zone name..."
111 formControlName="zoneName">
113 <span i18n>Enter a unique name for the Zone. A Zone represents a distinct data center or geographical location within a Zonegroup.</span>
115 <span class="invalid-feedback"
116 *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'required')"
117 i18n>This field is required.</span>
118 <span class="invalid-feedback"
119 *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'uniqueName')"
120 i18n>The chosen zone name is already in use.</span>
123 <div class="form-group row">
124 <label class="cd-col-form-label required"
126 i18n>Zone Endpoints</label>
127 <div class="cd-col-form-input">
128 <cd-select-badges id="zone_endpoints"
129 [data]="rgwEndpoints.value"
130 [options]="rgwEndpoints.options"
131 [customBadges]="true">
134 <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>
138 <div class="form-group row">
139 <label class="cd-col-form-label required"
141 i18n>Username</label>
142 <div class="cd-col-form-input">
143 <input class="form-control"
145 placeholder="Username..."
148 formControlName="username"
149 ngbTooltip="White spaces at the beginning and end will be trimmed"
153 <span i18n>Specify the username for the system user.</span>
155 <cd-alert-panel type="info"
157 <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>
159 <span class="invalid-feedback"
160 *ngIf="multisiteSetupForm.showError('username', formDir, 'required')"
161 i18n>This field is required.</span>
162 <span class="invalid-feedback"
163 *ngIf="multisiteSetupForm.showError('username', formDir, 'notUnique')"
164 i18n>The username already exists.</span>
170 <div *ngIf="isMultiClusterConfigured; else nonMultiClusterTemplate">
171 <div class="form-group row">
172 <label class="cd-col-form-label required"
174 i18n>Replication Cluster</label>
175 <div class="cd-col-form-input">
176 <select class="form-select"
178 [(ngModel)]="selectedCluster"
179 formControlName="cluster"
181 <option *ngFor="let cluster_detail of clusterDetailsArray"
182 [value]="cluster_detail.name">
183 {{ cluster_detail.cluster_alias }} - {{ cluster_detail.name }}
187 <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>
189 <cd-alert-panel type="info"
191 <span i18n>Before submitting this form, please verify that the selected cluster has an active RGW (Rados Gateway) service running.</span>
195 <div class="form-group row">
196 <label class="cd-col-form-label required"
198 i18n>Replication Zone Name</label>
199 <div class="cd-col-form-input">
200 <input class="form-control"
202 placeholder="Zone name..."
203 id="replicationZoneName"
204 name="replicationZoneName"
205 formControlName="replicationZoneName">
207 <span i18n>Replication zone represents the zone to be created in the replication cluster where your data will be replicated.</span>
209 <span class="invalid-feedback"
210 *ngIf="multisiteSetupForm.showError('replicationZoneName', formDir, 'required')"
211 i18n>This field is required.</span>
216 <div *ngSwitchCase="3"
218 <div *ngIf="isMultiClusterConfigured">
219 <ng-container *ngIf="!loading; else loadingTemplate">
220 <ng-container *ngIf="!setupCompleted; else progressCompleteTemplate">
221 <ng-container *ngTemplateOutlet="reviewTemplate"></ng-container>
232 <button cdsButton="secondary"
233 name="skip-cluster-selection"
236 *ngIf="stepTitles[currentStep.stepIndex]['label'] === 'Select Cluster'"
238 <button cdsButton="secondary"
239 (click)="onPreviousStep()"
240 [attr.aria-label]="showCancelButtonLabel()"
242 i18n>{{ showCancelButtonLabel() }}</button>
243 <button cdsButton="primary"
244 (click)="onNextStep()"
247 i18n>{{ showSubmitButtonLabel() }}
248 <cds-loading [isActive]="loading"
251 *ngIf="loading"></cds-loading>
256 <ng-template #nonMultiClusterTemplate>
257 <ng-container *ngIf="!loading; else loadingTemplate">
258 <ng-container *ngIf="!setupCompleted else exportTokenTemplate">
259 <ng-container *ngTemplateOutlet="reviewTemplate"></ng-container>
264 <ng-template #loadingTemplate>
265 <ng-container *ngTemplateOutlet="progressTemplate"></ng-container>
268 <ng-template #progressCompleteTemplate>
269 <div *ngIf="isMultiClusterConfigured && !stepsToSkip['Select Cluster']; else exportTokenTemplate">
270 <div class="text-center text-success"
272 Multi-site replication setup is complete.
277 <ng-template #progressTemplate>
278 <cd-progress [value]="executingTask?.progress"
279 [description]="executingTask?.name?.replace('progress/Multisite-Setup:', '')">
283 <ng-template #exportTokenTemplate>
284 <div *ngFor="let realminfo of realms">
285 <div class="form-group row">
286 <label class="cd-col-form-label"
288 i18n>Realm Name</label>
289 <div class="cd-col-form-input">
290 <input id="realmName"
293 [value]="realminfo.realm"
296 <span i18n>Name of the realm that will be involved in replication.</span>
300 <div class="form-group row">
301 <label class="cd-col-form-label"
304 <div class="cd-col-form-input">
305 <input id="realmToken"
308 [value]="realminfo.token"
311 <cd-copy-2-clipboard-button [source]="realminfo.token"
313 </cd-copy-2-clipboard-button>
315 <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>
319 <hr *ngIf="realms.length > 1">
323 <ng-template #reviewTemplate>
324 <div class="form-group row">
325 <label class="cd-col-form-label"
326 i18n>Realm Name:</label>
327 <div class="cd-col-form-input mt-2 text-muted"
329 <b>{{ multisiteSetupForm.get('realmName').value }}</b>
332 <div class="form-group row">
333 <label class="cd-col-form-label"
334 i18n>Zonegroup Name:</label>
335 <div class="cd-col-form-input mt-2 text-muted"
337 <b>{{ multisiteSetupForm.get('zonegroupName').value }}</b>
340 <div class="form-group row">
341 <label class="cd-col-form-label"
342 i18n>Zonegroup Endpoints:</label>
343 <div class="cd-col-form-input mt-2 text-muted">
344 <b>{{ rgwEndpoints.value.join(', ') }}</b>
347 <div class="form-group row">
348 <label class="cd-col-form-label"
349 i18n>Zone Name:</label>
350 <div class="cd-col-form-input mt-2 text-muted"
352 <b>{{ multisiteSetupForm.get('zoneName').value }}</b>
355 <div class="form-group row">
356 <label class="cd-col-form-label"
357 i18n>Zone Endpoints:</label>
358 <div class="cd-col-form-input mt-2 text-muted">
359 <b>{{ rgwEndpoints.value.join(', ') }}</b>
362 <div class="form-group row">
363 <label class="cd-col-form-label"
364 i18n>Username:</label>
365 <div class="cd-col-form-input mt-2 text-muted">
366 <b>{{ multisiteSetupForm.get('username').value }}</b>
369 <div *ngIf="isMultiClusterConfigured && !stepsToSkip['Select Cluster']">
370 <div class="form-group row">
371 <label class="cd-col-form-label"
372 i18n>Selected Replication Cluster:</label>
373 <div class="cd-col-form-input mt-2 text-muted">
374 <b>{{ selectedCluster }}</b>
377 <div class="form-group row">
378 <label class="cd-col-form-label"
379 i18n>Replication Zone Name:</label>
380 <div class="cd-col-form-input mt-2 text-muted">
381 <b>{{ multisiteSetupForm.get('replicationZoneName').value }}</b>