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.
Copy file name to clipboardExpand all lines: docs/_guides/codewind-crw-quick-guide.md
+36-38Lines changed: 36 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
2
layout: guide
3
-
summary-title: "Codewind in CodeReady Workspaces"
3
+
summary_title: "Codewind in CodeReady Workspaces"
4
4
title: "Getting Started with Codewind in CodeReady Workspaces"
5
5
categories: guides
6
-
guide_description: "Take advantage of Codewind's tools to help build high quality cloud native applications regardless of which IDE or language you use."
6
+
guide_description: "Use Codewind in CodeReady Workspaces to build high quality cloud native applications."
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
-
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.
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.
21
21
22
22
### Prerequisite
23
-
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.
23
+
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.
24
24
25
-
Each Codewind workspace also requires at least on 1Gi ReadWriteMany (RWX) persistent volume.
25
+
Each Codewind workspace also requires at least on 5Gi ReadWriteMany (RWX) persistent volume.
26
+
27
+
Before you can use Codewind with CodeReady Workspaces, apply the Codewind cluster role with `oc apply -f`.
26
28
27
29
### Installing CodeReady Workspaces
28
30
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`.
31
+
* If you did not set up an auth provider, set `openShiftoAuth` to `false`.
32
32
* To enable HTTPS, set `tlsSupport` to `true`.
33
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:
34
+
2. Use the following yaml:
35
35
```yaml
36
36
apiVersion: org.eclipse.che/v1
37
37
kind: CheCluster
@@ -70,63 +70,61 @@ spec:
70
70
preCreateSubPaths: true
71
71
```
72
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.
73
+
3. CodeReady Workspaces now installs and you can access the CodeReady Workspaces URL and Red Hat SSO Admin Console URL.
74
74
75
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:
77
-
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:
76
+
Because of its dependency on `buildah`, Codewind needs to run as root and privileged. To enable Codewind, run the following commands:
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.
84
81
85
82
### Configuring Codewind to use application stacks
86
-
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:
83
+
Configure Codewind to use Appsody templates so you can focus exclusively on your code. Complete the following steps to select the Appsody templates:
87
84
88
-
1. Under the Explorer pane, select `Codewind`.
89
-
2. Right-click `Local`.
90
-
3. Select `Template Source Manager`.
91
-
4. Enable `Appsody Stacks - incubator` and `Default templates`.
85
+
1. Under the Explorer pane, select **Codewind**.
86
+
2. Right-click **Local**.
87
+
3. Select **Template Source Manager**.
88
+
4. Enable **Appsody Stacks - incubator** and **Default templates**.
92
89
93
90
After you configured Codewind to use Appsody templates, continue to develop your microservice within Codewind.
94
91
95
92
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:
96
93
97
-
1. Return to `Codewind` and right-click `Local`.
98
-
2. Select `Template Source Manager`.
99
-
3. Click `Add New +` to add your URL.
94
+
1. Return to **Codewind** and right-click **Local**.
95
+
2. Select **Template Source Manager**.
96
+
3. Click **Add New +** to add your URL.
100
97
4. Add your URL in the pop-up window and save your changes.
101
98
102
99
### Creating an Appsody project
103
100
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).
104
101
105
-
1. Under the Explorer pane, select `Codewind`.
106
-
2. Expand `Codewind` by clicking the drop-down arrow.
107
-
3. Hover over the `Projects` entry underneath Codewind in the Explorer pane, and press the `+` icon to create a project.
102
+
1. Under the Explorer pane, select **Codewind**.
103
+
2. Expand **Codewind** by clicking the drop-down arrow.
104
+
3. Hover over the **Projects** entry underneath Codewind in the Explorer pane, and press the **+** icon to create a project.
108
105
* **Note:** Make sure that Docker is running. Otherwise, you get an error.
109
-
4. Choose the `Appsody Open Liberty default template (Appsody Stacks - incubator)`.
110
-
5. Name your project `appsody-calculator`.
111
-
* If you don't see Appsody templates, find and select `Template Source Manager` and enable `Appsody Stacks - incubator`.
106
+
4. Choose the **Appsody Open Liberty default template (Appsody Stacks - incubator)**.
107
+
5. Name your project **appsody-calculator**.
108
+
* If you don't see Appsody templates, find and select **Template Source Manager** and enable **Appsody Stacks - incubator**.
112
109
* The templates are refreshed, and the Appsody templates are available.
113
-
6. Press `Enter`.
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.
110
+
6. Press **Enter**.
111
+
* 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.
115
112
116
113
Your project is complete when you see that your application status is running and your build status is successful.
117
114
118
115
### Accessing the application endpoint in a browser
119
-
1. Return to your project under the Explorer pane.
120
-
2. Select the Open App icon next to your project's name, or right-click your project and select `Open App`.
116
+
1. Return to your project under the **Explorer** pane.
117
+
2. Select the Open App icon next to your project's name, or right-click your project and select **Open App**.
121
118
122
119
Your application is now opened in a browser, showing the welcome to your Appsody microservice page.
123
120
124
121
### Adding a REST service to your application
125
-
1. Go to your project's workspace under the Explorer tab.
126
-
2. Go to `src->main->java->dev->appsody->starter`.
127
-
3. Right-click `starter` and select `New File`.
128
-
4. Create a file, name it `Calculator.java`, and press `Enter`. This file is your JAX-RS resource.
129
-
5. Populate the file with the following code and then **save** the file:
122
+
1. Go to your project's workspace under the **Explorer** pane.
123
+
2. Go to `src>main>java>dev>appsody>starter`.
124
+
3. Right-click **starter** and select **New File**.
125
+
4. Create a file, name it `Calculator.java`, and press **Enter**. This file is your JAX-RS resource.
126
+
5. Before you input any code, make sure that the file is empty.
127
+
6. Populate the file with the following code and then **save** the file:
130
128
131
129
```java
132
130
package dev.appsody.starter;
@@ -174,7 +172,7 @@ public class Calculator extends Application {
174
172
}
175
173
```
176
174
177
-
Any changes that you make to your code are automatically built and redeployed by Codewind and you can view them in your browser.
175
+
Any changes that you make to your code are automatically built and redeployed by Codewind, and you can view them in your browser.
178
176
179
177
### Working with the example calculator microservice
180
178
You now can work with the example calculator microservice.
0 commit comments