GithubHelp home page GithubHelp logo

openliberty / cloud-hosted-guide-converter Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 4.0 294 KB

This repository contains the source code for the guide converter application. This source code once built is used to convert our guides on the openliberty.io/guides page from AsciiDoc to markdown for use on the Skills Network Environment.

License: Eclipse Public License 2.0

Java 100.00%

cloud-hosted-guide-converter's People

Contributors

gkwan-ibm avatar jakub-pomykala avatar ryan-storey avatar tevans78 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-hosted-guide-converter's Issues

Add a prefix to the generate PR

The convertor generates PR to the staging or master branch. Suggest to add a prefix for the PR title as following:

  • To staging: Change to cloud-hosted-guide-cdi-intro
  • To master: Change to cloud-hosted-guide-cdi-intro

Function to switch all docker output

The docker output doesn't match with the one in the guides. We need a way to switch these to the output that will match the one that the user sees in their terminals

Change temporary fix for italic writting issue

Once Skills Network comes up with a permanent fix for the issue where underscores are being changed to italic writing (even when escaped) We will have to change the GuideConverter. This included removing the hard coded temp fix and adding a function to add the permanent fix.

Feedback for Getting Started Guide - Mac/Chrome

Step 9
image

Consider having "Navigate to the target directory" on its own line so that its clearer or add a cd command to the target directory

Overall
The text surrounding the curl statements need to be revised. The guide itself worked as expected.

Can't copy and paste into editor on Linux

When trying to copy the new code from the left pane into the editor on the right, the error message pops up:
Screenshot 2021-01-12 at 2 17 03 PM

I am able to successfully copy and paste into the terminal, the issue is only with the editor. Also, if I copy using the browser's copy and paste, it works fine.

This was tested on a Linux VM using Firefox. This could be an issue unique to testing on a VM, but this is my only way to test it.

invalid markdown instructions in staging SN

Got invalid markdown instructions when run the following in staging SN:

  • cloud-hosted-guide-rest-intro
  • cloud-hosted-guide-containerize
  • cloud-hosted-guide-microprofile-config
  • cloud-hosted-guide-microprofile-fallback
  • cloud-hosted-guide-microprofile-rest-client
  • cloud-hosted-getting-started

Screen Shot 2020-12-11 at 3 22 27 PM

Step 2 of the cloud-hosted-guide-getting-started

In the following statement, the "Git repository" should have a link to the guide repo.

"The fastest way to work through this guide is to clone the Git repository and use the projects that are provided inside:"

Create/Replace/Update file Instruction not clear

[File -> Open]guide-cdi-intro/start/src/main/java/io/openliberty/guides/inventory/InventoryManager.java is clear to readers

Screen Shot 2020-12-10 at 5 26 28 PM

Suggest:
Run menu: File > New File
File path: /home/project/guide-cdi-intro/start/src/main/java/io/openliberty/guides/inventory/InventoryManager.java

For Replace or Update instruction:
Run menu: File > Open...
File path: /home/project/guide-cdi-intro/start/src/main/java/io/openliberty/guides/inventory/InventoryManager.java

Feedback for guide-microprofile-rest-client

Tested using login with Github, failed with:

An error occurred when signing you in to Open Liberty Hands On.
We are sorry, you are not authorized to access Open Liberty Hands On via this channel. Please contact your learning administrator or manager in order to access Open Liberty Hands On.

Error Details:
Authentication process cancelled

Retried log in with LinkedIn. This succeeds. Both my LinkedIn and Github are registered under the same e-mail address though.

Tested on Windows 10 on Firefox


Step 1

  • CDI link appears to be duplicated, appearing twice, with the second instance overwriting what should be a link to a blog post for the RestClientBuilder.

Step 2

  • In message The defaultServer server is ready to run a smarter planet., the word "is" is bolded for some reason.
  • When it asks you to point the browser to a URL, this isn't applicable for the cloud hosted guides
    • Previously mentioned in #53
    • Perhaps mentions of localhost:9080 can be replaced with something like austinseto-9080.theiadocker-24.proxy.cognitiveclas.ai (the URL I had) or similar?
    • curl command cannot be used before opening another terminal as the application is running the first terminal
  • Descriptions of URLs have parts of the URL italicized for some reason
  • Unsure if statement about FQDN is applicable on the cloud hosted guides

Step 3

  • In example message Press the Enter key to run tests on demand the word "press" is bolded and "on" is highlighted

Step 6

  • It says to "select either approach" but no approaches are shown

Step 7

  • In description of testDefaultLocalHost() the URL has a backslash at the start

Step 8

  • Hyperlink for Hostname with verification... is duplicated, overwriting the hyperlink MicroProfile Rest Client specification that appears on openliberty.io

Handle multiple conversions gracefully

  1. change a guide and merge a PR
  2. the converter create a PR on the quick-labs repo, but not merge
  3. another change for the same guide at step 1, and merge the PR
  4. the converter should override the PR at step 2 correctly

The above should be applied to the staging and master

Feedback for containerize guide

Step 2

  • Missing the getting started part (open terminal + git clone etc)

Step 4

