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

今から始めるクラウドネイティブインフラ - 哲学編

今から始めるクラウドネイティブインフラ - 哲学編

Cloud Native Infrastructure: Patterns for scalable infrastructure and applications in a dynamic environmentのまとめです

Kengo Suzuki

June 26, 2018
Tweet

More Decks by Kengo Suzuki

Other Decks in Technology

Transcript

  1. Obligatory Self Introduction - @ken5scal - 2018/01 ʙ : FOLIO

    - ͓࢓ࣄ - Security Architect/Engineer - SRE - ৘γε ˜'SPN4PGUXBSF
  2. 1. Cloud Nativeͱ͸ʢΠϯϑϥͱΞϓϦʣ 2. ࢖͍ॴ 3. ΠϯϑϥΞϓϦͷσβΠϯɾ։ൃ 4. Πϯϑϥͷςετ 5.

    Ϋϥ΢υωΠςΟϒΞϓϦͷӡ༻ 6. ΞϓϦͷηΩϡϦςΟ 7. Πϯϑϥͷ࣮૷ 8. จ۟ ໨࣍
  3. Cloud Native Infrastructure - Cloud Native AppΛ૸ΒͤΔ - IaaSͷίϯϙʔωϯτ͔Β͸ந৅Խ͞Ε͍ͯΔ -

    API͕͋Δ - ιϑτ΢ΣΞʹΑͬͯɺεέʔϧɾݎ࿚ɾϓϩϏδϣϯɾ ӡ༻͞ΕΔ - ؅ཧιϑτ: Infrastructure Application
  4. Cloud Native Application ΰʔϧ ֓ཁ ྫ "HJMJUZ  EFQMPZTGBTU 

    JUFSBUFTRVJDLMZ 0QFSBCJMJUZ  JOGPSNBQQMJGFDZDMFTUBUFGSPNBQQ w %FQMPZ 3VO 3FUSJSF 0CTFSWBCJMJUZ  BOTXFSTBQQTUBUFEJSFDUMZB⒎FDUT CVTJOFTT w 4-0ʹؔ܎͢Δ4-"΍,1*ʹؔ͢ΔσʔλɾϝτϦΫε w ྫඵؒϦΫΤετ਺ɺΤϥʔ਺ɺϨεϙϯεԠ౴࣌ؒ w ͦΕΒʹؔΘΔΞϥʔτ 3FTJMJFODZ  FNCSBDFTGBJMVSF  HSBDFGVMEFHSBEBUJPO w 4-0Ҏ্Λ࣮ݱ͢ΔΤϯδχΞϦϯά͸ແବ w ৘ใྔ΍ਖ਼֬ੑ͕௿ͯ͘΋Α͍ͷͰͱΓ͋͑ͣϨεϙϯε͢Δ
  5. *BB4 $MPVE/BUJWF "QQ *OGSBTUSVDUVSF "QQMJDBUJPO Cloud Native Application Deploy "1*

    )PPL "1*΍)PPLʹΑͬͯΠϯϑϥ͔Βͷૢ࡞Λ Մೳʹ͢Δ $MPVE/BUJWF*OGSB "1* Α͠ͳʹந৅Խ͞ΕͨϨΠϠʔ
  6. Cloud Native Appؔ࿈ͷ໾ׂɹ - runtime and isolation - resource allocation

    and scheduling - env isolation - service discovery - state mgt - monitoring and logging - metrics aggregation - debugging and tracing
  7. Cloud Native Appؔ࿈ͷ໾ׂɹ - runtime and isolation (Multi-tenancy) - resource

    allocation and scheduling - env isolation - service discovery - state mgt - monitoring and logging - metrics aggregation - debugging and tracing
  8. Cloud Native Appؔ࿈ͷ໾ׂɹ - runtime and isolation - resource allocation

    and scheduling - env isolation - service discovery - state mgt - monitoring and logging - metrics aggregation - debugging and tracing
  9. - runtime and isolation - resource allocation and scheduling -

    env isolation - service discovery - state mgt - monitoring and logging - metrics aggregation - debugging and tracing Cloud Native Appؔ࿈ͷ໾ׂɹ
  10. Cloud Native Appؔ࿈ͷ໾ׂɹ - runtime and isolation - resource allocation

    and scheduling - env isolation - service discovery - state mgt - monitoring and logging - metrics aggregation - debugging and tracing
  11. Cloud Native Appؔ࿈ͷ໾ׂɹ - runtime and isolation - resource allocation

    and scheduling - env isolation - service discovery - state management - monitoring and logging - metrics aggregation - debugging and tracing
  12. Cloud Native Appؔ࿈ͷ໾ׂɹ - runtime and isolation - resource allocation

    and scheduling - env isolation - service discovery - state mgt - monitoring and logging - metrics aggregation - debugging and tracing
  13. APIʢσʔλετϥΫνϟʣ - Πϯϑϥߏ੒Λද͢σʔλߏ଄ - YAML΍JSONͰදݱ - ྫ: AWSͷIAM Policy {

    "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "guardduty:*", "Resource": "*" }, { "Effect": "Allow", "Action": "iam:CreateServiceLi "Resource": "*", "Condition": { "StringLike": { "iam:AWSServiceName": } } } ] }
  14. εςʔτྫʢTerraformʣ resource "aws_iam_policy" "example" { name = "example_policy" path =

    "/" policy = "${data.aws_iam_policy_document.example.json}" } data "aws_iam_policy_document" "example" { statement { actions = ["s3:ListAllMyBuckets"] resources = ["arn:aws:s3:::*"] } }
  15. Reconcile Pattern - Actual StateΛExpected Stateʹಥ߹ͤ͞Δ - ྫ: terraform apply,

    kubectl apply - ࣮૷ྫ type Reconciler interface { GetActual() (*API, error) GetExpected() (*API, error) Reconcile(actualAPI, expectedAPI *API) (*API, error) Destroy(actualAPI *API) (*API, error) }
  16. ςετͷλΠϓ - Unit Test - AssertionϕʔεɻMock͸ؒҧͬͨconfidenceʹͭͳ͕ΔͷͰਪ঑͞Εͳ͍ɻ - Integration - ऴྃޙʹϦιʔε͕ഁյ͞ΕΔ͜ͱ

    - Chaos 1. ࣌ؒ࣠Ͱܭଌ 2. Chaosͷ஫ೖ 3. Chaosͷݕ஌ 4. Πϯϑϥࣗಈมߋ 5. Reconcile https://www.slideshare.net/kumagi/ss-81368169
  17. Cloud Native Infraͷ؅ཧ - ηΩϡϦςΟฤ - Policy as Code -

    Deployment Gating - Conformity Testing - Compliance Testing - Activity Testing - Auditing - Immutable Infra
  18. Cloud Nativeͷ؅ཧ - ηΩϡϦςΟฤ - Policy as Code - Deployment

    Gating - Conformity Testing - Compliance Testing - Activity Testing - Auditing - Immutable Infra
  19. Cloud Nativeͷ؅ཧ - ηΩϡϦςΟฤ - Policy as Code - Deployment

    Gating - Conformity Testing - Compliance Testing - Activity Testing - Auditing - Immutable Infra
  20. Cloud Native Infraͷ؅ཧ - ηΩϡϦςΟฤ - Policy as Code -

    Deployment Gating - Conformity Testing - Compliance Testing - Activity Testing - Auditing - Immutable Infra Template Conformity Test
  21. Cloud Nativeͷ؅ཧ - ηΩϡϦςΟฤ - Policy as Code - Deployment

    Gating - Conformity Testing - Compliance Testing - Activity Testing - Auditing - Immutable Infra
  22. Cloud Nativeͷ؅ཧ - ηΩϡϦςΟฤ - Policy as Code - Deployment

    Gating - Conformity Testing - Compliance Testing - Activity Testing - Auditing - Immutable Infra
  23. *BB4 $MPVE/BUJWF*OGSB $/"QQ $/"QQ .FUSJDT -PHHJOH 3FTJMJFODZ $POpH 4FSWJDF %JTDPWFSZ

    .POJUPS 5SBDJOH SideCarύλʔϯʹΑΔ࣮૷ w/ CNCF Incubation