Skip to content

Commit

Permalink
Feature 591 fix for csm installation wizard defects (#476)
Browse files Browse the repository at this point in the history
* added backup endpoint url, updated commands and unit tests

* updated authorization changes

* updated unit tests and lint issue

* addressed feedback comments and removed management endpoint url from UI

* addressed lint issues

* minor commit

* removed rquired from backup endpoint

* minor commit

* updated image version
  • Loading branch information
niranjan-n1 authored and rajkumar-palani committed Mar 9, 2023
1 parent 3c442b1 commit 37cf9b3
Show file tree
Hide file tree
Showing 13 changed files with 122 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ node_modules/
public/
resources/
.hugo_build.lock
coverage
coverage/
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ vgsnapshotImage=csi-volumegroup-snapshotter:v1.1.0
replicationImage=dell-csi-replicator:v1.3.0
authorizationImage=csm-authorization-sidecar:v1.4.0
migrationImage=dell-csi-migrator:v1.0.0
powermaxCSIReverseProxyImage=csipowermax-reverseproxy:v2.4.0
powermaxCSIReverseProxyImage=csipowermax-reverseproxy:v2.3.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
driverVersion=v2.6.0
vgsnapshotImage=csi-volumegroup-snapshotter:v1.2.0
replicationImage=dell-csi-replicator:v1.3.0
replicationImage=dell-csi-replicator:v1.4.0
podmonImage=podmon:v1.4.0
authorizationImage=csm-authorization-sidecar:v1.5.0
migrationImage=dell-csi-migrator:v1.0.0
powermaxCSIReverseProxyImage=csipowermax-reverseproxy:v2.4.0
podmonImage=podmon:v1.4.0
migrationImage=dell-csi-migrator:v1.1.0
powermaxCSIReverseProxyImage=csipowermax-reverseproxy:v2.5.0
70 changes: 44 additions & 26 deletions content/docs/deployment/csminstallationwizard/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<select id="array" class="form-select" onchange="validateInput(validateForm, CONSTANTS)" required>
<option value="" selected>Select the Array</option>
<option value="csi-powerstore">PowerStore</option>
<option value="csi-powermax">PowerMax</option>
<option value="powermax">PowerMax</option>
<option value="csi-powerscale" disabled>PowerScale</option>
<option value="csi-powerflex" disabled>PowerFlex</option>
<option value="csi-unity" disabled>Unity</option>
Expand Down Expand Up @@ -89,8 +89,6 @@
<div class="col-sm-3">
<select id="csm-version" class="form-select" onchange="onCSMVersionChange(); validateInput(validateForm, CONSTANTS)" required>
<option value="1.6.0" selected>CSM 1.6</option>
<option value="1.5.0">CSM 1.5</option>
<option value="1.4.0">CSM 1.4</option>
</select>
</div>
</div>
Expand All @@ -110,22 +108,35 @@
<input class="form-check-input" type="checkbox" id="velero" value="" checked>
<label for="velero" class="form-check-label ms-2 text-dark" data-bs-toggle="tooltip" data-bs-placement="right" title="Enable/Disable Velero feature">Velero</label>
</div>
<div class="mt-3 mx-1 py-2 note">
<div class="mt-3 py-2 note">
<i class="icon dds__icon dds__icon--alert-info-cir"></i>
<span class="h6" id="velero-note"></span>
</div>
</div>
</div>

<div class="row mb-4 authorization">
<div class="row mb-4 authorization col-sm-11">
<div class="col-sm-12">
<input class="form-check-input" type="checkbox" id="authorization" value="" onchange="onAuthorizationChange()">
<input class="form-check-input" type="checkbox" id="authorization" value="" onchange="onAuthorizationChange(authorizationNote)">
<label for="authorization" class="form-check-label ms-2 text-dark" data-bs-toggle="tooltip" data-bs-placement="right" title="Enable/Disable Authorization module">Authorization</label>
</div>
<div class="row mt-3 child-level-one" id="authorization-skip-cert-validation-wrapper">
<div class="row mt-3 child-level-one authorization-wrapper">
<div class="col-sm-12">
<input class="form-check-input" type="checkbox" id="authorization-skip-cert-validation" value="" checked>
<label for="authorization-skip-cert-validation" class="form-check-label ms-2 text-dark" data-bs-toggle="tooltip" data-bs-placement="right" title="">Authorization Skip Certificate Validation</label>
<label for="authorization-skip-cert-validation" class="form-check-label ms-2 text-dark" data-bs-toggle="tooltip" data-bs-placement="right" title="Enable/Disable certificate validation of the csm-authorization server">Authorization Skip Certificate Validation</label>
</div>
</div>
<div class="row mt-3 child-level-one authorization-wrapper">
<label for="authorization-proxy-host" class="col-sm-3 col-form-label" data-bs-toggle="tooltip" data-bs-placement="right" title="Hostname of the csm-authorization server" style="width: 110px;">Proxy Host</label>
<div class="col-sm-9"></div>
<div class="col-sm-3">
<input class="form-control input-lg" type="text" id="authorization-proxy-host" placeholder="">
</div>
</div>
<div class="row child-level-one authorization-wrapper">
<div class="mt-3 py-2 note">
<i class="icon dds__icon dds__icon--alert-info-cir"></i>
<span class="h6" id="authorization-note"></span>
</div>
</div>
</div>
Expand Down Expand Up @@ -156,7 +167,7 @@
<label for="resiliency" class="form-check-label ms-2 text-dark" data-bs-toggle="tooltip" data-bs-placement="right" title="Enable/Disable Resiliency module">Resiliency</label>
</div>
<div class="row child-level-one" id="podmon-note-wrapper">
<div class="mt-3 mx-1 py-2 note">
<div class="mt-3 py-2 note">
<i class="icon dds__icon dds__icon--alert-info-cir"></i>
<span class="h6" id="podmon-note"></span>
</div>
Expand Down Expand Up @@ -202,7 +213,7 @@
<label for="snapshot" class="form-check-label ms-2 text-dark" data-bs-toggle="tooltip" data-bs-placement="right" title="Enable/Disable Volume Snapshot feature">Snapshot</label>
</div>
<div class="row child-level-one" id="snapshot-note-wrapper">
<div class="mt-3 mx-1 py-2 note">
<div class="mt-3 py-2 note">
<i class="icon dds__icon dds__icon--alert-info-cir"></i>
<span class="h6" id="snapshot-note"></span>
</div>
Expand Down Expand Up @@ -239,17 +250,19 @@

<div class="row mb-4">
<label for="storage-array-endpoint-url" class="col-sm-3 col-form-label" data-bs-toggle="tooltip" data-bs-placement="right" title="This refers to the URL of the Unisphere server managing storageArrayId. If authorization is enabled, endpoint should be the HTTPS localhost endpoint that the authorization sidecar will listen on." style="width: 225px;">Storage Array Endpoint URL</label>
<div class="col-sm-9"></div>
<div class="was-validated col-sm-3">
<input class="form-control input-lg" type="text" id="storage-array-endpoint-url" placeholder="Example: https://primary-2.unisphe.re:8443" oninput="validateInput(validateForm, CONSTANTS)" required>
<div class="row">
<div class="was-validated col-sm-3">
<input class="form-control input-lg" type="text" id="storage-array-endpoint-url" placeholder="Example: https://primary-2.unisphe.re:8443" oninput="validateInput(validateForm, CONSTANTS)" required>
</div>
</div>
</div>

<div class="row mb-4">
<label for="management-servers-endpoint-url" class="col-sm-3 col-form-label" data-bs-toggle="tooltip" data-bs-placement="right" title="URL of the Unisphere server. If authorization is enabled, endpoint should be the HTTPS localhost endpoint that the authorization sidecar will listen on" style="width: 280px;">Management Servers Endpoint URL</label>
<div class="col-sm-9"></div>
<div class="was-validated col-sm-3">
<input class="form-control input-lg" type="text" id="management-servers-endpoint-url" placeholder="Example: https://primary-1.unisphe.re:8443" oninput="validateInput(validateForm, CONSTANTS)" required>
<label for="storage-array-backup-endpoint-url" class="col-sm-3 col-form-label" data-bs-toggle="tooltip" data-bs-placement="right" title="This refers to the URL of the backup Unisphere server managing storageArrayId. If authorization is enabled, endpoint should be the HTTPS localhost endpoint that the authorization sidecar will listen on." style="width: 280px;">Storage Array Backup Endpoint URL</label>
<div class="row">
<div class="col-sm-3">
<input class="form-control input-lg" type="text" id="storage-array-backup-endpoint-url" placeholder="Example: https://backup-1.unisphe.re:8443">
</div>
</div>
</div>
</div>
Expand All @@ -273,7 +286,7 @@

<div class="port-groups">
<div class="row mb-4">
<label for="port-groups" class="col-sm-2 col-form-label" data-bs-toggle="tooltip" data-bs-placement="right" title="Define the set of existing port groups that the driver will use" style="width: 110px;">Port Groups</label>
<label for="port-groups" class="col-sm-2 col-form-label" data-bs-toggle="tooltip" data-bs-placement="right" title="Define the set of existing port groups that the driver will use. Mandatory for ISCSI and Optional for FC" style="width: 110px;">Port Groups</label>
<div class="col-sm-9"></div>
<div class="col-sm-3">
<input class="form-control input-lg" type="text" id="port-groups" placeholder="Example: pg1, pg2, pg3, pg1" required>
Expand Down Expand Up @@ -331,13 +344,14 @@

<div class="was-validated row mb-4">
<label for="controller-count" class="col-sm-2 col-form-label" data-bs-toggle="tooltip" data-bs-placement="right" title="Defines the number of controller pods to deploy." style="width: 180px;">Controller Pods Count</label>
<div class="col-sm-9"></div>
<div class="col-sm-2">
<input class="form-control input-sm" type="number" id="controller-count" min="1" oninput="validateInput(validateForm, CONSTANTS)" required>
</div>
<div class="col-sm-4">
<div class="row mt-1">
<a class="reset" id="reset-controller-count" onclick="resetControllerCount(csmMap)">Reset to default</a>
<div class="row">
<div class="col-sm-2">
<input class="form-control input-sm" type="number" id="controller-count" min="1" oninput="validateInput(validateForm, CONSTANTS)" required>
</div>
<div class="col-sm-4">
<div class="row mt-1">
<a class="reset" id="reset-controller-count" onclick="resetControllerCount(csmMap)">Reset to default</a>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -440,6 +454,10 @@
<div class="mt-3 mx-1">
<span id="command2"></span>
</div>
<div class="mt-3 mx-1 py-2 note" id="reverseProxyNote">
<i class="icon dds__icon dds__icon--alert-info-cir"></i>
<span class="h6">Click on the <a href="https://dell.github.io/csm-docs/docs/csidriver/features/powermax/#prerequisite" target="_blank">documentation link</a> for the steps to generate the certificates</span>
</div>
<div class="my-3"></div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
var commandTitle = 'Run the following commands to install';
var commandNote = 'Ensure that the namespaces and secrets are created before installing the helm chart';
var command1 = 'helm repo add dell https://dell.github.io/helm-charts';
var command2 = 'helm install $driver dell/container-storage-modules -n [namespace] -f values.yaml'
var command3 = 'helm install $driver dell/container-storage-modules -f values.yaml';
var command2 = 'helm install $release-name dell/container-storage-modules -n [namespace] -f values.yaml'
var command3 = 'helm install $release-name dell/container-storage-modules -f values.yaml';
var nodeSelectorNote = 'For the pod to be eligible to run on a node, the node must have the indicated key-value pair as label';

const snapshotNote = 'If Snapshot is enabled, ensure the Snapshot CRDs are installed';
const veleroNote = 'If Velero is enabled, please add the respective credentials and configurations in the YAML file.';
const podmonNote = 'Uncomment tolerations under node property, if CSM for Resiliency and CSI Driver pods monitor are enabled in the generated YAML';
const podmonNote = 'Uncomment tolerations under node property, if CSM for Resiliency and CSI Driver pods monitor are enabled in the generated YAML';
const authorizationNote ='Only the Authorization sidecar is enabled by the CSM Installation Wizard. The Proxy Server has to be installed and configured separately';
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ const CONSTANTS = {
POWERSTORE: "csi-powerstore",
POWERSCALE: "csi-powerscale",
POWERFLEX: "csi-powerflex",
POWERMAX: "csi-powermax",
POWERMAX: "powermax",
UNITY: "csi-unity",
POWERSTORE_RELEASE_NAME: "powerstore",
MODULE: "csm-modules",
CSM_VALUES: "csm-values",
TEMP_DIR: "templates/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function setValues(csmMapValues, CONSTANTS_PARAM) {
DriverValues.resiliency = $("#resiliency").prop('checked') ? true : false;
DriverValues.storageCapacity = $("#storage-capacity").prop('checked') ? true : false;
DriverValues.authorizationSkipCertValidation = $("#authorization-skip-cert-validation").prop('checked') ? true : false;
DriverValues.authorizationProxyHost = document.getElementById("authorization-proxy-host").value;
DriverValues.vgsnapshotImage = DriverValues.imageRepository + CONSTANTS_PARAM.SLASH + csmMapValues.get("vgsnapshotImage");
DriverValues.replicationImage = DriverValues.imageRepository + CONSTANTS_PARAM.SLASH + csmMapValues.get("replicationImage");
DriverValues.migrationImage = DriverValues.imageRepository + CONSTANTS_PARAM.SLASH + csmMapValues.get("migrationImage");
Expand Down Expand Up @@ -100,7 +101,6 @@ function setValues(csmMapValues, CONSTANTS_PARAM) {
DriverValues.storageArrayId = $("#storage-array-id").val();
DriverValues.storageArrayEndpointUrl = $("#storage-array-endpoint-url").val() || '""';
DriverValues.storageArrayBackupEndpointUrl = $("#storage-array-backup-endpoint-url").val() || '""';
DriverValues.managementServersEndpointUrl = $("#management-servers-endpoint-url").val() || '""';
DriverValues.clusterPrefix = $("#cluster-prefix").val();
DriverValues.portGroups = $("#port-groups").val();

Expand Down Expand Up @@ -131,6 +131,7 @@ function createYamlString(yaml, obj, driverParam, CONSTANTS_PARAM) {
yaml = yaml.replaceAll("$MIGRATION_IMAGE", obj.migrationImage);
yaml = yaml.replaceAll("$AUTHORIZATION_ENABLED", obj.authorization);
yaml = yaml.replaceAll("$AUTHORIZATION_IMAGE", obj.authorizationImage);
yaml = yaml.replaceAll("$AUTHORIZATION_PROXY_HOST", obj.authorizationProxyHost);
yaml = yaml.replaceAll("$AUTHORIZATION_SKIP_CERTIFICATE_VALIDATION", obj.authorizationSkipCertValidation);
yaml = yaml.replaceAll("$OBSERVABILITY_ENABLED", obj.observability);
yaml = yaml.replaceAll("$RESILIENCY_ENABLED", obj.resiliency);
Expand All @@ -141,7 +142,7 @@ function createYamlString(yaml, obj, driverParam, CONSTANTS_PARAM) {
yaml = yaml.replaceAll("$POWERMAX_STORAGE_ARRAY_ID", obj.storageArrayId);
yaml = yaml.replaceAll("$POWERMAX_STORAGE_ARRAY_ENDPOINT_URL", obj.storageArrayEndpointUrl);
yaml = yaml.replaceAll("$POWERMAX_STORAGE_ARRAY_BACKUP_ENDPOINT_URL", obj.storageArrayBackupEndpointUrl);
yaml = yaml.replaceAll("$POWERMAX_MANAGEMENT_SERVERS_ENDPOINT_URL", obj.managementServersEndpointUrl);
yaml = yaml.replaceAll("$POWERMAX_MANAGEMENT_SERVERS_ENDPOINT_URL", obj.storageArrayEndpointUrl);
yaml = yaml.replaceAll("$POWERMAX_CSI_REVERSE_PROXY_IMAGE", obj.powermaxCSIReverseProxyImage);
yaml = yaml.replaceAll("$POWERMAX_CLUSTER_PREFIX", obj.clusterPrefix);
yaml = yaml.replaceAll("$POWERMAX_PORT_GROUPS", obj.portGroups);
Expand All @@ -155,10 +156,12 @@ function createYamlString(yaml, obj, driverParam, CONSTANTS_PARAM) {

if (driverParam === CONSTANTS_PARAM.POWERSTORE) {
yaml = yaml.replaceAll("$POWERSTORE_ENABLED", true);
releaseName = CONSTANTS_PARAM.POWERSTORE_RELEASE_NAME;
} else if (driverParam === CONSTANTS_PARAM.POWERFLEX) {
yaml = yaml.replaceAll("$POWERFLEX_ENABLED", true);
} else if (driverParam === CONSTANTS_PARAM.POWERMAX) {
yaml = yaml.replaceAll("$POWERMAX_ENABLED", true);
releaseName = CONSTANTS_PARAM.POWERMAX;
} else if (driverParam === CONSTANTS_PARAM.POWERSCALE) {
yaml = yaml.replaceAll("$POWERSCALE_ENABLED", true);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ const CONSTANTS = {
POWERSTORE: "csi-powerstore",
POWERSCALE: "csi-powerscale",
POWERFLEX: "csi-powerflex",
POWERMAX: "csi-powermax",
UNITY: "csi-unity",
POWERMAX: "powermax",
UNITY: "csi-unity",
POWERSTORE_RELEASE_NAME: "powerstore",
MODULE: "csm-modules",
CSM_VALUES: "csm-values",
TEMP_DIR: "templates/",
Expand All @@ -48,6 +49,7 @@ describe("GIVEN setValues function", () => {
<input type="checkbox" id="node-pods-node-selector" checked>
<input type="text" id="driver-namespace" value="">
<input type="text" id="module-namespace" value="">
<input type="text" id="authorization-proxy-host" value="">
`;

const testCSMMap = new Map([
Expand Down Expand Up @@ -784,7 +786,7 @@ describe("GIVEN createYamlString function", () => {
namespace: ""
`;

const received = createYamlString(testYAML, testObject, "csi-powermax", CONSTANTS);
const received = createYamlString(testYAML, testObject, "powermax", CONSTANTS);

expect(received).toEqual(expected);
});
Expand Down Expand Up @@ -896,7 +898,7 @@ describe("GIVEN createYamlString function", () => {
namespace:
`;

const received = createYamlString(testYAML, testObjectSingleNamespaceDisabled, "csi-powermax", CONSTANTS);
const received = createYamlString(testYAML, testObjectSingleNamespaceDisabled, "powermax", CONSTANTS);

expect(received).toEqual(expected);
});
Expand Down
Loading

0 comments on commit 37cf9b3

Please sign in to comment.