项目作者: KeithYeh

项目描述 :
Use Packer to build CentOS base image for different platform. (Personal use)
高级语言: Python
项目地址: git://github.com/KeithYeh/centos-base.git
创建时间: 2017-09-28T03:39:15Z
项目社区:https://github.com/KeithYeh/centos-base

开源协议:MIT License

下载


CentOS Base

This image is based on CentOS 7.4 Minimal(1708) with following software/packages

  • ansible 2.3
  • git 2.14
  • td-agent 0.12
  • wget
  • bzip
  • vim
  • network utilities
  • monitor utilities

After installed, packer will create a new user vagrant with password vagrant.
Vagrant Box will pack with self-generated SSH key pair for user vagrant.

Built vagrant box
https://app.vagrantup.com/KeithYeh/boxes/centos-base

Default timezone: UTC

NTP servers:

  • 0.tw.pool.ntp.org
  • 1.tw.pool.ntp.org
  • 2.tw.pool.ntp.org
  • 3.tw.pool.ntp.org

Usage

Before build virtualbox-iso or vmware-iso. Add Vagrant Cloud token to environment variable VAGRANT_ACCESS_TOKEN

Build images for all builders

  1. packer build \
  2. -var-file=config/aws.json \
  3. -var-file=config/gcp.json \
  4. template.json

Build images for specific builder

  1. # VirtualBox
  2. packer build --only=virtualbox-iso template.json
  3. # VMware Desktop
  4. packer build --only=vmware-iso template.json
  5. # Amazon AMI (EBS backed)
  6. packer build --only=amazon-ebs -var-file=config/aws.json template.json
  7. # Google compute engine
  8. packer build --only=googlecompute -var-file=config/gcp.json template.json

Gotchas

  • GCE image naming rule is (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?). That is NOT compatible with AMI naming rule.

Reference

LICENSE

MIT