Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
JBoss EAP for OpenShift
Search
Mamoru Shimizu
February 28, 2019
Technology
95
0
Share
JBoss EAP for OpenShift
OpenShift Meetup Tokyo #2 で発表した資料です。
Mamoru Shimizu
February 28, 2019
More Decks by Mamoru Shimizu
See All by Mamoru Shimizu
Tekton 入門
mamoru1112
4
1.6k
Other Decks in Technology
See All in Technology
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
290
Diagnosing performance problems without the guesswork
elenatanasoiu
0
120
long-running-tasks
cipepser
2
440
シンデレラなんかになりたくない!ガラスの靴が割れた時代にどう歩く?
nomizone
0
220
テストコードのないプロジェクトにテストを根付かせる
tttol
0
230
Platform Engineering as a Product: Criteria for Improvement and Multi-Tenant Design
kumorn5s
0
300
Dynamic Workersについて
yusukebe
1
440
Strands Agents超入門
kintotechdev
1
140
A Harness for Behaviour: how to get AI to generate code that does what we intend, or "TDD in the age of AI"
xpmatteo
0
510
権限管理設計を完全に理解した
rsugi
2
240
美味しいスイスチーズを作ろう🧀🐭
taigamikami
1
170
AI時代から振り返るTerraform drift運用の歴史 / AI Age Reflections on the History of Terraform Drift Operations
aeonpeople
0
590
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
310
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
55k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Marketing to machines
jonoalderson
1
5.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
210
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
820
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
The Spectacular Lies of Maps
axbom
PRO
1
770
Transcript
JBoss EAP for OpenShift Mamoru Shimizu / Consultant / Red
Hat K.K.
自己紹介 • Name : Mamoru Shimizu (Twitter: @mamomamo) • Company
: Red Hat K.K. • Role : Consultant • 最近の仕事 ◦ OpenShift 上のアプリケーション開発支援 ◦ OpenShift の構築支援 ◦ OpenShift ハンズオンの講師 など
アジェンダ • JBoss EAP for OpenShift の S2I(Source-to-Image) の紹介 •
JBoss EAP for OpenShift 利用上の注意点
JBoss EAP for OpenShift とは • Red Hat Container Catalog
から取得可能であり、 Red Hat のセキュリティチームによ り品質保証のプロセスを受けた、 OpenShift 上で動かすための JBoss EAP のコンテナ イメージ • 参考 : Red Hat Container Catalog ◦ https://access.redhat.com/containers/
S2I (Source-to-Image) とは • ベースイメージに対して、ソースコードからコンパイルしたバイナリを挿入し、新しいコ ンテナイメージを作成するフレームワーク
Deploy a JBoss EAP S2I Application to OpenShift • JBoss
EAP for OpenShift のテンプレートと、 Java アプリケーションのソースコードか ら、以下のコマンドによりアプリケーションを作成 • 上記のコマンドを実行することで、 Pod ・ Service ・ DeploymentConfig ・ BuildConfig な どが作成される oc new-app --template=eap72-basic-s2i \ -p IMAGE_STREAM_NAMESPACE=eap-demo \ -p SOURCE_REPOSITORY_URL=https://github.com/jboss-developer/jboss-eap-quickstarts \ -p SOURCE_REPOSITORY_REF=openshift \ -p CONTEXT_DIR=kitchensink
How the JBoss EAP for OpenShift S2I Process Works 1.
ソースリポジトリに pom.xml が存在すれば、 Maven ビルドプロセスが起動される 2. Maven ビルドプロセスが成功すると、 EAP_HOME/standalone/deployments に、生 成されたパッケージ (JAR/WAR/EAR) がコピーされる 3. ソースリポジトリに configuration ディレクトリが存在すれば、 EAP_HOME/standalone/configuration にファイルがコピーされる 4. ソースリポジトリに modules ディレクトリが存在すれば、 EAP_HOME/modules にファ イルがコピーされる
EAP for OpenShiftのS2Iで他に実現できること • Deployment Artifacts ◦ デフォルトでは target ディレクトリからアーティファクトをコピーするが、
BuildConfig の ARTIFACT_DIR 環境変数に設定されたディレクトリ配下からコピーするように変更できる • Artifact Repository Mirrors ◦ BuildConfig に MAVEN_MIRROR_URL 環境変数を設定することで、 Maven リポジトリのミラーサイト を指定できる • Environment Variables ◦ 上記の他にも HTTP プロキシの設定( HTTP_PROXY_HOST など)や、 Mavan コマンドの引数 ( MAVEN_ARGS_APPEND )を指定することができる
S2Iスクリプトの実体 • EAP for OpenShift のコンテナイメージの /usr/local/s2i 配下に格納されたシェルスク リプト •
run : ◦ JBoss EAP の設定と起動 • assemble : ◦ Maven コマンドにより、ソースコードをビルドし、パッケージ( WAR )を生成 ◦ 生成されたパッケージを EAP_HOME/standalone/deployments ディレクトリ配下へ移動
S2Iスクリプトのカスタマイズ • S2I スクリプトはカスタマイズ可能 • ソースリポジトリの .s2i/bin ディレクトリ配下にカスタマイズした S2I スクリプトを格納す
ることで、 S2I ビルドプロセスの実行時に既存の S2I スクリプトを上書きすることができ る
Comparison: JBoss EAP and JBoss EAP for OpenShift Feature Status
Description Management Console Not included Management CLI Not recommended コンテナが再起動すると設定が消えるから非推奨 Managed domain Not supported Default root page Disabled Remote messaging Supported ActiveMQ ArtemisはシングルPodのみsupported Transaction Recovery Partially supported 次ページを参照
Unsupported Transaction Recovery Scenarios • Pod がスケールインした際に、実行途中のトランザクションが失敗し、手動でトランザ クションのリカバリする必要がある • Unsupported
Transaction Recovery Scenarios ◦ JTS transactions ◦ XTS transactions ◦ Transations propagated over JBoss Remoting ◦ Transactions propagated over XATerminator
まとめ • JBoss EAP for OpenShift の S2I は色々できる •
JBoss EAP ≠ JBoss EAP for OpenShift • 単純な Lift&Shift はコンテナアプリケーションのアンチパターンを踏む可能性がある ため、設計時に設計原則を確認しておこう ◦ 「コンテナベース・アプリケーションの設計原則」 ▪ https://www.redhat.com/cms/managed-files/cl-cloud-native-container-design-whitepaper-f880 8kc-201710-a4-ja.pdf
参考情報 • Getting Started with JBoss EAP for OpenShift Container
Platform ◦ https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_app lication_platform/7.2/html/getting_started_with_jboss_eap_for_openshift_con tainer_platform/
THANK YOU