From 93dd35907216f6afd1edfb57b8b1be0f74942313 Mon Sep 17 00:00:00 2001 From: "David M. Lloyd" Date: Wed, 6 Mar 2019 11:38:53 +0100 Subject: [PATCH] Use shell instead of bash for shell script code blocks --- .../application-configuration-guide.adoc | 2 +- .../asciidoc/building-native-image-guide.adoc | 2 +- .../asciidoc/building-substrate-howto.adoc | 12 ++++----- .../main/asciidoc/getting-started-guide.adoc | 2 +- .../getting-started-knative-guide.adoc | 6 ++--- docs/src/main/asciidoc/gradle-tooling.adoc | 2 +- docs/src/main/asciidoc/jwt-guide.adoc | 26 +++++++++---------- docs/src/main/asciidoc/kubernetes-guide.adoc | 6 ++--- docs/src/main/asciidoc/maven-tooling.adoc | 2 +- .../main/asciidoc/performance-measure.adoc | 2 +- docs/src/main/asciidoc/topic/serverless.adoc | 2 +- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/src/main/asciidoc/application-configuration-guide.adoc b/docs/src/main/asciidoc/application-configuration-guide.adoc index fde6102be65a9..aeda74e8c874a 100644 --- a/docs/src/main/asciidoc/application-configuration-guide.adoc +++ b/docs/src/main/asciidoc/application-configuration-guide.adoc @@ -163,7 +163,7 @@ You can also generate the native executable with `mvn clean package -Pnative`. Most properties will then be read and set during the build time step. To change them, make sure to repackage your application. -[source,bash] +[source,shell] -- mvn clean package -- diff --git a/docs/src/main/asciidoc/building-native-image-guide.adoc b/docs/src/main/asciidoc/building-native-image-guide.adoc index 8814b2f602396..123496e95681e 100644 --- a/docs/src/main/asciidoc/building-native-image-guide.adoc +++ b/docs/src/main/asciidoc/building-native-image-guide.adoc @@ -183,7 +183,7 @@ By default, the native image is tailored for your operating system (Linux, macOS Because the Docker container may not use the same _executable_ format as the one produced by your operating system, we will instruct the Maven build to produce an executable from inside a Docker container: -[source, bash] +[source,shell] ---- mvn package -Pnative -Dnative-image.docker-build=true ---- diff --git a/docs/src/main/asciidoc/building-substrate-howto.adoc b/docs/src/main/asciidoc/building-substrate-howto.adoc index 2254f8176e1d1..05e140db2d3ee 100644 --- a/docs/src/main/asciidoc/building-substrate-howto.adoc +++ b/docs/src/main/asciidoc/building-substrate-howto.adoc @@ -16,7 +16,7 @@ auth param. After obtaining the download install it and set `JAVA_HOME` -[source,bash] +[source,shell] ---- wget -O jvmci.tgz http://download.oracle.com/otn/utilities_drivers/oracle-labs/labsjdk-8u172-jvmci-0.46-darwin-amd64.tar.gz?AuthParam=[GENERATED AUTH TOKEN HERE] tar -xzvf jvmci.tgz -C /opt @@ -29,7 +29,7 @@ export PATH=$JAVA_HOME/bin:$PATH Now you need to install Graal’s special build tool, `mx`. -[source,bash] +[source,shell] ---- git clone git@github.com:graalvm/mx.git export PATH=`pwd`/mx:$PATH @@ -39,7 +39,7 @@ export PATH=`pwd`/mx:$PATH You can now check-out and build Substrate: -[source,bash] +[source,shell] ---- git clone git clone git@github.com:oracle/graal.git cd graal/substratevm @@ -48,7 +48,7 @@ mx build Once built, you can quickly run the tools in place -[source,bash] +[source,shell] ---- echo "public class HelloWorld { public static void main(String[] args) { System.out.println(\"Hello World\"); } }" > HelloWorld.java javac HelloWorld.java @@ -65,7 +65,7 @@ build options to pick the modules in your distribution. For a simple subset VM with just substrate and its native tools execute the following: -[source,bash] +[source,shell] ---- cd ../vm mx --dy /substratevm,/tools build @@ -74,7 +74,7 @@ the following: For a stock CE build the following will do: -[source,bash] +[source,shell] ---- mx --dy /substratevm,/tools,/sulong,/graal-nodejs build tar -czvf my-custom-graal.tgz -C latest_graalvm . diff --git a/docs/src/main/asciidoc/getting-started-guide.adoc b/docs/src/main/asciidoc/getting-started-guide.adoc index 6b2c26f5c9a2f..a675da2960d3e 100644 --- a/docs/src/main/asciidoc/getting-started-guide.adoc +++ b/docs/src/main/asciidoc/getting-started-guide.adoc @@ -164,7 +164,7 @@ of the resource is created and not one per request. You can configure this using Now we are ready to run our application. Use: `mvn compile quarkus:dev`: -[source, bash] +[source,shell] ---- [INFO] --------------------< org.acme:quarkus-quickstart >--------------------- [INFO] Building quarkus-quickstart 1.0-SNAPSHOT diff --git a/docs/src/main/asciidoc/getting-started-knative-guide.adoc b/docs/src/main/asciidoc/getting-started-knative-guide.adoc index 79ef2edc123ae..b43ab9550ca10 100644 --- a/docs/src/main/asciidoc/getting-started-knative-guide.adoc +++ b/docs/src/main/asciidoc/getting-started-knative-guide.adoc @@ -97,7 +97,7 @@ you need to run the following maven command to make them passed to the Knative r The following is the example command to generate the need knative resource files -[source, bash, subs="attributes"] +[source,shell, subs="attributes"] ---- mvn -Dgithub.deploy.key=$(cat ~/.ssh/quarkus-quickstarts | base64 -w 0) \ -Dgithub.keyscan=$(ssh-keyscan github.com | base64 -w 0) \ @@ -117,7 +117,7 @@ and copy them to `${project.build.directory}/knative` Run the following command to create the Knative resources: -[source, bash] +[source,shell] ---- kubectl apply --recursive --filename target/knative ---- @@ -126,7 +126,7 @@ kubectl apply --recursive --filename target/knative The application is now exposed as an internal service. If you are using `minikube` or `minishift`, you can access it using: -[source, bash] +[source,shell] ---- INGRESSGATEWAY=istio-ingressgateway IP_ADDRESS="$(minikube ip):$(kubectl get svc $INGRESSGATEWAY --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')" #<1> diff --git a/docs/src/main/asciidoc/gradle-tooling.adoc b/docs/src/main/asciidoc/gradle-tooling.adoc index 4ba2b1d02867e..ca6fa3dcf887d 100644 --- a/docs/src/main/asciidoc/gradle-tooling.adoc +++ b/docs/src/main/asciidoc/gradle-tooling.adoc @@ -160,7 +160,7 @@ A native executable will be present in `build/`. The native executable will be specific to your operating system. To create an executable that will run in a container, use the following: -[source, bash] +[source,shell] ---- gradle quarkus-native --docker-build=true ---- diff --git a/docs/src/main/asciidoc/jwt-guide.adoc b/docs/src/main/asciidoc/jwt-guide.adoc index 4eaa57dd44886..870636e00ad8a 100644 --- a/docs/src/main/asciidoc/jwt-guide.adoc +++ b/docs/src/main/asciidoc/jwt-guide.adoc @@ -137,7 +137,7 @@ public class TokenSecuredResource { Now we are ready to run our application. Use: -[source, bash] +[source,shell] ---- mvn compile quarkus:dev ---- @@ -145,7 +145,7 @@ mvn compile quarkus:dev and you should see output similar to: .quarkus:dev Output -[source, bash] +[source,shell] ---- Scotts-iMacPro:using-jwt-rbac starksm$ mvn compile quarkus:dev [INFO] Scanning for projects... @@ -164,7 +164,7 @@ Listening for transport dt_socket at address: 5005 Now that the REST endpoint is running, we can access it using a command line tool like curl: .curl command for /secured/permit-all -[source, bash] +[source,shell] ---- Scotts-iMacPro:using-jwt-rbac starksm$ curl http://127.0.0.1:8080/secured/permit-all; echo hello + anonymous, isSecure: false, authScheme: null, hasJWT: false @@ -241,7 +241,7 @@ they have either a "Echoer" or "Subscriber" role assigned. After you make this addition to your `TokenSecuredResource`, rerun the `mvn compile quarkus:dev` command, and then try `curl -v http://127.0.0.1:8080/secured/roles-allowed; echo` to attempt to access the new endpoint. Your output should be: .curl command for /secured/roles-allowed -[source, bash] +[source,shell] ---- Scotts-iMacPro:using-jwt-rbac starksm$ curl -v http://127.0.0.1:8080/secured/roles-allowed; echo * Trying 127.0.0.1... @@ -671,7 +671,7 @@ also include a "Group2MappedRole" due to the `roleMappings` claim having a mappi Now we can generate a JWT to use with `TokenSecuredResource` endpoint. To do this, run the following command: .Command to Generate JWT -[source, bash] +[source,shell] ---- mvn exec:java -Dexec.mainClass=org.acme.jwt.GenerateToken -Dexec.classpathScope=test ---- @@ -680,7 +680,7 @@ TIP: You may need to run `mvn test-compile` before this if you are working stric automatically compiles code as you write it. .Sample JWT Generation Output -[source, bash] +[source,shell] ---- Scotts-iMacPro:using-jwt-rbac starksm$ mvn exec:java -Dexec.mainClass=org.acme.jwt.GenerateToken -Dexec.classpathScope=test [INFO] Scanning for projects... @@ -723,7 +723,7 @@ a longer expiration, pass in the lifetime of the token in seconds as the second the JWT, and should be '/JwtClaims.json' for this quickstart. .Example Command to Generate JWT with Lifetime of 3600 Seconds -[source, bash] +[source,shell] ---- Scotts-iMacPro:using-jwt-rbac starksm$ mvn exec:java -Dexec.mainClass=org.acme.jwt.GenerateToken -Dexec.classpathScope=test -Dexec.args="/JwtClaims.json 3600" [INFO] Scanning for projects... @@ -760,13 +760,13 @@ eyJraWQiOiJcL3ByaXZhdGVLZXkucGVtIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiO == Finally, Secured Access to /secured/roles-allowed Now let's use this to make a secured request to the /secured/roles-allowed endpoint. Make sure you have the {project-name} server running using the `mvn compile quarkus:dev` command, and then run the following command, making sure to use your version of the generated JWT from the previous step: -[source, bash] +[source,shell] ---- curl -H "Authorization: Bearer eyJraWQiOiJcL3ByaXZhdGVLZXkucGVtIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJqZG9lLXVzaW5nLWp3dC1yYmFjIiwiYXVkIjoidXNpbmctand0LXJiYWMiLCJ1cG4iOiJqZG9lQHF1YXJrdXMuaW8iLCJiaXJ0aGRhdGUiOiIyMDAxLTA3LTEzIiwiYXV0aF90aW1lIjoxNTUxNjUyMDkxLCJpc3MiOiJodHRwczpcL1wvcXVhcmt1cy5pb1wvdXNpbmctand0LXJiYWMiLCJyb2xlTWFwcGluZ3MiOnsiZ3JvdXAyIjoiR3JvdXAyTWFwcGVkUm9sZSIsImdyb3VwMSI6Ikdyb3VwMU1hcHBlZFJvbGUifSwiZ3JvdXBzIjpbIkVjaG9lciIsIlRlc3RlciIsIlN1YnNjcmliZXIiLCJncm91cDIiXSwicHJlZmVycmVkX3VzZXJuYW1lIjoiamRvZSIsImV4cCI6MTU1MTY1MjM5MSwiaWF0IjoxNTUxNjUyMDkxLCJqdGkiOiJhLTEyMyJ9.aPA4Rlc4kw7n_OZZRRk25xZydJy_J_3BRR8ryYLyHTO1o68_aNWWQCgpnAuOW64svPhPnLYYnQzK-l2vHX34B64JySyBD4y_vRObGmdwH_SEufBAWZV7mkG3Y4mTKT3_4EWNu4VH92IhdnkGI4GJB6yHAEzlQI6EdSOa4Nq8Gp4uPGqHsUZTJrA3uIW0TbNshFBm47-oVM3ZUrBz57JKtr0e9jv0HjPQWyvbzx1HuxZd6eA8ow8xzvooKXFxoSFCMnxotd3wagvYQ9ysBa89bgzL-lhjWtusuMFDUVYwFqADE7oOSOD4Vtclgq8svznBQ-YpfTHfb9QEcofMlpyjNA" http://127.0.0.1:8080/secured/roles-allowed; echo ---- .curl Command for /secured/roles-allowed With JWT -[source, bash] +[source,shell] ---- Scotts-iMacPro:using-jwt-rbac starksm$ curl -H "Authorization: Bearer eyJraWQ..." http://127.0.0.1:8080/secured/roles-allowed; echo hello + jdoe@quarkus.io, isSecure: false, authScheme: MP-JWT, hasJWT: true @@ -863,7 +863,7 @@ Add this `winners` method to your `TokenSecuredResource` code, and run the follo a new JWT or a long lived JWT you generated previously: .curl command for /secured/winners -[source, bash] +[source,shell] ---- curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:8080/secured/winners; echo ---- @@ -872,7 +872,7 @@ Example output using my generated token is shown in the following example output the birthdate claim from the `JwtClaims.json` content. .Example Output for /secured/winners -[source, bash] +[source,shell] ---- Scotts-iMacPro:using-jwt-rbac starksm$ curl -H "Authorization: Bearer eyJraWQiOiJcL3ByaXZhdGVLZXkucGVtIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJqZG9lLXVzaW5nLWp3dC1yYmFjIiwiYXVkIjoidXNpbmctand0LXJiYWMiLCJ1cG4iOiJqZG9lQHF1YXJrdXMuaW8iLCJiaXJ0aGRhdGUiOiIyMDAxLTA3LTEzIiwiYXV0aF90aW1lIjoxNTUxNjY2MDMzLCJpc3MiOiJodHRwczpcL1wvcXVhcmt1cy5pb1wvdXNpbmctand0LXJiYWMiLCJyb2xlTWFwcGluZ3MiOnsiZ3JvdXAyIjoiR3JvdXAyTWFwcGVkUm9sZSIsImdyb3VwMSI6Ikdyb3VwMU1hcHBlZFJvbGUifSwiZ3JvdXBzIjpbIkVjaG9lciIsIlRlc3RlciIsIlN1YnNjcmliZXIiLCJncm91cDIiXSwicHJlZmVycmVkX3VzZXJuYW1lIjoiamRvZSIsImV4cCI6MTU1MTY2NjMzMywiaWF0IjoxNTUxNjY2MDMzLCJqdGkiOiJhLTEyMyJ9.LqJ5LlCrVIbCcRAus4aNHv7UfvuUgrcEVOwBxwfPY4c-YCaUxK0owxbtP2WtR5__yTFXpdplR6gVJWwv4Hw8c_sP8MRQi_5bdnTqZt3TeJsepx0cm7AIwJCopmpbuNjIgLVLZ_6VP3ZkZ2VK9SDO-9yBMPWWp2bnLILdwfYsOuJbFB_bWxSQYnTioms7NZjVefVY8eqawwfRq75PhB7W2iw-Ni2puVFjnpTiAZeCUCur-zjQ50QG6zSCZpVqPcI5JZ2-KeJKheiglYCYp0cauTdVgXjdlXCGQbAU0xirLxJXNsxg2GZxgV9luGwy1y3BdezwoM2m4mXviuHJP-lziA" http://localhost:8080/secured/winners; echo [13, 47, 42, 45, 19, 25] @@ -957,13 +957,13 @@ The remainder of the code is the same as before. Update your `TokenSecuredResour `winners()` method, and then invoke the following command with _YOUR_TOKEN_ replaced: .curl command for /secured/winners2 -[source, bash] +[source,shell] ---- curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:8080/secured/winners2; echo ---- .Example Output for /secured/winners2 -[source, bash] +[source,shell] ---- Scotts-iMacPro:using-jwt-rbac starksm$ curl -H "Authorization: Bearer eyJraWQiOiJcL3ByaXZhdGVLZXkucGVtIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJqZG9lLXVzaW5nLWp3dC1yYmFjIiwiYXVkIjoidXNpbmctand0LXJiYWMiLCJ1cG4iOiJqZG9lQHF1YXJrdXMuaW8iLCJiaXJ0aGRhdGUiOiIyMDAxLTA3LTEzIiwiYXV0aF90aW1lIjoxNTUxNjY3MzEzLCJpc3MiOiJodHRwczpcL1wvcXVhcmt1cy5pb1wvdXNpbmctand0LXJiYWMiLCJyb2xlTWFwcGluZ3MiOnsiZ3JvdXAyIjoiR3JvdXAyTWFwcGVkUm9sZSIsImdyb3VwMSI6Ikdyb3VwMU1hcHBlZFJvbGUifSwiZ3JvdXBzIjpbIkVjaG9lciIsIlRlc3RlciIsIlN1YnNjcmliZXIiLCJncm91cDIiXSwicHJlZmVycmVkX3VzZXJuYW1lIjoiamRvZSIsImV4cCI6MTU1MTY3MDkxMywiaWF0IjoxNTUxNjY3MzEzLCJqdGkiOiJhLTEyMyJ9.c2QJAK3a1VOYL6vOt40VSEAy9wXPBEjVbqApTTNG8V8UDkQZ6HiOR9-rKOFX3WmTtQVru3O9zDu2_T2_v8kTmCkT-ThxodqC4VxD_QVx1v6BaSJ9-MX1Q7nrkD0Mk1V6x0Cqd6jmHxtJy0Ep8IgeMw2Y5gL9a1NgWVeldXP6cdHrHcYKYGnZKmYp7VpqZBoONPIS_QmWXm-JerwVpwt0juEtZUQoGCJdp7-GZA31QyEN64gCMKfdhYNnLuWQaom3i0uF_LfXtlMHdRU0kzDnLrnGw99ynTAex7ah7zG10ZbanK-PI-nD6wcTbE9WqriwohHM9BFJoBmF81RRk5uMsw" http://localhost:8080/secured/winners2; echo [13, 38, 36, 38, 36, 22] diff --git a/docs/src/main/asciidoc/kubernetes-guide.adoc b/docs/src/main/asciidoc/kubernetes-guide.adoc index 9e5866ca49349..4a69b0f64cc65 100644 --- a/docs/src/main/asciidoc/kubernetes-guide.adoc +++ b/docs/src/main/asciidoc/kubernetes-guide.adoc @@ -37,7 +37,7 @@ First, you need to _push_ the Docker image (created in the previous guide) to th Depending on your cluster, there are several ways. For `minikube`, execute: -[source, bash] +[source,shell] ---- # For minishift use "eval $(minishift docker-env)" instead eval $(minikube docker-env) @@ -47,7 +47,7 @@ docker build -t quarkus-quickstart/quickstart . Once the image has been pushed to the Kubernetes image registry, instantiate the application as follows: -[source, bash] +[source,shell] ---- kubectl run quarkus-quickstart --image=quarkus-quickstart/quickstart:latest --port=8080 --image-pull-policy=IfNotPresent kubectl expose deployment quarkus-quickstart --type=NodePort @@ -55,7 +55,7 @@ kubectl expose deployment quarkus-quickstart --type=NodePort The application is now exposed as an internal service. If you are using `minikube`, you can access it using: -[source, bash] +[source,shell] ---- curl $(minikube service quarkus-quickstart --url)/hello/greeting/quarkus ---- diff --git a/docs/src/main/asciidoc/maven-tooling.adoc b/docs/src/main/asciidoc/maven-tooling.adoc index 59358f30b3928..89f245b73d7f0 100644 --- a/docs/src/main/asciidoc/maven-tooling.adoc +++ b/docs/src/main/asciidoc/maven-tooling.adoc @@ -279,7 +279,7 @@ Executing [/Users/starksm/Dev/JBoss/Protean/starksm64-quarkus-quickstarts/gettin The native executable will be specific to your operating system. To create an executable that will run in a container, use the following: -[source, bash] +[source,shell] ---- mvn package -Pnative -Dnative-image.docker-build=true ---- diff --git a/docs/src/main/asciidoc/performance-measure.adoc b/docs/src/main/asciidoc/performance-measure.adoc index b82ec118cab79..ff1d830dbdfc7 100644 --- a/docs/src/main/asciidoc/performance-measure.adoc +++ b/docs/src/main/asciidoc/performance-measure.adoc @@ -84,7 +84,7 @@ TODO macOS:: On macOS, you can use `ps x -o pid,rss,command -p ` which list the RSS for a given process in KB (1024 bytes). -[source,bash] +[source,shell] -- $ ps x -o pid,rss,command -p 57160 diff --git a/docs/src/main/asciidoc/topic/serverless.adoc b/docs/src/main/asciidoc/topic/serverless.adoc index 3d9f52b7b9bfc..f56b38c521b7a 100644 --- a/docs/src/main/asciidoc/topic/serverless.adoc +++ b/docs/src/main/asciidoc/topic/serverless.adoc @@ -57,7 +57,7 @@ mvn package # produces a runnable jar with dependencies in target/lib or -[source, bash] +[source,shell] ---- mvn package quarkus:native-image # produces a standalone executable ----