diff --git a/README.md b/README.rst similarity index 98% rename from README.md rename to README.rst index 5864899b..5ad961cb 100644 --- a/README.md +++ b/README.rst @@ -267,7 +267,8 @@ Conform to the following conventions: and not remounted into the filesystem image - if the mount point is needed again, your element will need to remount it at that point. -### Phase Subdirectories ### +Phase Subdirectories +^^^^^^^^^^^^^^^^^^^^ Make as many of the following subdirectories as you need, depending on what part of the process you need to customise. The subdirectories are executed in @@ -337,7 +338,8 @@ two-digit numeric prefix, and are executed in numeric order. * runs: outside chroot * inputs: $ARCH=i386|amd64|armhf $TARGET\_ROOT=/path/to/target/workarea -### Other Subdirectories ### +Other Subdirectories +^^^^^^^^^^^^^^^^^^^^ Elements may have other subdirectories that are processed by specific elements rather than the diskimage-builder tools themselves. @@ -346,7 +348,8 @@ One example of this is the ``bin`` directory. The ``rpm-distro``, ``dpkg`` and ``opensuse`` elements install all files found in the ``bin`` directory into ``/usr/local/bin`` within the image as executable files. -### Environment Variables ### +Environment Variables +^^^^^^^^^^^^^^^^^^^^^ To set environment variables for other hooks, add a file to environment.d. This directory contains bash script snippets that are sourced before running @@ -357,7 +360,8 @@ to the full set of elements that are included in the image build. This can be used to process local in-element files across all the elements (pkg-map for example). -### Dependencies ### +Dependencies +^^^^^^^^^^^^ Each element can use the following files to define or affect dependencies: @@ -372,7 +376,8 @@ Each element can use the following files to define or affect dependencies: -### Ramdisk Elements ### +Ramdisk Elements +^^^^^^^^^^^^^^^^ Ramdisk elements support the following files in their element directories: @@ -389,7 +394,8 @@ Ramdisk elements support the following files in their element directories: * udev.d : udev rules files that will be copied into the ramdisk. -### Element coding standard ### +Element coding standard +^^^^^^^^^^^^^^^^^^^^^^^ - lines should not include trailing whitespace. - there should be no hard tabs in the file. diff --git a/diskimage_builder/version.py b/diskimage_builder/version.py new file mode 100644 index 00000000..77b60910 --- /dev/null +++ b/diskimage_builder/version.py @@ -0,0 +1,18 @@ +# Copyright 2011 OpenStack Foundation +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +import pbr.version + +version_info = pbr.version.VersionInfo('diskimage-builder') diff --git a/docs/ci.md b/doc/source/ci.md similarity index 100% rename from docs/ci.md rename to doc/source/ci.md diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 00000000..8f50a822 --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,236 @@ +import sys +import os + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'diskimage-builder' +copyright = u'2015, OpenStack Foundation' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# + +from diskimage_builder import version as dib_version +# The short X.Y version. +release = dib_version.version_info.release_string() +# The full version, including alpha/beta/rc tags. +version = dib_version.version_info.version_string() + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build', 'doc/build', '.tox', '.venv'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'diskimage-builderdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ('index', 'diskimage-builder.tex', u'diskimage-builder Documentation', + u'OpenStack', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'diskimage-builder', u'diskimage-builder Documentation', + [u'OpenStack'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'diskimage-builder', u'diskimage-builder Documentation', + u'OpenStack', 'diskimage-builder', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False diff --git a/docs/docker.md b/doc/source/docker.md similarity index 100% rename from docs/docker.md rename to doc/source/docker.md diff --git a/doc/source/elements b/doc/source/elements new file mode 120000 index 00000000..3b3a79dd --- /dev/null +++ b/doc/source/elements @@ -0,0 +1 @@ +../../elements \ No newline at end of file diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 00000000..d28c4c35 --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,14 @@ +.. diskimage-builder documentation master file, created by + sphinx-quickstart on Sat Feb 7 02:01:37 2015. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +.. include:: ../../README.rst + +Elements +======== + +.. toctree:: + :glob: + + elements/*/* diff --git a/elements/apt-conf/README.md b/elements/apt-conf/README.rst similarity index 89% rename from elements/apt-conf/README.md rename to elements/apt-conf/README.rst index 2daf2714..e411f829 100644 --- a/elements/apt-conf/README.md +++ b/elements/apt-conf/README.rst @@ -1,5 +1,8 @@ -Override the default apt.conf -============================= +======== +apt-conf +======== + +This element overrides the default apt.conf. For APT based systems, if you require specific options for apt operations, you can define `DIB_APT_CONF` with your favorite apt.conf to override it, diff --git a/elements/apt-preferences/README.md b/elements/apt-preferences/README.rst similarity index 63% rename from elements/apt-preferences/README.md rename to elements/apt-preferences/README.rst index 76836f95..ecc3d157 100644 --- a/elements/apt-preferences/README.md +++ b/elements/apt-preferences/README.rst @@ -1,4 +1,9 @@ -# Create package pins for apt systems if packages need to be held back +=============== +apt-preferences +=============== + +This element creates package pins for apt systems if packages need to be held +back. For APT based systems, you specify package priorities in the apt preferences file. This element reads the given manifest file, specified in `DIB_DPKG_MANIFEST`, to diff --git a/elements/apt-sources/README.md b/elements/apt-sources/README.rst similarity index 88% rename from elements/apt-sources/README.md rename to elements/apt-sources/README.rst index 2c822726..1e0171a2 100644 --- a/elements/apt-sources/README.md +++ b/elements/apt-sources/README.rst @@ -1,4 +1,9 @@ -# Override the default sources.list +=========== +apt-sources +=========== + + +This element overrides the default sources.list. For APT based systems, if your network connection is slow for the default sources.list in the upstream cloud image, you can define `DIB_APT_SOURCES` with diff --git a/elements/architecture-emulation-binaries/README.md b/elements/architecture-emulation-binaries/README.rst similarity index 89% rename from elements/architecture-emulation-binaries/README.md rename to elements/architecture-emulation-binaries/README.rst index c5661257..79aa40fc 100644 --- a/elements/architecture-emulation-binaries/README.md +++ b/elements/architecture-emulation-binaries/README.rst @@ -1,3 +1,7 @@ +=============================== +architecture-emulation-binaries +=============================== + This element enables execution for different architectures When building an image for an architecture that the host machine diff --git a/elements/baremetal/README.md b/elements/baremetal/README.rst similarity index 93% rename from elements/baremetal/README.md rename to elements/baremetal/README.rst index bfbbb2d9..2e3f68aa 100644 --- a/elements/baremetal/README.md +++ b/elements/baremetal/README.rst @@ -1,3 +1,7 @@ +========= +baremetal +========= + This is the baremetal (IE: real hardware) element. Does the following: diff --git a/elements/base/README.md b/elements/base/README.rst similarity index 97% rename from elements/base/README.md rename to elements/base/README.rst index e1746c29..6f8c27dd 100644 --- a/elements/base/README.md +++ b/elements/base/README.rst @@ -1,3 +1,6 @@ +==== +base +==== This is the base element. Almost all users will want to include this in their disk image build, diff --git a/elements/cache-url/README.md b/elements/cache-url/README.rst similarity index 64% rename from elements/cache-url/README.md rename to elements/cache-url/README.rst index 70317a26..5d30c9ac 100644 --- a/elements/cache-url/README.md +++ b/elements/cache-url/README.rst @@ -1 +1,4 @@ +========= +cache-url +========= A helper script to download images into a local cache. diff --git a/elements/centos-minimal/README.md b/elements/centos-minimal/README.rst similarity index 87% rename from elements/centos-minimal/README.md rename to elements/centos-minimal/README.rst index e8d0a33d..41c6f931 100644 --- a/elements/centos-minimal/README.md +++ b/elements/centos-minimal/README.rst @@ -1,3 +1,6 @@ +============== +centos-minimal +============== Create a minimal image based on CentOS 7. Use of this element will also require the tool 'rinse' to be diff --git a/elements/centos7/README.md b/elements/centos7/README.rst similarity index 82% rename from elements/centos7/README.md rename to elements/centos7/README.rst index b985b8b7..64c17268 100644 --- a/elements/centos7/README.md +++ b/elements/centos7/README.rst @@ -1,3 +1,6 @@ +======= +centos7 +======= Use Centos 7 cloud images as the baseline for built disk images. For further details see the redhat-common README. diff --git a/elements/cleanup-kernel-initrd/README.md b/elements/cleanup-kernel-initrd/README.md deleted file mode 100644 index 99da8b9a..00000000 --- a/elements/cleanup-kernel-initrd/README.md +++ /dev/null @@ -1 +0,0 @@ -Remove unused kernel/initrd from the image. diff --git a/elements/cleanup-kernel-initrd/README.rst b/elements/cleanup-kernel-initrd/README.rst new file mode 100644 index 00000000..5645df3c --- /dev/null +++ b/elements/cleanup-kernel-initrd/README.rst @@ -0,0 +1,4 @@ +===================== +cleanup-kernel-initrd +===================== +Remove unused kernel/initrd from the image. diff --git a/elements/cloud-init-datasources/README.md b/elements/cloud-init-datasources/README.rst similarity index 91% rename from elements/cloud-init-datasources/README.md rename to elements/cloud-init-datasources/README.rst index 61a8d9dc..0849cb6c 100644 --- a/elements/cloud-init-datasources/README.md +++ b/elements/cloud-init-datasources/README.rst @@ -1,3 +1,6 @@ +====================== +cloud-init-datasources +====================== Configures cloud-init to only use an explicit list of data sources. Cloud-init contains a growing collection of data source modules and most diff --git a/elements/cloud-init-nocloud/README.md b/elements/cloud-init-nocloud/README.rst similarity index 81% rename from elements/cloud-init-nocloud/README.md rename to elements/cloud-init-nocloud/README.rst index 0223c4eb..dfb89c94 100644 --- a/elements/cloud-init-nocloud/README.md +++ b/elements/cloud-init-nocloud/README.rst @@ -1,3 +1,6 @@ +================== +cloud-init-nocloud +================== Configures cloud-init to only use on-disk metadata/userdata sources. This will avoid a boot delay of 2 minutes while polling for cloud data sources such as the EC2 metadata service. diff --git a/elements/debian-systemd/README.md b/elements/debian-systemd/README.rst similarity index 73% rename from elements/debian-systemd/README.md rename to elements/debian-systemd/README.rst index 13ff9cee..32805b06 100644 --- a/elements/debian-systemd/README.md +++ b/elements/debian-systemd/README.rst @@ -1,2 +1,5 @@ +============== +debian-systemd +============== You may want to use `systemd` instead of the classic sysv init system. In this case, include this element in your element list. diff --git a/elements/debian-upstart/README.md b/elements/debian-upstart/README.rst similarity index 82% rename from elements/debian-upstart/README.md rename to elements/debian-upstart/README.rst index 807bc2ee..6fda66f1 100644 --- a/elements/debian-upstart/README.md +++ b/elements/debian-upstart/README.rst @@ -1,3 +1,6 @@ +============== +debian-upstart +============== By default Debian will use sysvinit for booting. If you want to experiment with Upstart, or have need of it due to a need for upstart jobs, this element will build the image with upstart as the init system. diff --git a/elements/debian/README.md b/elements/debian/README.rst similarity index 98% rename from elements/debian/README.md rename to elements/debian/README.rst index c009c295..a8d497cb 100644 --- a/elements/debian/README.md +++ b/elements/debian/README.rst @@ -1,3 +1,6 @@ +====== +debian +====== Create an image based on Debian. We default to unstable but DIB_RELEASE is mapped to any series of Debian. diff --git a/elements/deploy-baremetal/README.md b/elements/deploy-baremetal/README.rst similarity index 71% rename from elements/deploy-baremetal/README.md rename to elements/deploy-baremetal/README.rst index d163627e..3e175840 100644 --- a/elements/deploy-baremetal/README.md +++ b/elements/deploy-baremetal/README.rst @@ -1,2 +1,5 @@ +================ +deploy-baremetal +================ A ramdisk that will expose the machine primary disk over iSCSI and reboot once baremetal-deploy-helper signals it is finished. diff --git a/elements/deploy-ironic/README.md b/elements/deploy-ironic/README.rst similarity index 72% rename from elements/deploy-ironic/README.md rename to elements/deploy-ironic/README.rst index 0645312b..8849f88b 100644 --- a/elements/deploy-ironic/README.md +++ b/elements/deploy-ironic/README.rst @@ -1,2 +1,5 @@ +============= +deploy-ironic +============= A ramdisk that will expose the machine primary disk over iSCSI and reboot once Ironic signals it is finished. diff --git a/elements/deploy-kexec/README.md b/elements/deploy-kexec/README.rst similarity index 80% rename from elements/deploy-kexec/README.md rename to elements/deploy-kexec/README.rst index e316e181..9bdd76d0 100644 --- a/elements/deploy-kexec/README.md +++ b/elements/deploy-kexec/README.rst @@ -1,3 +1,6 @@ +============ +deploy-kexec +============ Boots into the new image once baremetal-deploy-helper signals it is finished by downloading the kernel and ramdisk via tftp, and using the kexec utilities. diff --git a/elements/deploy/README.md b/elements/deploy/README.rst similarity index 82% rename from elements/deploy/README.md rename to elements/deploy/README.rst index 2310eaf3..ba170e33 100644 --- a/elements/deploy/README.md +++ b/elements/deploy/README.rst @@ -1 +1,4 @@ +====== +deploy +====== Temporary element to include deploy-baremetal from the name deploy whilst renaming the element. diff --git a/elements/dhcp-all-interfaces/README.md b/elements/dhcp-all-interfaces/README.rst similarity index 90% rename from elements/dhcp-all-interfaces/README.md rename to elements/dhcp-all-interfaces/README.rst index 480b2f37..8a64b9c8 100644 --- a/elements/dhcp-all-interfaces/README.md +++ b/elements/dhcp-all-interfaces/README.rst @@ -1,3 +1,6 @@ +=================== +dhcp-all-interfaces +=================== Autodetect network interfaces during boot and configure them for DHCP The rationale for this is that we are likely to require multiple diff --git a/elements/dkms/README.md b/elements/dkms/README.rst similarity index 95% rename from elements/dkms/README.md rename to elements/dkms/README.rst index 912c8ed3..81ae1575 100644 --- a/elements/dkms/README.md +++ b/elements/dkms/README.rst @@ -1,3 +1,6 @@ +==== +dkms +==== This is the dkms (Dynamic Kernel Module System) element. Some distributions such as Fedora and Ubuntu include DKMS in their packaging. diff --git a/elements/dpkg/README.md b/elements/dpkg/README.rst similarity index 98% rename from elements/dpkg/README.md rename to elements/dpkg/README.rst index 864c9cb9..a06dee47 100644 --- a/elements/dpkg/README.md +++ b/elements/dpkg/README.rst @@ -1,3 +1,6 @@ +==== +dpkg +==== Provide dpkg specific image building glue. The ubuntu element needs customisations at the start and end of the image build diff --git a/elements/dracut-network/README.md b/elements/dracut-network/README.rst similarity index 57% rename from elements/dracut-network/README.md rename to elements/dracut-network/README.rst index 1618f4e7..a02bc677 100644 --- a/elements/dracut-network/README.md +++ b/elements/dracut-network/README.rst @@ -1 +1,4 @@ +============== +dracut-network +============== Extends dracut and build an initramfs with network support. diff --git a/elements/dracut-ramdisk/README.md b/elements/dracut-ramdisk/README.rst similarity index 77% rename from elements/dracut-ramdisk/README.md rename to elements/dracut-ramdisk/README.rst index c3f19185..8a759ff7 100644 --- a/elements/dracut-ramdisk/README.md +++ b/elements/dracut-ramdisk/README.rst @@ -1,3 +1,6 @@ +============== +dracut-ramdisk +============== Build Dracut-based ramdisks This is an alternative to the `ramdisk` element that uses diff --git a/elements/element-manifest/README.md b/elements/element-manifest/README.rst similarity index 93% rename from elements/element-manifest/README.md rename to elements/element-manifest/README.rst index b65a3037..3ed20128 100644 --- a/elements/element-manifest/README.md +++ b/elements/element-manifest/README.rst @@ -1,3 +1,4 @@ +================ element-manifest ================ diff --git a/elements/enable-serial-console/README.md b/elements/enable-serial-console/README.rst similarity index 83% rename from elements/enable-serial-console/README.md rename to elements/enable-serial-console/README.rst index f753b160..1394bc32 100644 --- a/elements/enable-serial-console/README.md +++ b/elements/enable-serial-console/README.rst @@ -1,3 +1,6 @@ +===================== +enable-serial-console +===================== Start getty on active serial consoles. With ILO and other remote admin environments, having a serial console can be diff --git a/elements/epel/README.md b/elements/epel/README.rst similarity index 89% rename from elements/epel/README.md rename to elements/epel/README.rst index 3242d95a..8caaab3c 100644 --- a/elements/epel/README.md +++ b/elements/epel/README.rst @@ -1,2 +1,5 @@ +==== +epel +==== This element installs the Extra Packages for Enterprise Linux (EPEL) repository GPG key as well as configuration for yum. diff --git a/elements/fedora/README.md b/elements/fedora/README.rst similarity index 95% rename from elements/fedora/README.md rename to elements/fedora/README.rst index 97003091..4d397690 100644 --- a/elements/fedora/README.md +++ b/elements/fedora/README.rst @@ -1,3 +1,6 @@ +====== +fedora +====== Use Fedora cloud images as the baseline for built disk images. If you wish to use a Fedora Yum mirror you can set DIB\_DISTRIBUTION\_MIRROR diff --git a/elements/hwburnin/README.md b/elements/hwburnin/README.rst similarity index 75% rename from elements/hwburnin/README.md rename to elements/hwburnin/README.rst index 8465564d..f3d1d8a1 100644 --- a/elements/hwburnin/README.md +++ b/elements/hwburnin/README.rst @@ -1,2 +1,5 @@ +======== +hwburnin +======== A hardware test ramdisk - exercises the machine RAM and exercises the hard disks diff --git a/elements/hwdiscovery/README.md b/elements/hwdiscovery/README.rst similarity index 97% rename from elements/hwdiscovery/README.md rename to elements/hwdiscovery/README.rst index e7a6eb4c..3036f643 100644 --- a/elements/hwdiscovery/README.md +++ b/elements/hwdiscovery/README.rst @@ -1,3 +1,6 @@ +=========== +hwdiscovery +=========== A ramdisk to report the hardware of a machine to an inventory service. This will collect up some basic information about the hardware it diff --git a/elements/ilo/README.md b/elements/ilo/README.rst similarity index 98% rename from elements/ilo/README.md rename to elements/ilo/README.rst index a9d9e11f..82fcb918 100644 --- a/elements/ilo/README.md +++ b/elements/ilo/README.rst @@ -1,3 +1,6 @@ +=== +ilo +=== Ramdisk support for applying HP iLO firmware. The firmware files are copied in via an extra-data hook: the variable diff --git a/elements/install-static/README.md b/elements/install-static/README.rst similarity index 87% rename from elements/install-static/README.md rename to elements/install-static/README.rst index 0e5a819c..abc580f8 100644 --- a/elements/install-static/README.md +++ b/elements/install-static/README.rst @@ -1,3 +1,6 @@ +============== +install-static +============== Copy static files into the built image. The contents of any ``static/`` subdirs of elements will be installed into diff --git a/elements/ironic-agent/README.md b/elements/ironic-agent/README.rst similarity index 72% rename from elements/ironic-agent/README.md rename to elements/ironic-agent/README.rst index 518f0d68..2ca48926 100644 --- a/elements/ironic-agent/README.md +++ b/elements/ironic-agent/README.rst @@ -1,2 +1,5 @@ +============ +ironic-agent +============ Build ramdisk with ironic-python-agent. Works only on Fedora, therefore fedora element is mandatory. diff --git a/elements/ironic-discoverd-ramdisk/README.md b/elements/ironic-discoverd-ramdisk/README.rst similarity index 90% rename from elements/ironic-discoverd-ramdisk/README.md rename to elements/ironic-discoverd-ramdisk/README.rst index 120bc74d..b7e93a83 100644 --- a/elements/ironic-discoverd-ramdisk/README.md +++ b/elements/ironic-discoverd-ramdisk/README.rst @@ -1,3 +1,6 @@ +======================== +ironic-discoverd-ramdisk +======================== ironic-discoverd [1] is a StackForge project for conducting hardware properties discovery via booting a special discovery ramdisk and interrogating hardware from within it. diff --git a/elements/iso/README.md b/elements/iso/README.rst similarity index 99% rename from elements/iso/README.md rename to elements/iso/README.rst index 9739a02c..26a60663 100644 --- a/elements/iso/README.md +++ b/elements/iso/README.rst @@ -1,3 +1,6 @@ +=== +iso +=== Generates a bootable ISO image from the kernel/ramdisk generated by the elements ``baremetal`` or ``ramdisk``. It uses isolinux to boot on BIOS machines and grub to boot on EFI machines. diff --git a/elements/local-config/README.md b/elements/local-config/README.rst similarity index 69% rename from elements/local-config/README.md rename to elements/local-config/README.rst index 990c58af..80a88d50 100644 --- a/elements/local-config/README.md +++ b/elements/local-config/README.rst @@ -1,2 +1,5 @@ +============ +local-config +============ Copies local user settings such as .ssh/authorized\_keys and $http\_proxy into the image. diff --git a/elements/manifests/README.md b/elements/manifests/README.rst similarity index 94% rename from elements/manifests/README.md rename to elements/manifests/README.rst index 6ada9376..d707c1b0 100644 --- a/elements/manifests/README.md +++ b/elements/manifests/README.rst @@ -1,3 +1,6 @@ +========= +manifests +========= Copy any manifests generated into the build area post-image creation This element should be a dependency of any element that writes a manifest diff --git a/elements/mellanox/README.md b/elements/mellanox/README.rst similarity index 57% rename from elements/mellanox/README.md rename to elements/mellanox/README.rst index b1ca5a50..0e2f3677 100644 --- a/elements/mellanox/README.md +++ b/elements/mellanox/README.rst @@ -1 +1,4 @@ +======== +mellanox +======== Force support for mellanox hardware diff --git a/elements/modprobe-blacklist/README.md b/elements/modprobe-blacklist/README.rst similarity index 83% rename from elements/modprobe-blacklist/README.md rename to elements/modprobe-blacklist/README.rst index 5f8c48db..b506dd94 100644 --- a/elements/modprobe-blacklist/README.md +++ b/elements/modprobe-blacklist/README.rst @@ -1,3 +1,6 @@ +================== +modprobe-blacklist +================== Blacklist specific modules using modprobe.d/blacklist.conf. In order to use set DIB_MODPROBE_BLACKLIST to the name of your diff --git a/elements/opensuse/README.md b/elements/opensuse/README.rst similarity index 96% rename from elements/opensuse/README.md rename to elements/opensuse/README.rst index 1a471ce3..076a27c4 100644 --- a/elements/opensuse/README.md +++ b/elements/opensuse/README.rst @@ -1,3 +1,6 @@ +======== +opensuse +======== Use an openSUSE cloud image as the baseline for built disk images. The base image is located here: diff --git a/elements/package-installs/README.rst b/elements/package-installs/README.rst index 5c222b5b..e3b6ad01 100644 --- a/elements/package-installs/README.rst +++ b/elements/package-installs/README.rst @@ -1,3 +1,7 @@ +================ +package-installs +================ + The package-installs element allows for a declarative method of installing and uninstalling packages for an image build. This is done by creating a package-installs.yaml or package-installs.json file in the element directory. diff --git a/elements/pip-cache/README.md b/elements/pip-cache/README.rst similarity index 96% rename from elements/pip-cache/README.md rename to elements/pip-cache/README.rst index 86f1d9aa..ae10b427 100644 --- a/elements/pip-cache/README.md +++ b/elements/pip-cache/README.rst @@ -1,3 +1,6 @@ +========= +pip-cache +========= # Use a cache for pip Using a download cache speeds up image builds. diff --git a/elements/pkg-map/README.md b/elements/pkg-map/README.rst similarity index 98% rename from elements/pkg-map/README.md rename to elements/pkg-map/README.rst index cf68cece..7a6cd83b 100644 --- a/elements/pkg-map/README.md +++ b/elements/pkg-map/README.rst @@ -1,3 +1,6 @@ +======= +pkg-map +======= Map package names to distro specific packages. Provides the following: diff --git a/elements/pypi/README.md b/elements/pypi/README.rst similarity index 99% rename from elements/pypi/README.md rename to elements/pypi/README.rst index 7a93abaa..468972a5 100644 --- a/elements/pypi/README.md +++ b/elements/pypi/README.rst @@ -1,3 +1,6 @@ +==== +pypi +==== Inject a PyPI mirror ==================== diff --git a/elements/ramdisk-base/README.md b/elements/ramdisk-base/README.rst similarity index 64% rename from elements/ramdisk-base/README.md rename to elements/ramdisk-base/README.rst index 722886ca..a23cde36 100644 --- a/elements/ramdisk-base/README.md +++ b/elements/ramdisk-base/README.rst @@ -1 +1,4 @@ +============ +ramdisk-base +============ Shared functionality required by all of the different ramdisk elements. diff --git a/elements/ramdisk/README.md b/elements/ramdisk/README.rst similarity index 97% rename from elements/ramdisk/README.md rename to elements/ramdisk/README.rst index 3b3c7ae4..6f170599 100644 --- a/elements/ramdisk/README.md +++ b/elements/ramdisk/README.rst @@ -1,3 +1,6 @@ +======= +ramdisk +======= This is the ramdisk element. Almost any user building a ramdisk will want to include this in their build, diff --git a/elements/rax-nova-agent/README.md b/elements/rax-nova-agent/README.rst similarity index 83% rename from elements/rax-nova-agent/README.md rename to elements/rax-nova-agent/README.rst index 52cd19f3..c6ecffd8 100644 --- a/elements/rax-nova-agent/README.md +++ b/elements/rax-nova-agent/README.rst @@ -1,3 +1,6 @@ +============== +rax-nova-agent +============== Images for Rackspace Cloud currently require nova-agent to get networking information. diff --git a/elements/redhat-common/README.md b/elements/redhat-common/README.rst similarity index 93% rename from elements/redhat-common/README.md rename to elements/redhat-common/README.rst index f425b027..4edcbf4e 100644 --- a/elements/redhat-common/README.md +++ b/elements/redhat-common/README.rst @@ -1,3 +1,6 @@ +============= +redhat-common +============= Image installation steps common to RHEL and Fedora. Overrides: diff --git a/elements/rhel-common/README.md b/elements/rhel-common/README.rst similarity index 99% rename from elements/rhel-common/README.md rename to elements/rhel-common/README.rst index 684c20f9..1c89124c 100644 --- a/elements/rhel-common/README.md +++ b/elements/rhel-common/README.rst @@ -1,3 +1,6 @@ +=========== +rhel-common +=========== This element contains the common installation steps between RHEL os releases. RHEL Registration diff --git a/elements/rhel/README.md b/elements/rhel/README.rst similarity index 99% rename from elements/rhel/README.md rename to elements/rhel/README.rst index 25a5a9bc..0ecf6e51 100644 --- a/elements/rhel/README.md +++ b/elements/rhel/README.rst @@ -1,3 +1,6 @@ +==== +rhel +==== # Overrides: ## General diff --git a/elements/rhel7/README.md b/elements/rhel7/README.rst similarity index 95% rename from elements/rhel7/README.md rename to elements/rhel7/README.rst index 0a69bf3a..4a8b2a64 100644 --- a/elements/rhel7/README.md +++ b/elements/rhel7/README.rst @@ -1,3 +1,6 @@ +===== +rhel7 +===== Use RHEL 7 cloud images as the baseline for built disk images. Note: As of this writing, RHEL 7 is still in beta, so final download diff --git a/elements/select-boot-kernel-initrd/README.md b/elements/select-boot-kernel-initrd/README.rst similarity index 77% rename from elements/select-boot-kernel-initrd/README.md rename to elements/select-boot-kernel-initrd/README.rst index 19421551..f4c6ba54 100644 --- a/elements/select-boot-kernel-initrd/README.md +++ b/elements/select-boot-kernel-initrd/README.rst @@ -1,3 +1,6 @@ +========================= +select-boot-kernel-initrd +========================= A helper script to get the kernel and initrd image. It uses the function select_boot_kernel_initrd from the library img-functions diff --git a/elements/selinux-permissive/README.md b/elements/selinux-permissive/README.rst similarity index 70% rename from elements/selinux-permissive/README.md rename to elements/selinux-permissive/README.rst index 3df0f44e..2326c38f 100644 --- a/elements/selinux-permissive/README.md +++ b/elements/selinux-permissive/README.rst @@ -1,3 +1,6 @@ +================== +selinux-permissive +================== Puts selinux into permissive mode by writing SELINUX=permissive to /etc/selinux/config diff --git a/elements/serial-console/README.md b/elements/serial-console/README.rst similarity index 62% rename from elements/serial-console/README.md rename to elements/serial-console/README.rst index b7f0812f..2f89a17a 100644 --- a/elements/serial-console/README.md +++ b/elements/serial-console/README.rst @@ -1 +1,4 @@ +============== +serial-console +============== **This element is now deprecated please use enable-serial-console instead** diff --git a/elements/source-repositories/README.md b/elements/source-repositories/README.rst similarity index 98% rename from elements/source-repositories/README.md rename to elements/source-repositories/README.rst index 19677316..b6039267 100644 --- a/elements/source-repositories/README.md +++ b/elements/source-repositories/README.rst @@ -1,3 +1,6 @@ +=================== +source-repositories +=================== With this element other elements can register their installation source by placing their details in the file source-repository-\*. An example of an element "custom-element" that wants to retrieve the ironic source diff --git a/elements/stable-interface-names/README.md b/elements/stable-interface-names/README.rst similarity index 71% rename from elements/stable-interface-names/README.md rename to elements/stable-interface-names/README.rst index 474d5095..ba4bc95a 100644 --- a/elements/stable-interface-names/README.md +++ b/elements/stable-interface-names/README.rst @@ -1,3 +1,6 @@ +====================== +stable-interface-names +====================== Does the following: * Enables stable network interface naming (em1, em2, etc) by diff --git a/elements/svc-map/README.md b/elements/svc-map/README.rst similarity index 99% rename from elements/svc-map/README.md rename to elements/svc-map/README.rst index a37e34ce..2c18c544 100644 --- a/elements/svc-map/README.md +++ b/elements/svc-map/README.rst @@ -1,3 +1,6 @@ +======= +svc-map +======= Map service names to distro specific services. Provides the following: diff --git a/elements/uboot/README.md b/elements/uboot/README.rst similarity index 95% rename from elements/uboot/README.md rename to elements/uboot/README.rst index 9ae3004d..e16df694 100644 --- a/elements/uboot/README.md +++ b/elements/uboot/README.rst @@ -1,3 +1,6 @@ +===== +uboot +===== Perform kernel/initrd post-processing for UBoot. This element helps post-process the kernel/initrd diff --git a/elements/ubuntu-core/README.md b/elements/ubuntu-core/README.rst similarity index 92% rename from elements/ubuntu-core/README.md rename to elements/ubuntu-core/README.rst index 5c9c4760..6035183f 100644 --- a/elements/ubuntu-core/README.md +++ b/elements/ubuntu-core/README.rst @@ -1,3 +1,6 @@ +=========== +ubuntu-core +=========== Use Ubuntu Core cloud images as the baseline for built disk images. Overrides: diff --git a/elements/ubuntu-minimal/README.md b/elements/ubuntu-minimal/README.rst similarity index 95% rename from elements/ubuntu-minimal/README.md rename to elements/ubuntu-minimal/README.rst index bb92224f..97fe28da 100644 --- a/elements/ubuntu-minimal/README.md +++ b/elements/ubuntu-minimal/README.rst @@ -1,3 +1,6 @@ +============== +ubuntu-minimal +============== Create a minimal image based on Ubuntu. We default to trusty but DIB_RELEASE is mapped to any series of Ubuntu. diff --git a/elements/ubuntu/README.md b/elements/ubuntu/README.rst similarity index 95% rename from elements/ubuntu/README.md rename to elements/ubuntu/README.rst index 9fc02df8..85c7e903 100644 --- a/elements/ubuntu/README.md +++ b/elements/ubuntu/README.rst @@ -1,3 +1,7 @@ +====== +ubuntu +====== + Use Ubuntu cloud images as the baseline for built disk images. Overrides: diff --git a/elements/vm/README.md b/elements/vm/README.rst similarity index 97% rename from elements/vm/README.md rename to elements/vm/README.rst index 9cc83b7e..678982e4 100644 --- a/elements/vm/README.md +++ b/elements/vm/README.rst @@ -1,3 +1,6 @@ +== +vm +== Sets up a partitioned disk (rather than building just one filesystem with no partition table). diff --git a/elements/yum/README.md b/elements/yum/README.rst similarity index 98% rename from elements/yum/README.md rename to elements/yum/README.rst index 2425a7f2..b1d45e64 100644 --- a/elements/yum/README.md +++ b/elements/yum/README.rst @@ -1,3 +1,6 @@ +=== +yum +=== Provide yum specific image building glue. RHEL/Fedora/CentOS and other yum based distributions need specific yum diff --git a/elements/zypper/README.md b/elements/zypper/README.rst similarity index 96% rename from elements/zypper/README.md rename to elements/zypper/README.rst index aec7e616..5611c52b 100644 --- a/elements/zypper/README.md +++ b/elements/zypper/README.rst @@ -1,3 +1,6 @@ +====== +zypper +====== This element provides some customizations for zypper based distributions like SLES and openSUSE. It works in a very similar way as the yum element does for yum based distributions. diff --git a/setup.cfg b/setup.cfg index 23dc7a5f..730bf680 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ name = diskimage-builder summary = Golden Disk Image builder. description-file = - README.md + README.rst author = HP Cloud Services author_email = openstack-dev@lists.openstack.org license: Apache License (2.0) @@ -14,6 +14,11 @@ classifier = Programming Language :: Python :: 2.7 Environment :: Console +[build_sphinx] +all_files = 1 +build-dir = doc/build +source-dir = doc/source + [files] packages = diskimage_builder diff --git a/test-requirements.txt b/test-requirements.txt index 78dc3b8d..d8750285 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,3 +6,6 @@ hacking>=0.9.2,<0.10 discover oslotest>=1.2.0 # Apache-2.0 testrepository>=0.0.18 + +# Doc requirements +sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 diff --git a/tox.ini b/tox.ini index 0025fc9f..1928e5ce 100644 --- a/tox.ini +++ b/tox.ini @@ -30,4 +30,4 @@ downloadcache = ~/cache/pip [flake8] ignore = E125,H202,H302,H803 builtins = _ -exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build +exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,conf.py