Memo/Packer

https://dexlab.net:443/pukiwiki/index.php?Memo/Packer
 

Packer

  • https://www.packer.io/
    • CHANGELOG.md
    • HashiCorp?製ツール(Vagrant, packer, Serfの開発元)
    • 仮想マシンイメージ作成をスクリプト化できる
      • AMIs for EC2
      • VMDK/VMX files for VMware
      • OVF exports for VirtualBox?
      • Docker

インストール

  • CentOS6.x 64bitの場合。alternativesで複数バージョンを切り替えられるようにする。
    sudo mkdir -p /opt/packer.0.8.6
    sudo wget -O /opt/packer.0.8.6/packer_0.6.9_linux_amd64.zip https://releases.hashicorp.com/packer/0.8.6/packer_0.8.6_linux_amd64.zip
    sudo unzip -d /opt/packer.0.8.6/ /opt/packer.0.8.6/packer_0.6.9_linux_amd64.zip
    
    sudo alternatives --install /usr/local/bin/packer packer /opt/packer.0.8.6/packer 86 \
     --slave /usr/local/bin/packer-builder-amazon-chroot packer-builder-amazon-chroot /opt/packer.0.8.6/packer-builder-amazon-chroot \
     --slave /usr/local/bin/packer-builder-amazon-ebs packer-builder-amazon-ebs /opt/packer.0.8.6/packer-builder-amazon-ebs \
     --slave /usr/local/bin/packer-builder-amazon-instance packer-builder-amazon-instance /opt/packer.0.8.6/packer-builder-amazon-instance \
     --slave /usr/local/bin/packer-builder-digitalocean packer-builder-digitalocean /opt/packer.0.8.6/packer-builder-digitalocean \
     --slave /usr/local/bin/packer-builder-docker packer-builder-docker /opt/packer.0.8.6/packer-builder-docker \
     --slave /usr/local/bin/packer-builder-file packer-builder-file /opt/packer.0.8.6/packer-builder-file \
     --slave /usr/local/bin/packer-builder-googlecompute packer-builder-googlecompute /opt/packer.0.8.6/packer-builder-googlecompute \
     --slave /usr/local/bin/packer-builder-null packer-builder-null /opt/packer.0.8.6/packer-builder-null \
     --slave /usr/local/bin/packer-builder-openstack packer-builder-openstack /opt/packer.0.8.6/packer-builder-openstack \
     --slave /usr/local/bin/packer-builder-parallels-iso packer-builder-parallels-iso /opt/packer.0.8.6/packer-builder-parallels-iso \
     --slave /usr/local/bin/packer-builder-parallels-pvm packer-builder-parallels-pvm /opt/packer.0.8.6/packer-builder-parallels-pvm \
     --slave /usr/local/bin/packer-builder-qemu packer-builder-qemu /opt/packer.0.8.6/packer-builder-qemu \
     --slave /usr/local/bin/packer-builder-virtualbox-iso packer-builder-virtualbox-iso /opt/packer.0.8.6/packer-builder-virtualbox-iso \
     --slave /usr/local/bin/packer-builder-virtualbox-ovf packer-builder-virtualbox-ovf /opt/packer.0.8.6/packer-builder-virtualbox-ovf \
     --slave /usr/local/bin/packer-builder-vmware-iso packer-builder-vmware-iso /opt/packer.0.8.6/packer-builder-vmware-iso \
     --slave /usr/local/bin/packer-builder-vmware-vmx packer-builder-vmware-vmx /opt/packer.0.8.6/packer-builder-vmware-vmx \
     --slave /usr/local/bin/packer-post-processor-artifice packer-post-processor-artifice /opt/packer.0.8.6/packer-post-processor-artifice \
     --slave /usr/local/bin/packer-post-processor-atlas packer-post-processor-atlas /opt/packer.0.8.6/packer-post-processor-atlas \
     --slave /usr/local/bin/packer-post-processor-compress packer-post-processor-compress /opt/packer.0.8.6/packer-post-processor-compress \
     --slave /usr/local/bin/packer-post-processor-docker-import packer-post-processor-docker-import /opt/packer.0.8.6/packer-post-processor-docker-import \
     --slave /usr/local/bin/packer-post-processor-docker-push packer-post-processor-docker-push /opt/packer.0.8.6/packer-post-processor-docker-push \
     --slave /usr/local/bin/packer-post-processor-docker-save packer-post-processor-docker-save /opt/packer.0.8.6/packer-post-processor-docker-save \
     --slave /usr/local/bin/packer-post-processor-docker-tag packer-post-processor-docker-tag /opt/packer.0.8.6/packer-post-processor-docker-tag \
     --slave /usr/local/bin/packer-post-processor-vagrant packer-post-processor-vagrant /opt/packer.0.8.6/packer-post-processor-vagrant \
     --slave /usr/local/bin/packer-post-processor-vagrant-cloud packer-post-processor-vagrant-cloud /opt/packer.0.8.6/packer-post-processor-vagrant-cloud \
     --slave /usr/local/bin/packer-post-processor-vsphere packer-post-processor-vsphere /opt/packer.0.8.6/packer-post-processor-vsphere \
     --slave /usr/local/bin/packer-provisioner-ansible-local packer-provisioner-ansible-local /opt/packer.0.8.6/packer-provisioner-ansible-local \
     --slave /usr/local/bin/packer-provisioner-chef-client packer-provisioner-chef-client /opt/packer.0.8.6/packer-provisioner-chef-client \
     --slave /usr/local/bin/packer-provisioner-chef-solo packer-provisioner-chef-solo /opt/packer.0.8.6/packer-provisioner-chef-solo \
     --slave /usr/local/bin/packer-provisioner-file packer-provisioner-file /opt/packer.0.8.6/packer-provisioner-file \
     --slave /usr/local/bin/packer-provisioner-powershell packer-provisioner-powershell /opt/packer.0.8.6/packer-provisioner-powershell \
     --slave /usr/local/bin/packer-provisioner-puppet-masterless packer-provisioner-puppet-masterless /opt/packer.0.8.6/packer-provisioner-puppet-masterless \
     --slave /usr/local/bin/packer-provisioner-puppet-server packer-provisioner-puppet-server /opt/packer.0.8.6/packer-provisioner-puppet-server \
     --slave /usr/local/bin/packer-provisioner-salt-masterless packer-provisioner-salt-masterless /opt/packer.0.8.6/packer-provisioner-salt-masterless \
     --slave /usr/local/bin/packer-provisioner-shell packer-provisioner-shell /opt/packer.0.8.6/packer-provisioner-shell \
     --slave /usr/local/bin/packer-provisioner-shell-local packer-provisioner-shell-local /opt/packer.0.8.6/packer-provisioner-shell-local \
     --slave /usr/local/bin/packer-provisioner-windows-restart packer-provisioner-windows-restart /opt/packer.0.8.6/packer-provisioner-windows-restart \
     --slave /usr/local/bin/packer-provisioner-windows-shell packer-provisioner-windows-shell /opt/packer.0.8.6/packer-provisioner-windows-shell \
  • バージョンの切り替え
    sudo alternatives --display packer
    sudo alternatives --set packer /opt/packer.0.8.6/packer
  • MacOSX
    brew install packer

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2018-09-15 (土) 07:31:38 (35d)