Skip to content

Commit

Permalink
Merge pull request #1850 from bipuladh/converged
Browse files Browse the repository at this point in the history
RHSTOR-6905: Enhance storage system creation flow
  • Loading branch information
openshift-merge-bot[bot] authored Feb 17, 2025
2 parents af0c286 + 29a0b34 commit e143482
Show file tree
Hide file tree
Showing 20 changed files with 634 additions and 396 deletions.
19 changes: 13 additions & 6 deletions locales/en/plugin__odf-console.json
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,6 @@
"Files should be named private and public followed by compatible extensions": "Files should be named private and public followed by compatible extensions",
"Deploys MultiCloud Object Gateway without block and file services.": "Deploys MultiCloud Object Gateway without block and file services.",
"Deploys Data Foundation with block, shared fileSystem and object services.": "Deploys Data Foundation with block, shared fileSystem and object services.",
"Deploys Data Foundation as a provider cluster": "Deploys Data Foundation as a provider cluster",
"Deployment type": "Deployment type",
"Use Ceph RBD as the default StorageClass": "Use Ceph RBD as the default StorageClass",
"Configure default RBD StorageClass to avoid adding manual annotations within a StorageClass and selecting a specific StorageClass when making storage requests or provisions in your PVCs.": "Configure default RBD StorageClass to avoid adding manual annotations within a StorageClass and selecting a specific StorageClass when making storage requests or provisions in your PVCs.",
Expand Down Expand Up @@ -964,13 +963,10 @@
"Encryption: {{encryptionStatus}}": "Encryption: {{encryptionStatus}}",
"In-transit encryption: {{hasInTransitEncryption}}": "In-transit encryption: {{hasInTransitEncryption}}",
"Network: {{networkType}}": "Network: {{networkType}}",
"Public Network Interface": "Public Network Interface",
"Select NetworkAttachmentDefinition": "Select NetworkAttachmentDefinition",
"Cluster Network Interface": "Cluster Network Interface",
"Network": "Network",
"Default (OVN)": "Default (OVN)",
"Default (Pod)": "Default (Pod)",
"The default OVN uses a single network for all data operations such as read/write and also for control planes, such as data replication.": "The default OVN uses a single network for all data operations such as read/write and also for control planes, such as data replication.",
"Custom (Multus)": "Custom (Multus)",
"Host": "Host",
"Multus allows a network seperation between the data operations and the control plane operations.": "Multus allows a network seperation between the data operations and the control plane operations.",
"Encryption level": "Encryption level",
"The StorageCluster encryption level can be set to include all components under the cluster (including StorageClass and PVs) or to include only StorageClass encryption. PV encryption can use an auth token that will be used with the KMS configuration to allow multi-tenancy.": "The StorageCluster encryption level can be set to include all components under the cluster (including StorageClass and PVs) or to include only StorageClass encryption. PV encryption can use an auth token that will be used with the KMS configuration to allow multi-tenancy.",
Expand All @@ -984,6 +980,17 @@
"Encrypts all Ceph traffic including data, using Ceph msgrv2": "Encrypts all Ceph traffic including data, using Ceph msgrv2",
"Verify your RHCS cluster has the necessary in-transit encryption settings configured to enable in-transit encryption on your external cluster. Refer to the documentation for detailed configuration steps.": "Verify your RHCS cluster has the necessary in-transit encryption settings configured to enable in-transit encryption on your external cluster. Refer to the documentation for detailed configuration steps.",
"Documentation link": "Documentation link",
"Isolate network using Multus": "Isolate network using Multus",
"Public Network Interface": "Public Network Interface",
"Select NetworkAttachmentDefinition": "Select NetworkAttachmentDefinition",
"Cluster Network Interface": "Cluster Network Interface",
"Isolate network using NIC Operators": "Isolate network using NIC Operators",
"Specify the public and network interfaces that Ceph will use for data traffic. Use CIDR notation to define the IP addresses which will bind to on the host.": "Specify the public and network interfaces that Ceph will use for data traffic. Use CIDR notation to define the IP addresses which will bind to on the host.",
"Nodes must be annotated with network.rook.io/mon-ip: <IPAddress> to set the correct IP address for the mon before proceeding with the host networking configuration. This ensures that the mons operate on the desired network": "Nodes must be annotated with network.rook.io/mon-ip: <IPAddress> to set the correct IP address for the mon before proceeding with the host networking configuration. This ensures that the mons operate on the desired network",
"Ceph Cluster CIDR": "Ceph Cluster CIDR",
"Enter a CIDR block (Eg: 192.168.100.0/24)": "Enter a CIDR block (Eg: 192.168.100.0/24)",
"Ceph Public CIDR": "Ceph Public CIDR",
"Enter a CIDR block (Eg: 192.168.0.0/32)": "Enter a CIDR block (Eg: 192.168.0.0/32)",
"An error has occurred: {{error}}": "An error has occurred: {{error}}",
"The uploaded file is not a valid JSON file": "The uploaded file is not a valid JSON file",
"External storage system metadata": "External storage system metadata",
Expand Down
40 changes: 0 additions & 40 deletions packages/odf/components/create-storage-system/create-steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const createSteps = (
const { encryption, kms } = securityAndNetwork;

const isMCG = deployment === DeploymentType.MCG;
const isProviderMode = deployment === DeploymentType.PROVIDER_MODE;

const commonSteps = {
capacityAndNodes: {
Expand All @@ -52,7 +51,6 @@ export const createSteps = (
volumeSetName={createLocalVolumeSet.volumeSetName}
nodes={nodes}
systemNamespace={systemNamespace}
deploymentMode={backingStorage.deployment}
/>
),
},
Expand All @@ -76,7 +74,6 @@ export const createSteps = (
kms={kms}
dispatch={dispatch}
isMCG={isMCG}
isProviderMode={isProviderMode}
systemNamespace={systemNamespace}
/>
),
Expand Down Expand Up @@ -167,24 +164,6 @@ export const createSteps = (
...commonSteps.reviewAndCreate,
},
];
} else if (isProviderMode) {
return [
{
id: 2,
canJumpTo: stepIdReached >= 2,
...commonSteps.capacityAndNodes,
},
{
id: 3,
canJumpTo: stepIdReached >= 3,
...commonSteps.security,
},
{
id: 4,
canJumpTo: stepIdReached >= 4,
...commonSteps.reviewAndCreate,
},
];
} else
return [
{
Expand Down Expand Up @@ -218,25 +197,6 @@ export const createSteps = (
...commonSteps.reviewAndCreate,
},
];
} else if (isProviderMode) {
return [
createLocalVolumeSetStep,
{
canJumpTo: stepIdReached >= 3,
...commonSteps.capacityAndNodes,
id: 3,
},
{
id: 4,
canJumpTo: stepIdReached >= 4,
...commonSteps.security,
},
{
id: 5,
canJumpTo: stepIdReached >= 5,
...commonSteps.reviewAndCreate,
},
];
}
return [
createLocalVolumeSetStep,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
STORAGE_CLUSTER_SYSTEM_KIND,
NO_PROVISIONER,
} from '@odf/core/constants';
import { PROVIDER_MODE } from '@odf/core/features';
import { useSafeK8sGet } from '@odf/core/hooks';
import { useODFNamespaceSelector } from '@odf/core/redux';
import { scResource } from '@odf/core/resources';
Expand All @@ -27,7 +26,6 @@ import {
} from '@odf/shared/types';
import { useCustomTranslation } from '@odf/shared/useCustomTranslationHook';
import { isDefaultClass, getODFCsv, getGVKLabel } from '@odf/shared/utils';
import { useFlag } from '@openshift-console/dynamic-plugin-sdk';
import * as _ from 'lodash-es';
import {
Form,
Expand Down Expand Up @@ -214,8 +212,6 @@ export const BackingStorage: React.FC<BackingStorageProps> = ({
>(ClusterServiceVersionModel, null, odfNamespace);

const isFullDeployment = deployment === DeploymentType.FULL;
const isProviderMode = deployment === DeploymentType.PROVIDER_MODE;
const isProviderModePresent = useFlag(PROVIDER_MODE) && hasInternal;
const isNonRHCSExternalType =
type === BackingStorageType.EXTERNAL &&
externalStorage !== StorageClusterModel.kind;
Expand Down Expand Up @@ -272,7 +268,7 @@ export const BackingStorage: React.FC<BackingStorageProps> = ({
* Allow pre selecting the "external connection" option instead of the "existing" option
* if an OCS Storage System is already created.
*/
if (hasOCS && allowedExternalStorage.length && !isProviderModePresent) {
if (hasOCS && allowedExternalStorage.length) {
dispatch({
type: 'backingStorage/setType',
payload: BackingStorageType.EXTERNAL,
Expand All @@ -285,7 +281,7 @@ export const BackingStorage: React.FC<BackingStorageProps> = ({
},
});
}
}, [dispatch, allowedExternalStorage.length, hasOCS, isProviderModePresent]);
}, [dispatch, allowedExternalStorage.length, hasOCS]);

React.useEffect(() => {
/*
Expand Down Expand Up @@ -390,11 +386,7 @@ export const BackingStorage: React.FC<BackingStorageProps> = ({
value={BackingStorageType.EXTERNAL}
isChecked={type === BackingStorageType.EXTERNAL}
onChange={(event, _unused) => onRadioSelect(_unused, event)}
isDisabled={
allowedExternalStorage.length === 0 ||
isProviderMode ||
isProviderModePresent
}
isDisabled={allowedExternalStorage.length === 0}
body={
showExternalStorageSelection && (
<ExternalSystemSelection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import * as React from 'react';
import { FDF_FLAG } from '@odf/core/redux';
import { BackingStorageType, DeploymentType } from '@odf/core/types';
import { DeploymentType } from '@odf/core/types';
import { useCustomTranslation } from '@odf/shared/useCustomTranslationHook';
import { useFlag } from '@openshift-console/dynamic-plugin-sdk';
import {
Select,
SelectOption,
Expand All @@ -14,12 +12,8 @@ import { FormGroup } from '@patternfly/react-core';
import { WizardDispatch, WizardState } from '../../reducer';
import './backing-storage-step.scss';

const selectOptions = (t: TFunction, isFDF: boolean) => {
const options = [
DeploymentType.FULL,
...(isFDF ? [DeploymentType.PROVIDER_MODE] : []),
DeploymentType.MCG,
];
const selectOptions = (t: TFunction) => {
const options = [DeploymentType.FULL, DeploymentType.MCG];

const optionsDescription = {
[DeploymentType.MCG]: t(
Expand All @@ -28,9 +22,6 @@ const selectOptions = (t: TFunction, isFDF: boolean) => {
[DeploymentType.FULL]: t(
'Deploys Data Foundation with block, shared fileSystem and object services.'
),
[DeploymentType.PROVIDER_MODE]: t(
'Deploys Data Foundation as a provider cluster'
),
};

return options.map((option) => (
Expand All @@ -51,20 +42,12 @@ export const SelectDeployment: React.FC<SelectDeploymentProps> = ({
const { t } = useCustomTranslation();
const [isSelectOpen, setIsSelectOpen] = React.useState(false);

const isFDF = useFlag(FDF_FLAG);

const handleSelection: SelectProps['onSelect'] = (_, value) => {
dispatch({
type: 'backingStorage/setDeployment',
// 'value' on SelectProps['onSelect'] is string hence does not match with payload of type "DeploymentType"
payload: value as DeploymentType,
});
if (value === DeploymentType.PROVIDER_MODE) {
dispatch({
type: 'backingStorage/setType',
payload: BackingStorageType.EXISTING,
});
}
setIsSelectOpen(false);
};

Expand All @@ -85,7 +68,7 @@ export const SelectDeployment: React.FC<SelectDeploymentProps> = ({
selections={deployment}
isOpen={isSelectOpen}
>
{selectOptions(t, isFDF)}
{selectOptions(t)}
</Select>
</FormGroup>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
import { useNodesData } from '@odf/core/hooks';
import { pvResource } from '@odf/core/resources';
import {
DeploymentType,
NodeData,
NodesPerZoneMap,
ResourceProfile,
Expand Down Expand Up @@ -420,7 +419,6 @@ export const CapacityAndNodes: React.FC<CapacityAndNodesProps> = ({
volumeSetName,
nodes,
systemNamespace,
deploymentMode,
}) => {
const {
capacity,
Expand All @@ -433,7 +431,6 @@ export const CapacityAndNodes: React.FC<CapacityAndNodesProps> = ({
} = state;

const isNoProvisioner = storageClass.provisioner === NO_PROVISIONER;
const isProviderMode = deploymentMode === DeploymentType.PROVIDER_MODE;
const flexibleScaling = isFlexibleScaling(
nodes,
isNoProvisioner,
Expand All @@ -453,7 +450,6 @@ export const CapacityAndNodes: React.FC<CapacityAndNodesProps> = ({
isNoProvisioner,
resourceProfile,
osdAmount,
deploymentMode,
volumeValidationType
);
const onProfileChange = React.useCallback(
Expand Down Expand Up @@ -487,16 +483,14 @@ export const CapacityAndNodes: React.FC<CapacityAndNodesProps> = ({
)}
{(!isNoProvisioner || nodes.length > 0) && (
<>
{!isProviderMode && (
<ConfigurePerformance
onResourceProfileChange={onProfileChange}
resourceProfile={resourceProfile}
headerText={PerformanceHeaderText}
profileRequirementsText={ProfileRequirementsText}
selectedNodes={nodes}
osdAmount={osdAmount}
/>
)}
<ConfigurePerformance
onResourceProfileChange={onProfileChange}
resourceProfile={resourceProfile}
headerText={PerformanceHeaderText}
profileRequirementsText={ProfileRequirementsText}
selectedNodes={nodes}
osdAmount={osdAmount}
/>
<EnableTaintNodes dispatch={dispatch} enableTaint={enableTaint} />
</>
)}
Expand All @@ -522,5 +516,4 @@ type CapacityAndNodesProps = {
volumeSetName: WizardState['createLocalVolumeSet']['volumeSetName'];
dispatch: WizardDispatch;
systemNamespace: WizardState['backingStorage']['systemNamespace'];
deploymentMode: DeploymentType;
};
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({

// NooBaa standalone deployment
const isMCG = deployment === DeploymentType.MCG;
const isProviderMode = deployment === DeploymentType.PROVIDER_MODE;
// External Red Hat Ceph Storage deployment
const isRhcs = !_.isEmpty(connectionDetails);
// External IBM deployment without ODF
Expand Down Expand Up @@ -164,13 +163,11 @@ export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({
memory: humanizeBinaryBytes(totalMemory).string,
})}
</ListItem>
{!isProviderMode && (
<ListItem>
{t('Performance profile: {{resourceProfile}}', {
resourceProfile: _.capitalize(capacityAndNodes.resourceProfile),
})}
</ListItem>
)}
<ListItem>
{t('Performance profile: {{resourceProfile}}', {
resourceProfile: _.capitalize(capacityAndNodes.resourceProfile),
})}
</ListItem>
<ListItem>
{t('Zone: {{zoneCount, number}} zone', {
zoneCount: zones.size,
Expand Down Expand Up @@ -219,13 +216,11 @@ export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({
})}
</ListItem>
)}
{!isProviderMode && (
<ListItem>
{t('Network: {{networkType}}', {
networkType: NetworkTypeLabels[networkType],
})}
</ListItem>
)}
<ListItem>
{t('Network: {{networkType}}', {
networkType: NetworkTypeLabels[networkType],
})}
</ListItem>
</ReviewItem>
))}
{isRhcs && (
Expand Down
Loading

0 comments on commit e143482

Please sign in to comment.