Skip to content

Commit

Permalink
Fix typos and improve the documentation
Browse files Browse the repository at this point in the history
In addition to the fixes, this commit :

- contains many additions of commas to simplify the reading of the documentation,
- adds a little bit of formatting for 'technical terms' (libsunec.so, cacerts...)
- contains simplification of many sentence structures (many different ways -> many ways, whether or not -> wether, some of the -> some...)
- is harmonizing some words (multi-module, username, dev mode, IntelliJ IDEA...),
- is removing the combined use of 'e.g.' with 'etc.'.

(cherry picked from commit 81cef8d)
  • Loading branch information
marcwrobel authored and gsmet committed Jun 21, 2022
1 parent 1a1cfa9 commit 77e60f7
Show file tree
Hide file tree
Showing 146 changed files with 651 additions and 651 deletions.
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ complete list of externalized variables for use is given in the following table:
|\{quarkus-home-url}|{quarkus-home-url}| The location of the project home page.
|\{quarkus-site-getting-started}|{quarkus-site-getting-started}| The location of the getting started page.

|\{quarkus-org-url}|{quarkus-org-url}| The location of the project github organization.
|\{quarkus-org-url}|{quarkus-org-url}| The location of the project GitHub organization.
|\{quarkus-base-url}|{quarkus-base-url}| Quarkus GitHub URL common base prefix.
|\{quarkus-clone-url}|{quarkus-clone-url}| Quarkus URL for git clone referenced by the documentation.
|\{quarkus-archive-url}|{quarkus-archive-url}| Quarkus URL to main source archive.
Expand Down
14 changes: 7 additions & 7 deletions docs/src/main/asciidoc/amazon-lambda-http.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ include::{includes}/prerequisites.adoc[]

== Getting Started

This guide walks you through generating an example Java project via a Maven archetype. Later on it walks through the structure
This guide walks you through generating an example Java project via a Maven archetype. Later on, it walks through the structure
of the project so you can adapt any existing projects you have to use Amazon Lambda.

== Installing AWS bits
Expand Down Expand Up @@ -88,7 +88,7 @@ include::{includes}/devtools/build-native-container.adoc[]
== Extra Build Generated Files

After you run the build, there are a few extra files generated by the Quarkus lambda extension you are using. These files
are in the the build directory: `target/` for Maven, `build/` for Gradle.
are in the build directory: `target/` for Maven, `build/` for Gradle.

* `function.zip` - lambda deployment file
* `sam.jvm.yaml` - sam cli deployment script
Expand Down Expand Up @@ -207,7 +207,7 @@ Value https://234asdf234as.execute-api.us-east-1.amazonaws.com/
The `Value` attribute is the root URL for your lambda. Copy it to your browser and add `hello` at the end.

[NOTE]
Responses for binary types will be automatically encoded with base64. This is different than the behavior using
Responses for binary types will be automatically encoded with base64. This is different from the behavior using
`quarkus:dev` which will return the raw bytes. Amazon's API has additional restrictions requiring the base64 encoding.
In general, client code will automatically handle this encoding but in certain custom situations, you should be aware
you may need to manually manage that encoding.
Expand All @@ -234,7 +234,7 @@ sam deploy -t target/sam.native.yaml -g
== Examine the POM

There is nothing special about the POM other than the inclusion of the `quarkus-amazon-lambda-http` extension
(if you are deploying an AWS Gateway HTTP API) or the `quarkus-amazon-lambda-rest` extension (if you are deploy an AWS Gateway REST API).
(if you are deploying an AWS Gateway HTTP API) or the `quarkus-amazon-lambda-rest` extension (if you are deploying an AWS Gateway REST API).
These extensions automatically generate everything you might need for your lambda deployment.

Also, at least in the generated Maven archetype `pom.xml`, the `quarkus-resteasy-reactive`, `quarkus-reactive-routes`, and `quarkus-undertow`
Expand Down Expand Up @@ -341,15 +341,15 @@ public class MyResource {

If you are building native images, and want to use https://aws.amazon.com/xray[AWS X-Ray Tracing] with your lambda
you will need to include `quarkus-amazon-lambda-xray` as a dependency in your pom. The AWS X-Ray
library is not fully compatible with GraalVM so we had to do some integration work to make this work.
library is not fully compatible with GraalVM, so we had to do some integration work to make this work.

== Security Integration

When you invoke an HTTP request on the API Gateway, the Gateway turns that HTTP request into a JSON event document that is
forwarded to a Quarkus Lambda. The Quarkus Lambda parses this json and converts in into an internal representation of an HTTP
request that can be consumed by any HTTP framework Quarkus supports (JAX-RS, servlet, Reactive Routes).

API Gateway supports many different ways to securely invoke on your HTTP endpoints that are backed by Lambda and Quarkus.
API Gateway supports many ways to securely invoke on your HTTP endpoints that are backed by Lambda and Quarkus.
If you enable it, Quarkus will automatically parse relevant parts of the https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html[event json document]
and look for security based metadata and register a `java.security.Principal` internally that can be looked up in JAX-RS
by injecting a `javax.ws.rs.core.SecurityContext`, via `HttpServletRequest.getUserPrincipal()` in servlet, and `RouteContext.user()` in Reactive Routes.
Expand Down Expand Up @@ -387,7 +387,7 @@ Here's how its mapped:
== Custom Security Integration

The default support for AWS security only maps the principal name to Quarkus security
APIs and does nothing to map claims or roles or permissions. You have can full control
APIs and does nothing to map claims or roles or permissions. You have full control on
how security metadata in the lambda HTTP event is mapped to Quarkus security APIs using
implementations of the `io.quarkus.amazon.lambda.http.LambdaIdentityProvider`
interface. By implementing this interface, you can do things like define role mappings for your principal
Expand Down
34 changes: 17 additions & 17 deletions docs/src/main/asciidoc/amazon-lambda.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Your lambdas can use injection annotations from CDI or Spring and other Quarkus
Quarkus lambdas can be deployed using the Amazon Java Runtime, or you can build a native executable and use
Amazon's Custom Runtime if you want a smaller memory footprint and faster cold boot startup time.

Quarkus's integration with lambdas also supports Quarkus's Live Coding development cycle. You an
Quarkus's integration with lambdas also supports Quarkus's Live Coding development cycle. You can
bring up your Quarkus lambda project in dev or test mode and code on your project live.

== Prerequisites
Expand Down Expand Up @@ -55,7 +55,7 @@ adding the `quarkus-amazon-lambda` extension as a dependency.
Copy the build.gradle, gradle.properties and settings.gradle into the above generated Maven archetype project, to follow along with this guide.
Execute: gradle wrapper to setup the gradle wrapper (recommended).
Execute: gradle wrapper to set up the gradle wrapper (recommended).
For full Gradle details <<gradle, see below>>.
====
Expand Down Expand Up @@ -130,7 +130,7 @@ LAMBDA_ROLE_ARN="arn:aws:iam::1234567890:role/lambda-role"
== Extra Build Generated Files

After you run the build, there are a few extra files generated by the `quarkus-amazon-lambda` extension. These files
are in the the build directory: `target/` for maven, `build/` for gradle.
are in the build directory: `target/` for maven, `build/` for gradle.

* `function.zip` - lambda deployment file
* `manage.sh` - wrapper around aws lambda cli calls
Expand All @@ -147,7 +147,7 @@ to create, delete, and update your lambdas.
`manage.sh` supports four operation: `create`, `delete`, `update`, and `invoke`.

NOTE: To verify your setup, that you have the AWS CLI installed, executed aws configure for the AWS access keys,
and setup the `LAMBDA_ROLE_ARN` environment variable (as described above), please execute `manage.sh` without any parameters.
and set up the `LAMBDA_ROLE_ARN` environment variable (as described above), please execute `manage.sh` without any parameters.
A usage statement will be printed to guide you accordingly.

NOTE: If using Gradle, the path to the binaries in the `manage.sh` must be changed from `target` to `build`
Expand Down Expand Up @@ -278,7 +278,7 @@ to zip up your executable for native deployments, but this is not the case anymo
[[gradle]]
== Gradle build

Similarly for Gradle projects, you also just have to add the `quarkus-amazon-lambda` dependency. The extension automatically generates everything you might need
Similarly, for Gradle projects, you also just have to add the `quarkus-amazon-lambda` dependency. The extension automatically generates everything you might need
for your lambda deployment.

Example Gradle dependencies:
Expand Down Expand Up @@ -314,7 +314,7 @@ $ curl -d "{\"name\":\"John\"}" -X POST http://localhost:8080

For your unit tests, you can also invoke on the mock event server using any HTTP client you want. Here's an example
using rest-assured. Quarkus starts up a separate Mock Event server under port 8081.
The default port for Rest Assured is automatically set to 8081 by Quarkus so you can invoke
The default port for Rest Assured is automatically set to 8081 by Quarkus, so you can invoke
on this endpoint.


Expand Down Expand Up @@ -390,8 +390,8 @@ sam local invoke --template target/sam.native.yaml --event payload.json

== Modifying `function.zip`

There are times where you may have to add some additions to the `function.zip` lambda deployment that is generated
by the build. To do this create a `zip.jvm` or `zip.native` directory within `src/main`.
There are times when you may have to add some additions to the `function.zip` lambda deployment that is generated
by the build. To do this, create a `zip.jvm` or `zip.native` directory within `src/main`.
Create `zip.jvm/` if you are doing a pure Java lambda. `zip.native/` if you are doing a native deployment.

Any you files and directories you create under your zip directory will be included within `function.zip`
Expand All @@ -411,7 +411,7 @@ The extension generates an example script within `target/bootstrap-example.sh`.

If you are building native images, and want to use https://aws.amazon.com/xray[AWS X-Ray Tracing] with your lambda
you will need to include `quarkus-amazon-lambda-xray` as a dependency in your pom. The AWS X-Ray
library is not fully compatible with GraalVM so we had to do some integration work to make this work.
library is not fully compatible with GraalVM, so we had to do some integration work to make this work.

In addition, remember to enable the AWS X-Ray tracing parameter in `manage.sh`, in the `cmd_create()` function. This can also be set in the AWS Management Console.
[source,bash]
Expand All @@ -431,7 +431,7 @@ This is explicitly set in `manage.sh` `cmd_create()`. Whilst the native image po
[[https]]
== Using HTTPS or SSL/TLS

If your code makes HTTPS calls, such as to a micro-service (or AWS service), you will need to add configuration to the native image,
If your code makes HTTPS calls (e.g. to a microservice, to an AWS service), you will need to add configuration to the native image,
as GraalVM will only include the dependencies when explicitly declared. Quarkus, by default enables this functionality on extensions that implicitly require it.
For further information, please consult the xref:native-and-ssl.adoc[Quarkus SSL guide]

Expand All @@ -456,7 +456,7 @@ when using synchronous mode, due to issues in the GraalVM compilation (at presen

Add `quarkus-jaxb` as a dependency in your Maven `pom.xml`, or Gradle `build.gradle` file.

You must also force your AWS service client for SQS, SNS, S3 et al, to use the URL Connection client,
You must also force your AWS service client for SQS, SNS, S3 et al., to use the URL Connection client,
which connects to AWS services over HTTPS, hence the inclusion of the SSL enabled property, as described in the <<https>> section above.

[source,java]
Expand Down Expand Up @@ -546,7 +546,7 @@ The native executable requires some additional steps to enable client SSL that S
3. `cacerts` must be added to `function.zip`

To do this, first create a directory `src/main/zip.native/` with your build. Next create a shell script file called `bootstrap`
within `src/main/zip.native/`, like below. An example is create automatically in your build folder (target or build), called `bootstrap-example.sh`
within `src/main/zip.native/`, like below. An example is created automatically in your build folder (target or build), called `bootstrap-example.sh`

[source,bash]
----
Expand All @@ -559,7 +559,7 @@ Additional set `-Djavax.net.ssl.trustStorePassword=changeit` if your `cacerts` f

Next you must copy some files from your GraalVM distribution into `src/main/zip.native/`.

NOTE: GraalVM versions can have different paths for these files, and whether you using the Java 8 or 11 version. Adjust accordingly.
NOTE: GraalVM versions can have different paths for these files whether you are using the Java 8 or 11 version. Adjust accordingly.

[source,bash]
----
Expand All @@ -582,14 +582,14 @@ docker run -it -d --entrypoint bash quay.io/quarkus/ubi-quarkus-native-image:{gr
# Note this value as we will need it for the commands below
----

First, libsunec.so, the C library used for the SSL implementation:
First, `libsunec.so`, the C library used for the SSL implementation:

[source,bash]
----
docker cp {container-id-from-above}:/opt/graalvm/lib/libsunec.so src/main/zip.native/
----

Second, cacerts, the certificate store. You may need to periodically obtain an updated copy, also.
Second, `cacerts`, the certificate store. You may need to periodically obtain an updated copy, also.
[source,bash]
----
docker cp {container-id-from-above}:/opt/graalvm/lib/security/cacerts src/main/zip.native/
Expand All @@ -608,7 +608,7 @@ jar tvf target/function.zip

== Deploy to AWS Lambda using a Container Image

AWS Lambda supports creating your lambdas by referencing https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html[container images] rather than uploading ZIP files. This can have some benefits such as bypassing the size limit of the uploaded ZIP files. You can define lambda functions for both native builds as well as regular JVM builds.
AWS Lambda supports creating your lambdas by referencing https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html[container images] rather than uploading ZIP files. This can have some benefits such as bypassing the size limit of the uploaded ZIP files. You can define lambda functions for both native builds and regular JVM builds.

=== JVM container image

Expand All @@ -626,7 +626,7 @@ CMD ["io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler::handleRequest"]

=== Native executable container image

To create a lambda container image that uses the native executable we'll need to do things a little differently. In this case, we won't need to use the `java:11` base image from AWS but instead we'll use a special image that assumes that the runtime environment for the lambda is provided. The example below creates such a container. It assumes that a Maven build has been executed (such as `mvn package -Dnative=true`) and has generated the native binary into the `target/` directory. The binary needs to be named `bootstrap` and be placed in `/var/runtime/`:
To create a lambda container image that uses the native executable we'll need to do things a little differently. In this case, we won't need to use the `java:11` base image from AWS, but instead we'll use a special image that assumes that the runtime environment for the lambda is provided. The example below creates such a container. It assumes that a Maven build has been executed (such as `mvn package -Dnative=true`) and has generated the native binary into the `target/` directory. The binary needs to be named `bootstrap` and be placed in `/var/runtime/`:

[source,Dockerfile]
----
Expand Down
8 changes: 4 additions & 4 deletions docs/src/main/asciidoc/amqp-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ On the inbound side (receiving messages from AMQP), the check verifies that the
On the outbound side (sending records to AMQP), the check verifies that the sender is attached to the broker.

Note that a message processing failures nacks the message, which is then handled by the `failure-strategy`.
It the responsibility of the `failure-strategy` to report the failure and influence the outcome of the checks.
It is the responsibility of the `failure-strategy` to report the failure and influence the outcome of the checks.
The `fail` failure strategy reports the failure, and so the check will report the fault.

== Using RabbitMQ
Expand Down Expand Up @@ -677,7 +677,7 @@ Type: _string_ | false |

| [.no-hyphens]#*cloud-events-insert-timestamp*#

[.no-hyphens]#_(cloud-events-default-timestamp)_# | Whether or not the connector should insert automatically the `time` attribute into the outgoing Cloud Event. Requires `cloud-events` to be set to `true`. This value is used if the message does not configure the `time` attribute itself
[.no-hyphens]#_(cloud-events-default-timestamp)_# | Whether the connector should insert automatically the `time` attribute into the outgoing Cloud Event. Requires `cloud-events` to be set to `true`. This value is used if the message does not configure the `time` attribute itself

Type: _boolean_ | false | `true`

Expand Down Expand Up @@ -773,11 +773,11 @@ Type: _string_ | false |

Type: _boolean_ | false | `true`

| [.no-hyphens]#*ttl*# | The time-to-live of the send AMQP messages. 0 to disable the TTL
| [.no-hyphens]#*ttl*# | The time-to-live of the sent AMQP messages. 0 to disable the TTL

Type: _long_ | false | `0`

| [.no-hyphens]#*use-anonymous-sender*# | Whether or not the connector should use an anonymous sender. Default value is `true` if the broker supports it, `false` otherwise. If not supported, it is not possible to dynamically change the destination address.
| [.no-hyphens]#*use-anonymous-sender*# | Whether the connector should use an anonymous sender. Default value is `true` if the broker supports it, `false` otherwise. If not supported, it is not possible to dynamically change the destination address.

Type: _boolean_ | false |

Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/amqp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include::./attributes.adoc[]
This guide demonstrates how your Quarkus application can utilize SmallRye Reactive Messaging to interact with AMQP 1.0.

IMPORTANT: If you want to use RabbitMQ, you should use the xref:rabbitmq.adoc[SmallRye Reactive Messaging RabbitMQ extension].
Alternatively, if want to use RabbitMQ with AMQP 1.0 you need to enable the AMQP 1.0 plugin in the RabbitMQ broker;
Alternatively, if you want to use RabbitMQ with AMQP 1.0 you need to enable the AMQP 1.0 plugin in the RabbitMQ broker;
check the https://smallrye.io/smallrye-reactive-messaging/smallrye-reactive-messaging/3.9/amqp/amqp.html#amqp-rabbitmq[connecting to RabbitMQ]
documentation.

Expand Down Expand Up @@ -234,7 +234,7 @@ public class QuoteProcessor {
@Outgoing("quotes") // <2>
@Blocking // <3>
public Quote process(String quoteRequest) throws InterruptedException {
// simulate some hard working task
// simulate some hard-working task
Thread.sleep(200);
return new Quote(quoteRequest, random.nextInt(100));
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/apicurio-registry-dev-services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ For Apicurio Registry serde, that is:

[source,properties]
----
mp.messaging.connector.smallrye-kafka.apicurio.registry.url=... your Apicuio Registry URL...
mp.messaging.connector.smallrye-kafka.apicurio.registry.url=... your Apicurio Registry URL...
----

For Confluent Schema Registry serde, that is:
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/asciidoc/azure-functions-http.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Running this command will run maven in interactive mode and it will ask you to f
* `artifactId` - The maven artifactId of this generated project. Type in `quarkus-demo`
* `version` - Version of this generated project.
* `package` - defaults to `groupId`
* `appName` - Use the default value. This is the application name in Azure. It must be a unique subdomain name under `*.azurewebsites.net`. Otherwise deploying to Azure will fail.
* `appName` - Use the default value. This is the application name in Azure. It must be a unique subdomain name under `*.azurewebsites.net`. Otherwise, deploying to Azure will fail.
* `appRegion` - Defaults to `westus`. Dependent on your azure region.
* `function` - Use the default which is `quarkus`. Name of your azure function. Can be anything you want.
* `resourceGroup` - Use the default value. Any value is fine though.
Expand All @@ -57,7 +57,7 @@ The values above are defined as properties in the generated `pom.xml` file.

== Login to Azure

If you don't login to Azure you won't be able to deploy.
If you don't log in to Azure you won't be able to deploy.

[source,bash,subs=attributes+]
----
Expand All @@ -75,7 +75,7 @@ how to execute it.
./mvnw clean install azure-functions:deploy
----

If you haven't already created your function up at azure, the will build an uber-jar, package it, create the function
If you haven't already created your function up at azure, then build an uber-jar, package it, create the function
at Azure, and deploy it.

If deployment is a success, the azure plugin will tell you the base URL to access your function.
Expand Down
Loading

0 comments on commit 77e60f7

Please sign in to comment.