From dd0813101c572f9e4b77f713e5c2663bc7e1d607 Mon Sep 17 00:00:00 2001 From: Mohit Suman Date: Fri, 17 Jun 2022 01:42:33 +0530 Subject: [PATCH 1/3] add support for OpenShift local 2.4.1 Signed-off-by: Mohit Suman --- src/webview/cluster/app/cluster.tsx | 8 +++---- src/webview/cluster/app/clusterView.tsx | 31 ++++++++++++------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/webview/cluster/app/cluster.tsx b/src/webview/cluster/app/cluster.tsx index 72ad3fd93..0cef0257e 100644 --- a/src/webview/cluster/app/cluster.tsx +++ b/src/webview/cluster/app/cluster.tsx @@ -27,18 +27,18 @@ const useStyles = makeStyles(clusterStyle); const clusterTypes = [ { heading: 'Deploy it locally on your laptop', - description: 'Install on Laptop: Red Hat CodeReady Containers.', + description: 'Install on Laptop: Red Hat OpenShift Local(formerly Red Hat CodeReady Containers)', smallInfo: 'Create a minimal OpenShift 4 cluster on your desktop/laptop for local development and testing.', imageUrl: ['https://www.openshift.com/hubfs/images/icons/Icon-Red_Hat-Hardware-Laptop-A-Black-RGB.svg'], urlAlt: 'crc', redirectLink: '', buttonText: 'Create/Refresh cluster', - tooltip: 'You can create/run local OpenShift 4 cluster using this wizard.' + tooltip: 'Create/Run local OpenShift 4 cluster using the guided workflow' }, { heading: 'Launch Developer Sandbox', description: 'Free access to the Developer Sandbox for Red Hat OpenShift', - smallInfo: 'The sandbox provides you with a private OpenShift environment in a shared, multi-tenant OpenShift cluster that is pre-configured with a set of developer tools.', + smallInfo: 'If you are exploring how to run your code as containers in OpenShift, our free Developer Sandbox instantly gives you a way to try it out.', imageUrl: ['https://assets.openshift.com/hubfs/images/logos/osh/Logo-Red_Hat-OpenShift-A-Standard-RGB.svg'], urlAlt: 'dev sandbox', redirectLink: '', @@ -151,7 +151,7 @@ export default function Header() {
- Red Hat CodeReady Containers brings a minimal OpenShift 4 cluster to your local computer.

You can use this wizard to create OpenShift cluster locally. Cluster take approximately 15 minutes to provision. + Red Hat OpenShift Local brings a minimal OpenShift 4 cluster to your local computer.

You can use this guided workflow to create OpenShift cluster locally. Cluster take approximately 15 minutes to provision.
diff --git a/src/webview/cluster/app/clusterView.tsx b/src/webview/cluster/app/clusterView.tsx index 34e3c8b34..f5aa58d12 100644 --- a/src/webview/cluster/app/clusterView.tsx +++ b/src/webview/cluster/app/clusterView.tsx @@ -53,14 +53,14 @@ const crcDefaults = { // eslint-disable-next-line @typescript-eslint/explicit-function-return-type function getSteps() { - return ['CodeReady Containers archive', 'File path of image pull secret', 'Select optional configurations', 'Setup CRC', 'Start the cluster']; + return ['Download OpenShift Local', 'File path of image pull secret', 'Select optional configurations', 'Setup OpenShift Local', 'Start the cluster']; } // eslint-disable-next-line @typescript-eslint/explicit-function-return-type export default function addClusterView(props) { const classes = useStyles(); - const crcLatest = '1.40.0'; - const crcOpenShift = '4.9.18'; + const crcLatest = '2.4.1'; + const crcOpenShift = '4.10.14'; const [fileName, setBinaryPath] = React.useState(''); const [pullSecretPath, setSecret] = React.useState(''); const [cpuSize, setCpuSize] = React.useState(crcDefaults.DefaultCPUs); @@ -218,7 +218,7 @@ export default function addClusterView(props) { }; const handleDisabled = () => { - return (activeStep === 1 && fileName === '') + return (activeStep === 1 && fileName === '') || (activeStep === 2 && pullSecretPath === ''); }; @@ -226,7 +226,7 @@ export default function addClusterView(props) { setStopProgress(true); setCrcStopError(false); props.vscode.postMessage({ - action: 'crcStop', + action: 'crcStop', data: { tool: fileName } @@ -339,7 +339,7 @@ export default function addClusterView(props) {
- CodeReady Containers Status: {status.crcStatus}}/> + OpenShift Local Status: {status.crcStatus}}/> OpenShift Status: {status.openshiftStatus}}/> @@ -396,7 +396,7 @@ export default function addClusterView(props) { )} {(statusSkeleton && !statusError) && (
- Refreshing the crc status + Refreshing the OpenShift Local status
)} @@ -461,7 +461,7 @@ export default function addClusterView(props) { case 0: return (
- Download and extract the CodeReady Containers archive for your operating system and place the executable in your $PATH + Download and open the OpenShift Local file. Opening the file will automatically start a step-by-step installation guide. @@ -471,15 +471,14 @@ export default function addClusterView(props) { This will download the CodeReady Containers {crcLatest} archive}/> + secondary={This will download OpenShift local {crcLatest}}/> @@ -492,7 +491,7 @@ export default function addClusterView(props) { Executable Location*} - secondary={Provide the CodeReady Containers {crcLatest} executable location} /> + secondary={Provide the OpenShift Local {crcLatest} executable location} />
Set up your host operating system for the CodeReady Containers virtual machine} + primary={Set up your host operating system for the OpenShift Local virtual machine} secondary={Once the setup process is successful, then proceed to start the cluster in Next step.} />