Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
chinhh committed Dec 24, 2019
1 parent b17e582 commit a771695
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 19 deletions.
3 changes: 0 additions & 3 deletions docs/labs/citizen-integrator-track/lab01/walkthrough.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ image::images/design-03.png[design-new-api, role="integr8ly-img-responsive"]
** Type: *Open API 3.0.2*
** Name: *`Locations-{user-username}`*
** Description: *`Locations API`*

+
image::images/design-04.png[design-create-api, role="integr8ly-img-responsive"]
. Click on *Create API*.
Expand All @@ -75,7 +74,6 @@ Did the API successfully get created?
[type=verificationFail]
Have your instructor check the Kubernetes pod that contains the Apicurio Studio application.


[time=2]
[id="editing-apis"]
== Editing APIs
Expand Down Expand Up @@ -122,7 +120,6 @@ Were the data types successfully detected?
[type=verificationFail]
Have your instructor check the Kubernetes pod that contains the Apicurio Studio application.


[time=2]
[id="adding-paths"]
== Adding Paths
Expand Down
2 changes: 0 additions & 2 deletions docs/labs/citizen-integrator-track/lab02/walkthrough.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,12 @@ image::images/mock-18.png[mock-curl-service, role="integr8ly-img-responsive"]
+
image::images/mock-19.png[mock-curl-response, role="integr8ly-img-responsive"]


[type=verification]
Were the _RESPONSE HEADERS_ and the _RESPONSE_BODY_ created successfully?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the Microcks application.


_Congratulations!_ You have successfully configure a Microcks Job to create a REST mock service to test your API.

[time=2]
Expand Down
18 changes: 18 additions & 0 deletions docs/labs/developer-track/lab01/walkthrough.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ image::images/design-04.png[design-import-api, role="integr8ly-img-responsive"]
+
image::images/design-05.png[design-edit-api, role="integr8ly-img-responsive"]

[type=verification]
Did the API successfully get created?

[type=verificationFail]
Have your instructor check the Kubernetes pod that contains the Apicurio Studio application.

=== Step 2: Verifying APIs

