blob: 274bf1f942e35c9ec1221f674c4a754f12a0acb7 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-112407000-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-112407000-2');
</script>
<!-- Google Tag Manager -->
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({
'gtm.start': new Date().getTime(),
event: 'gtm.js'
});
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != 'dataLayer' ? '&l=' + l : '';
j.async = true;
j.src =
'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-KS8HHSF');
</script>
<!-- End Google Tag Manager -->
<head>
<title>Getting Started with Codewind in CodeReady Workspaces | Codewind</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Use CodeReady Workspaces to develop cloud-native applications from an OpenShift cluster.">
<meta name="keywords" content="Codewind, CodeReady Workspaces, OpenShift"/>
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon/favicon-32x32.png">
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:300,400,600&display=swap" rel="stylesheet">
<!-- Bootstrap CSS CDN -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/docs.css">
<link rel="stylesheet" href="css/learn.css">
<link rel="stylesheet" href="css/blog.css">
<link rel="stylesheet" href="css/guides.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/themes/prism.min.css">
</head>
<body data-spy="scroll" data-target="#toc">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KS8HHSF"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div class="main">
<!-- Bootstrap NavBar -->
<nav class="navbar navbar-expand-lg navbar-light cw-banner fixed-top" aria-label="topnav">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"
data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="/codewind/">
<img alt="Codewind logo image" title="Codewind logo image" src="images/header/header-logo.svg" class="cw-header-logo" alt="">
</a>
<div class="collapse navbar-collapse justify-content-end cw-navbar-padding" id="navbarNavDropdown">
<ul class="navbar-nav cw-navbar-nav">
<li class="nav-item cw-navbar-item cw-header-link-docs">
<a class="nav-link cw-nav-link cw-header-link-text" href="learn.html">Learn</a>
</li>
<li class="nav-item cw-navbar-item cw-header-link-news">
<a class="nav-link cw-nav-link cw-header-link-text" href="news.html">News</a>
</li>
<li class="nav-item cw-navbar-item cw-header-link-blog">
<a class="nav-link cw-nav-link cw-header-link-text" href="blog.html">Blog</a>
</li>
<li class="nav-item cw-navbar-item cw-header-link-guides">
<a class="nav-link cw-nav-link cw-header-link-text" href="guides.html">Guides</a>
</li>
<li class="nav-item cw-navbar-item cw-header-link">
<a class="nav-link cw-nav-link" href="https://github.com/eclipse/codewind"><img alt="Codewind Github" class="banner-image" title="Codewind Github" data-toggle="tooltip" data-placement="top" id="cw_github_stars" title="..." src="images/header/github.svg"/></a>
</li>
<li class="nav-item cw-navbar-item cw-header-link">
<a class="nav-link cw-nav-link" href="https://twitter.com/EclipseCodewind"><img alt="Codewind Twitter" class="banner-image" title="Codewind Twitter" src="images/header/twitter.png"/></a>
</li>
<li class="nav-item cw-navbar-item cw-header-link">
<a class="nav-link cw-nav-link" href="https://mattermost.eclipse.org/eclipse/channels/eclipse-codewind"><img alt="Codewind Mattermost" class="banner-image" title="Codewind Mattermost" src="images/header/mattermost.png"/></a>
</li>
<li class="nav-item cw-navbar-item cw-header-link">
<a class="nav-link cw-nav-link" href="https://www.youtube.com/channel/UCnKCVK6RFDyHFqUmXlAhCHQ"><img alt="Codewind YouTube" class="banner-image" title="Codewind YouTube" src="images/header/youtube.png"/></a>
</li>
<!-- li class="nav-item cw-navbar-item" id="download-li">
<button onClick="window.location.href='https://microclimate.dev/download/codewind';" type="button" class="btn cw-download-button">Download</button>
<a href="https://microclimate.dev/download/codewind" class="nav-link cw-nav-link cw-download-link" href="#">Download</a>
</li> -->
<!-- Smaller devices menu END -->
</ul>
</div>
</nav>
<!-- End Bootstrap NavBar -->
<div class="row" id="post-row">
<div class="col-xs-12 col-lg-1"></div>
<div class="py-5 px-5 col-xs-12 col-lg-10">
<div class="cw-docs-spacer"></div>
<div id="post-content">
<h1>Getting Started with Codewind in CodeReady Workspaces</h1>
<p>12 Jun 2020</p>
<h2>Objectives</h2>
<ul>
<li>
Install CodeReady Workspaces and Codewind.
</li>
<li>
Create a Codewind workspace within CodeReady Workspaces.
</li>
</ul>
<div role="main"><h2 id="overview">Overview</h2>
<p>Use Eclipse Codewind to develop microservice applications from application stacks in an integrated developer environment (IDE). CodeReady Workspaces provides a containerized IDE for cloud-native application development on an OpenShift cluster.</p>
<h2 id="developing-with-codeready-workspaces">Developing with CodeReady Workspaces</h2>
<p>CodeReady Workspaces uses Kubernetes and containers to provide a preconfigured environment. Use CodeReady Workspaces to create, build, and test your code in OpenShift containers but feel like you are working on an IDE on your local machine.</p>
<h3 id="prerequisite">Prerequisite</h3>
<p>Before you can use Codewind with CodeReady Workspaces, you must have an OpenShift cluster available. To install OpenShift clusters, see <a href="https://code-ready.github.io/crc/">CodeReady Containers</a>.</p>
<p>CodeReady Workspaces require at least two 5Gi ReadWriteOnce (RWO) persistent volumes on the cluster to install and a 5Gi RWO volume for each created workspace.</p>
<p>Each Codewind workspace also requires at least one 5Gi ReadWriteMany (RWX) persistent volume.</p>
<h3 id="installing-codeready-workspaces">Installing CodeReady Workspaces</h3>
<p>1. Log in to your OpenShift cluster’s dashboard.</p>
<p>2. From the sidebar, click <strong>Operators</strong> then <strong>OperatorHub</strong>.</p>
<p>3. Search for <code class="highlighter-rouge">CodeReady Workspaces</code>.</p>
<p>4. Select <strong>Red Hat CodeReady Workspaces</strong>:</p>
<p><img src="./images/codereadyworkspaces-images/CRW-OperatorHub.png" alt="Subscribe to OperatorHub" width="900" />.</p>
<p>5. Click <strong>Install</strong>:</p>
<p><img src="./images/codereadyworkspaces-images/CRW-Install.png" alt="Install CodeReady Workspaces" width="800" />.</p>
<p>After you install the operator, continue to install CodeReady Workspaces:</p>
<p>1. From the OpenShift dashboard, go to <code class="highlighter-rouge">Operators</code>&gt;<code class="highlighter-rouge">Installed Operators</code>.</p>
<p>2. Select <strong>CodeReady Workspaces</strong>.</p>
<p>3. Select the <strong>CodeReady Workspaces</strong> cluster then <strong>Create CheCluster</strong>.</p>
<p>4. Configure the fields, like <strong>tlsSupport</strong>, as needed.</p>
<p>5. Copy and paste the following yaml into the provided text box:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">apiVersion</span><span class="pi">:</span> <span class="s">org.eclipse.che/v1</span>
<span class="na">kind</span><span class="pi">:</span> <span class="s">CheCluster</span>
<span class="na">metadata</span><span class="pi">:</span>
<span class="na">name</span><span class="pi">:</span> <span class="s">codeready-workspaces</span>
<span class="na">spec</span><span class="pi">:</span>
<span class="na">server</span><span class="pi">:</span>
<span class="na">cheImageTag</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">cheFlavor</span><span class="pi">:</span> <span class="s">codeready</span>
<span class="na">devfileRegistryImage</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">pluginRegistryImage</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">tlsSupport</span><span class="pi">:</span> <span class="no">true</span>
<span class="na">selfSignedCert</span><span class="pi">:</span> <span class="no">true</span>
<span class="na">cheWorkspaceClusterRole</span><span class="pi">:</span> <span class="s1">'</span><span class="s">eclipse-codewind'</span>
<span class="na">customCheProperties</span><span class="pi">:</span>
<span class="na">CHE_INFRA_KUBERNETES_WORKSPACE__START__TIMEOUT__MIN</span><span class="pi">:</span> <span class="s2">"</span><span class="s">15"</span>
<span class="na">CHE_LIMITS_WORKSPACE_IDLE_TIMEOUT</span><span class="pi">:</span> <span class="s2">"</span><span class="s">0"</span>
<span class="na">CHE_WORKSPACE_PLUGIN__BROKER_WAIT__TIMEOUT__MIN</span><span class="pi">:</span> <span class="s2">"</span><span class="s">15"</span>
<span class="na">database</span><span class="pi">:</span>
<span class="na">externalDb</span><span class="pi">:</span> <span class="no">false</span>
<span class="na">chePostgresHostName</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">chePostgresPort</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">chePostgresUser</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">chePostgresPassword</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">chePostgresDb</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">auth</span><span class="pi">:</span>
<span class="na">openShiftoAuth</span><span class="pi">:</span> <span class="no">false</span>
<span class="na">identityProviderImage</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">externalIdentityProvider</span><span class="pi">:</span> <span class="no">false</span>
<span class="na">identityProviderURL</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">identityProviderRealm</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">identityProviderClientId</span><span class="pi">:</span> <span class="s1">'</span><span class="s">'</span>
<span class="na">storage</span><span class="pi">:</span>
<span class="na">pvcStrategy</span><span class="pi">:</span> <span class="s">per-workspace</span>
<span class="na">pvcClaimSize</span><span class="pi">:</span> <span class="s">1Gi</span>
<span class="na">preCreateSubPaths</span><span class="pi">:</span> <span class="no">true</span>
</code></pre></div></div>
<p><img src="./images/codereadyworkspaces-images/CRW-CheCluster.png" alt="Install CheCluster" width="900" />.</p>
<ul>
<li><strong>Note:</strong> If you install CodeReady Workspaces on an OpenShift cluster with publicly signed certificates, such as on IBM Cloud, set <strong>selfSignedCert</strong> to <strong>false</strong>.</li>
</ul>
<p>6. After CodeReady Workspaces installs, click the <strong>CodeReady Workspaces URL</strong>.</p>
<p>7. A new window appears that prompts you to log in. If you have not made a CodeReady Workspaces account, do so by clicking <strong>Register</strong>:</p>
<p><img src="./images/codereadyworkspaces-images/CRW-Register.png" alt="Register an account" width="900" />.</p>
<p>8. After you make a CodeReady Workspaces account, you can start to create a Codewind workspace.</p>
<h3 id="setting-up-codewind">Setting up Codewind</h3>
<p>Because of its dependency on <code class="highlighter-rouge">buildah</code>, Codewind needs to run as root and privileged. To enable Codewind, run the following commands from your command line:</p>
<ul>
<li><code class="highlighter-rouge">oc adm policy add-scc-to-user anyuid system:serviceaccounts:&lt;namespace where you installed CodeReady Workspaces&gt;:che-workspace</code></li>
<li><code class="highlighter-rouge">oc adm policy add-scc-to-user privileged system:serviceaccounts:&lt;namespace where you installed CodeReady Workspaces&gt;:che-workspace</code></li>
</ul>
<p>CodeReady Workspaces starts Codewind and installs the Codewind plug-ins. This process might take a couple of minutes for all of the necessary components to be pulled and started.</p>
<h3 id="creating-the-codewind-workspace">Creating the Codewind workspace</h3>
<p>After you set up Codewind, log in to your CodeReady Workspaces account and create a Codewind workspace from the Codewind devfile:</p>
<p>1. Log in to CodeReady Workspaces.</p>
<p>2. Go to <strong>Workspaces</strong> then click <strong>Add Workspace</strong>.</p>
<p>3. Click <strong>Import Devfile</strong>.</p>
<p>4. From <strong>Source</strong>, click <strong>YAML</strong>.</p>
<p>5. Go to the link, <a href="https://raw.githubusercontent.com/eclipse/codewind-che-plugin/0.13.0/devfiles/0.13.0/devfile.yaml">codewind-che-plugin/0.13.0/devfile.yaml</a>, then copy and paste the contents into the YAML text box in your Codewind workspace.</p>
<p>6. Click <strong>Create &amp; Open</strong>.</p>
<h2 id="what-you-have-learned">What you have learned</h2>
<p>Now that you have completed this quick guide, you have learned to:</p>
<ol>
<li>Install CodeReady Workspaces and Codewind.</li>
<li>Create a Codewind workspace within CodeReady Workspaces.</li>
</ol>
<h2 id="next-steps">Next Steps</h2>
<p>See other quick guides to learn how to develop with Codewind:</p>
<ul>
<li><a href="codewind-eclipse-quick-guide.html">Codewind in Eclipse</a></li>
<li><a href="https://www.eclipse.org/codewind/codewind-vscode-quick-guide.html">Codewind in VS Code</a></li>
</ul>
</div>
</div>
</div>
<div class="col-xs-12 col-lg-1"></div>
</div>
<!-- footer row -->
<footer>
<div id="footer-div-mobile">
<div class="row">
<div class="col-sm-12 text-center">
<span>Useful Links:</span>
<br/><br/>
<a class="cw-footer-links" href="http://www.eclipse.org">Eclipse Foundation</a><br/>
<a class="cw-footer-links" href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a><br/>
<a class="cw-footer-links" href="http://www.eclipse.org/legal/termsofuse.php">Website Terms of Use</a><br/>
<a class="cw-footer-links" href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a><br/>
<a class="cw-footer-links" href="http://www.eclipse.org/legal">Legal</a><br/>
</div>
</div>
<div class="cw_footer_display_flex cw-footer-same-height cw-footer-center">
<div class="cw_footer_display_icons row">
<div class="cw-footer-col text-center col-md-3 col-sm-6 col-xs-12">
<div>
<div>
<a href="mailto:codewind-dev@eclipse.org"><img alt="Send us an email" title="Send us an email" src="images/footer/email-icon.svg" class="cw-logo" /></a>
</div>
</div>
</div>
<div class="cw-footer-col text-center col-md-3 col-sm-6 col-xs-12">
<div>
<div>
<a href="https://twitter.com/EclipseCodewind"><img alt="Codewind Twitter" title="Codewind Twitter" src="images/footer/twitter-logo.svg" class="cw-logo" /></a>
</div>
</div>
</div>
<div class="cw-footer-col text-center col-md-3 col-sm-6 col-xs-12">
<div>
<div>
<a href="https://github.com/eclipse/codewind"><img alt="Codewind Github" title="Codewind Github" src="images/footer/github-logo.svg"
class="cw-logo" /></a>
</div>
</div>
</div>
<div class=" cw-footer-col text-center col-md-3 col-sm-6 col-xs-12">
<div>
<div>
<a href="https://mattermost.eclipse.org/eclipse/channels/eclipse-codewind"><img alt="Codewind Mattermost" title="Codewind Mattermost" src="images/footer/mattermost-logo.png" class="cw-logo-mm" /></a>
</div>
</div>
</div>
<div class="cw-footer-col text-center col-md-3 col-sm-6 col-xs-12">
<div>
<div>
<a href="https://www.youtube.com/channel/UCnKCVK6RFDyHFqUmXlAhCHQ"><img alt="Codewind YouTube" title="Codewind YouTube" src="images/footer/youtube-logo-dark.svg"
class="cw-logo" /></a>
</div>
</div>
</div>
<div class="cw-footer-col text-center col-md-3 col-sm-6 col-xs-12">
<div>
<div>
<a href="http://www.eclipse.org"><img class="cw-logo-eclipse-mobile" alt="Eclipse" title="Eclipse" src="images/footer/eclipse.svg"/></a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row cw-footer-desktop" id="footer-div">
<div class="cw-footer-left">
<div class="px-5 cw-font-12>
<span class="cw-font-14">Useful Links:</span>
<br/><br/>
<a class="cw-footer-links" href="http://www.eclipse.org">Eclipse Foundation</a><br/>
<a class="cw-footer-links" href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a><br/>
<a class="cw-footer-links" href="http://www.eclipse.org/legal/termsofuse.php">Website Terms of Use</a><br/>
<a class="cw-footer-links" href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a><br/>
<a class="cw-footer-links" href="http://www.eclipse.org/legal">Legal</a><br/>
</div>
</div>
<div class="cw-footer-border-right"></div>
<div class="cw_footer_display_flex cw-footer-same-height cw-footer-center">
<div class="cw_footer_display_icons">
<div class="cw-footer-col text-center">
<div>
<div>
<a href="mailto:codewind-dev@eclipse.org"><img alt="Send us an email" title="Send us an email" src="images/footer/email-icon.svg" class="cw-logo" /></a>
</div>
</div>
</div>
<div class="cw-footer-col text-center">
<div>
<div>
<a href="https://twitter.com/EclipseCodewind"><img alt="Codewind Twitter" title="Codewind Twitter" src="images/footer/twitter-logo.svg" class="cw-logo" /></a>
</div>
</div>
</div>
<div class="cw-footer-col text-center">
<div>
<div>
<a href="https://github.com/eclipse/codewind"><img alt="Codewind Github" title="Codewind Github" src="images/footer/github-logo.svg"
class="cw-logo" /></a>
</div>
</div>
</div>
<div class=" cw-footer-col text-center">
<div class="cw-logo-mm" >
<div class="cw-logo-mm" >
<a href="https://mattermost.eclipse.org/eclipse/channels/eclipse-codewind"><img alt="Codewind Mattermost" title="Codewind Mattermost" src="images/footer/mattermost-logo.png" class="cw-logo-mm" /></a>
</div>
</div>
</div>
<div class="cw-footer-col text-center">
<div>
<div>
<a href="https://www.youtube.com/channel/UCnKCVK6RFDyHFqUmXlAhCHQ"><img alt="Codewind YouTube" title="Codewind YouTube" src="images/footer/youtube-logo-dark.svg"
class="cw-logo" /></a>
</div>
</div>
</div>
</div>
</div>
<div class="cw-footer-border-right"></div>
<div class="cw-footer-right cw-footer-same-height cw-footer-vcenter">
<div class="cw-footer-eclipse-img cw-footer-same-height px-5 ">
<a href="http://www.eclipse.org">
<img alt="Eclipse" title="Eclipse" src="images/footer/eclipse.svg"/>
</a>
</div>
</div>
</div>
</footer>
<!-- footer row END -->
<!-- Jquery -->
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>
<!-- Font Awesome JS -->
<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/solid.js"
integrity="sha384-tzzSw1/Vo+0N5UhStP3bvwWPq+uvzCMfrN1fEFe+xBmv1C/AtVX5K0uZtmcHitFZ" crossorigin="anonymous">
</script>
<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/fontawesome.js"
integrity="sha384-6OIrr52G08NpOFSZdxxz1xdNSndlD4vdcf/q2myIUVO0VsqaGHJsB0RaBE01VTOY" crossorigin="anonymous">
</script>
<script src="js/jquery.matchHeight-min.js"></script>
<script src="js/index.js"></script>
<script src="js/docs.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/components/prism-docker.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/components/prism-json.min.js"></script>
</div>
</body>
</html>