From 52bbdc220f4598a9f1fefccee2e73cd69ac92632 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 13 Jun 2015 19:09:19 +0200 Subject: [PATCH] [install-guide-rst] Set up conditionals for distros Add support for conditionals for the Install Guide. This uses the tags: * rdo * obs * ubuntu Note that this is changed from the spec since sphinx does not accept a "-". Also, I changed from opensuse to suse for brevity. Adds new tox target so that "tox -e install-guides" builds only the RST Install Guide. implements bp installguide-liberty Change-Id: Ibdfbc7ff294e56f52cd6f4ef59ceeb7b6af3e28a --- .gitignore | 4 +- doc/install-guide-rst/source/index.rst | 56 ++++++++++++++++++++++++-- tools/build-all-rst.sh | 4 +- tools/build-install-guides-rst.sh | 13 ++++++ tools/build-rst.sh | 2 +- tox.ini | 4 ++ 6 files changed, 76 insertions(+), 7 deletions(-) create mode 100755 tools/build-install-guides-rst.sh diff --git a/.gitignore b/.gitignore index 30b9533ac9..e5140fc1c8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,9 @@ target/ /publish-docs/ /www/output/ /generated/ -/doc/user-guides/build-admin/ +/doc/install-guide-rst/build-rdo/ +/doc/install-guide-rst/build-obs/ +/doc/install-guide-rst/build-ubuntu/ .doctrees build/ /build-*.log.gz diff --git a/doc/install-guide-rst/source/index.rst b/doc/install-guide-rst/source/index.rst index 90688aa3e3..9413dd845a 100644 --- a/doc/install-guide-rst/source/index.rst +++ b/doc/install-guide-rst/source/index.rst @@ -1,6 +1,34 @@ -============================ -OpenStack Installation Guide -============================ +.. only:: nonsense + + .. TODO(ajaeger): Sphinx uses the first title it finds - ignoring + the only - to create the top most title. Therefore use this + version. This needs to be revised. + + ============================ + OpenStack Installation Guide + ============================ + +.. only:: rdo + + ============================================================================= + OpenStack Installation Guide for Red Hat Enterprise Linux, CentOS, and Fedora + ============================================================================= + +.. only:: obs + + .. title: OpenStack Installation Guide for openSUSE and SUSE Linux + Enterprise + + =================================================================== + OpenStack Installation Guide for openSUSE and SUSE Linux Enterprise + =================================================================== + +.. only:: ubuntu + + ======================================= + OpenStack Installation Guide for Ubuntu + ======================================= + Abstract ~~~~~~~~ @@ -12,7 +40,27 @@ Image Service, Block Storage, Object Storage, Telemetry, Orchestration, and Database. You can install any of these projects separately and configure them stand-alone or as connected entities. -This guide documents the OpenStack Liberty release. +.. only:: rdo + + This guide shows you how to install OpenStack by using packages + available through Fedora 21 as well as on Red Hat Enterprise Linux + 7 and its derivatives through the EPEL repository. + +.. only:: ubuntu + + This guide walks through an installation by using packages + available through Ubuntu 14.04. + +.. only:: obs + + This guide shows you how to install OpenStack by using packages on + openSUSE 13.2 and SUSE Linux Enterprise Server 12 through the Open + Build Service Cloud repository. + +Explanations of configuration options and sample configuration files +are included. + +This guide documents OpenStack Liberty release. .. warning:: This guide is a work-in-progress and changing rapidly while we continue to test and enhance the guidance. Please note diff --git a/tools/build-all-rst.sh b/tools/build-all-rst.sh index 759c85146d..d3eab29b04 100755 --- a/tools/build-all-rst.sh +++ b/tools/build-all-rst.sh @@ -12,7 +12,9 @@ for guide in user-guide user-guide-admin networking-guide; do done # Draft guides -for guide in admin-guide-cloud-rst install-guide-rst; do +for guide in admin-guide-cloud-rst; do tools/build-rst.sh doc/$guide --build build \ --target "draft/$guide" done + +tools/build-install-guides-rst.sh diff --git a/tools/build-install-guides-rst.sh b/tools/build-install-guides-rst.sh new file mode 100755 index 0000000000..b8580a87e3 --- /dev/null +++ b/tools/build-install-guides-rst.sh @@ -0,0 +1,13 @@ +#!/bin/bash -e + +mkdir -p publish-docs + +for distro in obs rdo ubuntu; do + TAG="${distro}_based" + GLOSSARY="" + if [[ ! -e doc/common-rst/glossary.rst ]] ; then + GLOSSARY="--glossary" + fi + tools/build-rst.sh doc/install-guide-rst \ + $GLOSSARY --tag $TAG --target "draft/install-guide-rst-${TAG}" +done diff --git a/tools/build-rst.sh b/tools/build-rst.sh index 7cc6e656b3..c4b8383018 100755 --- a/tools/build-rst.sh +++ b/tools/build-rst.sh @@ -59,7 +59,7 @@ if [ "$GLOSSARY" -eq "1" ] ; then tools/glossary2rst.py doc/common-rst/glossary.rst fi -if [ -z "BUILD" ] ; then +if [ -z "$BUILD" ] ; then if [ -z "$TAG" ] ; then BUILD_DIR="$DIRECTORY/build/html" else diff --git a/tox.ini b/tox.ini index 7b5d8253db..da1f662a73 100644 --- a/tox.ini +++ b/tox.ini @@ -44,6 +44,10 @@ commands = commands = {toxinidir}/tools/build-all-rst.sh +[testenv:install-guides] +commands = + {toxinidir}/tools/build-install-guides-rst.sh + [testenv:publishdocs] # Prepare all documents (except www subdir) so that they can get # published on docs.openstack.org with just copying publish-docs/*