You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= Deploy {project-name} applications compiled to native executables
8
-
7
+
= Deploying {project-name} applications compiled to native executables
9
8
include::_attributes.adoc[]
10
9
:diataxis-type: howto
11
10
:categories: cloud, native
@@ -15,17 +14,23 @@ include::_attributes.adoc[]
15
14
16
15
You can deploy your native {project-name} applications to {openshift} compiled to native executables by using the Docker build strategy.
17
16
18
-
You must create a native executable for your application that targets the Linux AMD64 operating system.
19
-
If your host operating system is different from this, create a native Linux executable by using a container runtime, for example, Docker or Podman.
17
+
You must create a native executable for your application that targets a supported operating system and match the architecture.
18
+
This means, if you are building on Windows, you create a native Linux executable by using a container runtime, for example, Docker or Podman.
20
19
21
20
Your Quarkus project includes pregenerated Dockerfiles with instructions.
22
21
If you want to use a custom Dockerfile, add the file to the `src/main/docker` directory or any location inside the module.
23
-
Additionally, set the path to your Dockerfile by using the `quarkus.openshift.native-dockerfile` property.
22
+
Additionally, if you want to have multiple Docker files and switch between them, set the path to your preferred Dockerfile by using the `quarkus.openshift.native-dockerfile` property.
23
+
24
+
[NOTE]
25
+
====
26
+
This guide describes this strategy by using a Quarkus project with Maven as the example project.
27
+
====
24
28
25
29
== Prerequisites
26
30
27
-
* You have a Linux AMD64 system or an Open Container Initiative (OCI) compatible container runtime, such as Podman or Docker.
31
+
* A supported operating system or an Open Container Initiative (OCI) compatible container runtime, such as Podman or Docker.
28
32
* You have a Quarkus Maven project that includes the `quarkus-openshift` extension.
33
+
* You have access to an {openshift} cluster and the latest compatible version of the `oc` CLI tool installed.
29
34
* You are working in the correct OpenShift project namespace.
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/deploying-to-openshift-s2i-howto.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,7 +183,7 @@ For more information, see the link:https://docs.openshift.com/container-platform
183
183
For information about this image, see link:https://catalog.redhat.com/software/containers/ubi9/openjdk-21/653fb7e21b2ec10f7dfc10d0[{runtimes-openjdk-long} 21].
184
184
====
185
185
186
-
. To build the project, create the application, and deploy the {openshift} service, enter the following command:
186
+
. Build the project, create the application, and deploy the {openshift} service:
= Deploying {project-name} applications to {openshift}
8
8
include::_attributes.adoc[]
9
9
:categories: cloud, native
@@ -107,9 +107,10 @@ However, if you want to continue to use `DeploymentConfig`, it is still possible
107
107
quarkus extension add 'quarkus-openshift'
108
108
----
109
109
110
-
== Logging in to an OpenShift cluster
110
+
== Logging in to an {openshift} cluster
111
111
112
-
You can log in to an OpenShift cluster by using the https://docs.openshift.com/container-platform/4.9/cli_reference/openshift_cli/getting-started-cli.html[OpenShift CLI]:
112
+
You can log in to an {openshift} cluster by using the OpenShift CLI (`oc`).
113
+
For more information, see link:https://docs.openshift.com/container-platform/4.18/cli_reference/openshift_cli/getting-started-cli.html[Getting started with the OpenShift CLI]:
113
114
114
115
.Example: Log in by using the OpenShift CLI
115
116
[source,bash]
@@ -120,7 +121,7 @@ oc login -u myUsername <1>
120
121
121
122
Alternatively, you can log in by using the API token:
122
123
123
-
.Example: Log in by using the OpenShift command-line interface (CLI) with API token
124
+
.Example: Log in by using the OpenShift CLI with API token
OpenShift provides multiple ways of defining environment variables:
330
+
{openshift} provides multiple ways of defining environment variables:
330
331
331
-
- key/value pairs
332
-
- import all values from a Secret or ConfigMap
333
-
- interpolate a single value identified by a given field in a Secret or ConfigMap
334
-
- interpolate a value from a field within the same resource
332
+
- Key/value pairs
333
+
- Import all values from a Secret or ConfigMap
334
+
- Interpolate a single value identified by a given field in a Secret or ConfigMap
335
+
- Interpolate a value from a field within the same resource
335
336
336
337
==== Environment variables from key/value pairs
337
338
@@ -467,7 +468,8 @@ For example, adding the property `quarkus.openshift.arguments=A,B`.
467
468
Finally, the Kubernetes job will be launched every time that it is installed in OpenShift.
468
469
For more information about how to run Kubernetes jobs, see https://kubernetes.io/docs/concepts/workloads/controllers/job/#running-an-example-job[Running an example job].
469
470
470
-
You can configure the rest of the Kubernetes Job configuration by using the properties under `quarkus.openshift.job.xxx` (for more information, see xref:deploying-to-openshift.adoc#quarkus-kubernetes_quarkus-openshift-job-parallelism[quarkus.openshift.job.parallelism).
471
+
You can configure the rest of the Kubernetes Job configuration by using the properties under `quarkus.openshift.job.xxx`.
472
+
For more information, see xref:deploying-to-openshift.adoc#quarkus-kubernetes_quarkus-openshift-job-parallelism[quarkus.openshift.job.parallelism].
471
473
472
474
===== Generating CronJob resources
473
475
@@ -513,13 +515,13 @@ The older syntax is still supported but is deprecated, and it is advised that yo
513
515
514
516
[NOTE]
515
517
====
516
-
If you redefine the same variable using the new syntax while keeping the old syntax, **ONLY** the new version is kept, and a warning will be issued to alert you of the problem.
518
+
If you redefine the same variable by using the new syntax while keeping the old syntax, only the new version is kept, and a warning will be issued to alert you of the problem.
517
519
For example, if you define both `quarkus.openshift.env-vars.my-env-var.value=foobar` and `quarkus.openshift.env.vars.my-env-var=newValue`, the extension generates an environment variable `MY_ENV_VAR=newValue` and issues a warning.
518
520
====
519
521
520
522
=== Mounting volumes
521
523
522
-
The OpenShift extension allows the user to configure both volumes and mounts for the application.
524
+
The OpenShift extension allows you to configure both volumes and mounts for the application.
523
525
You can mount any volume with a simple configuration:
0 commit comments