Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

packer build \
    -var-file=config/aws.json \
    -var-file=config/gcp.json \
    template.json

Build images for specific builder

# VirtualBox
packer build --only=virtualbox-iso template.json

# VMware Desktop
packer build --only=vmware-iso template.json

# Amazon AMI (EBS backed)
packer build --only=amazon-ebs -var-file=config/aws.json template.json

# Google compute engine
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

About

Use Packer to build CentOS base image for different platform. (Personal use)

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages