Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #18 from SueChaplain/release-0.7
Browse files Browse the repository at this point in the history
Fix permalink
  • Loading branch information
alohr51 authored Mar 24, 2020
2 parents 392ef3f + 2d5d253 commit c90d7c1
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 76 deletions.
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
---
permalink: /guide/codewind-getting-started-eclipse
permalink: /guide/codewind-getting-started-eclipse/
layout: guide-markdown
title: Getting Started with Codewind and Eclipse
duration: 30 minutes
description: Take advantage of Codewind's tools to help build high quality cloud native applications with the Eclipse IDE.
duration: 30 minutes
description: Take advantage of Codewind's tools to help build high quality cloud native applications with the Eclipse IDE.
tags: ['kabanero', 'appsody', 'codewind', 'microservice']
guide-category: stacks
---

## Objectives

### Learning objectives
### Learning objectives

In this guide, you will learn how to develop a simple microservice with Eclipse, using Eclipse Codewind, an open source project, which provides IDE extensions. Codewind provides the ability to create new projects based on application stacks that can be customized to meet your company's policies and consistently deploy applications and microservices at scale.

## Overview

Application stacks enable the development and optimization of containerized microservice applications. Public stacks for Open Liberty, Springboot, Node.js, and Node.js with Express can be customized to suit local requirements. Codewind provides the ability to create application projects from these stacks, enabling developers to focus on their code and not infrastructure and Kubernetes.
Application stacks enable the development and optimization of containerized microservice applications. Public stacks for Open Liberty, Springboot, Node.js, and Node.js with Express can be customized to suit local requirements. Codewind provides the ability to create application projects from these stacks, enabling developers to focus on their code and not infrastructure and Kubernetes.

## Developing with Eclipse
## Developing with Eclipse

You can use Codewind for Eclipse to develop and debug your containerized projects, using the workflow you already use today.

### Prerequisite

Before you can develop a microservice with Eclipse, you need to:

