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.
changed metadata, omitted developing with Codewind content so the guide solely focuses on installing CodeReady Workspaces and setting up a Codewind workspace
Signed-off-by: Jacob Berger <jacob.berger@ibm.com>
objectives: ["Install CodeReady Workspaces and Codewind.", "Create a Codewind workspace within CodeReady Workspaces."]
11
+
icon: images/learn/icon_cloud.svg
12
+
---
15
13
16
14
## 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 cloudnative application development on an OpenShift cluster.
15
+
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
16
19
17
## Developing with CodeReady Workspaces
20
18
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.
@@ -27,7 +25,7 @@ Each Codewind workspace also requires at least one 5Gi ReadWriteMany (RWX) persi
27
25
Before you can use Codewind with CodeReady Workspaces, you must have an OpenShift cluster available.
28
26
29
27
### Installing CodeReady Workspaces
30
-
1\. Log in to your OpenShift console's dashboard.
28
+
1\. Log in to your OpenShift cluster's dashboard.
31
29
32
30
2\. From the sidebar, click **Operators** then **OperatorHub**.
33
31
@@ -125,116 +123,11 @@ After you set up Codewind, log in to your CodeReady Workspaces account and creat
125
123
126
124
6\. Click **Create & Open**.
127
125
128
-
### Configuring Codewind to use application stacks
129
-
Configure Codewind to use Appsody templates so you can focus exclusively on your code. Complete the following steps to select the Appsody templates:
130
-
131
-
1. Select **Codewind**.
132
-
2. Right-click **Projects**.
133
-
3. Select **Template Source Manager**.
134
-
4. Enable **Appsody Stacks - incubator** and **Default templates**.
135
-
136
-
After you configured Codewind to use Appsody templates, continue to develop your microservice within Codewind.
137
-
138
-
### Creating an Appsody project
139
-
Throughout the application lifestyle, Appsody helps you develop containerized applications and maximize containers curated for your usage.
140
-
141
-
1. Under the Explorer pane, select **Codewind**.
142
-
2. Expand **Codewind** by clicking the drop-down arrow.
143
-
3. Hover over the **Projects** entry underneath Codewind in the Explorer pane, and press the **+** icon to create a project.
144
-
* **Note:** Make sure that Docker is running. Otherwise, you get an error.
145
-
4. Choose the **Appsody Open Liberty default template (Appsody Stacks - incubator)**.
146
-
5. Name your project **appsody-calculator**.
147
-
* If you don't see Appsody templates, find and select **Template Source Manager** and enable **Appsody Stacks - incubator**.
148
-
* The templates are refreshed, and the Appsody templates are available.
149
-
6. Press **Enter**.
150
-
* 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.
151
-
152
-
Your project is complete when you see that your application status is running and your build status is successful.
153
-
154
-
### Accessing the application endpoint in a browser
155
-
1. Return to your project under the **Explorer** pane.
156
-
2. Select the Open App icon next to your project's name, or right-click your project and select **Open App**.
157
-
158
-
Your application is now opened in a browser, showing the welcome to your Appsody microservice page.
159
-
160
-
### Adding a REST service to your application
161
-
1. Go to your project's workspace under the **Explorer** pane.
162
-
2. Go to `src`>`main`>`java`>`dev`>`appsody`>`starter`.
163
-
3. Right-click **starter** and select **New File**.
164
-
4. Create a file, name it `Calculator.java`, and press **Enter**. This file is your JAX-RS resource.
165
-
5. Before you input any code, make sure that the file is empty.
166
-
6. Populate the file with the following code and then **save** the file:
167
-
168
-
```java
169
-
package dev.appsody.starter;
170
-
171
-
import javax.ws.rs.core.Application;
172
-
import javax.ws.rs.GET;
173
-
import javax.ws.rs.Path;
174
-
import javax.ws.rs.Produces;
175
-
import javax.ws.rs.core.MediaType;
176
-
import javax.ws.rs.core.Response;
177
-
178
-
import javax.ws.rs.PathParam;
179
-
180
-
@Path("/calculator")
181
-
public class Calculator extends Application {
182
-
183
-
@GET
184
-
@Path("/aboutme")
185
-
@Produces(MediaType.TEXT_PLAIN)
186
-
public String aboutme() {
187
-
return "You can add (+), subtract (-), and multiply (*) with this simple calculator.";
188
-
}
189
-
190
-
@GET
191
-
@Path("/{op}/{a}/{b}")
192
-
@Produces(MediaType.TEXT_PLAIN)
193
-
public Response calculate(@PathParam("op") String op, @PathParam("a") String a, @PathParam("b") String b) {
0 commit comments