Code Monkey home page Code Monkey logo

centos-7-ami's Introduction

centos-7-ami

This documents the process of building an PV-GRUB AMI using in this case Centos 7.

However, the process should be repeatable for any kind of new distro that hasn't AMIs created yet.

TL;DR

The information and repos that I found all revolve around:

  • creating a filesystem image file that is then blessed with ec2-bundle-image.

This did not work, because I could never get it to boot with the PV-GRUB AKI images. I am definitely doing something wrong, as all the scripts that I found do exactly this, but no combination of

  • specifying block-device-mappings as ami=sda,root=/dev/sda, ami=/dev/sda,root=/dev/sda, etc
  • using PV-GRUB 0 or 00 AKI images

worked

  • creating a snapshot out of an existing HVM AMI. This did not work, because there were no existing AMIs :)

What did work is:

  • Create a partitioned disk image, using MBR
  • Install the necessary stuff there

Details

You need

  • Access to AWS (keypairs, secret / access key)
  • A centos 7 machine (Virtualbox, VMWare, bare metal, doesn't matter)
  • An X.509 cert / private key

Creating a PV Raw image

  • Login to a Centos 7 VM (Virtualbox, etc)
  • Edit config_aws, config_pv_raw with the necessary parameters
  • source {functions.sh,config_aws,config_pv_raw
  • bash build-image.sh. Run the script. Very little testing was needed, so you might be better off copying the commands and checking for errors. Problematic steps are grub installation.

Creating a HVM Image

  • First, create a PV image
  • Boot an AWS machine with the PV image (don't know if necessary, but this is how I got it working)
  • Login to the machine, checkout the code
  • source {functions.sh,config_aws,config_hvm_mbr
  • bash build-hvm-image-from-pv-image. Run the script. Very little testing was needed, so you might be better off copying the commands and checking for errors. Problematic steps are grub installation.

Inspiration / help

TODO

  • create GPT image, not MBR
  • test HVM instances

centos-7-ami's People

Contributors

adragomir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.