Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit 2cb79fb

Browse files
committed
removed Kabanero references to installation instructions and made them more Codewind specific
Signed-off-by: Jacob Berger <jacob.berger@ibm.com>
1 parent ff913c7 commit 2cb79fb

File tree

1 file changed

+64
-54
lines changed

1 file changed

+64
-54
lines changed

docs/_guides/codewind-crw-quick-guide.md

Lines changed: 64 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,66 +11,76 @@ tags: Codewind, CodeReady Workspaces, Openshift, Kubernetes, containers, microse
1111

1212
## Objectives
1313
* Install CodeReady Workspaces and Codewind
14-
* Develop a simple microservice, using Eclipse Codewind on CodeReady Workspaces
14+
* Develop a simple microservice that uses Eclipse Codewind on CodeReady Workspaces
1515

1616
## Overview
17-
Eclipse Codewind enables you 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.
17+
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.
1818

1919
## Developing with CodeReady Workspaces
20-
CodeReady workspaces uses Kubernetes and containers to provide a preconfigured environment. CodeReady Workspaces allows you to create, build, and test your code in OpenShift containers but makes you feel like you are working on an IDE on your local machine.
20+
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 computer.
2121

2222
### Prerequisite
2323
CodeReady Workspaces requires at least two 1Gi ReadWriteOnce (RWO) persistent volumes on the cluster to install and a 1Gi RWO volume for each created workspace.
2424

2525
Each Codewind workspace also requires at least on 1Gi ReadWriteMany (RWX) persistent volume.
2626

2727
### Installing CodeReady Workspaces
28-
To install CodeReady Workspaces, set `Spec.codeReadyWorkspaces.enable: true` in the Kabanero custom resource (Kabanero CR) instance and apply it.
29-
30-
To edit the Kabanero CR, you can run `oc edit kabanero -n kabanero` from the command line.
31-
32-
The following sample shows a Kabanero CR instance configuration:
33-
28+
1. Subscribe to the CodeReady Workspaces operator then install it.
29+
* To manually install CodeReady Workspaces, apply the CodeReady Workspaces OperatorHub subscription.
30+
2. After the CodeReady Workspaces operator is installed, create the CheCluster resources.
31+
* If you have not set up an auth provider, set `openShiftoAuth` to `false`.
32+
* To enable HTTPS, set `tlsSupport` to `true`.
33+
* If you use a self-signed certificate, set `selfSignedCert` to `true`.
34+
3. If you install Codewind alongside CodeReady Workspaces, use the following yaml:
3435
```yaml
35-
apiVersion: kabanero.io/v1alpha2
36-
kind: Kabanero
36+
apiVersion: org.eclipse.che/v1
37+
kind: CheCluster
3738
metadata:
38-
name: kabanero
39+
  name: codeready-workspaces
3940
spec:
40-
version: "0.6.0"
41-
codeReadyWorkspaces:
42-
enable: true
43-
operator:
44-
customResourceInstance:
45-
tlsSupport: true
46-
selfSignedCert: true
47-
stacks:
48-
repositories:
49-
- name: central
50-
https:
51-
url: https://github.com/kabanero-io/collections/releases/download/0.6.0/kabanero-index.yaml
41+
  server:
42+
    cheImageTag: ''
43+
    cheFlavor: codeready
44+
    devfileRegistryImage: ''
45+
    pluginRegistryImage: ''
46+
    tlsSupport: false
47+
    selfSignedCert: false
48+
    cheWorkspaceClusterRole: 'eclipse-codewind'
49+
    customCheProperties:
50+
      CHE_INFRA_KUBERNETES_WORKSPACE__START__TIMEOUT__MIN: "15"
51+
      CHE_LIMITS_WORKSPACE_IDLE_TIMEOUT: "0"
52+
      CHE_WORKSPACE_PLUGIN__BROKER_WAIT__TIMEOUT__MIN: "15"
53+
  database:
54+
    externalDb: false
55+
    chePostgresHostName: ''
56+
    chePostgresPort: ''
57+
    chePostgresUser: ''
58+
    chePostgresPassword: ''
59+
    chePostgresDb: ''
60+
  auth:
61+
    openShiftoAuth: false
62+
    identityProviderImage: ''
63+
    externalIdentityProvider: false
64+
    identityProviderURL: ''
65+
    identityProviderRealm: ''
66+
    identityProviderClientId: ''
67+
  storage:
68+
    pvcStrategy: per-workspace
69+
    pvcClaimSize: 1Gi
70+
    preCreateSubPaths: true
5271
```
72+
* To manually install Codewind alongside Codewind Workspaces, save this yaml to a disk and run `oc apply -f <yaml>`.
73+
4. CodeReady Workspaces now installs and you can access the CodeReady Workspaces URL and Red Hat SSO Admin Console URL.
5374