Screen Shot 2021-01-26 at 12 00 13 PM

  • Link doesn't match the guide http://localhost:9081/inventory/systems/pass:c[[system-ip-address]] -> http://localhost:9081/inventory/systems/[system-ip-address]
  • There should be a curl command associated to that link
  • problem here as well http://localhost:9081/inventory/systems[http://localhost:9081/inventory/systems^]

Step 5

Screen Shot 2021-01-26 at 12 03 45 PM

  • same thing here, http://localhost:9081/inventory/systems/pass:c[[system-ip-address]] -> http://localhost:9081/inventory/systems/[system-ip-address]
  • and we should also add a curl associated with that link

Step 6

Screen Shot 2021-01-26 at 12 09 25 PM

Screen Shot 2021-01-26 at 12 09 38 PM

  • can't go to step 7?

Step 7

End to end works!

Change command line output

Some commands will be giving different outputs for users when using the build in environment. We can add this to the guide Converter by running commands and finding the different outputs and then adding these outputs to the cloud-hosted file of Guides-common. Then switch the outcomes when the converter finds an output that should be different

Feedback for cloud hosted microprofile config guide

Step 2 of 10

Should ask for users to open a new terminal before prompting the curl commands
Screen Shot 2021-01-11 at 12 57 55 PM

Step of 10

Issue with parsing the property name:
Screen Shot 2021-01-11 at 1 08 04 PM
Screen Shot 2021-01-11 at 1 10 29 PM

Step 5 of 10

Suggestion to change Note that three default config sources mentioned **above** are static and fixed on application... to
Note that three default config sources mentioned **in the previous step** are static and fixed on application... or something similar
Screen Shot 2021-01-11 at 1 15 27 PM
Property names not parsed correctly:
Screen Shot 2021-01-11 at 2 17 04 PM

Step 6 of 10

Screen Shot 2021-01-11 at 2 20 27 PM

Step 8 of 10

Screen Shot 2021-01-11 at 4 14 02 PM

Step 9 of 10

Screen Shot 2021-01-11 at 4 15 40 PM

Login and log out was working properly. Integration test passed. End to end works as expected too.

Feedback for guide-cdi-intro

Tested using login with LinkedIn

Tested on Windows 10 on Firefox


General

  • When the user is asked to create/modify certain files, the highlighting appears to miss package

Step 1

  • The link to the guide-rest-intro links to the guide on openliberty.io, unsure if intended or if these links are intended to link to the guides on the cloud hosted platform

Step 2

  • When it asks you to point the browser to a URL, this isn't applicable for the cloud hosted guides
    • Perhaps mentions of localhost:9080 can be replaced with something like austinseto-9080.theiadocker-8.proxy.cognitiveclas.ai (the URL I had) or similar?
    • curl command cannot be used before opening another terminal as the application is running the first terminal

Step 4

  • The URLs displayed are incorrect (besides previously noted issue regarding localhost)
    • Only 1 URL is listed (guide on openliberty.io lists 2 URLs)
    • Random dash appears instead, I think URL got cut off or similar, excerpt copy pasted below

Excerpt:

You can find the inventory and system services at the following URLs:

curl http://localhost:9080/inventory/systems

Curl command

The curl command function should be revisited and re written in a better way or, overall switched over to using the build in environment UI

Should ask users to log out the lab when finish?

Should ask users to log out the lab when finish at the last "Summary" step?

e.g. add a statement
Log out by running [Account -> Logout]

Otherwise, in case users not complete a lab and open another lab, SN will open the same env, it may cause problem

Running multiple instances simultaneously

Can users have multiple cloud-hosted guides opened at the same time?

If so, how can they effectively work with multiple cloud-hosted guides at the same time with the same hosted environment? (Open multiple terminals?)

Should clarify and provide guidance on this where appropriate.

I can see users wanting to reference multiple guides and try them out together. May be not common or day 1 usage but can happen. At least, we should allow for it.

Cloud Hosted Rest Intro

On the Skills Network Labs draft website:
Note: not sure if this is where to open up an issue

Step 1 of 8

  • Localhost link has a slash in front:

Screen Shot 2021-01-07 at 2 54 44 PM

Step 2 of 8

  • We should prompt the user to open a new terminal in order to run the curl command

Step 5 of 8

  • We shouldn't keep adoc tags in the xml config file

Screen Shot 2021-01-07 at 2 57 13 PM

Step 7 of 8

  • Has a misplaced curl command

Screen Shot 2021-01-07 at 2 58 04 PM

Otherwise, log in works and end to end application works as well.

Polish the Summary step

  • instruction can be
cd /home/project
rm -fr guide-cdi-intro
  • "Great work! You're done!" -> "Nice work!"

Need instruction how to clone a guide repo

Need to insert some instruction how to start.
Readers don’t know where to run the git clone ... at step 2

e.g. Run menu [Terminal] > [New Terminal]. At the terminal console run the following commands:

Switch localhost to username

When it asks user to point the browser to a URL, this isn't applicable for the cloud hosted guides
Perhaps mentions of localhost:9080 can be replaced with something like jakubpomykala-9080.theiadocker-8.proxy.cognitiveclas.ai or similar?

