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

Packer で自分だけの Raspberry Pi イメージを 作った話 / #techst...

Packer で自分だけの Raspberry Pi イメージを 作った話 / #techstudygroupjp 2020.5.14

Avatar for さたけ

さたけ

May 14, 2020
Tweet

More Decks by さたけ

Other Decks in Technology

Transcript

  1. JSONͷॻ͘ { "builders": [ { "type": "arm-image", "iso_url" : "file:///build/2020-02-13-raspbian-buster-lite.zip",

    "iso_checksum_type":"sha256", "iso_checksum": "12ae6e17bf95b6ba83beca61e7394e7411b45eba7e6a520f434b0748ea7370e8", "target_image_size": 4294967296 } ], "provisioners": [ { "type": "shell", "inline": [ "systemctl enable ssh”, "mkdir /home/pi/.ssh && chmod 644 /home/pi/.ssh", "curl -o /home/pi/.ssh/authorized_keys https://github.com/satackey.keys” ] } ] } ԿͷΠϝʔδΛ ࡞Δͷ͔(builder) ԿΛ࣮ߦ͢Δͷ͔ (provisioner)
  2. JSONͷॻ͘ { "builders": [ { "type": "arm-image", "iso_url" : "file:///build/2020-02-13-raspbian-buster-lite.zip",

    "iso_checksum_type":"sha256", "iso_checksum": "12ae6e17bf95b6ba83beca61e7394e7411b45eba7e6a520f434b0748ea7370e8", "target_image_size": 4294967296 } ], "provisioners": [ { "type": "shell", "inline": [ "systemctl enable ssh”, "mkdir /home/pi/.ssh && chmod 644 /home/pi/.ssh", "curl -o /home/pi/.ssh/authorized_keys https://github.com/satackey.keys” ] } ] } ϕʔεʹͳΔΠϝʔδͷ ύεΛࢦఆʢURL΋OKʣ
  3. JSONͷॻ͘ { "builders": [ { "type": "arm-image", "iso_url" : "file:///build/2020-02-13-raspbian-buster-lite.zip",

    "iso_checksum_type":"sha256", "iso_checksum": "12ae6e17bf95b6ba83beca61e7394e7411b45eba7e6a520f434b0748ea7370e8", "target_image_size": 4294967296 } ], "provisioners": [ { "type": "shell", "inline": [ "systemctl enable ssh", "mkdir /home/pi/.ssh && chmod 644 /home/pi/.ssh", "curl -o /home/pi/.ssh/authorized_keys https://github.com/satackey.keys" ] } ] } SSH Λ༗ޮԽ ࣗ෼ͷSSHެ։伴Λ GitHub͔Βμ΢ϯϩʔυ