Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Java Spring Boot with Kubernetes on IBM Cloud

Java Spring Boot with Kubernetes on IBM Cloud

This presentation is for JJUG CCC Fall 2018.

Taiji HAGINO

December 15, 2018
Tweet

More Decks by Taiji HAGINO

Other Decks in Technology

Transcript

  1. TECHNOLOGISTS RULE THE WORLD      

     #    "! $ %   
  2. ,, (&& 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
  3. B

  4. ) (

  5. ,2% &% •IBM Cloud Kubernetes Service (IKS): IBM Cloud-( !&%

    &$&#% & •Compose for MySQL: &%&.*RDB •IBM Cloud Functions: &&$ & " %!%+1 &&) /'0FaaS (Function as a Service) 3
  6. % 1.  Clone 2.   3. Spring Boot

    Microservices 4. IBM Cloud Functions$#  ("!) 5. Microservices 6.    
  7. 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
  8. 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
  9. Create the Spring Boot Microservices Maven  $ brew install

    maven $ mvn –v Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T03:41:47+09:00)
  10. Maven& #" MavenJava #-( ,. +' Docker" "  %*

    Docker!$,.)/ Go to containers/compute-interest-api $ mvn package Go to containers/send-notification $ mvn package
  11. 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
  12. 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>
  13. 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
  14. Frontend service  $ kubectl apply -f account-summary.yaml service "account-summary"

    created deployment "account-summary" created   Node.js Web
  15. Transaction Generator $ kubectl apply -f transaction-generator.yaml service "transaction-generator" created

    deployment "transaction- generator" created   Python  
  16. f l Ur h IBM Partners D KM E H

    E E HK IB M , /c woikrpr Uo M I : AE zUnU , M I .MMEM I . 5 R . 5 d , tUs *0 ,3/ . 3/ 411 c6 B IB BM ,B 4 , 5/ /G D EI G C H 2I B K EMB S) 1 A 4 C D KM E H E EGAPE D I C 1 A 4 , 01 A a ( s S a )(– T b e c5/ 0G AmUupk o rf W