Skip to content

Commit 355c93c

Browse files
committed
Sync documentation of main branch
1 parent e0c0158 commit 355c93c

File tree

4 files changed

+57
-27
lines changed

4 files changed

+57
-27
lines changed

_versions/main/guides/deploying-to-heroku.adoc

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ This guide covers:
1717
* Install the Heroku CLI
1818
* Deploy the application to Heroku
1919
* Deploy the application as container image to Heroku
20-
* Using Docker
21-
* Using Podman
20+
** Using Docker
21+
** Using Podman
2222
* Deploy the native application as container image to Heroku
2323
2424
== Prerequisites
2525

2626
:prerequisites-time: 1 hour for all modalities
2727
:prerequisites-no-graalvm:
2828
include::{includes}/prerequisites.adoc[]
29-
* https://www.heroku.com/[A Heroku Account]. Free accounts work.
29+
* https://www.heroku.com/[A Heroku Account]. You need at least an Eco account to deploy an application.
3030
* https://devcenter.heroku.com/articles/heroku-cli[Heroku CLI installed]
3131

3232
== Introduction
@@ -46,10 +46,20 @@ Luckily, there's a dynamic configuration property for it.
4646

4747
== Common project setup
4848

49-
This guide will take as input an application developed in the xref:getting-started.adoc[Getting Started guide].
49+
This guide will take as input a simple application created with the Quarkus tooling:
5050

51-
Make sure you have the getting-started application at hand, or clone the Git repository: `git clone {quickstarts-clone-url}`,
52-
or download an {quickstarts-archive-url}[archive]. The solution is located in the `getting-started` directory.
51+
:create-app-artifact-id: getting-started-with-heroku
52+
:create-app-code:
53+
include::{includes}/devtools/create-app.adoc[]
54+
55+
This command will create a new REST application in the `getting-started-with-heroku` directory.
56+
57+
Let's make this application a Git repository:
58+
59+
1. Change to the application directory: `cd getting-started-with-heroku`.
60+
2. Initialize a new Git repository: `git init -b main`.
61+
3. Add all files to the repository: `git add .`.
62+
4. Commit the files: `git commit -a -m 'Initial copy of getting-started'`.
5363

5464
Heroku can react on changes in your repository, run CI and redeploy your application when your code changes.
5565
Therefore, we start with a valid repository already.
@@ -110,25 +120,39 @@ git add Procfile
110120
git commit -am "Add a Procfile."
111121
----
112122

113-
Your application should already be runnable via `heroku local web`.
123+
Your application should already be runnable via `heroku local web` from the repository root directory. You need to have run `mvn package` before to create the runnable jar for this to succeed.
114124

115-
Let's create an application in your account and deploy that repository to it:
125+
Now let's create an application in your account and deploy that repository to it:
116126

117127
[source,bash]
118128
----
119129
heroku create
120-
git push heroku master
121-
heroku open
122130
----
123131

124-
The application will have a generated name and the terminal should output that. `heroku open` opens your default browser to access your new application.
132+
This will create a remote repository in your Heroku account, and it should have also added a heroku remote url to your local repository which you can view using `git remote -v`:
133+
[source,bash]
134+
----
135+
starksm@Scotts-Mac-Studio getting-started % git remote -v
136+
heroku https://git.heroku.com/young-shelf-58876.git (fetch)
137+
heroku https://git.heroku.com/young-shelf-58876.git (push)
138+
----
139+
140+
Now you can push your application to Heroku and open it in your browser.
141+
[source,bash]
142+
----
143+
git push heroku main
144+
heroku open hello
145+
----
146+
147+
The application will have a generated URL and the terminal should output that. `heroku open hello` opens your default browser to access your new application using the '/hello' context. That page should output the text 'hello'.
125148

126-
To access the REST endpoint via curl, run:
149+
To access the REST endpoint via curl, get the app URL from the heroku info command:
127150

128151
[source,bash]
129152
----
130-
APP_NAME=`heroku info | grep "=== .*" |sed "s/=== //"`
131-
curl $APP_NAME.herokuapp.com/hello
153+
heroku info | grep "Web URL:"
154+
APP_NAME=<https url info>
155+
curl $APP_NAME/hello
132156
----
133157

134158
Of course, you can use the Heroku CLI to connect this repo to your GitHub account, too, but this is out of scope for this guide.
@@ -137,18 +161,23 @@ Of course, you can use the Heroku CLI to connect this repo to your GitHub accoun
137161

138162
The advantage of pushing a whole container is that we are in complete control over its content and maybe even choose to deploy a container with a native executable running on GraalVM.
139163

164+
140165
First, login to Heroku's container registry:
141166

142167
[source,bash]
143168
-----
144169
heroku container:login
145170
-----
146171

