Giter Site home page Giter Site logo

basebox-packer's Introduction

THIS REPOSITORY HAS MOVED

This is the former GitHub repository for a collection of community-driven templates for Vagrant. All the templates have been moved to individual repositories under the box-cutter organization: https://github.com/box-cutter

basebox-packer's People

Contributors

avtar avatar dysinger avatar gonzolino avatar grahamgilbert avatar joefitzgerald avatar jquast avatar kanzure avatar markprzepiora avatar mckern avatar misheska avatar mitchellh avatar radeksimko avatar rasa avatar sc0ttruss avatar stefanscherer avatar thewellington avatar timsutton avatar warantesbr 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

basebox-packer's Issues

00-run-all-scripts.cmd in Windows templates enhancements

Per Ross Smith,

Skip all .bat/.cmd scripts that start with an underscore (floppy/00-run-all-scripts.cmd)
Added debug variables PACKER_DEBUG and PACKER_PAUSE (floppy/00-run-all-scripts.cmd)
Moved A:\ to end of the PATH, to give precendence to installed applications (floppy/00-run-all-scripts.cmd)
Search for tee.exe in the PATH first, before looking in A:\ (floppy/00-run-all-scripts.cmd)

Wrong filename (swp)

There is a file named

.install-openssh-sshd.bat.swp

in "basebox-packer/template/windows2012r2/floppy".
Should be

install-openssh-sshd.bat

instead.

Vagrant config for jenkins

In the spirit of eating ones own dog food, do you happen to have Jenkins running in vagrant? If so, would you be opposed to publishing the vagrant configs for it?

Windows 7 template WinRM not working

Currently after Sysprep, in the Windows 7 templates, despite having a OOBE Network setting of "Work", WinRM isn't properly enabled because the Network type is set to "Public" and it needs to be either "Work" or "Home".

WinRM refuses to configure if the network adapter type is "Public", and thus doesn't work.

So you'll notice that all the Windows 7 templates don't work because vagrant can't connect to them. This can be fixed by hand by setting the Network type to "Work", then re-running the winrm config script.

Looking in to a way to fix this in an automated fashion.

I never noticed this issue in the Windows 7 templates because I wasn't trying to use WinRM until recently with the switch to using vagrant-windows. These Windows 7 templates never worked properly with WinRM.

Use of Powershell in preinstall scripts stymies Windows update slipstreamg

Use wget or bitsadmin, if found in the PATH, or on A:, otherwise use powershell
Skip downloading any file if it's found on a:, d:\ or in the PATH
This addresses the following issues after slipstreaming Windows updates into installation media:
After installing all Windows and .Net 3.51 updates, running powershell during installation would produce:
"Version v4.0.30319 of the .NET Framework is not installed and it is required to run version 3 of Windows PowerShell."
After installing all Windows and .Net 3.51 updates, and then .NET 4.51 (NDP451-KB2858728-x86-x64-AllOS-ENU.exe),
running powershell during installation would produce:
"Internal Windows PowerShell error. Loading managed Windows PowerShell failed with error 80070002."

failed substitution of ULTRADEFRAG_DIR

Just tried building a Windows 2012r2 box; it works, but I noticed this:

    virtualbox-iso: ==> Removing "%ULTRADEFRAG_DIR%"
    virtualbox-iso: Could Not Find C:\Users\vagrant\%ULTRADEFRAG_DIR%

Start ssh daemon last in the Windows templates to avoid premature shutdown

Per Ross Smith,

The Windows templates should avoid starting the ssh daemon until after all the other "pre-install" scripts have run, to avoid premature shutdown. In order to make the Windows 7 templates work with WinRM, they will be resetting/mucking around with the network interfaces during the postinstall phase - while Packer is pretty tolerant of the SSH connection being dropped, it is best just to not bother with this at all.

Plus, if one does a Windows update during the packer run, Packer definitely isn't as good at handling Windows reboots as it is Unix/Linux reboots. Best to try to take care of the reboots before starting the ssh daemon.

Just start the sshd daemon last.

Rename to zz-start-sshd.cmd (or something like that), as the 00-run* script runs scripts in alphabetical order.

Typo in all Windows templates setting winrm to auto start

Everyone's been copying this line from the Veewee templates to configure winrm to auto-start (including me):
cmd.exe /c sc config winrm start=auto

This is incorrect and the command will error. It should be this in all the Sysprep templates:
cmd.exe /c sc config winrm start= auto

(Need to be a space after the =)

License missing?

Hello,

I'd like to fork this repository, but I'm not sure what kind of license the files in this repo fall under.

Would the owner mind adding a LICENSE or COPYING file?

Thanks

ubuntu boxes

Can you please add the package nfs-common to the ubuntu boxes you build so that NFS mounts work properly?

Debian ISO download source not working anymore

jousch@foobar basebox-packer (master) $ make vmware/debian71.box
cd template/debian/; \
    rm -rf output-vmware; \
    mkdir -p ../../vmware; \
    packer build -only=vmware debian71.json
vmware output will be in this color.

==> vmware: Downloading or copying ISO
    vmware: Downloading or copying: http://cdimage.debian.org/cdimage/archive/7.1.0/amd64/iso-dvd/debian-7.1.0-amd64-DVD-1.iso
    vmware: Error downloading: HTTP error '404'! Remote side responded:
    vmware: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    vmware: <html><head>
    vmware: <title>404 Not Found</title>
    vmware: </head><body>
    vmware: <h1>Not Found</h1>
    vmware: <p>The requested URL /cdimage/archive/7.1.0/amd64/iso-dvd/debian-7.1.0-amd64-DVD-1.iso was not found on this server.</p>
    vmware: <hr>
    vmware: <address>Apache/2.4.4 (Unix) Server at <a href="mailto:[email protected]">ftp.acc.umu.se</a> Port 80</address>
    vmware: </body></html>
    vmware:
==> vmware: ISO download failed.
Build 'vmware' errored: ISO download failed.

There are no iso files available -> Look

Possibility of Net Installs

Would it be acceptable to patch and use the net installs as opposed to the DVD installs. I've found its generally faster to get the net iso and let the fastest mirror work its magic. I didn't want to make a pull request if there was a reason you're using DVD iso's though.

vmware/centos nfs-utils missing

Prevents from mounting shared folders via NFS with VMWare (Fusion) provider. This may also fail on VirtualBox.

You may want to add the following to the templates/centos/script/base.sh:

yum install -y nfs-utils

Populate the environment variables that Cygwin removes

I'm working on the PR now. Here is a hint:

In openssh.bat:

powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'APPDATA=%SystemDrive%\Users\%USERNAME%\AppData\Roaming'"
powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'CommonProgramFiles=%SystemDrive%\Program Files\Common Files'"
powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'LOCALAPPDATA=%SystemDrive%\Users\%USERNAME%\AppData\Local'"
powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'ProgramData=%SystemDrive%\ProgramData'"
powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'ProgramFiles=%SystemDrive%\Program Files'"
powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'PSModulePath=%SystemDrive%\Windows\system32\WindowsPowerShell\v1.0\Modules\'"
powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'PUBLIC=%SystemDrive%\Users\Public'"
powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'SESSIONNAME=Console'"
powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'TEMP=%windir%\Temp'"
powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'TMP=%windir%\Temp'"
:: to override "cyg_server":
powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'USERNAME=%USERNAME%'"

if exist "%SystemDrive%\Program Files (x86)" (
   powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'CommonProgramFiles(x86)=%SystemDrive%\Program Files (x86)\Common Files'"
   powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'CommonProgramW6432=%SystemDrive%\Program Files\Common Files'"
   powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'ProgramFiles(x86)=%SystemDrive%\Program Files (x86)'"
   powershell -Command "Add-Content %USERPROFILE%\.ssh\environment 'ProgramW6432=%SystemDrive%\Program Files'"
)

In cygwin.sh (which will be called from cygwin.bat):

#!/bin/bash

CYGWIN="ntsecbinmode mintty nodosfilewarning"

echo '==> Make user home directories default to their windows profile directory'

ln -s "$(dirname $(cygpath -D))" /home/$USERNAME

mkpasswd -l -p "$(cygpath -H)" >/etc/passwd

echo '==> Creating /etc/group (required by sshd)'
mkgroup -l >/etc/group

echo "==> set up host's ssh config files"

ssh-host-config -y -c "ntsecbinmode mintty nodosfilewarning" -w $1

chmod a+w /etc/sshd_config

sed -i -e 's/StrictModes yes/StrictModes no/i' /etc/sshd_config
sed -i -e 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/i' /etc/sshd_config
sed -i -e 's/#PermitUserEnvironment no/PermitUserEnvironment yes/i' /etc/sshd_config
sed -i -e 's/#UseDNS yes/UseDNS no/i' /etc/sshd_config
# REMOVE WHEN DONE TESTING:
sed -i -e 's/#LogLevel INFO/LogLevel DEBUG/i' /etc/sshd_config

chmod go-w /etc/sshd_config

echo "==> set up user's ssh config files"

ssh-user-config -y -p ''

sed -i.bak -e 's/^TMP/#TMP/; s/^TEMP/#TEMP/; s/^unset TMP/#unset TMP/' /etc/profile

SSHENV=$SYSTEMDRIVE/Users/$USERNAME/.ssh/environment

echo "APPDATA=$SYSTEMDRIVE\\Users\\$USERNAME\\AppData\\Roaming" >>$SSHENV
echo "CommonProgramFiles=$SYSTEMDRIVE\\Program Files\\Common Files" >>$SSHENV
echo "LOCALAPPDATA=$SYSTEMDRIVE\\Users\\$USERNAME\\AppData\\Local" >>$SSHENV
echo "ProgramData=$SYSTEMDRIVE\\ProgramData" >>$SSHENV
echo "ProgramFiles=$SYSTEMDRIVE\\Program Files" >>$SSHENV
echo "PSModulePath=$SYSTEMDRIVE\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\" >>$SSHENV
echo "PUBLIC=$SYSTEMDRIVE\\Users\\Public" >>$SSHENV
echo "SESSIONNAME=Console" >>$SSHENV
echo "TEMP=$SYSTEMDRIVE\\Users\\$USERNAME\\AppData\\Temp" >>$SSHENV
echo "TMP=$SYSTEMDRIVE\\Users\\$USERNAME\\AppData\\Temp" >>$SSHENV
# to override "cyg_server":
echo "USERNAME=$USERNAME" >>$SSHENV

if [ -d "$SYSTEMDRIVE/Program Files (x86)" ];then
  echo "CommonProgramFiles(x86)=$SYSTEMDRIVE\\Program Files (x86)\\Common Files" >>$SSHENV
  echo "CommonProgramW6432=$SYSTEMDRIVE\\Program Files\\Common Files" >>$SSHENV
  echo "ProgramFiles(x86)=$SYSTEMDRIVE\\Program Files (x86)" >>$SSHENV
  echo "ProgramW6432=$SYSTEMDRIVE\\Program Files" >>$SSHENV
fi

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.