From 0cb14a2e83e00ad4b57d7af0a13bc156527b17c8 Mon Sep 17 00:00:00 2001 From: jamesfalkner Date: Tue, 23 Jul 2019 17:39:33 -0400 Subject: [PATCH] fix braces --- docs/deploy.adoc | 2 +- docs/monitoring.adoc | 6 +++--- docs/native.adoc | 2 +- docs/panache.adoc | 6 +++--- docs/security.adoc | 12 ++++++------ docs/tracing.adoc | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/deploy.adoc b/docs/deploy.adoc index 942eea5..23c3ab3 100644 --- a/docs/deploy.adoc +++ b/docs/deploy.adoc @@ -104,7 +104,7 @@ And now we can access using `curl` once again. In the Terminal, run this command [source,sh,role="copypaste copypaste"] ---- -curl $(oc get route people -o=go-template --template='{{ .spec.host }}')/hello/greeting/quarkus-on-openshift +curl $(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/hello/greeting/quarkus-on-openshift ---- [NOTE] diff --git a/docs/monitoring.adoc b/docs/monitoring.adoc index 53e503a..a4219c1 100644 --- a/docs/monitoring.adoc +++ b/docs/monitoring.adoc @@ -189,14 +189,14 @@ You'll need to trigger the methods that we've instrumented, so first run this co [source,sh,role="copypaste"] ---- -echo http://$(oc get route people -o=go-template --template='{{ .spec.host }}')/names.html +echo http://$(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/names.html ---- Within a few seconds, Prometheus should start scraping the metrics. Run this command to output the URL to the Prometheus GUI: [source,sh,role="copypaste"] ---- -echo http://$(oc get route prometheus -o=go-template --template='{{ .spec.host }}') +echo http://$(oc get route prometheus -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %}') ---- Open a separate browser tab and navigate to that URL. You should see: @@ -231,7 +231,7 @@ image::https://grafana.com/api/dashboards/3308/images/2099/image[Grafana dashboa == Extra Credit after this workshop -If you have time after completing this workshop, try running grafana and hooking it up to your Prometheus instance you've created. Hint: `oc new-app grafana/grafana && oc expose svc/grafana` and then access Grafana at the URL emitted by this command: `echo http://$(oc get route grafana -o=go-template --template='{{ .spec.host }}')`, add Prometheus as a data source at `http://prometheus:9090`, and create a custom dashboard showing some of your application metrics, or import an existing dashboard from the Grafana community. +If you have time after completing this workshop, try running grafana and hooking it up to your Prometheus instance you've created. Hint: `oc new-app grafana/grafana && oc expose svc/grafana` and then access Grafana at the URL emitted by this command: `echo http://$(oc get route grafana -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})`, add Prometheus as a data source at `http://prometheus:9090`, and create a custom dashboard showing some of your application metrics, or import an existing dashboard from the Grafana community. == Cleanup diff --git a/docs/native.adoc b/docs/native.adoc index 35cca00..aea51e4 100644 --- a/docs/native.adoc +++ b/docs/native.adoc @@ -16,7 +16,7 @@ echo $GRAALVM_HOME == Build the image -Within the `pom.xml`{{open}} is the declaration for the Quarkus Maven plugin which contains a profile for `native-image`: +Within the `pom.xml` is the declaration for the Quarkus Maven plugin which contains a profile for `native-image`: [source,xml] ---- diff --git a/docs/panache.adoc b/docs/panache.adoc index 709f555..f0cc7a7 100644 --- a/docs/panache.adoc +++ b/docs/panache.adoc @@ -60,7 +60,7 @@ public enum EyeColor { } ---- -This app will be a database of people, each of which have a name, birthdate, and eye color. We'll need an entity, so open up the `src/main/java/org/acme/people/model/Person.java`{{open}} file, and replace the stub code in the file with the following: +This app will be a database of people, each of which have a name, birthdate, and eye color. We'll need an entity, so open up the `src/main/java/org/acme/people/model/Person.java` file, and replace the stub code in the file with the following: [source,java,role="copypaste"] ---- @@ -589,7 +589,7 @@ And now we can access using `curl` once again to find everyone born in or before [source,sh,role="copypaste"] ---- -curl $(oc get route people -o=go-template --template='{{ .spec.host }}')/person/birth/before/2000 | jq +curl $(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/person/birth/before/2000 | jq ---- Now that we have our app running on OpenShift, let's see what we can do. @@ -598,7 +598,7 @@ Run the following command to output the full URL to our DataTable graphical fron [source,sh,role="copypaste"] ---- -echo; echo "http://$(oc get route people -o=go-template --template='{{ .spec.host }}')/datatable.html" ; echo +echo; echo "http://$(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/datatable.html" ; echo ---- Copy and paste that URL into a new browser tab to access it. It should look like: diff --git a/docs/security.adoc b/docs/security.adoc index 261b5de..cbdd52a 100644 --- a/docs/security.adoc +++ b/docs/security.adoc @@ -139,7 +139,7 @@ Try to access the endpoint as an anonymous unauthenticated user: [source,sh,role="copypaste"] ---- -curl -i http://$(oc get route people -o=go-template --template='{{ .spec.host }}')/secured/me +curl -i http://$(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/secured/me ---- It should fail with: @@ -177,7 +177,7 @@ Try out the JWT-secured API as Alice: [source,sh,role="copypaste"] ---- -curl -i http://$(oc get route people -o=go-template --template='{{ .spec.host }}')/secured/me \ +curl -i http://$(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/secured/me \ -H "Authorization: Bearer $ALICE_TOKEN" ---- @@ -198,7 +198,7 @@ Now try to access the `/me/admin` endpoint as `alice`: [source,sh,role="copypaste"] ---- -curl -i http://$(oc get route people -o=go-template --template='{{ .spec.host }}')/secured/me/admin \ +curl -i http://$(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/secured/me/admin \ -H "Authorization: Bearer $ALICE_TOKEN" ---- @@ -235,7 +235,7 @@ And try again with your new token: [source,sh,role="copypaste"] ---- -curl -i http://$(oc get route people -o=go-template --template='{{ .spec.host }}')/secured/me/admin \ +curl -i http://$(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/secured/me/admin \ -H "Authorization: Bearer $ADMIN_TOKEN" ---- @@ -371,7 +371,7 @@ First make sure even `admin` can't access the endpoint: [source,sh,role="copypaste"] ---- curl -v -X GET \ - http://$(oc get route people -o=go-template --template='{{ .spec.host }}')/secured/confidential \ + http://$(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/secured/confidential \ -H "Authorization: Bearer $ADMIN_TOKEN" ---- @@ -404,7 +404,7 @@ And access the confidential endpoint with your new token: [source,sh,role="copypaste"] ---- curl -X GET \ - http://$(oc get route people -o=go-template --template='{{ .spec.host }}')/secured/confidential \ + http://$(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/secured/confidential \ -H "Authorization: Bearer $JDOE_TOKEN" ---- diff --git a/docs/tracing.adoc b/docs/tracing.adoc index 79489ef..c547051 100644 --- a/docs/tracing.adoc +++ b/docs/tracing.adoc @@ -87,7 +87,7 @@ You'll need to trigger some HTTP endpoints to generate traces, so let's re-visit [source,sh,role="copypaste"] ---- -echo http://$(oc get route people -o=go-template --template='{{ .spec.host }}')/datatable.html +echo http://$(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/datatable.html ---- Open that URL in a separate browser tab, and exercise the table a bit by paging through the entries to force several RESTful calls back to our app: @@ -100,7 +100,7 @@ Use this command to generate the URL to Jaeger: [source,sh,role="copypaste"] ---- -echo http://$(oc get route jaeger-query -o=go-template --template='{{ .spec.host }}') +echo http://$(oc get route jaeger-query -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %}) ---- Open that URL in a separate tab to arrive at the Jaeger Tracing console (leave the tab open as we'll use it later) @@ -258,7 +258,7 @@ Try out our new endpoint by running the following command: [source,sh,role="copypaste"] ---- -curl http://$(oc get route people -o=go-template --template='{{ .spec.host }}')/person/swpeople +curl http://$(oc get route people -o=go-template --template={% raw %}'{{ .spec.host }}'{% endraw %})/person/swpeople ---- You should see: