GithubHelp home page GithubHelp logo

kwilczynski / packer-templates Goto Github PK

View Code? Open in Web Editor NEW
79.0 3.0 16.0 3.36 MB

Packer templates for creating Amazon EC2 images, Proxmox templates and Vagrant boxes

License: Apache License 2.0

Shell 95.25% Ruby 1.11% HCL 3.64%
vagrant-boxes amazon-ec2-images packer operating-system vagrant ubuntu ubuntu-server operating-system-images vmware security ec2 proxmox hardened docker packer-templates

packer-templates's Issues

Permission Denied + ixgbevf build issues with Ubuntu 16.04 AMI

Building from master does not complete when building AMIs for Ubuntu 16.04.

Issue 1:

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

Issue 2:

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

Permission Denied error

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

running docker command hangs

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

pre-load docker images

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.

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.