Skip to content

danielmt/packer-templates

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debian Packer Templates

The current and only template was created for a Debian 8.1.0 VM box. These boxes are "vanilla" with a minimal setup, 256MB RAM, 1 CPU and includes Puppet.

These settings can be easily changed in vagrant.

Prerequisites

Installing Packer via Homebrew

$ brew tap homebrew/binary
$ brew install packer

Configure the vagrant box

Edit the debian-8.1.0-64-puppet.json and check the variables at the beginning of the file.

Note:

The debian iso file name contains the version number and, as soon as a new release will be out and the 780 will be removed from the debian servers, the debian-780-wheezy-virtualbox.json file will be outdated and you'll get the "ISO download failed" error after running the build command. To fix the issue go on http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/, check which is the latest net-inst version and copy its checksum from the MD5SUMS file. Then edit the .json file and update these variables at the beginning of the .json file:

  • "iso_url": update the link to the iso file
  • "iso_md5": insert the new MD5 checksum
  • "vm_name": update the version

Build vagrant box

$ make build-all

or optionnaly, select only one provider, for example vmware:

$ make build-vmware

Install your new box

$ vagrant box add debian-8.1.0-64-puppet debian-8.1.0-64-puppet-virtualbox.box

or

$ vagrant box add debian-8.1.0-64-puppet debian-8.1.0-64-puppet-vmware.box

The VM image has been imported to vagrant, it's now available on your system.

Vagrant

Getting Started

To use this image with Vagrant, create a vagrant file (vagrant init), and use the newly created box:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  # All Vagrant configuration is done here. The most common configuration
  # options are documented and commented below. For a complete reference,
  # please see the online documentation at vagrantup.com.

  # Every Vagrant virtual environment requires a box to build off of.
  config.vm.box = "debian-8.1.0-64-puppet"

  # Make ssh login secure
  # config.ssh.private_key_path = '~/.ssh/id_rsa'
  #
  # [...]
end

And initialize the vm:

$ vagrant up --provider=vmware_fusion

The --provider option is only needed if another vagrant provider is available, like virtualbox.

Ignore vagrant boxes in git

$ echo ".vagrant" >> ~/.gitignore

Contributing

  1. Fork it
  2. Create your recipe branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some features')
  4. Push to the branch (git push origin my-new-features)
  5. Create new Pull Request

Credits

This project is based on Tech Angels Packer templates

About

VM Templates for packer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 89.1%
  • Makefile 10.9%