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
Java Spring Boot on K8s with C4C
Search
Taiji HAGINO
PRO
February 22, 2019
Technology
280
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Java Spring Boot on K8s with C4C
本資料はOSC東京2019春にて登壇した資料になります。
Taiji HAGINO
PRO
February 22, 2019
More Decks by Taiji HAGINO
See All by Taiji HAGINO
Datadogで実現するマルチレイヤーObservability入門
taiponrock
PRO
0
150
Datadog Cloud Cost Management で実現するFinOps
taiponrock
PRO
0
340
5分で知るMicrosoft Ignite
taiponrock
PRO
0
560
Bridging the Gap:Why Developer Relations and Product Management Must Work Together
taiponrock
PRO
0
78
What Four Approaches Taught Me About Developer Productivity
taiponrock
PRO
0
51
Automatic Creation of Azure Environment Configuration Diagrams! with Datadog Cloudcraft
taiponrock
PRO
0
100
VS Code の静的分析でリアルタイムのコードフィードバックを取得
taiponrock
PRO
0
250
Backstage of Enterprise Conference
taiponrock
PRO
1
260
どの種は何の花を咲かす?DevRelのターゲットオーディエンスを知ることの意味
taiponrock
PRO
2
510
Other Decks in Technology
See All in Technology
Data Hubグループ 紹介資料
sansan33
PRO
0
3.1k
第3回しろおびセキュリティスポンサーセッション
log0417
0
160
トヨタ⽣産⽅式(TPS)⼊⾨
recruitengineers
PRO
3
650
SO-101×VLAによる3色キューブのピック&プレース
abeja
0
160
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
【CEDEC2026】『ウマ娘 プリティーダービー』 英語版のキャラクターの方言や口調をローカライズするための創造的アプローチ
cygames
PRO
1
200
個人OSSが、机の上から世界に広がるまでの話
shinyasaita
1
370
AI駆動開発は個人技からチーム戦へ:組織でAIを使いこなすための実践設計
moongift
PRO
0
480
生成 AI の基礎 〜 サンプル実装で学ぶ基本原理
enakai00
7
4.4k
サイバー捜査員研修(前半)
nomizone
1
1.9k
関東Kaggler会発表資料
takoi
1
200
侵入は突然に 〜 IoTマルウェアと悪用される家庭の機器 ~ / When Intrusion Strikes: IoT Malware and the Abuse of Home Devices
nttcom
0
1.6k
Featured
See All Featured
A Soul's Torment
seathinner
6
3.4k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
640
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
240
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
570
Optimising Largest Contentful Paint
csswizardry
37
3.9k
4 Signs Your Business is Dying
shpigford
187
22k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
630
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
280
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Designing for Timeless Needs
cassininazir
1
430
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
450
Transcript
Java Spring Boot on Kubernetes Taiji HAGINO Developer Advocate /
[email protected]
SPEAKER
Taiji HAGINO IBM Developer Advocate Specialist in Node-RED/Node.js, Swift @taiponrock
f t in
IBM DEVELOPER ADVOCATE
TECHNOLOGISTS RULE THE WORLD
# "! $ %
OUR ACTIVITIES a
B c d P S D D M D N
TOKYO CITY TEAM Tokyo Team is a part of Worldwide
Developer Advocate Teams!
Yes, we are DeveloperAdvocate https://developer.ibm.com/code/community/advocates/
Java
,, (&& Ph deS R (&& (&&( . (&&( (&&)
29J9 aV7 JB 27 02. (&&) (&&* 29J9 1B9 1B9 6 CE (&&* (&&, 29J9 b V g (&&, F F E A 4 A 7 N R V- E fS29J9i P O
SpringBoot
B
) (
( 3. ) / ( . ()( 3. . /
//
-- . - /
Web
https://developer.ibm.com/jp/patterns/deploy-spring-boot-microservices-on-kubernetes-4/
None
,2% &% •IBM Cloud Kubernetes Service (IKS): IBM Cloud-( !&%
&$&#% & •Compose for MySQL: &%&.*RDB •IBM Cloud FuncAons: &&$ & " %!%+1 &&) /'0FaaS (FuncAon as a Service) 3
•Kubernetes MinikubeICPIKS •Slack Incoming Webhook •IBM Cloud Functions
CLI
% 1. Clone 2. 3. Spring Boot
Microservices 4. IBM Cloud Functions$# ("!) 5. Microservices 6.
Clone $ git clone https://github.com/IBM/spring-boot-microservices-on- kubernetes
Kubernetes on IBM Cloud
IBM CloudKubernetes
IBM CloudKubernetes
IBM CloudKubernetes
DB
MySQL $ kubectl create -f account-database.yaml service "account-database" created deployment
"account-database" created $ kubectl apply -f secrets.yaml secret "demo-credentials" created IBM Cloud Compose for MySQL DB or
MySQL $ kubectl create -f account-database.yaml service "account-database" created deployment
"account-database" created $ kubectl apply -f secrets.yaml secret "demo-credentials" created IBM Cloud Compose for MySQL DB or
None
Java
Create the Spring Boot Microservices Maven $ brew install
maven $ mvn --version Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T03:41:47+09:00)
Maven& #" MavenJava #-( ,. +' Docker" " %*
Docker!$,.)/ Go to containers/compute-interest-api $ mvn package Go to containers/send-notification $ mvn package
Docker
DockerSpringBoot IBM Cloud Container Registry ! Docker hub
! Docker hub $ docker build -t $DOCKERHUB_USERNAME/compute-interest-api:latest containers/compute-interest-api/ $ docker build -t $DOCKERHUB_USERNAME/send-notification:latest containers/send-notification/ $ docker push $DOCKERHUB_USERNAME/compute-interest-api:latest $ docker push $DOCKERHUB_USERNAME/send-notification:latest
Kubernetes
compute-interest-api.yaml send-notification.yaml Docker
# compute-interest-api.yaml spec: containers: - image: <your image> # send-notification.yaml spec: containers: - image: <your image>
Spring Boot Microservices $ kubectl apply -f compute-interest-api.yaml service "compute-interest-api"
created deployment "compute-interest- api" created $ kubectl apply -f send-notification.yaml service "send-notification" created deployment "send-notification" created
None
Frontend service $ kubectl apply -f account-summary.yaml service "account-summary"
created deployment "account-summary" created Node.js Web
None
Transaction Generator $ kubectl apply -f transaction-generator.yaml service "transaction-generator" created
deployment "transaction- generator" created Python
None
Public IP $ ibmcloud cs workers <name-of-cluster> $ kubectl get
service account-summary
Public IP + account-summary 184.173.47.69:30080
None
None
https://code-and-response.connpass.com/event/121314/
github.com/taijihagino Taiji HAGINO Developer Advocate IBM THANKS! facebook.com/taiponrock f t
in linkedin.com/taiponrock @taiponrock
58 DOC ID / Month XX, 2018 / © 2018
IBM Corporation