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

AKSでマイクロサービス Bootcamp

AKSでマイクロサービス Bootcamp

マイクロサービスとAKSを速習します
入門編です

shin5ok

May 07, 2018
Tweet

More Decks by shin5ok

Other Decks in Technology

Transcript

  1. None
  2. ž    Azure  

  3. 

  4.          DB

  5. None
  6. None
  7. None
  8.   

  9. None
  10. None
  11. None
  12. https://docs.microsoft.com/ja-jp/dotnet/standard/microservices-architecture/multi-container-microservice-net-applications/microservice-application-design

  13. None
  14. None
  15. • ) ( C D • B - D B

    B D • A • D • A D - D - • / - • B • D A • B ) • A B • B
  16. 1 1

  17.   1 u…ekT[e /7Aƒ‚(#?Ixu…  o9!A%5(Cn 2 ZmwOhf Immutableri(.[email protected](

    $B.2%)`|a  3 APIYlSFe 4'<3B"~cri wGq}XpE  4 RH|J~c 1:B RHDDDr‚ /,(0jQ( [email protected]?|J 5 (#?e tNytNri]|  6 DevOps CI/CDpE B6=$1M„  .(0[email protected]'ri 7 L^ €dD‚ _s{P@'>B( 8 * ;>. vbri zgƒ‚7>4>/&<B>+(WK $B.2s\UVri
  18. None
  19. 

  20. None
  21. 

  22. None
  23. None
  24.  

  25. None
  26. None
  27. None
  28. None
  29. None
  30. None
  31. None
  32. None
  33. None
  34. None
  35. None
  36.   Docker CE   http://docs.docker.jp/engine/installation/docker-ce.html

  37. None
  38. None
  39. None
  40. None
  41. # ubuntu $,! '0 + > docker run –it ubuntu

    # exit #/ # Azure cli2.0 $,"* mycli .% ) # '0 + > docker run --name mycli -it azuresdk/azure-cli-python:2.0.20 # exit #/ # apache 2.4.29!  ) #  80- 80- (& > docker pull httpd:2.4.29 > docker inspect httpd:2.4.29 > docker run -d -p 80:80 httpd:2.4.29
  42. None
  43. # 'ubuntu'-$.   " > docker search ubuntu #

    ubuntu 14:10  '+&  > docker pull ubuntu:14.10 # !*(  ,% > docker ps #  )# > docker stop [ID] #     > docker images
  44. None
  45. None
  46. None
  47. 1 6 KEIA " -2 8-2 0 NDF R I

    E M N O" KF [email protected] OA KF @@ KTOD I& KT KEK CEO KAIM IC @> M [email protected] K @ O @> CEO IA DOOKN NDF R I >EO> FAO" MC NDF R I @ FAM KKN K A"CEO :6 3/2 @ FAM KKN K A KEK EINO M MA EMA AION"O O . / " AIOMT"ND D NO @ FAM > E @ O T KKN K A " D NO @ FAM O C T KKN K A NDF R I T KKN K A " D NO @ FAM K ND NDF R I T KKN K A " I ODAMD NO @ FAM M I K @ I A T K DA NDF R I T KKN K A "
  48. None
  49. None
  50. None
  51. None
  52. None
  53. None
  54. None
  55. None
  56. . - - - - / .

  57. None
  58. None
  59.  : Docker 10 https://developers.redhat.com/blog/2016/02/24/10-things-to-avoid-in-docker-containers/

  60. None
  61. version: '2' services: appsample: #  " appsample image: shkawan/appsample:v3.10

    #   environment: # ! - MONGODB_PORT=27017 - MONGODB_HOST=mongodb ports: - 80:80 #   bind mongodb: #  " mongodb image: mongo:3.6.0 # DockerHub  volumes: #    - /tmp/mongodb:/data/db -
  62.    

  63.     

  64. 13 13 13 13 13 13 13 13 13 13

    0 24 0 24 0 24 13
  65. None
  66. 13 13 13 13 13 13 13 13 13 13

    0 24 0 24 13
  67. None
  68. 

  69. None
  70. https://octoverse.github.com/

  71. https://Kubernetes.io/

  72. None
  73. None
  74. None
  75. AKS

  76. # ANC . -. . . . . . .

    . . . . . . . .- RK > . . .-> C M . . S . -. . . . . .  . -. . . . .
  77. NL 1M I U TR M I A> GKP S

    ONK C >> $ 1 - #C = =C C >> $ 1 1 # 1 - C >> $ 1 -# C EC \_ C >> $ > C >> $ EA 1 - > 1 - A> G C >> $ =C 1 - 1 1 > 1 - C >> $$ CC = GC
  78. >G P SMO RKU E< ( >E AE $ _M

    E< ( >E $ A E $ )- $A )- /). E< ( >G E A N E< ( < E G ">G C A E<# (( E< E< ( E G E<
  79.  

  80. kSYS S bm B EE DM= >LE A L I

    GA G ce EI G gl YR PGA G STni d B EE DM= >LE MG PGA G A GA G EI G PGA G UkSYS bm B EE DM= >LE A L I 5- 0 70-/ 8 - :8 708 -7 8 -10 PGA G # # # I=NG 7MGG GA # B 6 h YcaR 6 bm B EE DM= >LE I IE P PGA G I L # LPI 3 . E G> B EE DM= >LE A L N >
  81. None
  82. k8s(AKS)/  

  83. https://Kubernetes.io/docs/tutorials/object-management-kubectl/object-management/       +,&  ("

      ) $ kubectl ' +,& %    *#  Git !& %        Git
  84. None
  85. None
  86. None
  87. None
  88. None
  89. None
  90. None
  91. None
  92. None
  93. .. . - - - - / .

  94. None
  95. :0 / LP = 77 / 0>7 8 /.= 0.

    8. = . . /.= 0. ## 0: P I = 77 / 0>7 > : = - D - I = 77 / 0>7 B := 7: 8 > 8 /.= 0. : > # >. > : > ### > :. .7. 0 = 77 / 0>7 > = 0 =
  96. 0. . : . 8. -. > .5: > P

    0. . : /.: - 0. . : .: /. -. > .5: > > 0 = 5 ## P - 0. . : /.: - = : 0
  97. Deployment Service Replicaset Pods kube-system Pods User Namespace

  98. None
  99. None
  100. NEW NEW

  101. $  $  $ $

  102. None
  103. None
  104. SSL Gateway  2 Web  4   2

      2 Cosmos DB Log Analytics
  105. None
  106. None
  107. Web  4   2   2 Cosmos

    DB Log Analytics Immutable Immutable Immutable Immutable
  108. SSL Gateway  2 Web  4   2

      2 Cosmos DB Log Analytics
  109. None
  110.       <=7$ 9*3 %: 5

    kubectl 8 <=7/6 !  ! #$ ;4   Git 0'7/6 !  "  ! #$ )   Git  -2 &, (./-2 +1
  111. 1.44 - 3 -. 2/. 1.44 2 /20 8 >

    4 1.44 2 . . > 4 1.44 3 . 4 884> / # . 8 . > 4 1.44 3 . 4 884> / /20 8 > 4 1.44 3 . 4 884> / . . > 4 1.44 3 . 4 884> / -.84 > . > 4 1.44 3 . 4 884> / . 2 . > 4
  112. Cosmos DB

  113. Web 4   2   2 Cosmos DB

  114. Web 4   2   2 Cosmos DB

  115. None
  116. None
  117. Web 4   2   2 Cosmos DB

    New Cosmos DB
  118. None
  119. None
  120. None
  121. SSL Gateway  2 Web  4   2

      2 Cosmos DB Log Analytics
  122. None
  123. > 2 12 2: . .: 32> 12 2: /

    .: 32> 12 2: ++ ++ 2 .1. . :. 2 . >. 2 :. 2> . 2 . > 2 2 .> 2 .> > . 24 :4- 1. 2 . ,@ 42 > 2 [email protected]/2 . 3 12 2:
  124. SSL Gateway  2 Web 4   2 Cosmos

    DB Log Analytics   4
  125. [email protected] CC , CFN N C > I CFN N

    C : > I CFN N C -- -- I + C + N I C + 1 50/78 40 C + @ + N F >N F IC + [email protected] :I C + + [email protected] :I C + 3 CC3FC N+ 0>1F 3 I + N :I C I3FC N+ .C I / I [email protected] CC , : C CN > CFN N C
  126. None
  127. Web  4   2    2

    Cosmos DB Log Analytics Ingress Contoller OMS
  128. 

  129. None
  130. AKS

  131. M KP NU C U >> G - - .

    AC A CE E. >.C 8 > $ MU >> 5E> E ORSP >> 5 > - - . 5 E # C $ U
  132. P MR GEKN S OU P MR 8 A C

    -1 -1. A 8 > A C # $ # -1 -1.
  133. None
  134. None
  135. Appendix. Docker on Azure

  136.          

    
  137. None
  138. None
  139. None
  140. None
  141. $ az container create -n MyACI -g MyACI --ip-address Public

    -l westus \ > --image shkawan/basicapi:v1
  142. None