54-
### Configuring CodeReady Workspaces
55-
The Kabanero CR instance provides additional fields allowing you to configure your installation of CodeReady Workspaces.
56-
57-
* If you want to install CodeReady Workspaces with TLS Support, set `Spec.codeReadyWorkspaces.operator.customResourceInstance.tlsSupport` to `true`.
58-
**Note:** If your OpenShift cluster's router is set up with self-signed certificates, `Spec.codeReadyWorkspaces.operator.instance.selfSignedCert` must also be set to `true`.
59-
* If you want to use your OpenShift accounts with CodeReady Workspaces, set up permanent users (accounts other than kube:admin) and then set `Spec.codeReadyWorkspaces.operator.customResourceInstance.openShiftOAuth` to `true`.
60-
* To view the full list of configurable fields, see [Kabanero Custom Resource](../configuration/kabanero-cr-config.html).
61-
62-
### Installing Codewind
63-
When CodeReady Workspaces is installed on your OpenShift cluster, complete the following steps:
64-
65-
1. Log in to CodeReady Workspaces.
66-
2. Click **Create Workspace**.
67-
3. For **Name**, give your workspace some meaningful name.
68-
4. For **Select Stack**, select `Codewind`.
69-
5. Click **Create & Open** to create and start Codewind in CodeReady Workspaces.
75+
### Setting up Codewind
76+
Before you can use Codewind with CodeReady Workspaces or Che, complete the following steps, either before or after you install Codewind:
7077

71-
CodeReady Workspaces starts Codewind and installs the Codewind plugins. This process might take a couple of minutes for all of the necessary components to be pulled and started.
78+
1. Apply the Codewind cluster role with `oc apply -f`.
79+
2. Because of its dependency on `buildah`, Codewind needs to run as root and privileged. To enable Codewind, run the following commands:
80+
* `oc adm policy add-scc-to-user anyuid system:serviceaccounts:<namespace>:che-workspace`
81+
* `oc adm policy add-scc-to-user privileged system:serviceaccounts:<namespace>:che-workspace`
7282

