Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions libs/locales/lib/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
"ai:Cluster installation is still in-progress.": "Cluster installation is still in-progress.",
"ai:Cluster installation process": "Cluster installation process",
"ai:Cluster installation was cancelled": "Cluster installation was cancelled.",
"ai:Cluster must be created before configuring infrastructure environment": "Cluster must be created before configuring infrastructure environment",
"ai:Cluster must have at least 3 hosts.": "Cluster must have at least 3 hosts.",
"ai:Cluster name": "Cluster name",
"ai:Cluster network CIDR": "Cluster network CIDR",
Expand Down Expand Up @@ -214,6 +215,7 @@
"ai:Configure environment": "Configure environment",
"ai:Configure host inventory settings": "Configure host inventory settings",
"ai:Configure load balancer on Amazon Web Services for me.": "Configure load balancer on Amazon Web Services for me.",
"ai:Configure proxy settings": "Configure proxy settings",
"ai:Configure the SSH key and proxy settings after the modal appears (optional).": "Configure the SSH key and proxy settings after the modal appears (optional).",
"ai:Configure your own NTP sources to sychronize the time between the hosts that will be added to this infrastructure environment.": "Configure your own NTP sources to sychronize the time between the hosts that will be added to this infrastructure environment.",
"ai:Configure your own NTP sources to synchronize the time between the hosts that will be added to this infrastructure environment.": "Configure your own NTP sources to synchronize the time between the hosts that will be added to this infrastructure environment.",
Expand Down Expand Up @@ -346,9 +348,11 @@
"ai:Failed to add hosts to the cluster": "Failed to add hosts to the cluster",
"ai:Failed to configure provisioning to enable registering hosts via BMC.": "Failed to configure provisioning to enable registering hosts via BMC.",
"ai:Failed to create AgentServiceConfig": "Failed to create AgentServiceConfig",
"ai:Failed to create infrastructure environment": "Failed to create infrastructure environment",
"ai:Failed to create IngressController": "Failed to create IngressController",
"ai:Failed to delete host": "Failed to delete host",
"ai:Failed to download the discovery Image": "Failed to download the discovery Image",
"ai:Failed to fetch cluster": "Failed to fetch cluster",
"ai:Failed to fetch cluster credentials.": "Failed to fetch cluster credentials.",
"ai:Failed to get Provisioning Configuration": "Failed to get Provisioning Configuration",
"ai:Failed to load Credentials Download step": "Failed to load Credentials Download step",
Expand All @@ -358,6 +362,7 @@
"ai:Failed to save configuration": "Failed to save configuration",
"ai:Failed to save host selection.": "Failed to save host selection.",
"ai:Failed to update host": "Failed to update host",
"ai:Failed to update infrastructure environment": "Failed to update infrastructure environment",
"ai:Failed validations:": "Failed validations:",
"ai:Failing infrastructure environment": "Failing infrastructure environment",
"ai:Fence Agents Remediation requirements": "Fence Agents Remediation requirements",
Expand Down Expand Up @@ -562,6 +567,7 @@
"ai:Minimum Memory": "Minimum Memory",
"ai:Minimum memory for selected role": "Minimum memory for selected role",
"ai:Minimum number of hosts": "Minimum number of hosts",
"ai:Missing cluster": "Missing cluster",
"ai:Model": "Model",
"ai:Modify your platform configuration to access your platform's features directly in OpenShift.": "Modify your platform configuration to access your platform's features directly in OpenShift.",
"ai:More info for configure storage sizes": "More information for configure storage sizes",
Expand Down Expand Up @@ -670,6 +676,7 @@
"ai:Operators": "Operators",
"ai:Option 1: Add the following records to your DNS server (recommended)": "Option 1: Add the following records to your DNS server (recommended)",
"ai:Option 2: Update your local /etc/hosts or /etc/resolv.conf files": "Option 2: Update your local /etc/hosts or /etc/resolv.conf files",
"ai:Optional configurations": "Optional configurations",
"ai:Otherwise, the VMs will not be able to reboot during the installation process.": "Otherwise, the VMs will not be able to reboot during the installation process.",
"ai:OVN separates the physical network topology from the logical one and is recommended if you're using new or telco features.": "OVN separates the physical network topology from the logical one and is recommended if you are using new or telco features.",
"ai:Packet loss": "Packet loss",
Expand Down Expand Up @@ -739,6 +746,7 @@
"ai:Removing {{name}} will remove the association with {{count}} host. These hosts will become available for other nodepools._plural": "Removing {{name}} will remove the association with {{count}} hosts. These hosts will become available for other nodepools.",
"ai:Removing from cluster": "Removing from cluster",
"ai:Rename hostnames using the custom template:": "Rename hostnames using the custom template:",
"ai:Rendezvous IP": "Rendezvous IP",
"ai:Report a bug": "Report a bug",
"ai:Required field": "Required field",
"ai:Requirements for Two Node control plane OpenShift": "Requirements for Two Node control plane OpenShift",
Expand Down Expand Up @@ -840,6 +848,7 @@
"ai:The hosts you selected are using different proxy settings. Configure a proxy that will be applied for these hosts. <bold>Configure at least one of the proxy settings below.</bold>": "The hosts you selected are using different proxy settings. Configure a proxy that will be applied for these hosts. <bold>Configure at least one of the following proxy settings.</bold>",
"ai:The HTTP proxy URL that agents should use to access the discovery service.": "The HTTP proxy URL that agents should use to access the discovery service.",
"ai:The IP address pool to use for service IP addresses. You can enter only one IP address pool. If you need to access the services from an external network, configure load balancers and routers to manage the traffic.": "The IP address pool to use for service IP addresses. You can enter only one IP address pool. If you need to access the services from an external network, configure load balancers and routers to manage the traffic.",
"ai:The IP address that hosts will use to communicate with the bootstrap node during installation.": "The IP address that hosts will use to communicate with the bootstrap node during installation.",
"ai:The MAC address of the host's network connected NIC that will be used to provision the host.": "The MAC address of the host's network connected NIC that will be used to provision the host.",
"ai:The output displays the following:": "The output displays the following:",
"ai:The resource has been saved and the YAML is now read only.": "The resource has been saved and the YAML is now read only.",
Expand Down
26 changes: 25 additions & 1 deletion libs/types/assisted-installer-service.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ export interface ImageInfo {
staticNetworkConfig?: string;
type?: ImageType;
}
export type ImageType = 'full-iso' | 'minimal-iso';
export type ImageType = 'full-iso' | 'minimal-iso' | 'disconnected-iso';
export interface ImportClusterParams {
/**
* OpenShift cluster name.
Expand Down Expand Up @@ -1830,6 +1830,14 @@ export interface InfraEnv {
* certificates in this bundle.
*/
additionalTrustBundle?: string;
/**
* The IP address that hosts will use to communicate with the bootstrap node during installation.
*/
rendezvousIp?: string;
/**
* The type of network configuration for hosts: 'dhcp' for DHCP only, 'static' for static IP configuration.
*/
hostsNetworkConfigurationType?: 'dhcp' | 'static';
}
export interface InfraEnvCreateParams {
/**
Expand Down Expand Up @@ -1875,6 +1883,14 @@ export interface InfraEnvCreateParams {
* certificates in this bundle.
*/
additionalTrustBundle?: string;
/**
* The IP address that hosts will use to communicate with the bootstrap node during installation.
*/
rendezvousIp?: string;
/**
* The type of network configuration for hosts: 'dhcp' for DHCP only, 'static' for static IP configuration.
*/
hostsNetworkConfigurationType?: 'dhcp' | 'static';
}
export type InfraEnvList = InfraEnv[];
export interface InfraEnvUpdateParams {
Expand Down Expand Up @@ -1906,6 +1922,14 @@ export interface InfraEnvUpdateParams {
* Version of the OS image
*/
openshiftVersion?: string;
/**
* The IP address that hosts will use to communicate with the bootstrap node during installation.
*/
rendezvousIp?: string;
/**
* The type of network configuration for hosts: 'dhcp' for DHCP only, 'static' for static IP configuration.
*/
hostsNetworkConfigurationType?: 'dhcp' | 'static';
}
export interface InfraError {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const discoveryImageTypes: Record<DiscoveryImageType, string> = {
'minimal-iso': 'Minimal image file - Download an ISO that fetches content on boot',
'full-iso': 'Full image file - Download a self-contained ISO',
'discovery-image-ipxe': 'iPXE - Provision from your network server',
'disconnected-iso': 'Disconnected ISO - Provision from a local file',
};

type DiscoveryImageTypeDropdownProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
import { Formik, FormikHelpers } from 'formik';
import {
HostStaticNetworkConfig,
ImageType,
InfraEnv,
Proxy,
} from '@openshift-assisted/types/assisted-installer-service';
Expand Down Expand Up @@ -70,7 +69,7 @@ type OcmDiscoveryImageConfigFormProps = Proxy & {
formikActions: FormikHelpers<OcmDiscoveryImageFormValues>,
) => Promise<void>;
sshPublicKey?: string;
imageType?: ImageType;
imageType?: DiscoveryImageType;
isIpxeSelected?: boolean;
enableCertificate?: boolean;
trustBundle?: InfraEnv['additionalTrustBundle'];
Expand Down Expand Up @@ -104,7 +103,7 @@ export const OcmDiscoveryImageConfigForm = ({
httpsProxy: httpsProxy || '',
noProxy: noProxy || '',
enableProxy: !!(httpProxy || httpsProxy || noProxy),
imageType: imageTypeValue as ImageType,
imageType: imageType,
enableCertificate: enableCertificate || false,
trustBundle: trustBundle || '',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,33 @@ const getWizardStepIds = (
return stepsCopy;
};

// Same logic as getWizardStepIds but for disconnected flow
// Adds static IP steps after 'disconnected-optional-configurations' instead of 'cluster-details'
const getDisconnectedWizardStepIds = (
wizardStepIds: ClusterWizardStepsType[] | undefined,
staticIpView?: StaticIpView | 'dhcp-selected',
): ClusterWizardStepsType[] => {
let stepsCopy = wizardStepIds ? [...wizardStepIds] : [...disconnectedSteps];
if (staticIpView === StaticIpView.YAML) {
stepsCopy = removeStepFromClusterWizard(stepsCopy, 'static-ip-network-wide-configurations', 2);
stepsCopy = addStepToClusterWizard(stepsCopy, 'disconnected-optional-configurations', [
'static-ip-yaml-view',
]);
} else if (staticIpView === StaticIpView.FORM) {
stepsCopy = removeStepFromClusterWizard(stepsCopy, 'static-ip-yaml-view', 1);
stepsCopy = addStepToClusterWizard(
stepsCopy,
'disconnected-optional-configurations',
staticIpFormViewSubSteps,
);
} else if (staticIpView === 'dhcp-selected') {
stepsCopy = removeStepFromClusterWizard(stepsCopy, 'static-ip-network-wide-configurations', 2);
stepsCopy = removeStepFromClusterWizard(stepsCopy, 'static-ip-yaml-view', 1);
}

return stepsCopy;
};

const ClusterWizardContextProvider = ({
children,
cluster,
Expand All @@ -89,6 +116,8 @@ const ClusterWizardContextProvider = ({
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
const [currentStepId, setCurrentStepId] = React.useState<ClusterWizardStepsType>();
const [connectedWizardStepIds, setWizardStepIds] = React.useState<ClusterWizardStepsType[]>();
const [disconnectedWizardStepIds, setDisconnectedWizardStepIds] =
React.useState<ClusterWizardStepsType[]>(disconnectedSteps);
const [wizardPerPage, setWizardPerPage] = React.useState(10);
const [customManifestsStep, setCustomManifestsStep] = React.useState<boolean>(false);
const [installDisconnected, setInstallDisconnected] = React.useState(false);
Expand All @@ -106,7 +135,7 @@ const ClusterWizardContextProvider = ({
const { clearAlerts, addAlert, alerts } = useAlerts();
const setClusterPermissions = useSetClusterPermissions();

const wizardStepIds = installDisconnected ? disconnectedSteps : connectedWizardStepIds;
const wizardStepIds = installDisconnected ? disconnectedWizardStepIds : connectedWizardStepIds;

React.useEffect(() => {
if (!UISettingsLoading) {
Expand Down Expand Up @@ -165,17 +194,29 @@ const ClusterWizardContextProvider = ({

const handleMoveFromStaticIp = () => {
//if static ip view change wasn't persisted, moving from static ip step should change the wizard steps to match the view in the infra env
const staticIpInfo = infraEnv ? getStaticIpInfo(infraEnv) : undefined;
const currentInfraEnv = installDisconnected ? disconnectedInfraEnv : infraEnv;
const staticIpInfo = currentInfraEnv ? getStaticIpInfo(currentInfraEnv) : undefined;
if (!staticIpInfo) {
throw `Wizard step is currently ${currentStepId}, but no static ip info is defined`;
}
const newStepIds = getWizardStepIds(
wizardStepIds,
staticIpInfo.view,
customManifestsStep,
isSingleClusterFeatureEnabled,
);
setWizardStepIds(newStepIds);

if (installDisconnected) {
// For disconnected wizard, update wizard steps directly (same pattern as connected)
const newStepIds = getDisconnectedWizardStepIds(
disconnectedWizardStepIds,
staticIpInfo.view,
);
setDisconnectedWizardStepIds(newStepIds);
} else {
// For connected wizard, update wizard steps directly
const newStepIds = getWizardStepIds(
wizardStepIds,
staticIpInfo.view,
customManifestsStep,
isSingleClusterFeatureEnabled,
);
setWizardStepIds(newStepIds);
}
};

const onSetCurrentStepId = (stepId: ClusterWizardStepsType) => {
Expand Down Expand Up @@ -219,31 +260,57 @@ const ClusterWizardContextProvider = ({
} else {
setCurrentStepId('static-ip-network-wide-configurations');
}
setWizardStepIds(
getWizardStepIds(wizardStepIds, view, customManifestsStep, isSingleClusterFeatureEnabled),
);
},
onUpdateHostNetworkConfigType(type: HostsNetworkConfigurationType): void {
if (type === HostsNetworkConfigurationType.STATIC) {
setWizardStepIds(
getWizardStepIds(
wizardStepIds,
StaticIpView.FORM,
customManifestsStep,
isSingleClusterFeatureEnabled,
),
if (installDisconnected) {
// For disconnected wizard, update wizard steps (same pattern as connected)
setDisconnectedWizardStepIds(
getDisconnectedWizardStepIds(disconnectedWizardStepIds, view),
);
} else {
setWizardStepIds(
getWizardStepIds(
wizardStepIds,
'dhcp-selected',
view,
customManifestsStep,
isSingleClusterFeatureEnabled,
),
);
}
},
onUpdateHostNetworkConfigType(type: HostsNetworkConfigurationType): void {
if (installDisconnected) {
// For disconnected wizard, update wizard steps (same pattern as connected)
if (type === HostsNetworkConfigurationType.STATIC) {
setDisconnectedWizardStepIds(
getDisconnectedWizardStepIds(disconnectedWizardStepIds, StaticIpView.FORM),
);
} else {
setDisconnectedWizardStepIds(
getDisconnectedWizardStepIds(disconnectedWizardStepIds, 'dhcp-selected'),
);
}
} else {
// For connected wizard, update wizard steps directly
if (type === HostsNetworkConfigurationType.STATIC) {
setWizardStepIds(
getWizardStepIds(
wizardStepIds,
StaticIpView.FORM,
customManifestsStep,
isSingleClusterFeatureEnabled,
),
);
} else {
setWizardStepIds(
getWizardStepIds(
wizardStepIds,
'dhcp-selected',
customManifestsStep,
isSingleClusterFeatureEnabled,
),
);
}
}
},
wizardStepIds: wizardStepIds,
currentStepId,
setCurrentStepId: onSetCurrentStepId,
Expand Down Expand Up @@ -276,8 +343,8 @@ const ClusterWizardContextProvider = ({
uiSettings,
updateUISettings,
installDisconnected,
setInstallDisconnected,
connectedWizardStepIds,
disconnectedWizardStepIds,
disconnectedInfraEnv,
]);

Expand Down
14 changes: 11 additions & 3 deletions libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { useClusterWizardContext } from './ClusterWizardContext';
import ReviewStep from './disconnected/ReviewStep';
import BasicStep from './disconnected/BasicStep';
import OptionalConfigurationsStep from './disconnected/OptionalConfigurationsStep';
import DisconnectedStaticIp from './disconnected/DisconnectedStaticIp';
import { ClusterWizardStepsType } from './wizardTransition';
import { ModalDialogsContextProvider } from '../hosts/ModalDialogsContext';

const getCurrentStep = (currentStepId: ClusterWizardStepsType) => {
switch (currentStepId) {
Expand All @@ -15,6 +17,10 @@ const getCurrentStep = (currentStepId: ClusterWizardStepsType) => {
return <BasicStep />;
case 'disconnected-optional-configurations':
return <OptionalConfigurationsStep />;
case 'static-ip-yaml-view':
case 'static-ip-network-wide-configurations':
case 'static-ip-host-configurations':
return <DisconnectedStaticIp />;
default:
return <ClusterDetails />;
}
Expand All @@ -23,9 +29,11 @@ const getCurrentStep = (currentStepId: ClusterWizardStepsType) => {
const NewClusterWizard: React.FC = () => {
const { currentStepId } = useClusterWizardContext();
return (
<div className={classNames('pf-v6-c-wizard', 'cluster-wizard')}>
{getCurrentStep(currentStepId)}
</div>
<ModalDialogsContextProvider>
<div className={classNames('pf-v6-c-wizard', 'cluster-wizard')}>
{getCurrentStep(currentStepId)}
</div>
</ModalDialogsContextProvider>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const BasicStep = () => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
await ClustersService.registerDisconnected({
name: 'disconnected-cluster',
openshiftVersion: '4.20',
openshiftVersion: '4.22',
});
disconnectedClusterId = disconnectedCluster.id;
navigate(`${currentPath}/${disconnectedClusterId}`, {
Expand Down Expand Up @@ -98,7 +98,7 @@ const BasicStep = () => {
</GridItem>
<GridItem>
<Form id="wizard-cluster-basic-info__form">
<OcmOpenShiftVersion openshiftVersion="4.20" withPreviewText withMultiText>
<OcmOpenShiftVersion openshiftVersion="4.22" withPreviewText withMultiText>
<ExternalLink href={`${window.location.origin}/${OCP_RELEASES_PAGE}`}>
<span data-ouia-id="openshift-releases-link">
{t('ai:Learn more about OpenShift releases')}
Expand Down
Loading
Loading