3.2.2. OpenShift デプロイメント用の Eclipse Vert.x アプリケーションの準備
Eclipse Vert.x アプリケーションを OpenShift にデプロイするには、以下を含める必要があります。
-
アプリケーションの
pom.xmlファイルにあるランチャープロファイル情報。
以下の手順では、OpenShift Maven プラグインを使用するプロファイルは、アプリケーションの OpenShift へのビルドおよびデプロイに使用されます。
要件
- Maven がインストールされている。
- Red Hat Ecosystem Catalog での Docker または Podman 認証による RHEL 8 イメージへのアクセスができる。
手順
以下の内容を、アプリケーションルートディレクトリーの
pom.xmlファイルに追加します。<!-- Specify the JDK builder image used to build your application. --> <properties> <jkube.generator.from>registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift:latest</jkube.generator.from> </properties> ... <profiles> <profile> <id>openshift</id> <build> <plugins> <plugin> <groupId>org.eclipse.jkube</groupId> <artifactId>openshift-maven-plugin</artifactId> <version>1.1.1</version> <executions> <execution> <goals> <goal>resource</goal> <goal>build</goal> <goal>apply</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles>Pom
.xml ファイルのプロパティーを置き換え、使用する OpenJDK イメージを指定します。jkube.generator.fromx86_64 アーキテクチャー
OpenJDK 8 を使用した RHEL 7
<jkube.generator.from>registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift:latest</jkube.generator.from>OpenJDK 11 を使用した RHEL 7
<jkube.generator.from>registry.access.redhat.com/openjdk/openjdk-11-rhel7:latest</jkube.generator.from>OpenJDK 8 を使用した RHEL 8
<jkube.generator.from>registry.access.redhat.com/ubi8/openjdk-8:latest</jkube.generator.from>
x86_64、s390x(IBM Z)、および ppc64le(IBM Power Systems)アーキテクチャー
OpenJDK 11 を使用した RHEL 8
<jkube.generator.from>registry.access.redhat.com/ubi8/openjdk-11:latest</jkube.generator.from>