Git Product home page Git Product logo

debian's Introduction

Packer templates for Debian written in legacy JSON

Overview

This repository contains Packer templates for creating Debian Vagrant boxes written in legacy JSON.

Current Boxes

We no longer provide pre-built binaries for these templates.

Building the Vagrant boxes with Packer

To build all the boxes, you will need VirtualBox, VMware Fusion/VMware Workstation and Parallels installed.

Parallels requires that the Parallels Virtualization SDK for Mac be installed as an additional preqrequisite.

We make use of JSON files containing user variables to build specific versions of Debian. You tell packer to use a specific user variable file via the -var-file= command line option. This will override the default options on the core debian.json packer template, which builds Debian 8 by default.

For example, to build Debian 7, use the following:

$ packer build -var-file=debian7.json debian.json

If you want to make boxes for a specific desktop virtualization platform, use the -only parameter. For example, to build Debian 7 for VirtualBox:

$ packer build -only=virtualbox-iso -var-file=debian7.json debian.json

The boxcutter templates currently support the following desktop virtualization strings:

Building the Vagrant boxes with the box script

We've also provided a wrapper script bin/box for ease of use, so alternatively, you can use the following to build Debian 8 for all providers:

$ bin/box build debian8

Or if you just want to build Debian 8 for VirtualBox:

$ bin/box build debian8 virtualbox

Building the Vagrant boxes with the Makefile

A GNU Make Makefile drives a complete basebox creation pipeline with the following stages:

  • build - Create basebox *.box files
  • assure - Verify that the basebox *.box files produced function correctly
  • deliver - Upload *.box files to Artifactory, Atlas or an S3 bucket

The pipeline is driven via the following targets, making it easy for you to include them in your favourite CI tool:

make build   # Build all available box types
make assure  # Run tests against all the boxes
make deliver # Upload box artifacts to a repository
make clean   # Clean up build detritus

Acquiring ISO Images

The ISO image are expected to be in the iso subdirectory or the user configured path. The easiest way to acquire the files is the Makefile which depends on jigdo-lite.

For a single iso: make iso/debian-7.8.0-amd64-DVD-1.iso

For all isos: make isos

Proxy Settings

The templates respect the following network proxy environment variables and forward them on to the virtual machine environment during the box creation process, should you be using a proxy:

  • http_proxy
  • https_proxy
  • ftp_proxy
  • rsync_proxy
  • no_proxy

Tests

The tests are written in Serverspec and require the vagrant-serverspec plugin to be installed with:

vagrant plugin install vagrant-serverspec

The Makefile has individual targets for each box type with the prefix test-* should you wish to run tests individually for each box.

Similarly there are targets with the prefix ssh-* for registering a newly-built box with vagrant and for logging in using just one command to do exploratory testing. For example, to do exploratory testing on the VirtualBox training environmnet, run the following command:

make ssh-box/virtualbox/debian76-nocm.box

Upon logout make ssh-* will automatically de-register the box as well.

Contributing

  1. Fork and clone the repo.
  2. Create a new branch, please don't work in your master branch directly.
  3. Add new Serverspec or Bats tests in the test/ subtree for the change you want to make. Run make test on a relevant template to see the tests fail (like make test-virtualbox/ubuntu1404).
  4. Fix stuff. Use make ssh to interactively test your box (like make ssh-virtualbox/ubuntu1404).
  5. Run make test on a relevant template (like make test-virtualbox/ubuntu1404) to see if the tests pass. Repeat steps 3-5 until done.
  6. Update README.md and AUTHORS to reflect any changes.
  7. If you have a large change in mind, it is still preferred that you split them into small commits. Good commit messages are important. The git documentatproject has some nice guidelines on writing descriptive commit messages.
  8. Push to your fork and submit a pull request.
  9. Once submitted, a full make test run will be performed against your change in the build farm. You will be notified if the test suite fails.

Would you like to help out more?

Contact [email protected]

Acknowledgments

Parallels provided a Business Edition license of their software to run on the basebox build farm.

SmartyStreets provided basebox hosting for the box-cutter project since 2015 - thank you for your support!

debian's People

Contributors

