Giter VIP home page Giter VIP logo

packer-vagrant's Introduction

Example templates for Vagrant and Packer

Intro

There are already some existing GitHub projects providing templates to create machines with Packer. However I created this project for learning purposes . In addition to the packer documentation I also took some inspiration from these great projects:

Structure

  • images - images for better illustration in the README.txt
  • packerfiles - hcl (variables) for packera
    • iso - os specific variables like iso name and checksum
    • scripts - scripts for provisioning machines with packer
  • scripts - script to be used for provisioning
  • unattended - preseed files for Linux and Autounattend files for Windows
    • windows - autounattended files for Windows
      • 10-ent-n-2016-LTSB - Windows 10 Enterprise Edition N2016 LTSB
      • ...
    • linux - answer files for Linux
      • Ubuntu - Ubuntu specific files
      • ...
  • vagrantfiles
    • @os version@ -

Additional information can be found in the related subfolders

Build

In order to build VMs with packer you can use the gradle script build.gradle as follows

  1. Add a gradle.properties file and define the following values. The values represent tokens which will be replaced in respective answer and packer files

    • username=@username for user account to be created@
    • password=@password for user account 'username'@
    • rootpassword=@password for root/Administrator account@
  2. Define additional parameters

    • builders=@packer builders to execute e.g. virtualbox-iso@
  3. Build machines by calling either gradle buildLinux -PconfigFile=xxx or gradle buildWindows -PconfigFile=xxx. You have to submit a config file (name form packerfiles/iso folder) which defines which distro / windows version to build

    gradle clean buildWindows -PconfigFile=windows_server_2016_standard_x64.hcl

Remark: Some characters may break the scripts e.g. using $ will break windows-base.ps1

packer-vagrant's People

Contributors

papanito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.