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 <cd-alert-panel *ngIf="loading"
28 <span i18n>Please note that this process can take some time. During this period, do not click the back button or close the wizard. Thank you for your patience.</span>
30 <div *ngSwitchCase="'0'"
32 <div class="form-group row">
33 <label class="cd-col-form-label required"
35 i18n>Realm Name</label>
36 <div class="cd-col-form-input">
37 <input class="form-control"
39 placeholder="Realm name..."
42 formControlName="realmName"
45 <span i18n>Enter a unique name for the Realm. The Realm is a logical grouping of all your Zonegroups.</span>
47 <span class="invalid-feedback"
48 *ngIf="multisiteSetupForm.showError('realmName', formDir, 'required')"
49 i18n>This field is required.</span>
50 <span class="invalid-feedback"
51 *ngIf="multisiteSetupForm.showError('realmName', formDir, 'uniqueName')"
52 i18n>The chosen realm name is already in use.</span>
55 <div class="form-group row">
56 <label class="cd-col-form-label required"
58 i18n>Zone Group Name</label>
59 <div class="cd-col-form-input">
60 <input class="form-control"
62 placeholder="Zone group name..."
65 formControlName="zonegroupName">
67 <span i18n>Enter a name for the Zonegroup. Zonegroup will help you identify and manage the group of zones.</span>
69 <span class="invalid-feedback"
70 *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'required')"
71 i18n>This field is required.</span>
72 <span class="invalid-feedback"
73 *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'uniqueName')"
74 i18n>The chosen zone group name is already in use.</span>
77 <div class="form-group row">
78 <label class="cd-col-form-label required"
79 for="zonegroup_endpoints"
80 i18n>Zonegroup Endpoints</label>
81 <div class="cd-col-form-input">
82 <cd-select-badges id="zonegroup_endpoints"
83 [data]="rgwEndpoints.value"
84 [options]="rgwEndpoints.options"
85 [customBadges]="true">
88 <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>
93 <div *ngSwitchCase="'1'"
97 <div class="form-group row">
98 <label class="cd-col-form-label required"
100 i18n>Zone Name</label>
101 <div class="cd-col-form-input">
102 <input class="form-control"
104 placeholder="Zone name..."
107 formControlName="zoneName">
109 <span i18n>Enter a unique name for the Zone. A Zone represents a distinct data center or geographical location within a Zonegroup.</span>
111 <span class="invalid-feedback"
112 *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'required')"
113 i18n>This field is required.</span>
114 <span class="invalid-feedback"
115 *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'uniqueName')"
116 i18n>The chosen zone name is already in use.</span>
119 <div class="form-group row">
120 <label class="cd-col-form-label required"
122 i18n>Zone Endpoints</label>
123 <div class="cd-col-form-input">
124 <cd-select-badges id="zone_endpoints"
125 [data]="rgwEndpoints.value"
126 [options]="rgwEndpoints.options"
127 [customBadges]="true">
130 <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>
134 <div class="form-group row">
135 <label class="cd-col-form-label required"
137 i18n>Username</label>
138 <div class="cd-col-form-input">
139 <input class="form-control"
141 placeholder="Username..."
144 formControlName="username"
145 ngbTooltip="White spaces at the beginning and end will be trimmed"
149 <span i18n>Specify the username for the system user.</span>
151 <cd-alert-panel type="info"
153 <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>
155 <span class="invalid-feedback"
156 *ngIf="multisiteSetupForm.showError('username', formDir, 'required')"
157 i18n>This field is required.</span>
158 <span class="invalid-feedback"
159 *ngIf="multisiteSetupForm.showError('username', formDir, 'notUnique')"
160 i18n>The username already exists.</span>
166 <div *ngIf="isMultiClusterConfigured; else exportTokenTemplate">
168 i18n>Select Cluster</h4>
169 <div class="form-group row">
170 <label class="cd-col-form-label required"
173 <div class="cd-col-form-input">
174 <select class="form-select"
176 [(ngModel)]="selectedCluster"
177 formControlName="cluster"
179 <option *ngFor="let cluster_detail of clusterDetailsArray"
180 [value]="cluster_detail.name">
181 {{ cluster_detail.cluster_alias }} - {{ cluster_detail.name }}
185 <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>
187 <cd-alert-panel type="info"
189 <span i18n>Before submitting this form, please verify that the selected cluster has an active RGW (Rados Gateway) service running.</span>
194 <ng-template #exportTokenTemplate>
196 i18n>Export Token</h4>
197 <div *ngFor="let realminfo of realms">
198 <div class="form-group row">
199 <label class="cd-col-form-label"
201 i18n>Realm Name</label>
202 <div class="cd-col-form-input">
203 <input id="realmName"
206 [value]="realminfo.realm"
209 <span i18n>Name of the realm that will be involved in replication.</span>
213 <div class="form-group row">
214 <label class="cd-col-form-label"
217 <div class="cd-col-form-input">
218 <input id="realmToken"
221 [value]="realminfo.token"
224 <cd-copy-2-clipboard-button [source]="realminfo.token"
226 </cd-copy-2-clipboard-button>
228 <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>
232 <hr *ngIf="realms.length > 1">
242 <button cdsButton="secondary"
243 (click)="onPreviousStep()"
244 [attr.aria-label]="showCancelButtonLabel()"
246 i18n>{{ showCancelButtonLabel() }}</button>
247 <button cdsButton="primary"
248 (click)="onNextStep()"
250 i18n>{{ showSubmitButtonLabel() }}
251 <cds-loading [isActive]="loading"
254 *ngIf="loading"></cds-loading>