abhigyankrsingh avatar annawake avatar dol avatar dploeger avatar florianmaier101178 avatar fvhovell avatar grafjo avatar gtrafimenkov avatar jepjepus avatar johngian avatar krissi avatar lbdr avatar mafrosis avatar maxhq avatar mgruner avatar misheska avatar patricklang avatar rasa avatar rickard-von-essen avatar rmoriz avatar rubo77 avatar sammcj avatar stephenreay avatar tas50 avatar taylorific avatar theangrybyrd avatar vvavrychuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

debian's Issues

Debian 7.7

Hey, first thanks for maintaining these repos, they proved useful quite a few times to me already!

I noticed Debian's 7.7 version has gone missing from your Atlas account (and from this repo after a quick check), any chance you could bring it back? I've got some Debian 7.7 servers running atm and not planning to upgrade'em to 7.9 just yet... Of course I could just host a Debian 7.7 box by myself for my special needs but I thought it'd just feel great to have everything centralised in boxcutter repos?

Lemme know what you think :)
Thanks

Question: Why the `iso_url` variable is set in two different files (Makefile and debianXX.json)?

Hi,
I don't understand why the iso_url is set at two different places:
In the Makefile, and pass to the -var option:

DEBIAN78_AMD64 ?= http://cdimage.debian.org/cdimage/release/7.8.0/amd64/iso-dvd/debian-7.8.0-amd64-DVD-1.iso
DEBIAN78_I386 ?= http://cdimage.debian.org/cdimage/release/7.8.0/i386/iso-dvd/debian-7.8.0-i386-DVD-1.iso
DEBIAN77_AMD64 ?= http://cdimage.debian.org/cdimage/archive/7.7.0/amd64/iso-dvd/debian-7.7.0-amd64-DVD-1.iso
DEBIAN77_I386 ?= http://cdimage.debian.org/cdimage/archive/7.7.0/i386/iso-dvd/debian-7.7.0-i386-DVD-1.iso
DEBIAN76_AMD64 ?= http://cdimage.debian.org/cdimage/archive/7.6.0/amd64/iso-dvd/debian-7.6.0-amd64-DVD-1.iso
DEBIAN76_I386 ?= http://cdimage.debian.org/cdimage/archive/7.6.0/i386/iso-dvd/debian-7.6.0-i386-DVD-1.iso
DEBIAN75_AMD64 ?= http://cdimage.debian.org/cdimage/archive/7.5.0/amd64/iso-dvd/debian-7.5.0-amd64-DVD-1.iso
DEBIAN75_I386 ?= http://cdimage.debian.org/cdimage/archive/7.5.0/i386/iso-dvd/debian-7.5.0-i386-DVD-1.iso
DEBIAN6010_AMD64 ?= http://cdimage.debian.org/cdimage/archive/6.0.10/amd64/iso-cd/debian-6.0.10-amd64-CD-1.iso
DEBIAN6010_I386 ?= http://cdimage.debian.org/cdimage/archive/6.0.10/i386/iso-cd/debian-6.0.10-i386-CD-1.iso

[…]

$(VIRTUALBOX_BOX_DIR)/$(1)$(BOX_SUFFIX): $(1).json $(SOURCES)
    rm -rf $(VIRTUALBOX_OUTPUT)
    mkdir -p $(VIRTUALBOX_BOX_DIR)
    $(PACKER_CMD) build -only=$(VIRTUALBOX_BUILDER) $(PACKER_VARS) -var "iso_url=$(2)" $(1).json

