kwilczynski / packer-templates Goto Github PK
View Code? Open in Web Editor NEWPacker templates for creating Amazon EC2 images, Proxmox templates and Vagrant boxes
License: Apache License 2.0
Packer templates for creating Amazon EC2 images, Proxmox templates and Vagrant boxes
License: Apache License 2.0
Building from master
does not complete when building AMIs for Ubuntu 16.04.
Error when building ixgbevf:
cd src/; make BUILD_KERNEL=4.4.0-1022-aws....(bad exit status: 2)
ERROR (dkms apport): binary package for ixgbevf: 3.1.2 not found
Error! Bad return status for module build on kernel: 4.4.0-1022-aws (x86_64)
Consult /var/lib/dkms/ixgbevf/3.1.2/build/make.log for more information.
I found a fix in this SO answer.
Adding the following line to /scripts/ec2/networking.sh
(I added to line 104) resolves the issue:
sed -i 's/#if UTS_UBUNTU_RELEASE_ABI > 255/#if UTS_UBUNTU_RELEASE_ABI > 99255/' /usr/src/ixgbevf-${SRIOV_DRIVER_VERSION}/src/kcompat.h
With the above resolved, the AMI builds but when started, #1 is occurring again, this time for /etc/udev/70-persistent-rules.net
. cloud-init now calls write_file
on this file here which causes the same issue.
Applying the fix in #1 to /scripts/common/clean-up.sh
resolves the issue:
-- line 277
if [[ $AMAZON_EC2 == 'yes' ]]; then
# Get rid of this file, alas clout-init will probably
# create it again automatically so that it can wreck
# network configuration. These files, sadly cannot be
# simply a symbolic links to /dev/null, as cloud-init
# would change permission of the device node to 0644,
# which is disastrous, every time during the system
# startup.
rm -f \
/etc/network/interfaces.d/50-cloud-init.cfg \
/etc/systemd/network/50-cloud-init-eth0.link \
/etc/udev/rules.d/70-persistent-net.rules
pushd /etc/network/interfaces.d &>/dev/null
mknod .null c 1 3
ln -sf .null 50-cloud-init.cfg
popd &>/dev/null
pushd /etc/udev/rules.d &>/dev/null
mknod .null c 1 3
ln -sf .null 70-persistent-net.rules
popd &>/dev/null
fi
If these fixes are correct, I'm happy to submit a PR - just let me know.
And, thank you for all of your work here!
EDIT: Fixed in my fork via fbb0439
After running the ubuntu-16.04-amd64-docker.json and try to spin up a new instance from the AMI created, I'm greeted wit this
`Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.0-28-generic x86_64)
ubuntu-16.04-amd64-docker (amazon-ebs)
___ ___ ___
| __/ __|_ )
| _| (__ / /
|___\___/___|
Mon Jul 11 19:15:30 UTC 2016
Version: 0.1.0
System information as of Mon Jul 11 21:45:25 UTC 2016
System load: 0.0 Processes: 101
Usage of /: 9.0% of 9.71GB Users logged in: 1
Memory usage: 8% IP address for eth0: 10.0.0.0
Swap usage: 0%
Last login: Mon Jul 11 20:39:48 2016 from xx.xx.xx.xx
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
ubuntu@ip-10-0-0-0:~$ `
where can i track down what script is trying to access /dev/null
?
thanks
When running in EC2 generated AMI
docker ps -a
or any docker run -d --name=test
just hangs and doesn't give any output or indicators that something is happening
How would you be able to pre-load with docker images?
I notice that if i included my docker pull
commands at the end of common/docker.sh that when the artifacts are finished, the docker images are not on the server. But in the output logs they clearly show them being pulled from the docker repositories.
Where would we be able to place the code to have these images be persistent?
thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.