Giter VIP home page Giter VIP logo

packer-ironic-images's Introduction

packer-ironic-images

Automated way to create baremetal images with packer and qemu-kvm for Openstak Ironic deployments Have a look https://github.com/jriguera/ansible-ironic-standalone to install Ironic server (standalone)

Those images use cloud-init with config-drive provider, in order to work with IPA (Ironic Python Agent) driver.

Usage (on Ubuntu)

  1. Install packer from https://www.packer.io/intro/getting-started/setup.html
# Download packer (choose the latest version)
wget https://dl.bintray.com/mitchellh/packer/packer_0.8.6_linux_amd64.zip  -O /tmp/packer.zip
sudo unzip /tmp/packer.zip -d /usr/local/bin
rm -f /tmp/packer.zip
  1. Install qemu-kvm
# Install the packages
sudo apt-get install qemu-utils virtinst virt-viewer libguestfs-tools
sudo apt-get install qemu-kvm qemu-system libvirt-bin bridge-utils virt-manager
# Your user should be part of the libvirtd group to manage vms
sudo adduser $USER libvirtd
sudo adduser $USER kvm
# change the current group ID during this session.
newgrp libvirtd
newgrp kvm
# Check if everything is working:
virsh -c qemu:///system list
  1. Run a packer template
# Building an ubuntu baremetal image
cd ubuntu
packer build  ubuntu-14.04.latest-amd64.json
# output in the new folder output-ubuntu-14.04 
  1. Optionally, copy to Ironic server and use it
# Based on https://github.com/jriguera/ansible-ironic-standalone
# the variable is baremetal_server_images_path (on the ironic role is ironic_pxe_images_path)
md5sum output-ubuntu-14.04/trusty.qcow2 > output-ubuntu-14.04/trusty.meta

# Upload the meta and qcow2 files to the HTTP repository
curl -T output-ubuntu-14.04/trusty.qcow2 http://<IRONIC-SERVER>/images/
curl -T output-ubuntu-14.04/trusty.meta http://<IRONIC-SERVER>/images/

Author

José Riguera López

packer-ironic-images's People

Contributors

jriguera avatar jsenon avatar

Watchers

James Cloos avatar De Lin Hoo 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.