Skip to content

dotcarls/photon-packer-templates

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VMware Photon 3.0 Packer Templates

Description

This repository can be used to build Vagrant boxes for the VMware's Photon OS using HashiCorp's Packer. It is a fork of the 'official' VMware photon-packer-templates repository. The primary difference is that this repository drops Photon 2.x support and instead specifically targets Photon 3.0.

Prerequisites

Providers

The Packer template has builder definitions for the following providers:

Examples

These templates are used to build the dotcarls/photon3 Vagrant boxes available on Vagrant Cloud. There are example Vagrantfile's available in the examples directory:

» cd examples/virtualbox
» vagrant up
Bringing machine 'photon3' up with 'virtualbox' provider...
...

Usage

Use the included Makefile targets to perform various Packer tasks. There are three top-level targets:

  • validate
  • build
  • publish

These top-level targets will use all builders. There are additional targets for each specific provider. Run make help to see all available targets:

» make help
Targets:
  validate
    validate-vagrant-virtualbox-iso
    validate-vagrant-vmware-iso
    validate-vagrant-aws-ami
   
  build
    build-vagrant-virtualbox-iso
    build-vagrant-vmware-iso
    build-vagrant-aws-ami
   
  publish
    publish-vagrant-virtualbox-iso
    publish-vagrant-vmware-iso
    publish-vagrant-aws-ami

Configuration

The vars/3.0GA.json var file contains all user-defined variables for all providers.

Vagrant Cloud Publishing

To publish to your own Vagrant Cloud account, call publish[-*] targets with the following environment variables set:

VAGRANT_BOX_TAG="<your account>/<your box>"
VAGRANT_BOX_VERSION="<sets the box version>"
VAGRANT_CLOUD_TOKEN="<your client token>"

The VAGRANT_CLOUD_TOKEN must be exposed as an environment variable, however the other variables can be specified in Makefile.

Photon Base ISO

The following variables can be used to define the base ISO used for all builds:

"product_version" : "3.0GA",
"iso_sha1sum" : "1c38dd6d00e11d3cbf7768ce93fc3eb8913a9673",
"iso_file" : "http://dl.bintray.com/vmware/photon/3.0/GA/iso/photon-3.0-26156e2.iso",

VirtualBox Guest Additions

The following variables can be used to define the version of VirtualBox guest additions to be installed:

"virtualbox_guest_additions_version": "6.0.6",
"virtualbox_guest_additions_sha256": "832152b63630ceb2f89fb460eeb35b74a1218df903758157f785122392d32ceb",

AWS Builder configuration

The following variables can be used to define the AWS configuration for the amazon-ebs builder:

"aws_profile": "default",
"aws_region": "us-west-1",
"aws_source_ami_us_west_1": "ami-0576199ca1b362d73",
"aws_source_ami_us_west_2": "ami-0a94981ba259c30d6",
"aws_ssh_keypair_name": "CHANGEME",
"aws_ssh_private_key_file": "/path/to/keypair"

About

VMware Photon 3.0 Packer Templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 46.1%
  • Ruby 30.9%
  • Makefile 23.0%