147-
We need to add an extension to our project to build container images via the Quarkus Maven plugin:
172+
We need to add an extension to our project to add the capability to build container images:
173+
174+
:add-extension-extensions: container-image-docker
175+
include::{includes}/devtools/extension-add.adoc[]
176+
177+
Then, let's commit this change:
148178

149179
[source,bash]
150180
----
151-
mvn quarkus:add-extension -Dextensions="container-image-docker"
152181
git add pom.xml
153182
git commit -am "Add container-image-docker extension."
154183
----
@@ -159,7 +188,7 @@ We get the generated name via `heroku info` and pass it on to the (local) build:
159188
[source,bash]
160189
----
161190
APP_NAME=`heroku info | grep "=== .*" |sed "s/=== //"`
162-
mvn clean package\
191+
./mvnw clean package\
163192
-Dquarkus.container-image.build=true\
164193
-Dquarkus.container-image.group=registry.heroku.com/$APP_NAME\
165194
-Dquarkus.container-image.name=web\
@@ -183,6 +212,7 @@ With Docker installed, these steps are simple:
183212
[source,bash]
184213
----
185214
docker push registry.heroku.com/$APP_NAME/web
215+
heroku stack:set container
186216
heroku container:release web --app $APP_NAME
187217
----
188218

@@ -238,12 +268,12 @@ We opt in to compiling a native image inside a local container, so that we don't
238268
[source,bash]
239269
----
240270
APP_NAME=`heroku info | grep "=== .*" |sed "s/=== //"`
241-
mvn clean package\
242-
-Dquarkus.container-image.build=true\
243-
-Dquarkus.container-image.group=registry.heroku.com/$APP_NAME\
244-
-Dquarkus.container-image.name=web\
245-
-Dquarkus.container-image.tag=latest\
246-
-Dnative\
271+
./mvnw clean package \
272+
-Dquarkus.container-image.build=true \
273+
-Dquarkus.container-image.group=registry.heroku.com/$APP_NAME \
274+
-Dquarkus.container-image.name=web \
275+
-Dquarkus.container-image.tag=latest \
276+
-Dnative \
247277
-Dquarkus.native.container-build=true
248278
----
249279

_versions/main/guides/getting-started-reactive.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ include::{includes}/prerequisites.adoc[]
3636

3737
NOTE: Verify that Maven is using the Java version you expect.
3838
If you have multiple JDKs installed, make sure Maven is using the expected one.
39-
You can verify which JDK Maven uses by running `mvn --version.`
39+
You can verify which JDK Maven uses by running `mvn --version`.
4040

4141
== Imperative vs. Reactive: a question of threads
4242

_versions/main/guides/maven-tooling.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ Uber-Jar's final name is configurable via a Maven's build settings `finalName` o
652652

653653
==== Uber-Jar file name suffix
654654

655-
By default the generated uber JAR file name will have the `-runner` suffix, unless it was overridden by configuring a custom one with `quarkus.package.runner-suffix` configuration option.
655+
By default the generated uber JAR file name will have the `-runner` suffix, unless it was overridden by configuring a custom one with `quarkus.package.jar.runner-suffix` configuration option.
656656
If the runner suffix is not desired, it can be disabled by setting `quarkus.package.jar.add-runner-suffix` configuration option to `false`, in which case the uber JAR will replace the original JAR
657657
file generated by `maven-jar-plugin` for the application module.
658658

_versions/main/guides/smallrye-fault-tolerance.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ implementation("io.quarkus:quarkus-smallrye-fault-tolerance")
576576
== Additional resources
577577

578578
SmallRye Fault Tolerance has more features than shown here.
579-
Please check the link:https://smallrye.io/docs/smallrye-fault-tolerance/6.7.1/index.html[SmallRye Fault Tolerance documentation] to learn about them.
579+
Please check the link:https://smallrye.io/docs/smallrye-fault-tolerance/6.7.2/index.html[SmallRye Fault Tolerance documentation] to learn about them.
580580

581581
In Quarkus, you can use the SmallRye Fault Tolerance optional features out of the box.
582582

@@ -608,7 +608,7 @@ quarkus.fault-tolerance.mp-compatibility=true
608608
----
609609
====
610610

611-
The link:https://smallrye.io/docs/smallrye-fault-tolerance/6.7.1/reference/programmatic-api.html[programmatic API] is present and integrated with the declarative, annotation-based API.
611+
The link:https://smallrye.io/docs/smallrye-fault-tolerance/6.7.2/reference/programmatic-api.html[programmatic API] is present and integrated with the declarative, annotation-based API.
612612
You can use the `Guard`, `TypedGuard` and `@ApplyGuard` APIs out of the box.
613613

614614
Support for Kotlin is present (assuming you use the Quarkus extension for Kotlin), so you can guard your `suspend` functions with fault tolerance annotations.

0 commit comments

Comments
 (0)