{"id":26493700,"url":"https://github.com/redhat-openstack/image-building-poc","last_synced_at":"2025-10-25T05:03:50.813Z","repository":{"id":7693131,"uuid":"9057166","full_name":"redhat-openstack/image-building-poc","owner":"redhat-openstack","description":"Image Building Service Proof of Concept","archived":false,"fork":false,"pushed_at":"2013-06-17T22:07:29.000Z","size":636,"stargazers_count":3,"open_issues_count":6,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-03-21T10:28:57.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhat-openstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-27T15:35:25.000Z","updated_at":"2023-03-21T10:28:57.642Z","dependencies_parsed_at":"2022-09-19T01:51:57.148Z","dependency_job_id":null,"html_url":"https://github.com/redhat-openstack/image-building-poc","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-openstack%2Fimage-building-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-openstack%2Fimage-building-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-openstack%2Fimage-building-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-openstack%2Fimage-building-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-openstack","download_url":"https://codeload.github.com/redhat-openstack/image-building-poc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244591485,"owners_count":20477709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-20T09:56:45.607Z","updated_at":"2025-10-25T05:03:50.761Z","avatar_url":"https://github.com/redhat-openstack.png","language":"Python","readme":"Building OS images in NOVA\n==========================\n\nThis is an early demonstration of a new image building approach for OpenStack.\n\nIt is a command line tool that builds working OpenStack images by\nrunning Anaconda or other native installers within Nova.  In its simplest form \nit requires only a kickstart or preseed file as input.  All of the heavy lifting\nis done inside of OpenStack instances.\n\nEarly discussion of this approach can be found here:\n\nhttps://wiki.openstack.org/wiki/NovaImageBuilding\n\nIt has been developed and tested on RHEL6 and the Folsom OpenStack release installed\nusing packstack.  However, it should work with newer host OSes and newer OpenStack releases.\n\nTo try it out install the requirements listed below then run commands like this:\n\n(substituting the details of your own OpenStack environment where indicated)\n\n\n#### Create a Fedora 18 JEOS image in glance using a network install\n\n    ./create_image.py --username admin --tenant admin --password password --auth-url http://10.10.10.10:5000/v2.0 \\\n                      --glance-url http://10.10.10.10:9292/ --root-password myrootpw install_scripts/fedora-18-jeos.ks\n\n#### Create an Ubuntu 12.04 image in glance using a network install\n\n    ./create_image.py --username admin --tenant admin --password password --auth-url http://10.10.10.10:5000/v2.0 \\\n                      --glance-url http://10.10.10.10:9292/ --root-password myrootpw \\\n                        install_scripts/ubuntu-12.04-jeos.preseed\n\n#### Create a Fedora 18 JEOS image as a volume snapshot using a network install\n\n    ./create_image.py --username admin --tenant admin --password password --auth-url http://10.10.10.10:5000/v2.0 \\\n                      --glance-url http://10.10.10.10:9292/ --root-password myrootpw --create-volume \\\n                        install_scripts/fedora-18-jeos.ks\n\n#### Create a Fedora 18 JEOS image as a volume snapshot using an install DVD pulled from a Fedora mirror\n\n    ./create_image.py --username admin --tenant admin --password password --auth-url http://10.10.10.10:5000/v2.0 \\\n                      --create-volume --install-media-url \\\n                        http://mirror.pnl.gov/fedora/linux/releases/18/Fedora/x86_64/iso/Fedora-18-x86_64-DVD.iso \\\n                      --install-tree-url \\\n                        http://mirror.pnl.gov/fedora/linux/releases/18/Fedora/x86_64/os/ \\\n                      --glance-url http://10.10.10.10:9292/ --root-password myrootpw install_scripts/fedora-18-jeos-DVD.ks\n\n#### Create a Fedora 18 JEOS image as a volume snapshot by re-using the DVD volume snapshot created above\n\n    ./create_image.py --username admin --tenant admin --password password --auth-url http://10.10.10.10:5000/v2.0 \\\n                      --create-volume --install-media-snapshot \u003cSNAPSHOT_ID_REPORTED_ABOVE\u003e \\\n                      --install-tree-url \\\n                        http://mirror.pnl.gov/fedora/linux/releases/18/Fedora/x86_64/os/ \\\n                      --glance-url http://10.10.10.10:9292/ --root-password myrootpw install_scripts/fedora-18-jeos-DVD.ks\n\n\n### What does this do?\n\nThe script generates a small syslinux-based bootable image that is used\nto start unattended Anaconda or Ubuntu installations.  It contains only \nthe initrd and vmlinuz from the install source and a syslinux.cfg file.\nThe installer then writes over this minimal image.\n\nThe kickstart/preseed files are passed to the installers via OpenStack \nuser-data and the appropriate kernel command line parameters in the \nsyslinux configuration file.\n\nThe script uploads this bootstrapping image to glance, launches it, and\nwaits for it to shut down.  If shutdown occurs within the timeout period\nwe assume that the installer has finished and take a snapshot of the current\ninstance state, which is the completed install.\n\nYou can monitor progress via Anaconda's VNC support, which is enabled\nin the example kickstarts under the \"install_scripts\" directory. The \nscript reports the instance IP and gives the exact invocation of \nvncviewer that is needed to connect to the install.\n\nYou can do something similar with an Ubuntu install using an SSH console.\nHowever, this feature stops the installation and waits for user input so\nit is commented out in the example preseed files.  See instructions in\nthe comments for how to enable this.\n\n\n### What operating systems can it support?\n\nThe install_scripts contains known-working kickstart and preseed files for:\n\nFedora 18, Fedora 17, RHEL 6.4, RHEL 5.9\n\nUbuntu 12.10, 12.04 and 10.04\n\nThis approach should work as far back as Fedora 10 and RHEL 4 U8 and on\nother Linux variants including SLES.\n\n\n### Volume Based Images\n\nBy default the script will build a Glance backed image.  If passed the\n--create-volume option it will instead build a volume backed \"snapshot\"\nimage.\n\n\n### ISO Install Media\n\nIt also contains initial support for presenting installer ISO images as\na source for installation packages.  This support has only been tested for\nFedora 18 for the moment.  It is somewhat limited because OpenStack currently\nonly allows these images to be mapped into the instance as \"normal\"\nblock devices, rather than CDROMs.  Not all installers can deal with this.\n\n(Note: When using the install media volume feature you must still pass\na \"--install-tree-url\" option as demonstrated in the examples above.  This\nis necessary to allow the script to retrieve the install kernel and ramdisk\nwithout having to pull down a copy of the entire ISO.)\n\n### Requirements\n\nThis script has been tested with the following OpenStack client packages:\n\n* python-glanceclient-0.5.1-1.el6.noarch\n* python-novaclient-2.10.0-2.el6.noarch\n* python-keystoneclient-0.1.3.27-1.el6.noarch\n* python-cinderclient-0.2.26-1.el6.noarch\n\nNewer and older versions may work.\n\nIt also requires:\n\n* python-libguestfs\n* syslinux\n* qemu-img\n\nIf you want to view ongoing installs over VNC you will need:\n\n* tigervnc\n\n\n### TODO\n\nBetter documentation\n\nBetter error detection and reporting\n\nSupport for more operating systems.\n\nSupport for sourcing install scripts through libosinfo\n\nSupport for enhanced block device mapping when it becomes available\n\nSupport for direct booting of kernel/ramdisk/cmdline combinations when/if it is added to Nova\n\nImproved detection of install success or failure\n\nSupport for caching of self-install images\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-openstack%2Fimage-building-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-openstack%2Fimage-building-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-openstack%2Fimage-building-poc/lists"}