* [Install Docker](https://docs.docker.com/install/)
* **Note:** Make sure to install or upgrade to minimum Docker version 19.03.
* [Install Docker](https://docs.docker.com/install/)
* **Note:** Make sure to install or upgrade to minimum Docker version 19.03.
* [Install Eclipse](https://www.eclipse.org/downloads/packages/release/)
* **Note:** Make sure to install or upgrade to mimimum Eclipse version 2019-09 R (4.13.0).
* **Note:** Make sure to install or upgrade to mimimum Eclipse version 2019-09 R (4.13.0).
* [Install Codewind for Eclipse](https://kabanero.io/docs/ref/general/installation/installing-dev-tools.html#installing-codewind-for-eclipse)

### Configuring Codewind to use application stacks

Configure Codewind to use Appsody templates so you can focus exclusively on your code. These templates include stacks that you can use to follow this guide. Complete the following steps to select the Appsody templates:

1. Click the `Codewind` tab.
1. Click the `Codewind` tab.
2. Expand `Codewind` by clicking the drop-down arrow.
3. Right-click `Local [Running]`.
4. Select `Manage Template Sources...`.
4. Select `Manage Template Sources...`.
5. Select `Appsody Stacks - incubator`.
6. Click the `OK` button.
6. Click the `OK` button.

You now have configured Codewind to Appsody templates and can proceed to develop your microservice within Codewind.

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:
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:

1. Return to `Codewind` and right-click `Local [Running]`.
2. Select `Manage Template Sources...`.
1. Return to `Codewind` and right-click `Local [Running]`.
2. Select `Manage Template Sources...`.
3. Click the `Add...` button to add your URL.
4. Add your URL in the `URL:` box in the pop up window and save your changes.
4. Add your URL in the `URL:` box in the pop up window and save your changes.

### Creating an Appsody project

Appsody helps you develop containerized applications and removes the burden of managing the full software development stack. If you want more context about Appsody, visit the https://appsody.dev/docs[Appsody welcome page].
Appsody helps you develop containerized applications and removes the burden of managing the full software development stack. If you want more context about Appsody, visit the https://appsody.dev/docs[Appsody welcome page].

1. Right-click `Local [Running]` under `Codewind` in the `Codewind` tab.
2. Select `+ Create New Project...`
* **Note:** Make sure Docker is running. Otherwise, you get an error.
3. Name your project `appsody-calculator`.
* **Note:** Make sure Docker is running. Otherwise, you get an error.
3. Name your project `appsody-calculator`.
4. Under `Template`, select `Appsody Open Liberty template`
* If you don't see an Appsody template, select the `Manage Template Sources...` link at the end of the window.
* Select the `Appsody Stacks - appsodyhub` checkbox.
* Select the `Appsody Stacks - appsodyhub` checkbox.
* Click `OK`.
* The templates are refreshed, and the Appsody templates are available.
* The templates are refreshed, and the Appsody templates are available.
5. Click `Finish`.
* To monitor your project's progress, right-click on your project, and select `Show Log Files`.
* Select `Show All`. Then a `Console` tab is displayed where you see your project's build logs.
* Select `Show All`. Then a `Console` tab is displayed where you see your project's build logs.

Your project is displayed in the `Local [Running]` section. The progress for creating your project is tracked next to the project's name.
Your project is displayed in the `Local [Running]` section. The progress for creating your project is tracked next to the project's name.

Your project is complete when you see your project is running and its build is successful.
Your project is complete when you see your project is running and its build is successful.

### Accessing the application endpoint in a browser

1. Return to your project under the Codewind tab.
2. Right-click your project and select `Open Application`.
1. Return to your project under the Codewind tab.
2. Right-click your project and select `Open Application`.

Your application is now opened in the browser, showing the welcome to your Appsody microservice page.
Your application is now opened in the browser, showing the welcome to your Appsody microservice page.

### Adding a REST service to your application

1. Go to your project's workspace under the Project Explorer tab.
2. Navigate to `Java Resources->src/main/java->dev.appsody.starter`.
1. Go to your project's workspace under the Project Explorer tab.
2. Navigate to `Java Resources->src/main/java->dev.appsody.starter`.
3. Right-click `dev.appsody.starter` and select `New->Class`.
4. Create a Class file, name it `Calculator.java`, and select `Finish`. This file is your JAX-RS resource.
5. Populate the file with the following code then **save** the file:
4. Create a Class file, name it `Calculator.java`, and select `Finish`. This file is your JAX-RS resource.
5. Populate the file with the following code then **save** the file:

```
package dev.appsody.starter;
Expand Down Expand Up @@ -139,11 +139,11 @@ Any changes you make to your code is automatically built and re-deployed by Code

### Working with the microservice

You now can work with your calculator.
You now can work with your calculator.

* Use the port number you saw when you first opened the application.
* Make sure to remove the `< >` symbol in the URL.
* `http://127.0.0.1:<port>/starter/calculator/aboutme`
* Make sure to remove the `< >` symbol in the URL.
* `http://127.0.0.1:<port>/starter/calculator/aboutme`
* You should see the following response:

```
Expand All @@ -153,18 +153,18 @@ You can add (+), subtract (-), and multiply (*) with this simple calculator.
You could also try a few of the sample calculator functions:

* `http://127.0.0.1:<port>/starter/calculator/{op}/{a}/{b}`, where you can input one of the available operations `(+, _, *)`, and an integer a, and an integer b.
* So for `http://127.0.0.1:<port>/starter/calculator/+/10/3` you should see: `10+3=13`.
* So for `http://127.0.0.1:<port>/starter/calculator/+/10/3` you should see: `10+3=13`.

### More Learning

You have completed a simple microservice using the Eclipse IDE. For further learning:
You have completed a simple microservice using the Eclipse IDE. For further learning:

* Learn more about [Codewind](https://www.eclipse.org/codewind).
* Review [managing Codewind projects for Eclipse](https://www.eclipse.org/codewind/mdteclipsemanagingprojects.html).
* Review [managing Codewind projects for Eclipse](https://www.eclipse.org/codewind/mdteclipsemanagingprojects.html).

## What you have learned
## What you have learned

Now that you have completed this guide, you have:

1. Installed Codewind on Eclipse.
2. Developed your own microservice using Codewind.
2. Developed your own microservice using Codewind.
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
---
permalink: /guide/codewind-getting-started-vscode
permalink: /guide/codewind-getting-started-vscode/
layout: guide-markdown
title: Getting Started with Codewind and VS Code
duration: 30 minutes
description: Take advantage of Codewind's tools to help build high quality cloud native applications with the VS Code IDE.
duration: 30 minutes
description: Take advantage of Codewind's tools to help build high quality cloud native applications with the VS Code IDE.
tags: ['kabanero', 'appsody', 'codewind', 'microservice']
guide-category: stacks
---

## Objectives

### Learning objectives
### Learning objectives

In this guide, you will learn how to develop a simple microservice with Visual Studio Code (VS Code), using Eclipse Codewind, an open source project, which provides IDE extensions. Codewind provides the ability to create new projects based on application stacks that can be customized to meet your company's policies and consistently deploy applications and microservices at scale.

## Overview

Application stacks enable the development and optimization of containerized microservice applications. Public stacks for Open Liberty, Springboot, Node.js, and Node.js with Express can be customized to suit local requirements. Codewind provides the ability to create application projects from these stacks, enabling developers to focus on their code and not infrastructure and Kubernetes.
Application stacks enable the development and optimization of containerized microservice applications. Public stacks for Open Liberty, Springboot, Node.js, and Node.js with Express can be customized to suit local requirements. Codewind provides the ability to create application projects from these stacks, enabling developers to focus on their code and not infrastructure and Kubernetes.

## Developing with VS Code

You can use Codewind for VS Code to develop and debug your containerized projects, using the workflow you already use today.

### Prerequisite
### Prerequisite

Before you can develop a microservice with VS Code, you need to:

* [Install Docker](https://docs.docker.com/install/)
* **Note:** Make sure to install or upgrade to minimum Docker version 19.03.
* [Install Docker](https://docs.docker.com/install/)
* **Note:** Make sure to install or upgrade to minimum Docker version 19.03.
* [Install VS Code](https://code.visualstudio.com/download)
* [Install Codewind for VS Code](https://kabanero.io/docs/ref/general/installation/installing-dev-tools.html#installing-codewind-for-vs-code)
* [Install Codewind for VS Code](https://kabanero.io/docs/ref/general/installation/installing-dev-tools.html#installing-codewind-for-vs-code)

### Configuring Codewind to use application stacks
### Configuring Codewind to use application stacks

Configure Codewind to use Appsody templates so you can focus exclusively on your code. These templates include stacks that you can use to follow this guide. Complete the following steps to select the Appsody templates:

1. Under the Explorer pane, select `Codewind`.
1. Under the Explorer pane, select `Codewind`.
2. Right-click `Local`.
3. Select `Template Source Manager`.
4. Enable `Appsody Stacks - incubator`.
3. Select `Template Source Manager`.
4. Enable `Appsody Stacks - incubator`.

You now have configured Codewind to Appsody templates and can proceed to develop your microservice within Codewind.

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:
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:

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

### Creating an Appsody project

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).
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).

1. Under the Explorer pane, select `Codewind`.
2. Expand `Codewind` by clicking the drop-down arrow.
2. Expand `Codewind` by clicking the drop-down arrow.
3. Hover over the `Projects` entry underneath Codewind in the Explorer pane, and press the `+` icon to create a project.
* **Note:** Make sure Docker is running. Otherwise, you get an error.
4. Choose the `Open Liberty (Default templates)`.
* **Note:** Make sure Docker is running. Otherwise, you get an error.
4. Choose the `Open Liberty (Default templates)`.
5. Name your project `appsody-calculator`.
* If you don't see Appsody templates, find and select `Template Source Manager` and enable `Appsody Stacks - appsodyhub`.
** The templates are refreshed, and the Appsody templates are available.
6. Press `Enter`.
* 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.
* If you don't see Appsody templates, find and select `Template Source Manager` and enable `Appsody Stacks - appsodyhub`.
** The templates are refreshed, and the Appsody templates are available.
6. Press `Enter`.
* 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.

Your project is complete when you see your application status is running and your build status is successful.
Your project is complete when you see your application status is running and your build status is successful.

### Accessing the application endpoint in a browser

1. Return to your project under the Explorer pane.
2. Select the Open App icon next to your project's name, or right-click your project and select `Open App`.
1. Return to your project under the Explorer pane.
2. Select the Open App icon next to your project's name, or right-click your project and select `Open App`.

Your application is now opened in the browser, showing the welcome to your Appsody microservice page.

### Adding a REST service to your application

1. Go to your project's workspace under the Explorer tab.
1. Go to your project's workspace under the Explorer tab.
2. Navigate to `src->main->java->dev->appsody->starter`.
3. Right-click `starter` and select `New File`.
4. Create a file, name it `Calculator.java`, and press `Enter`. This file is your JAX-RS resource.
5. Populate the file with the following code then **save** the file:
4. Create a file, name it `Calculator.java`, and press `Enter`. This file is your JAX-RS resource.
5. Populate the file with the following code then **save** the file:

```
package dev.appsody.starter;
Expand Down Expand Up @@ -128,22 +128,22 @@ public class Calculator extends Application {
}
}
```
Any changes you make to your code is automatically built and re-deployed by Codewind and viewable in your browser.
Any changes you make to your code is automatically built and re-deployed by Codewind and viewable in your browser.

### Working with the microservice

You now can work with your calculator.

1. Use the port number you saw when you first opened the application.
2. Make sure to remove the `< >` symbol in the URL.
3. `http://127.0.0.1:<port>/starter/calculator/aboutme`
2. Make sure to remove the `< >` symbol in the URL.
3. `http://127.0.0.1:<port>/starter/calculator/aboutme`
4. You should see the following response:

```
You can add (+), subtract (-), and multiply (*) with this simple calculator.
```

You could also try a few of the sample calculator functions:
You could also try a few of the sample calculator functions:

* `http://127.0.0.1:<port>/starter/calculator/{op}/{a}/{b}`, where you can input one of the available operations `(+, _, *)`, and an integer a, and an integer b.
* So for `http://127.0.0.1:<port>/starter/calculator/+/10/3` you should see: `10+3=13`.
Expand All @@ -155,9 +155,9 @@ You have created a simple microservice using the VS Code IDE. For further learni
* Learn more about [Codewind](https://www.eclipse.org/codewind/).
* Review [project commands for Codewind for VS Code](https://www.eclipse.org/codewind/mdt-vsc-commands-project.html).

## What you have learned
## What you have learned

Now that you have completed this guide, you have:

1. Installed Codewind on VS Code.
2. Developed your own microservice using Codewind.
2. Developed your own microservice using Codewind.

0 comments on commit c90d7c1

Please sign in to comment.