And directly in the .json file (for example: https://github.com/boxcutter/debian/blob/master/debian78.json#L168).

Regards,
Guillaume

Packer on Windows host behind corporate proxy - Bad archive mirror

Hey guys, I'm tryin to build the images with Packer on a Windows 7 64bit host which is behind a corporate proxy and the process always stucks at the same step where the package manager should be configured ( error message: Bad archive mirror):

image

I have set proxy environment variables in Windows for http_proxy, https_proxy and no_proxy, e.g.:

λ echo $http_proxy
http://user:password@proxyhost:8888

(proxy uses authentification)

But it seems that my proxy environment variables are not forwarded to the virtual machine(?)

Using deborphan breaks Salt versioned install

The use of deborphan in minimize.sh means that a bunch of necessary packages for Salt are removed when doing a versioned install of Salt via the cm_version var.

I spent a while playing around with deborphan, but couldn't come up with any way to mark the relevant packages as manual or similar which would make deborphan ignore them.

This is because Salt is installed from python source using pip when doing a versioned install. Salt's dependencies are installed via apt, and thus are "orphans".

Thoughts? Yet another -var and ENV var to avoid using deborphan during the packer build? I think that might be preferable to assuming that only a salt versioned install might benefit from ditching deborphan.

Debian 711 won´t build on Windows 10 with Packer

λ packer build -only=virtualbox-iso -var-file=debian711.json debian.json
virtualbox-iso output will be in this color.

==> virtualbox-iso: Downloading or copying Guest additions
    virtualbox-iso: Downloading or copying: file:///C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
    virtualbox-iso: Downloading or copying: file:///Volumes/Storage/software/debian/debian-7.11.0-amd64-DVD-1.iso
    virtualbox-iso: Error downloading: open Volumes/Storage/software/debian/debian-7.11.0-amd64-DVD-1.iso: The system cannot find the path specified.
    virtualbox-iso: Downloading or copying: http://cdimage.debian.org/cdimage/archive/7.11.0/amd64/iso-dvd/debian-7.11.0-amd64-DVD-1.iso
==> virtualbox-iso: Starting HTTP server on port 8009
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 2736)
==> virtualbox-iso: Executing custom VBoxManage commands...
    virtualbox-iso: Executing: modifyvm debian711 --memory 512
    virtualbox-iso: Executing: modifyvm debian711 --cpus 1
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for SSH to become available...

Installation process stucks at "Select a language" dialog:

image

or sometimes at "Configure the package manager" dialog:

image

Note: this time I am not behind a proxy. Packer version 0.10.1

Debian 7.8-i386 Parallels image is 20GB

The Parallels image available for Vagrant (v2.0.4) expands to 20GB, rathe than the usual 2-3GB for a base box.

Nothing seems to be using the space in the virtual environment.

Debian8 parallels box isn't downloaded from atlas.hashicorp.com

$ vagrant up --provider parallels
Bringing machine 'default' up with 'parallels' provider...
==> default: Box 'boxcutter/debian8' could not be found. Attempting to find and install...
    default: Box Provider: parallels
    default: Box Version: >= 0
==> default: Loading metadata for box 'boxcutter/debian8'
    default: URL: https://atlas.hashicorp.com/boxcutter/debian8
==> default: Adding box 'boxcutter/debian8' (v2.0.7) for provider: parallels
    default: Downloading: https://atlas.hashicorp.com/boxcutter/boxes/debian8/versions/2.0.7/providers/parallels.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

The requested URL returned error: 403 Forbidden

Update Readme

While Debian 9 (strech) was merged #53, and "Updated Debian 8 configs to new 8.8.0 release" #52
the Readme still says: "Current images are 8.6 and 7.11".

Please update the Readme.

Debian Jessie

Howdy,

Nice templates!
Any chance of you updating the Debian ones for Jessie which is currently at RC1?

Debian 9 VMware tool

When building debian 9 for vmware this loops constantly

    vmware-iso: What is the location of the "ifconfig" program on your
    vmware-iso: machine?
    vmware-iso: The answer "" is invalid.  It must be the complete name of a binary file.

Since debian9 doesn't have ifconfig anymore a fix would be to add net-tools to the prelude-jessie.cfg. Would you like a PR for it?

debian82 gone, debian85 now?

Firstly, thanks for providing this service and sorry if this isn't the right place to raise this but I couldn't find another contact point.

debian82 box seems to have gone? I'm guessing this is because there is now a debian85 box instead?

Is the removal of debian82 a deliberate policy to force people on to the latest version? Was there any cross over period when debian82 and debian85 were available during which people should have upgraded? Is there an email list or push notification service that would have told users this?

It's just that anyone now trying to use my vagrant scripts for the first time will get 404 errors. They only work for me locally because I have debian82 cached.

I would be interested in:

  • a policy of leaving debian82 in place for existing users. However I understand you may be wary about supplying out of date software, and I don't want to demand more work.
  • could there be an announce only email list (Google Groups for a free service) so users can be aware of changes as they happen?
  • could there be a debian8 box that will always be the latest version of debian8? Then those that don't care about minor differences can just run this and not have to worry about renaming debian82 to debian85.

But, again, thanks for the service!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.