You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 28, 2022. It is now read-only.
* Develop a simple microservice that uses Eclipse Codewind on CodeReady Workspaces
15
15
16
16
## Overview
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.
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.
18
18
19
19
## Developing with CodeReady Workspaces
20
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 machine.
@@ -24,22 +24,23 @@ CodeReady Workspaces require at least two 5Gi ReadWriteOnce (RWO) persistent vol
24
24
25
25
Each Codewind workspace also requires at least one 5Gi ReadWriteMany (RWX) persistent volume.
26
26
27
-
Before you can use Codewind with CodeReady Workspaces, you must:
28
-
29
-
1. Install an OpenShift cluster.
30
-
2. Apply the Codewind cluster by going to your command line and inputting `oc apply -f`.
27
+
Before you can use Codewind with CodeReady Workspaces, you must have an OpenShift cluster available.
31
28
32
29
### Installing CodeReady Workspaces
33
-
1\. Log in to your OpenShift cluster.
30
+
1\. Log in to your OpenShift console's dashboard.
34
31
35
32
2\. From the sidebar, click **Operators** then **OperatorHub**.
36
33
37
34
3\. Search for `CodeReady Workspaces`.
38
35
39
-
4\. Select **Red Hat CodeReady Workspaces** and click **Install**:
36
+
4\. Select **Red Hat CodeReady Workspaces**:
40
37
41
38
{:width="900"}.
* To manually install Codewind with CodeReady Workspaces, save this yaml to a disk and run `oc apply -f <yaml>`.
96
-
* If you did not set up an auth provider, set **openShiftoAuth** to **false**.
97
-
* To enable HTTPS, set **tlsSupport** to **true**.
98
-
* If you use a self-signed certificate, set **selfSignedCert** to **true**.
96
+
* **Note:** If you install CodeReady Workspaces on an OpenShift cluster with publicly signed certificates, such as on IBM Cloud, set **selfSignedCert** to **false**.
99
97
100
-
6\. CodeReady Workspaces now installs and you can access the CodeReady Workspaces URL and Red Hat SSO Admin Console URL:
98
+
6\. After CodeReady Workspaces installs, click the **CodeReady Workspaces URL**.
7\. A new window appears that prompts you to log in. If you have not made a CodeReady Workspaces account, do so by clicking **Register**:
103
101
104
-
After you install CodeReady Workspaces, log in and create a Codewind workspace from the Codewind devfile:
102
+
{:width="900"}.
103
+
104
+
8\. After you make a CodeReady Workspaces account, you can start to create a Codewind workspace.
105
+
106
+
### Setting up Codewind
107
+
Because of its dependency on `buildah`, Codewind needs to run as root and privileged. To enable Codewind, run the following commands from your command line:
108
+
* `oc adm policy add-scc-to-user anyuid system:serviceaccounts:<namespace where you installed CodeReady Workspaces>:che-workspace`
109
+
* `oc adm policy add-scc-to-user privileged system:serviceaccounts:<namespace where you installed CodeReady Workspaces>:che-workspace`
110
+
111
+
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.
112
+
113
+
### Creating the Codewind workspace
114
+
After you set up Codewind, log in to your CodeReady Workspaces account and create a Codewind workspace from the Codewind devfile:
105
115
106
116
1\. Log in to CodeReady Workspaces.
107
117
@@ -111,17 +121,10 @@ After you install CodeReady Workspaces, log in and create a Codewind workspace f
111
121
112
122
4\. From **Source**, click **YAML**.
113
123
114
-
5\. Go to the link, [codewind-che-plugin/0.12.0/devfile.yaml](https://raw.githubusercontent.com/eclipse/codewind-che-plugin/0.13.0/devfiles/0.13.0/devfile.yaml), then copy and paste the contents into the YAML text box in your Codewind workspace.
124
+
5\. Go to the link, [codewind-che-plugin/0.13.0/devfile.yaml](https://raw.githubusercontent.com/eclipse/codewind-che-plugin/0.13.0/devfiles/0.13.0/devfile.yaml), then copy and paste the contents into the YAML text box in your Codewind workspace.
115
125
116
126
6\. Click **Create & Open**.
117
127
118
-
### Setting up Codewind
119
-
Because of its dependency on `buildah`, Codewind needs to run as root and privileged. To enable Codewind, run the following commands:
120
-
* `oc adm policy add-scc-to-user anyuid system:serviceaccounts:<namespace where you installed CodeReady Workspaces>:che-workspace`
121
-
* `oc adm policy add-scc-to-user privileged system:serviceaccounts:<namespace where you installed CodeReady Workspaces>:che-workspace`
122
-
123
-
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.
124
-
125
128
### Configuring Codewind to use application stacks
126
129
Configure Codewind to use Appsody templates so you can focus exclusively on your code. Complete the following steps to select the Appsody templates:
127
130
@@ -215,7 +218,7 @@ You now can work with the example calculator microservice.
215
218
216
219
1. Use the URL that you saw when you first opened the application.
217
220
2. Make sure to remove the `< >` symbol in the URL.
@@ -224,8 +227,8 @@ You can add (+), subtract (-), and multiply (*) with this simple calculator.
224
227
225
228
You can also try a few of the sample calculator functions:
226
229
227
-
* `http://127.0.0.1:<url>/starter/calculator/{op}/{a}/{b}`, where you can input one of the available operations `(+, _, *)`, and an integer a, and an integer b.
228
-
* So for `http://127.0.0.1:<url>/starter/calculator/+/10/3` you see: `10+3=13`.
230
+
* `<url>/starter/calculator/{op}/{a}/{b}`, where you can input one of the available operations `(+, _, *)`, and an integer a, and an integer b.
231
+
* So for `<url>/starter/calculator/+/10/3` you see: `10+3=13`.
229
232
230
233
## What you have learned
231
234
Now that you have completed this quick guide, you have learned to:
0 commit comments