Memo/Packer

http://dexlab.net/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で複数バージョンを切り替えられるようにする。
    1. sudo mkdir -p /opt/packer.0.8.6
    2. 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
    3. sudo unzip -d /opt/packer.0.8.6/ /opt/packer.0.8.6/packer_0.6.9_linux_amd64.zip
    4.  
    5. sudo alternatives --install /usr/local/bin/packer packer /opt/packer.0.8.6/packer 86 \
    6.  --slave /usr/local/bin/packer-builder-amazon-chroot packer-builder-amazon-chroot /opt/packer.0.8.6/packer-builder-amazon-chroot \
    7.  --slave /usr/local/bin/packer-builder-amazon-ebs packer-builder-amazon-ebs /opt/packer.0.8.6/packer-builder-amazon-ebs \
    8.  --slave /usr/local/bin/packer-builder-amazon-instance packer-builder-amazon-instance /opt/packer.0.8.6/packer-builder-amazon-instance \
    9.  --slave /usr/local/bin/packer-builder-digitalocean packer-builder-digitalocean /opt/packer.0.8.6/packer-builder-digitalocean \
    10.  --slave /usr/local/bin/packer-builder-docker packer-builder-docker /opt/packer.0.8.6/packer-builder-docker \
    11.  --slave /usr/local/bin/packer-builder-file packer-builder-file /opt/packer.0.8.6/packer-builder-file \
    12.  --slave /usr/local/bin/packer-builder-googlecompute packer-builder-googlecompute /opt/packer.0.8.6/packer-builder-googlecompute \
    13.  --slave /usr/local/bin/packer-builder-null packer-builder-null /opt/packer.0.8.6/packer-builder-null \
    14.  --slave /usr/local/bin/packer-builder-openstack packer-builder-openstack /opt/packer.0.8.6/packer-builder-openstack \
    15.  --slave /usr/local/bin/packer-builder-parallels-iso packer-builder-parallels-iso /opt/packer.0.8.6/packer-builder-parallels-iso \
    16.  --slave /usr/local/bin/packer-builder-parallels-pvm packer-builder-parallels-pvm /opt/packer.0.8.6/packer-builder-parallels-pvm \
    17.  --slave /usr/local/bin/packer-builder-qemu packer-builder-qemu /opt/packer.0.8.6/packer-builder-qemu \
    18.  --slave /usr/local/bin/packer-builder-virtualbox-iso packer-builder-virtualbox-iso /opt/packer.0.8.6/packer-builder-virtualbox-iso \
    19.  --slave /usr/local/bin/packer-builder-virtualbox-ovf packer-builder-virtualbox-ovf /opt/packer.0.8.6/packer-builder-virtualbox-ovf \
    20.  --slave /usr/local/bin/packer-builder-vmware-iso packer-builder-vmware-iso /opt/packer.0.8.6/packer-builder-vmware-iso \
    21.  --slave /usr/local/bin/packer-builder-vmware-vmx packer-builder-vmware-vmx /opt/packer.0.8.6/packer-builder-vmware-vmx \
    22.  --slave /usr/local/bin/packer-post-processor-artifice packer-post-processor-artifice /opt/packer.0.8.6/packer-post-processor-artifice \
    23.  --slave /usr/local/bin/packer-post-processor-atlas packer-post-processor-atlas /opt/packer.0.8.6/packer-post-processor-atlas \
    24.  --slave /usr/local/bin/packer-post-processor-compress packer-post-processor-compress /opt/packer.0.8.6/packer-post-processor-compress \
    25.  --slave /usr/local/bin/packer-post-processor-docker-import packer-post-processor-docker-import /opt/packer.0.8.6/packer-post-processor-docker-import \
    26.  --slave /usr/local/bin/packer-post-processor-docker-push packer-post-processor-docker-push /opt/packer.0.8.6/packer-post-processor-docker-push \
    27.  --slave /usr/local/bin/packer-post-processor-docker-save packer-post-processor-docker-save /opt/packer.0.8.6/packer-post-processor-docker-save \
    28.  --slave /usr/local/bin/packer-post-processor-docker-tag packer-post-processor-docker-tag /opt/packer.0.8.6/packer-post-processor-docker-tag \
    29.  --slave /usr/local/bin/packer-post-processor-vagrant packer-post-processor-vagrant /opt/packer.0.8.6/packer-post-processor-vagrant \
    30.  --slave /usr/local/bin/packer-post-processor-vagrant-cloud packer-post-processor-vagrant-cloud /opt/packer.0.8.6/packer-post-processor-vagrant-cloud \
    31.  --slave /usr/local/bin/packer-post-processor-vsphere packer-post-processor-vsphere /opt/packer.0.8.6/packer-post-processor-vsphere \
    32.  --slave /usr/local/bin/packer-provisioner-ansible-local packer-provisioner-ansible-local /opt/packer.0.8.6/packer-provisioner-ansible-local \
    33.  --slave /usr/local/bin/packer-provisioner-chef-client packer-provisioner-chef-client /opt/packer.0.8.6/packer-provisioner-chef-client \
    34.  --slave /usr/local/bin/packer-provisioner-chef-solo packer-provisioner-chef-solo /opt/packer.0.8.6/packer-provisioner-chef-solo \
    35.  --slave /usr/local/bin/packer-provisioner-file packer-provisioner-file /opt/packer.0.8.6/packer-provisioner-file \
    36.  --slave /usr/local/bin/packer-provisioner-powershell packer-provisioner-powershell /opt/packer.0.8.6/packer-provisioner-powershell \
    37.  --slave /usr/local/bin/packer-provisioner-puppet-masterless packer-provisioner-puppet-masterless /opt/packer.0.8.6/packer-provisioner-puppet-masterless \
    38.  --slave /usr/local/bin/packer-provisioner-puppet-server packer-provisioner-puppet-server /opt/packer.0.8.6/packer-provisioner-puppet-server \
    39.  --slave /usr/local/bin/packer-provisioner-salt-masterless packer-provisioner-salt-masterless /opt/packer.0.8.6/packer-provisioner-salt-masterless \
    40.  --slave /usr/local/bin/packer-provisioner-shell packer-provisioner-shell /opt/packer.0.8.6/packer-provisioner-shell \
    41.  --slave /usr/local/bin/packer-provisioner-shell-local packer-provisioner-shell-local /opt/packer.0.8.6/packer-provisioner-shell-local \
    42.  --slave /usr/local/bin/packer-provisioner-windows-restart packer-provisioner-windows-restart /opt/packer.0.8.6/packer-provisioner-windows-restart \
    43.  --slave /usr/local/bin/packer-provisioner-windows-shell packer-provisioner-windows-shell /opt/packer.0.8.6/packer-provisioner-windows-shell \
  • バージョンの切り替え
    1. sudo alternatives --display packer
    2. sudo alternatives --set packer /opt/packer.0.8.6/packer
  • MacOSX
    1. brew install packer

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-02-28 (火) 06:24:39 (540d)