Comments (4)
That's quite the large collection of requirements...
Getting started is pretty easy if you have http://brew.sh/ installed...
brew install packer
I use Packer on Mac OSX and Linux with VirtualBox on both and qemu on Linux. If you're trying to get qemu working, you'll probably want to consider setting yourself up a Linux machine on a spare x86_64 machine.
Something to remember... Vagrant box files are tar.gz archives containing: box.ovf, name_of_machine-disk1.vmdk, Vagrantfile, metadata.json and OVA files are tar archives containing the same box.ovf file renamed to name_of_machine.ovf and the same vmdk file. The qemu-img convert
can be used to convert the vmdk file to a qemu raw file but I haven't tested it yet.
I haven't touched Windows for nearly 2 decades now so I won't be able to help you there. Perhaps you should do a search for packer Windows projects on GitHub (I know there are a few).
You won't be able to boot your Raspberry Pi from USB but you can put your root filesystem there and boot from uSD or SD. If all you want to do is make sure you have the same software on there, there are other ways of doing that.
I have starred a few Raspberry Pi image builder GitHub projects with the intention of eventually building my own images from scratch to add a few packages. The idea that you are suggesting trying to make non-bootable root filesystems for Raspberry Pi using Packer is something I have also considered trying.
I'll try to answer a bit more when I have some more time.
from packer-build.
Doing the Ubuntu server build will be very easy to generate both a qemu and vagrant image using the same template--I do this already in my packer templates.
I just added a Xenial Xerus template for you to try. I haven't tested it yet but I'm pretty confident it's mostly ok. You'd likely just change one line d-i pkgsel/include string openssh-server, postgresql
to add another entry to the package list in the base-64.seed
file or else apt-get install postgresql
sometime later (in another shell provisioner perhaps).
As for adding Go, you'd probably want to grab a more recent binary rather than use the old crufty one packaged in Ubuntu. I just added a similar thing for packer in their vagrant file recently. It basically is just does (using sudo)...
# Fetch from https://golang.org/dl
TARBALL="https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz"
UNTARPATH="/opt"
GOROOT="${UNTARPATH}/go"
GOPATH="${UNTARPATH}/gopath"
# Install Go
if [ ! -d ${GOROOT} ]; then
sudo wget --progress=bar:force --output-document - ${TARBALL} |\
tar xfz - -C ${UNTARPATH}
fi
# Setup the GOPATH
sudo mkdir -p ${GOPATH}
cat <<EOF >/tmp/gopath.sh
export GOROOT="${GOROOT}"
export GOPATH="${GOPATH}"
export PATH="${GOROOT}/bin:${GOPATH}/bin:\$PATH"
EOF
sudo mv /tmp/gopath.sh /etc/profile.d/gopath.sh
from packer-build.
The more I think about it, I think the Raspberry Pi stuff is going to likely require a totally different toolchain and build environment.
I'd just build your Raspberry Pi images using something designed for building such images such as one of the following projects:
from packer-build.
Thanks for the hugely thorough answer.
Ubuntu Core is my favourite target for an OS. I am working on Snaps etc, and also the Transactional OS updates stuff in a vagrant machine.
I was thinking about this, and there are really two fundamental approaches:
1 - try to build images with all the stuff you need in them, and BURN it
2 - just boot the OS, and have a script to install the other bits.
Your seed file looks pretty cool.
About getting a Linux box in order to do QEMU. Yep makes sense. I saw some googlings about running QEMU on OSX, but have not tried yet.
I will play around and see how far i get.
from packer-build.
Related Issues (20)
- ubuntu/xenial/base-uefi.json freezes on GRUB menu HOT 3
- UEFI Booting on VirtualBox HOT 2
- gpus? HOT 1
- vagrant-libvirtd: possible hint HOT 1
- Bionic fails to build with Packer HOT 1
- Post-processor build failure on bionic HOT 3
- Crash with Bionic Beaver and Packer 1.2.4 HOT 3
- Build failed running post-processor: shell-local HOT 3
- Packer fix error (when running with packer 1.4.2) HOT 2
- Missing qemu.sh and vbox.sh HOT 1
- LUKS unattended builds do not complete automatically HOT 6
- Thanks for the inspiration! HOT 1
- Error getting SSH address 500 QEMU guest agent is not running HOT 3
- [preseed debian] Skip past "Force UEFI Install" installer prompt HOT 1
- qemuargs build options HOT 4
- [DEBUG] SSH handshake err
- Templating of external files is not yet complete in conversion from YAML to HCL HOT 14
- Debian UEFI build HOT 4
- 'packer validate' throws errors HOT 4
- Errors in building packer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packer-build.