You are now in the main screen to edit your APIs. Different from other API editor products, Apicurio's Editor is a graphical, form-based editor. With Apicurio you don't need master in and out all the details of the *OpenAPI Specification*. It allows you to design beautiful, functionals APIs with zero coding.
Expand All @@ -88,6 +94,12 @@ image::images/design-16.png[design-definition-name, role="integr8ly-img-responsi
+
image::images/design-17.png[design-definition-types, role="integr8ly-img-responsive"]

[type=verification]
Were the correct HTTP Response received?

[type=verificationFail]
Have your instructor check the Kubernetes pod that contains the Apicurio Studio application.

=== Step 3: Verify the location object

. Click on the `</> location` object link under the _Data Types_ section. Notice that the object has a bunch of properties defined which make up the object.
Expand All @@ -104,6 +116,12 @@ image::images/design-07.png[design-path, role="integr8ly-img-responsive"]
+
image::images/design-23.png[design-locations-api, role="integr8ly-img-responsive"]

[type=verification]
Were the location object successfully created?

[type=verificationFail]
Have your instructor check the Kubernetes pod that contains the Apicurio Studio application.

_Congratulations!_ You have imported your first API definition based on the OpenAPI Specification using Red Hat's Apicurio.

[time=1]
Expand Down
18 changes: 17 additions & 1 deletion docs/labs/developer-track/lab02/walkthrough.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ifdef::env-github[]
:next-lab-url: ../lab03/walkthrough.adoc
endif::[]


[id='mocking']
= Developer Lab 2 - API Mocking

Expand Down Expand Up @@ -103,6 +102,11 @@ image::images/mock-09.png[mock-gogs-file]
http://gogs.{openshift-app-host}/{user-username}/locations-api/raw/dev-track-lab-02/locations-api/Locations-{user-username}.json
----

[type=verification]
Was the valid URL address created successfully?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the Gogs application.

[time=6]
[id="Microcks setup"]
Expand Down Expand Up @@ -160,6 +164,12 @@ image::images/mock-19.png[mock-mock-service]
+
image::images/mock-20.png[mock-mock-operation]

[type=verification]
Was the *Mocks URL* created successfully?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the Microcks application.

=== Step 2: Test the REST Mock Service

We now have a working REST mock service listening for requests. We will use an online cURL tool to test it.
Expand All @@ -186,6 +196,12 @@ image::images/mock-21.png[mock-curl-service]
+
image::images/mock-22.png[mock-curl-response]

[type=verification]
Were the _RESPONSE HEADERS_ and the _RESPONSE_BODY_ created successfully?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the Microcks application.

_Congratulations!_ You have successfully configure a Microcks Job to create a REST mock service to test your API.

[time=1]
Expand Down
51 changes: 45 additions & 6 deletions docs/labs/developer-track/lab03/walkthrough.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif::[]
[id='swagger-rest']
= Developer Lab 3 - Swagger to REST

In this lab, we will use Contract-first API development with a database interface, implemented using Eclipse Che
In this lab, we will use Contract-first API development with a database interface, implemented using CodeReady Workspaces

Audience: API Owner, Product Manager, Developers, Architects

Expand Down Expand Up @@ -62,6 +62,12 @@ image::images/00-new-workspace.png[00-new-workspace.png, role="integr8ly-img-res

. Click on **Create & Open**.

[type=verification]
Were you able to complete those steps?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the CodeReady Workspaces application.

[time=2]
[id="DB setup"]
== Setup a sample database
Expand All @@ -84,6 +90,12 @@ image::images/00-postgres-credentials.png[00-postgres-credentials.png, role="int

. Click *Next* and ensure _Do not Bind at this time_ is selected. Click *Create* to generate the service.

[type=verification]
Were you able to generate the service?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the CodeReady Workspaces application.

[time=3]
[id="git-import"]
== Import the skeleton projects from Git and convert them to Maven projects.
Expand All @@ -107,6 +119,12 @@ image::images/00-select-maven.png[00-select-maven.png, role="integr8ly-img-respo

. Convert the remaining projects to Maven, by repeating steps 4 & 5 for the *location-service* and *location-gateway* projects.

[type=verification]
Were you able to convert the projects?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the CodeReady Workspaces application.

[time=2]
[id="open-api-import"]
== Import the OpenAPI specification
Expand Down Expand Up @@ -145,6 +163,12 @@ image::images/00-login-terminal.png[00-login-terminal.png, role="integr8ly-img-r
+
image::images/00-run-mvn.png[00-run-mvn.png, role="integr8ly-img-responsive"]

[type=verification]
Were you able to generate the `CamelRoutes.java` file?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the CodeReady Workspaces application.

[time=10]
[id="Camel Route Update"]
== Update the Camel Routes
Expand Down Expand Up @@ -342,6 +366,12 @@ image::images/00-final-spring-boot.png[00-final-spring-boot.png, role="integr8ly
+
image::images/00-run-locally.png[00-run-locally.png, role="integr8ly-img-responsive"]

[type=verification]
Were you able to run the script?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the CodeReady Workspaces application.

[time=2]
[id="test-springboot"]
== Test local spring:boot service
Expand All @@ -350,10 +380,16 @@ image::images/00-run-locally.png[00-run-locally.png, role="integr8ly-img-respons
+
image::images/00-open-servers.png[00-open-servers.png, role="integr8ly-img-responsive"]

. Click on the route link above the location-service pod and append `/locations` to the URI. As a result, you should receive a list of all locations
. Click on the route link above the location-service pod and append `/locations` to the URI. As a result, you should receive a list of all locations.
+
image::images/00-location-list.png[00-location-list.png, role="integr8ly-img-responsive"]

[type=verification]
Were you able to retrieve a list of locations?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the CodeReady Workspaces application.

[time=3]
[id="deploy-location-service"]
== Deploy location service to Openshift
Expand All @@ -366,7 +402,6 @@ image::images/00-deploy-mvn.png[00-deploy-mvn.png, role="integr8ly-img-responsiv
+
image::images/00-save-fabric-deploy.png[00-save-fabric-deploy.png, role="integr8ly-img-responsive"]


. Click **Run**. The script will run and deploy to your {user-username} Openshift project.
+
image::images/00-mvn-deploy.png[00-mvn-deploy.png, role="integr8ly-img-responsive"]
Expand All @@ -380,17 +415,21 @@ image::images/00-verify-location-service.png[00-verify-location-service.png, rol
image::images/00-location-list.png[00-location-list.png, role="integr8ly-img-responsive"]

. You can also search for individual locations by adjusting the URI to `+/locations/{id}+` e.g. `/locations/100`.
. Lastly, via the Eclipse Che terminal, test the HTTP POST using curl. You can use the following command:
. Lastly, via the CodeReady Workspaces terminal, test the HTTP POST using curl. You can use the following command:
+
[source,bash,subs="attributes+"]
----
curl --header "Content-Type: application/json" --request POST --data '{"id": 101,"name": "Kakadu","type": "HQ","status": "1","location": {"lat": "78.88436","lng": "99.05295"}}' http://location-service-{user-username}.{openshift-app-host}/locations
----
+
. If the HTTP POST operation is successful, you should be able to view it by repeating the HTTP GET /locations test.

. If the HTTP POST is successful, you should be able to view it by repeating the HTTP GET /locations test.
[type=verification]
Were all the HTTP POST operations successful?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the web service application.

+
_Congratulations!_ You have now an application to test your Swagger to RESTdsl integration.

[time=2]
Expand Down
28 changes: 25 additions & 3 deletions docs/labs/developer-track/lab04/walkthrough.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:walkthrough: Contract-first API development wrapping an existing SOAP service, implemented using Eclipse Che
:walkthrough: Contract-first API development wrapping an existing SOAP service, implemented using CodeReady Workspaces
:codeready-url: https://codeready-codeready.{openshift-app-host}
:next-lab-url: https://tutorial-web-app-webapp.{openshift-app-host}/tutorial/dayinthelife-integration.git-developer-track-lab05/
:user-password: openshift
Expand All @@ -20,7 +20,7 @@ Another important use case in developing API's is to take an existing legacy SOA

*Why Red Hat?*

CodeReady Workspaces, our online IDE, provides important functionality for implementing API services. In this lab you can see how our Eclipse Che and Fuse can help with SOAP to REST transformation on OpenShift.
CodeReady Workspaces, our online IDE, provides important functionality for implementing API services. In this lab you can see how our CodeReady Workspaces and Fuse can help with SOAP to REST transformation on OpenShift.

*Skipping The Lab*

Expand Down Expand Up @@ -78,6 +78,13 @@ image::images/00-login-terminal.png[00-login-terminal.png, role="integr8ly-img-r
+
image::images/00-verify-location-soap.png[00-verify-location-soap.png, role="integr8ly-img-responsive"]

[type=verification]
Were you able to build and deploy the SOAP application?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the SOAP application.


[time=5]
[id="instructions"]
== Modify the skeleton project
Expand All @@ -86,7 +93,7 @@ image::images/00-verify-location-soap.png[00-verify-location-soap.png, role="int
+
image::images/00-verify-wsdl.png[00-verify-wsdl.png, role="integr8ly-img-responsive"]

. Return to your Eclipse Che workspace and open the `dayintelife-import/location-soap2rest` project. Open the `pom.xml` file and scroll to the bottom. Uncomment out the `cxf-codegen-plugin` entry at the bottom. Update the `<wsdl>` entry with your fully qualified WSDL URL e.g. `http://location-soap-{user-username}.{openshift-app-host}/ws/location?wsdl`.
. Return to your CodeReady Workspaces workspace and open the `dayintelife-import/location-soap2rest` project. Open the `pom.xml` file and scroll to the bottom. Uncomment out the `cxf-codegen-plugin` entry at the bottom. Update the `<wsdl>` entry with your fully qualified WSDL URL e.g. `http://location-soap-{user-username}.{openshift-app-host}/ws/location?wsdl`.
+
image::images/00-uncomment-codegen.png[00-uncomment-codegen.png, role="integr8ly-img-responsive"]

Expand All @@ -106,6 +113,13 @@ _Common gotcha: If build fails due to used port, check if you are running with m
+
image::images/00-verify-pojos.png[00-verify-pojos.png, role="integr8ly-img-responsive"]

[type=verification]
Were you able to generate the POJO classes?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the CodeReady Workspaces application.


[time=10]
[id="instructions"]
== Update the Camel Route
Expand Down Expand Up @@ -193,6 +207,14 @@ image::images/00-verify-pod.png[00-verify-pod.png, role="integr8ly-img-responsiv

. Click on the route link above the location-soap2rest pod and append `/location/contact/2` to the URI. As a result, you should get a contact back.

[type=verification]
Were you able to retrieve a contact?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the CodeReady Workspaces application.



_Congratulations!_ You have created a SOAP to REST transformation API.

[time=2]
Expand Down
16 changes: 15 additions & 1 deletion docs/labs/developer-track/lab05/walkthrough.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ image::images/04-setuptoken.png[04-setuptoken.png, role="integr8ly-img-responsiv
+
image::images/05-token.png[05-token.png, role="integr8ly-img-responsive"]

[type=verification]
Were you able to create and copy the token?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the 3scale API Management application.


[time=10]
[id="lab-instructions"]
== Start managing your APIs
Expand All @@ -78,7 +85,14 @@ By running the command lines, it will automatically setup the 3scale API configu
_Remember to replace *YOUR_API_TOKEN* with your generated *token*_.
+
. The *API automated, DONE!* string should be returned as the result.
+

[type=verification]
Was the string returned?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the 3scale API Management application.


_Congratulations!_ You have configured 3scale access control layer as a proxy to only allow authenticated calls to your backend API. 3scale is also now:
** Authenticating: (If you test with an incorrect API key it will fail)
** Recording calls (Visit the Analytics tab to check who is calling your API).
Expand Down
21 changes: 20 additions & 1 deletion docs/labs/developer-track/lab06/walkthrough.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ image::images/17-publishplan.png[17-publishplan.png, role="integr8ly-img-respons
+
image::images/11-visit-devportal.png[11-visit-devportal.png, role="integr8ly-img-responsive"]

[type=verification]
Were you able to customize the developer portal?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the 3scale API Management application.


[time=10]
[id="register-dev-portal"]
== Register New Accounts Using Developer Portal
Expand Down Expand Up @@ -124,6 +131,12 @@ image::images/21-select-application.png[21-select-application.png, role="integr8
+
image::images/22-updare-redirect-link.png[22-updare-redirect-link.png, role="integr8ly-img-responsive"]

[type=verification]
Were you able to activate your user account?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the 3scale API Management application.

[time=10]
[id="login-dev-portal"]
== Login to Developer Portal
Expand All @@ -147,7 +160,13 @@ image::images/16f-dev-signin.png[16f-dev-signin.png, role="integr8ly-img-respons
image::images/16g-user-credentials.png[16g-user-credentials.png, role="integr8ly-img-responsive"]
+
_Copy down this credentials as it you will use them to authenticate yourself to the managed API_.
+

[type=verification]
Were you able to customize the developer portal?

[type=verificationFail]
Try to redo this section, if any problem persists have your instructor check the Kubernetes pod that contains the 3scale API Management application.

_Congratulations!_ You have successfully customized your Developer Portal and completed a Sign Up process.

[time=1]
Expand Down
Loading

0 comments on commit a771695

Please sign in to comment.