Step 6 and 7 of the cloud-hosted-guide-getting-started

Step 6

[File -> Open]guide-getting-started/start/src/main/java/io/openliberty/sample/system/SystemReadinessCheck.java
and
[File -> Open]guide-getting-started/start/src/main/java/io/openliberty/sample/system/SystemLivenessCheck.java

should be

[File -> New File]
guide-getting-started/start/src/main/java/io/openliberty/sample/system/SystemReadinessCheck.java

and

[File -> New File]
guide-getting-started/start/src/main/java/io/openliberty/sample/system/SystemLivenessCheck.java

Step 7

[File -> Open]guide-getting-started/start/src/main/liberty/config/server.xml
to

[File -> Open...]
guide-getting-started/start/src/main/liberty/config/server.xml

Should make the File Open/New command clear

Now is showing
[File -> Open]guide-getting-started/start/src/main/liberty/config/server.xml

Suggest to be in two lines and have ... after Open to match what I see for VS code

[File -> Open...]
guide-getting-started/start/src/main/liberty/config/server.xml

or

[File] > [Open...]
guide-getting-started/start/src/main/liberty/config/server.xml

Screen Shot 2020-12-14 at 11 44 21 AM

The text for "Great work!" should be before the clean up instruction

See the last step of https://openliberty.skillsnetwork.site/quicklab/cloud-hosted-guide-microprofile-rest-client-staging. The following text should be before the clean up instruction

MicroProfile Rest Client also provides a uniform way to configure SSL for the client. You can learn more in the Hostname verification with SSL on Open Liberty and MicroProfile Rest Client blog and the Hostname verification with SSL on Open Liberty and MicroProfile Rest Client.

Feel free to try one of the related guides where you can learn more technologies and expand on what you built here.

Screen Shot 2021-01-05 at 2 45 20 PM

Improve Summary step

  • Order the "Nice work!" section first i.e. summarize what the users have learnt first

  • Improve and/or clarify the relevance and why for "Clean up your environment"

    • Why do we need to clean up? Can the steps be automated?
    • Logout: Do we need to log out if users want to try more guides?
  • Link back to https://openliberty.io/guides and/or relevant guides

@gkwan-ibm @jamiecoleman92

Feedback for the microprofile-fallback guide

Step 2

  • The following should be reworded and we should also prompt the user to open another terminal before prompting them to curl.

Screen Shot 2021-01-11 at 6 37 15 PM

  • start should be changed to finish

Screen Shot 2021-01-11 at 6 40 53 PM

  • parsing issue

Screen Shot 2021-01-11 at 6 42 44 PM

  • Same thing here; start should be changed to finish, the parsing issue also happens after this curl command

Screen Shot 2021-01-11 at 6 46 40 PM

Step 5

  • Should reword the following:

Screen Shot 2021-01-11 at 7 07 14 PM

  • Add a curl -k -u admin https://localhost:9443/metrics/application command which prompts users to enter the adminpwd password

Screen Shot 2021-01-11 at 7 11 38 PM

  • This issue happens a couple times in this step:

Screen Shot 2021-01-11 at 7 12 16 PM

  • Wording here should be changed because we are using curl as opposed to using the browser

Screen Shot 2021-01-11 at 7 13 51 PM

  • Wording here should be changed as well.
  • The -I flag should be added to the command so that the status code shows up ie. curl -I http://localhost:9080/system/properties
HTTP/1.1 503 Service Unavailable
X-Powered-By: Servlet/4.0
Date: Tue, 12 Jan 2021 00:28:55 GMT
Content-Length: 0
Content-Language: en-US
Connection: Close

Screen Shot 2021-01-11 at 7 29 17 PM

  • Missing a curl -k -u admin https://localhost:9443/metrics/application

Step 6

  • The integration test code has comments that are not well formed which causes errors

The application works, integration test passed when I copied the code from the draft site and log in also works!

Screen Shot 2021-01-11 at 7 42 19 PM

Feedback for Getting Started Guide - Mac/Firefox

Functionally, everything works well in the guide. I have a couple pieces of feedback regarding the content:

  • I think that the way the user is instructed to run the curl commands could be worded better. For example, the first time the user is asked to run the command, it is phrased as such:
To access the system microservice, see the 

`curl http://localhost:9080/system/properties`

URL, and you see a list of the various system properties of your JVM: ...

Im not sure it makes sense to say "see the" followed by a command. Consider replacing it with something like:

Open a new tab of your command-line session and run the following command to access the system microservice:

`curl http://localhost:9080/system/properties`

You should see a list of the various system properties of your JVM: ...

I think the instructions preceding the curl commands should be reworded throughout the guide if possible.

  • In step 8/10, the section still contains the instructions to make sure Docker is installed and to start the daemon. I don't think this applies for the cloud hosted labs because it's already set up.

Write "hide tags" feature

In original guide when there is an import code file command, sometimes it includes hide_tags=. It will be good to add this to the guide converter by using regex to find what tag within file needs to be hidden and then again using regex delete that tag from the code snippet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.