73-
See (Codewind on Che documentation)[https://www.eclipse.org/codewind/mdt-che-installinfo.html] for additional information and next steps.
83+
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.
7484

7585
### Configuring Codewind to use application stacks
7686
Configure Codewind to use Appsody templates so you can focus exclusively on your code. These templates include an Eclipse MicroProfile stack that you can use to follow this guide. Complete the following steps to select the Appsody templates:
@@ -80,30 +90,30 @@ Configure Codewind to use Appsody templates so you can focus exclusively on your
8090
3. Select `Template Source Manager`.
8191
4. Enable `Appsody Stacks - incubator` and `Default templates`.
8292

83-
You have now configured Codewind to use Appsody templates and can proceed to develop your microservice within Codewind.
93+
After you configured Codewind to use Appsody templates, continue to develop your microservice within Codewind.
8494

85-
If your organization uses customized application stacks and has given you a URL that points to an `index.json` file, you can add it to Codewind:
95+
If your organization uses customized application stacks and gives you a URL that points to an `index.json` file, you can add it to Codewind:
8696

8797
1. Return to `Codewind` and right-click `Local`.
8898
2. Select `Template Source Manager`.
89-
3. Click the `Add New +` button to add your URL.
90-
4. Add your URL in the pop up window and save your changes.
99+
3. Click `Add New +` to add your URL.
100+
4. Add your URL in the pop-up window and save your changes.
91101

92102
### Creating an Appsody project
93-
Throughout the application lifestyle, Appsody helps you develop containerized applications and leverage containers curated for your usage. If you want more context about Appsody, visit the [Appsody welcome page](https://appsody.dev/docs).
103+
Throughout the application lifestyle, Appsody helps you develop containerized applications and maximize containers curated for your usage. If you want more context about Appsody, see [Appsody welcome page](https://appsody.dev/docs).
94104

95105
1. Under the Explorer pane, select `Codewind`.
96106
2. Expand `Codewind` by clicking the drop-down arrow.
97107
3. Hover over the `Projects` entry underneath Codewind in the Explorer pane, and press the `+` icon to create a project.
98-
* **Note:** Make sure Docker is running. Otherwise, you get an error.
108+
* **Note:** Make sure that Docker is running. Otherwise, you get an error.
99109
4. Choose the `Appsody Open Liberty default template (Appsody Stacks - incubator)`.
100110
5. Name your project `appsody-calculator`.
101111
* If you don't see Appsody templates, find and select `Template Source Manager` and enable `Appsody Stacks - incubator`.
102112
* The templates are refreshed, and the Appsody templates are available.
103113
6. Press `Enter`.
104-
* To monitor your project's progress, right-click your project, and select `Show all logs`. Then an `Output` tab is displayed where you see your project's build logs.
114+
* To monitor your project's progress, right-click your project, and select `Show all logs`. Then, an `Output` tab is displayed where you see your project's build logs.
105115

106-
Your project is complete when you see your application status is running and your build status is successful.
116+
Your project is complete when you see that your application status is running and your build status is successful.
107117

108118
### Accessing the application endpoint in a browser
109119
1. Return to your project under the Explorer pane.
@@ -113,7 +123,7 @@ Your application is now opened in a browser, showing the welcome to your Appsody
113123

114124
### Adding a REST service to your application
115125
1. Go to your project's workspace under the Explorer tab.
116-
2. Navigate to `src->main->java->dev->appsody->starter`.
126+
2. Go to `src->main->java->dev->appsody->starter`.
117127
3. Right-click `starter` and select `New File`.
118128
4. Create a file, name it `Calculator.java`, and press `Enter`. This file is your JAX-RS resource.
119129
5. Populate the file with the following code and then **save** the file:
@@ -164,12 +174,12 @@ public class Calculator extends Application {
164174
}
165175
```
166176

167-
Any changes you make to your code are automatically built and re-deployed by Codewind and you can view them in your browser.
177+
Any changes that you make to your code are automatically built and redeployed by Codewind and you can view them in your browser.
168178

169179
### Working with the example calculator microservice
170180
You now can work with the example calculator microservice.
171181

172-
1. Use the exposed port number you saw when you first opened the application.
182+
1. Use the port number that you saw when you first opened the application.
173183
2. Make sure to remove the `< >` symbol in the URL.
174184
3. `http://127.0.0.1:<port>/starter/calculator/aboutme`
175185
4. You see the following response:
@@ -187,7 +197,7 @@ You can also try a few of the sample calculator functions:
187197
Now that you have completed this quick guide, you have learned to:
188198

189199
1. Install CodeReady Workspaces and Codewind
190-
2. Develop your own microservice using Codewind on CodeReady Workspaces
200+
2. Develop your own microservice that uses Codewind on CodeReady Workspaces
191201

192202
## Next Steps
193203
See other quick guides to learn how to develop with Codewind:

0 commit comments

Comments
 (0)