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

The meaning of using Packer

The meaning of using Packer

5d769d109697012317c09c6a27a6a4bf?s=128

linyows

July 04, 2015
Tweet

More Decks by linyows

Other Decks in Programming

Transcript

  1. ύΧοͱαʔό !MJOZPXT QFQBCPUFDIDPO

  2. ͜Μʹͪ͸ 1BDLFS৬ਓͰ͢ 5PNPIJTB0EB!MJOZPXT

  3. None
  4. ։ൃ؀ڥ͸Ͳ͏͍ͯ͠·͔͢ʁ

  5. None
  6. +

  7. ຊ൪ͱ։ൃ؀ڥ͕ҟͳΔ

  8. ຊ൪؀ڥΛςετ͍ͨ͠

  9. ࠓ͋Δ1VQQFUࢿ࢈Ͱ %PDLFSίϯςφ࡞Γ͍ͨ

  10. ΠϝʔδΛ͔̍Β࡞Γ͍ͨΜ΍ʂʂʂ̍

  11. https://packer.io/

  12. ϚγϯΠϝʔδ࡞੒ΛࣗಈԽ͢Δ΋ͷ

  13. “Packer is a tool for creating machine and container images

    for multiple platforms from a single source configuration.
  14. packer-template.json Amazon EC2 Virtualbox Docker Openstack QEMUʢKVM Xenʣ

  15. "840QFO4UBDL

  16. via Provisioning Toolchain / Lee Thompson

  17. CPPUTUSBQͱDPOpHVSBUJPOͷ ྆ํͷ໘౗Λݟͯ͘ΕΔ

  18. w "84&$BNJ w %JHJUBM0DFBO w %PDLFS w (PPHMF$PNQVUF &OHJOF w

    0QFO4UBDL w 1BSBMMFMT w 2&.6 ,7.9FO  w 7JSUVBM#PY w 7.8BSF
  19. { "builders": [ { "type": "amazon-ebs", "access_key": "...", "secret_key": "...",

    "region": "us-east-1", "source_ami": "ami-de0d9eb7", "instance_type": "t1.micro", "ssh_username": "ubuntu", "ami_name": "packer {{timestamp}}" } ], "provisioners": [ { "type": "shell", "script": "setup_things.sh" } ] } packer-template.json
  20. ࡞ͬͨΠϝʔδͷςετ w QSPWJTJPOʹTFSWFSTQFDͷςετΛೖΕ͓ͯ͘ w ࠷ޙʹͦͷςετΛྲྀ͢ w ςετ͕௨ͬͨΒςετؔ࿈ͷϑΝΠϧ͸࡟আͯ͠͠·͏

  21. ࡞ͬͨΠϝʔδʹରͯ͠Կ͔Λߦ͍͍ͨ w QMVHJOΛॻ͘ w QBDLFSQPTUQSPDFTTPSTIFMMΛ࢖͏

  22. ඍົͳͱ͜Ζ EPDLFSͷΑ͏ʹ్தͷόʔδϣϯ͕ ࢒Βͳ͍ͷͰ Ϗϧυ΍Γ௚͠ʹ͕͔͔࣌ؒΔʂʂʂʂ

  23. Πϯετʔϧதɺ ਐ௙͕ετοϓ͢Δ໰୊

  24. !

  25. ΠϯετʔϧɾϓϩϏδϣχϯά ͕͔͔࣌ؒΔ໰୊

  26. IUUQTHJUIVCDPN SPTZMJMMZQQSPDFTT͕ศར

  27. ·ͱΊ w Թ͔Έͷ͋Δ࡞ۀ͕ෆཁʹͳΔ w ϚγϯΠϝʔδ࡞੒ΛҰݩ؅ཧ͢Δ͜ͱͰָͰ͖Δ w όʔδϣϯ؅ཧͰ͖Δ w ϓϥοτϑΥʔϜ͕ҧͬͯ΋Πϯελϯε͕΄΅ಉҰͰ͋Δ͜ͱΛ ୲อͰ͖Δ

  28. ઌ೔ϦϦʔε͞ΕͨW w 8JOEPXT".* w 0QFO4UBDLW w 'JMFQSPWJTJPOFSʹEPXOMPBEΦϓγϣϯ

  29. ͓ΘΓ