4 [hasScrollingContent]="true"
5 (overlaySelected)="closeModal()">
6 <cds-modal-header (closeSelect)="closeModal()">
7 <h3 cdsModalHeaderHeading
8 i18n>Set up Multi-site Replication</h3>
14 [columnNumbers]="{'lg': 2, 'md': 2, 'sm': 2}"
15 class="indicator-wrapper">
16 <cd-wizard [stepsTitle]="stepTitles"></cd-wizard>
20 [columnNumbers]="{'lg': 14, 'md': 14, 'sm': 14}">
21 <form [formGroup]="multisiteSetupForm"
24 <ng-container [ngSwitch]="currentStep?.stepIndex">
25 <div *ngSwitchCase="0"
27 <cd-alert-panel type="info"
29 This wizard enables you to set up multi-site replication within your
30 Ceph environment.If you have already added another cluster to your
31 multi-cluster setup, you can select that cluster in the wizard to
32 automate the replication process.If no additional cluster is currently
33 added, the wizard will guide you through creating the necessary realm,
34 zonegroup, and zone, and provide a realm token.This token can be used
35 later to manually import into a desired cluster to establish replication
38 <div class="form-group row">
39 <label class="cd-col-form-label required"
41 i18n>Realm Name</label>
42 <div class="cd-col-form-input">
43 <input class="form-control"
45 placeholder="Realm name..."
48 formControlName="realmName">
50 <span i18n>Enter a unique name for the Realm. The Realm is a logical grouping of all your Zonegroups.</span>
52 <span class="invalid-feedback"
53 *ngIf="multisiteSetupForm.showError('realmName', formDir, 'required')"
54 i18n>This field is required.</span>
55 <span class="invalid-feedback"
56 *ngIf="multisiteSetupForm.showError('realmName', formDir, 'uniqueName')"
57 i18n>The chosen realm name is already in use.</span>
60 <div class="form-group row">
61 <label class="cd-col-form-label required"
63 i18n>Zone Group Name</label>
64 <div class="cd-col-form-input">
65 <input class="form-control"
67 placeholder="Zone group name..."
70 formControlName="zonegroupName">
72 <span i18n>Enter a name for the Zonegroup. Zonegroup will help you identify and manage the group of zones.</span>
74 <span class="invalid-feedback"
75 *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'required')"
76 i18n>This field is required.</span>
77 <span class="invalid-feedback"
78 *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'uniqueName')"
79 i18n>The chosen zone group name is already in use.</span>
82 <div class="form-group row">
83 <label class="cd-col-form-label required"
84 for="zonegroup_endpoints"
85 i18n>Zonegroup Endpoints</label>
86 <div class="cd-col-form-input">
87 <cd-select-badges id="zonegroup_endpoints"
88 [data]="rgwEndpoints.value"
89 [options]="rgwEndpoints.options"
90 [customBadges]="true">
93 <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>
98 <div *ngSwitchCase="1"
100 <div class="form-group row">
101 <label class="cd-col-form-label required"
103 i18n>Zone Name</label>
104 <div class="cd-col-form-input">
105 <input class="form-control"
107 placeholder="Zone name..."
110 formControlName="zoneName">
112 <span i18n>Enter a unique name for the Zone. A Zone represents a distinct data center or geographical location within a Zonegroup.</span>
114 <span class="invalid-feedback"
115 *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'required')"
116 i18n>This field is required.</span>
117 <span class="invalid-feedback"
118 *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'uniqueName')"
119 i18n>The chosen zone name is already in use.</span>
122 <div class="form-group row">
123 <label class="cd-col-form-label required"
125 i18n>Zone Endpoints</label>
126 <div class="cd-col-form-input">
127 <cd-select-badges id="zone_endpoints"
128 [data]="rgwEndpoints.value"
129 [options]="rgwEndpoints.options"
130 [customBadges]="true">
133 <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>
137 <div class="form-group row">
138 <label class="cd-col-form-label required"
140 i18n>Username</label>
141 <div class="cd-col-form-input">
142 <input class="form-control"
144 placeholder="Username..."
147 formControlName="username"
148 ngbTooltip="White spaces at the beginning and end will be trimmed"
152 <span i18n>Specify the username for the system user.</span>
154 <cd-alert-panel type="info"
156 <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>
158 <span class="invalid-feedback"
159 *ngIf="multisiteSetupForm.showError('username', formDir, 'required')"
160 i18n>This field is required.</span>
161 <span class="invalid-feedback"
162 *ngIf="multisiteSetupForm.showError('username', formDir, 'notUnique')"
163 i18n>The username already exists.</span>
169 <div *ngIf="isMultiClusterConfigured; else nonMultiClusterTemplate">
170 <div class="form-group row">
171 <label class="cd-col-form-label required"
173 i18n>Replication Cluster</label>
174 <div class="cd-col-form-input">
175 <select class="form-select"
177 [(ngModel)]="selectedCluster"
178 formControlName="cluster"
180 <option *ngFor="let cluster_detail of clusterDetailsArray"
181 [value]="cluster_detail.name">
182 {{ cluster_detail.cluster_alias }} - {{ cluster_detail.name }}
186 <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>
188 <cd-alert-panel type="info"
190 <span i18n>Before submitting this form, please verify that the selected cluster has an active RGW (Rados Gateway) service running.</span>
194 <div class="form-group row">
195 <label class="cd-col-form-label required"
197 i18n>Replication Zone Name</label>
198 <div class="cd-col-form-input">
199 <input class="form-control"
201 placeholder="Zone name..."
202 id="replicationZoneName"
203 name="replicationZoneName"
204 formControlName="replicationZoneName">
206 <span i18n>Replication zone represents the zone to be created in the replication cluster where your data will be replicated.</span>
208 <span class="invalid-feedback"
209 *ngIf="multisiteSetupForm.showError('replicationZoneName', formDir, 'required')"
210 i18n>This field is required.</span>
215 <div *ngSwitchCase="3"
217 <div *ngIf="isMultiClusterConfigured">
218 <ng-container *ngIf="!loading; else loadingTemplate">
219 <ng-container *ngIf="!setupCompleted; else progressCompleteTemplate">
220 <ng-container *ngTemplateOutlet="reviewTemplate"></ng-container>
231 <button cdsButton="secondary"
232 name="skip-cluster-selection"
235 *ngIf="stepTitles[currentStep.stepIndex]['label'] === 'Select Cluster'"
237 <button cdsButton="secondary"
238 (click)="onPreviousStep()"
239 [attr.aria-label]="showCancelButtonLabel()"
241 i18n>{{ showCancelButtonLabel() }}</button>
242 <button cdsButton="primary"
243 (click)="onNextStep()"
246 i18n>{{ showSubmitButtonLabel() }}
247 <cds-loading [isActive]="loading"
250 *ngIf="loading"></cds-loading>
255 <ng-template #nonMultiClusterTemplate>
256 <ng-container *ngIf="!loading; else loadingTemplate">
257 <ng-container *ngIf="!setupCompleted else exportTokenTemplate">
258 <ng-container *ngTemplateOutlet="reviewTemplate"></ng-container>
263 <ng-template #loadingTemplate>
264 <ng-container *ngTemplateOutlet="progressTemplate"></ng-container>
267 <ng-template #progressCompleteTemplate>
268 <div *ngIf="isMultiClusterConfigured && !stepsToSkip['Select Cluster']; else exportTokenTemplate">
269 <div class="text-center text-success"
271 Multi-site replication setup is complete.
276 <ng-template #progressTemplate>
277 <cd-progress [value]="executingTask?.progress"
278 [description]="executingTask?.name?.replace('progress/Multisite-Setup:', '')">
282 <ng-template #exportTokenTemplate>
283 <div *ngFor="let realminfo of realms">
284 <div class="form-group row">
285 <label class="cd-col-form-label"
287 i18n>Realm Name</label>
288 <div class="cd-col-form-input">
289 <input id="realmName"
292 [value]="realminfo.realm"
295 <span i18n>Name of the realm that will be involved in replication.</span>
299 <div class="form-group row">
300 <label class="cd-col-form-label"
303 <div class="cd-col-form-input">
304 <input id="realmToken"
307 [value]="realminfo.token"
310 <cd-copy-2-clipboard-button [source]="realminfo.token"
312 </cd-copy-2-clipboard-button>
314 <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>
318 <hr *ngIf="realms.length > 1">
322 <ng-template #reviewTemplate>
323 <div class="form-group row">
324 <label class="cd-col-form-label"
325 i18n>Realm Name:</label>
326 <div class="cd-col-form-input mt-2 text-muted">
327 <b>{{ multisiteSetupForm.get('realmName').value }}</b>
330 <div class="form-group row">
331 <label class="cd-col-form-label"
332 i18n>Zonegroup Name:</label>
333 <div class="cd-col-form-input mt-2 text-muted">
334 <b>{{ multisiteSetupForm.get('zonegroupName').value }}</b>
337 <div class="form-group row">
338 <label class="cd-col-form-label"
339 i18n>Zonegroup Endpoints:</label>
340 <div class="cd-col-form-input mt-2 text-muted">
341 <b>{{ rgwEndpoints.value.join(', ') }}</b>
344 <div class="form-group row">
345 <label class="cd-col-form-label"
346 i18n>Zone Name:</label>
347 <div class="cd-col-form-input mt-2 text-muted">
348 <b>{{ multisiteSetupForm.get('zoneName').value }}</b>
351 <div class="form-group row">
352 <label class="cd-col-form-label"
353 i18n>Zone Endpoints:</label>
354 <div class="cd-col-form-input mt-2 text-muted">
355 <b>{{ rgwEndpoints.value.join(', ') }}</b>
358 <div class="form-group row">
359 <label class="cd-col-form-label"
360 i18n>Username:</label>
361 <div class="cd-col-form-input mt-2 text-muted">
362 <b>{{ multisiteSetupForm.get('username').value }}</b>
365 <div *ngIf="isMultiClusterConfigured && !stepsToSkip['Select Cluster']">
366 <div class="form-group row">
367 <label class="cd-col-form-label"
368 i18n>Selected Replication Cluster:</label>
369 <div class="cd-col-form-input mt-2 text-muted">
370 <b>{{ selectedCluster }}</b>
373 <div class="form-group row">
374 <label class="cd-col-form-label"
375 i18n>Replication Zone Name:</label>
376 <div class="cd-col-form-input mt-2 text-muted">
377 <b>{{ multisiteSetupForm.get('replicationZoneName').value }}</b>