Skip to content

Commit

Permalink
Merge pull request #1262 from dmlloyd/adoc-shell
Browse files Browse the repository at this point in the history
Use shell instead of bash for shell script code blocks
  • Loading branch information
dmlloyd committed Mar 6, 2019
2 parents 81719c4 + 93dd359 commit 1905551
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
--
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/building-native-image-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
----
Expand Down
12 changes: 6 additions & 6 deletions docs/src/main/asciidoc/building-substrate-howto.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/getting-started-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/asciidoc/getting-started-knative-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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
----
Expand All @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/gradle-tooling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
----
Expand Down
26 changes: 13 additions & 13 deletions docs/src/main/asciidoc/jwt-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ public class TokenSecuredResource {

Now we are ready to run our application. Use:

[source, bash]
[source,shell]
----
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...
Expand All @@ -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
Expand Down Expand Up @@ -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...
Expand Down Expand Up @@ -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
----
Expand All @@ -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...
Expand Down Expand Up @@ -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...
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
----
Expand All @@ -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]
Expand Down Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/asciidoc/kubernetes-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -47,15 +47,15 @@ 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
----

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
----
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/maven-tooling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
----
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/performance-measure.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ TODO
macOS::
On macOS, you can use `ps x -o pid,rss,command -p <PID>` which list the RSS for a given process in KB (1024 bytes).

[source,bash]
[source,shell]
--
$ ps x -o pid,rss,command -p 57160

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/topic/serverless.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
----
Expand Down

0 comments on commit 1905551

Please sign in to comment.