Tag environment-specific steps

Create a custom sphinx theme that provides color-coded section
classes for RHEL, CentOS, and Baremetal environments and tag any
steps specific to those environments.

Change-Id: Ief962d44cba3345e4e1086f7b409662461f77c6c
This commit is contained in:
Ben Nemec 2015-03-20 21:08:10 -05:00
parent 9c2462c222
commit 437e50be8b
9 changed files with 126 additions and 45 deletions

View File

@ -20,7 +20,8 @@ The setup requires baremetal machines with the following minimum specifications:
* 4GB memory
* 60GB free disk space
The undercloud machine needs to run RHEL 7.1 x86_64, which is discussed more below.
The undercloud machine needs to run RHEL 7.1 x86_64 or CentOS 7 x86_64,
which is discussed more below.
Preparing the Baremetal Environment
-----------------------------------
@ -62,7 +63,7 @@ Setting Up The Undercloud Machine
#. Select a machine within the baremetal environment on which to install the
undercloud.
#. Install RHEL 7.1 x86_64 on this machine.
#. Install RHEL 7.1 x86_64 or CentOS 7 x86_64 on this machine.
#. If needed, create a non-root user with sudo access to use for installing the
Undercloud::

View File

@ -15,26 +15,38 @@ non-root user that was used to install the undercloud.
undercloud. See the Note below to choose a different OS::
.. note:: To build images with a base OS different from the undercloud,
set the ``$NODE_DIST`` environment variable prior to running the
``instack-build-images`` command::
set the ``$NODE_DIST`` environment variable prior to running
``instack-build-images``:
# To choose CentOS 7:
export NODE_DIST=centos7
# To choose RHEL 7.1:
export NODE_DIST=rhel7
.. admonition:: CentOS
:class: centos-tag
2. Build the required images::
::
.. note:: If building images for **RHEL 7.1**, download the RHEL 7.1 cloud image or copy
it over from a different location, and define the needed environment variable
to use the image prior to running the below ``instack-build-images`` commands::
export NODE_DIST=centos7
curl -O http://download.devel.redhat.com/brewroot/packages/rhel-guest-image/7.1/20150203.1/images/rhel-guest-image-7.1-20150203.1.x86_64.qcow2
export DIB_LOCAL_IMAGE=rhel-guest-image-7.1-20150203.1.x86_64.qcow2
.. admonition:: RHEL
:class: rhel-tag
::
::
export NODE_DIST=rhel7
2. Build the required images:
.. admonition:: RHEL
:class: rhel-tag
Download the RHEL 7.1 cloud image or copy it over from a different location,
and define the needed environment variable for RHEL 7.1 prior to running
``instack-build-images``::
curl -O http://download.devel.redhat.com/brewroot/packages/rhel-guest-image/7.1/20150203.1/images/rhel-guest-image-7.1-20150203.1.x86_64.qcow2
export DIB_LOCAL_IMAGE=rhel-guest-image-7.1-20150203.1.x86_64.qcow2
::
instack-build-images
instack-build-images
#. Load the images into Glance::

View File

@ -91,7 +91,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'theme'
# 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
@ -99,7 +99,7 @@ html_theme = 'default'
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = ['.']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".

View File

@ -31,10 +31,13 @@ Create the necessary flavors::
instack-ironic-deployment --setup-flavors
If installing on baremetal, copy the sample overcloudrc file and edit to reflect your environment. Then source this file::
.. admonition:: Baremetal
:class: baremetal-tag
cp /usr/share/instack-undercloud/deploy-baremetal-overcloudrc ~/deploy-overcloudrc
source deploy-overcloudrc
Copy the sample overcloudrc file and edit to reflect your environment. Then source this file::
cp /usr/share/instack-undercloud/deploy-baremetal-overcloudrc ~/deploy-overcloudrc
source deploy-overcloudrc
Deploy the the *openstack-full* image (default of 1 compute and 1 control)::

View File

@ -4,11 +4,19 @@ Installing the Undercloud
Make sure you are logged in as a non-root user (such as the stack user) on the
node on which you want to install the undercloud.
If you used the virt setup this node will be a VM called *instack* and you can
use the stack user.
.. admonition:: Virt
:class: virt-tag
For a baremetal setup this will be the host you selected for the Undercloud
while preparing the environment.
This node will be a VM called *instack* and you can use the stack user.
.. admonition:: Baremetal
:class: baremetal-tag
This will be the host you selected for the Undercloud while preparing the environment.
#. Install yum-utils (required by the instack-setup-host script)::
sudo yum install -y yum-utils
#. Download and execute the instack-undercloud setup script::
@ -18,12 +26,7 @@ while preparing the environment.
sudo yum install -y instack-undercloud
#. If installing on baremetal, copy in the sample answers file and edit it
to reflect your environment::
cp /usr/share/instack-undercloud/instack.answers.sample ~/instack.answers
#. Run script to install the undercloud::
#. Run script to install the undercloud:
.. note:: Ensure that there is an entry for the system's full hostname in /etc/hosts.
For example, if the system is named *myhost.mydomain*, /etc/hosts should have
@ -31,6 +34,14 @@ while preparing the environment.
127.0.0.1 myhost.mydomain
.. admonition:: Baremetal
:class: baremetal-tag
Copy in the sample answers file and edit it to reflect your environment::
cp /usr/share/instack-undercloud/instack.answers.sample ~/instack.answers
::
instack-install-undercloud

View File

@ -5,3 +5,34 @@ instack-undercloud is a scripted installer and other tooling for OpenStack
based on `TripleO`_.
.. _Tripleo: https://wiki.openstack.org/wiki/TripleO
Documentation Conventions
-------------------------
Some steps in the following instructions only apply to certain environments,
such as deployments to real baremetal and deployments using RHEL. These
steps are marked as follows:
.. admonition:: RHEL
:class: rhel-tag
Step that should only be run when using RHEL
.. admonition:: CentOS
:class: centos-tag
Step that should only be run when using CentOS
.. admonition:: Baremetal
:class: baremetal-tag
Step that should only be run when deploying to baremetal
.. admonition:: Virt
:class: virt-tag
Step that should only be run when deploying to virtual machines
Any such steps should *not* be run if the target environment does not match
the section marking.

View File

@ -0,0 +1,9 @@
@import url("default.css");
.rhel-tag {background-color: #fee; border: 1px solid #ccc;}
.centos-tag {background-color: #fef; border: 1px solid #ccc;}
.baremetal-tag {background-color: #eef; border: 1px solid #ccc;}
.virt-tag {background-color: #efe; border: 1px solid #ccc;}

View File

@ -0,0 +1,3 @@
[theme]
inherit = default
stylesheet = instack.css

View File

@ -59,27 +59,38 @@ Preparing the Host Machine
.. note:: To setup the undercloud vm with a base OS different from the host,
set the ``$NODE_DIST`` environment variable prior to running
``instack-virt-setup``::
``instack-virt-setup``:
# To choose CentOS 7:
export NODE_DIST=centos7
# To choose RHEL 7.1:
export NODE_DIST=rhel7
.. admonition:: CentOS
:class: centos-tag
::
8. Run the script to setup your virtual environment.::
export NODE_DIST=centos7
.. note:: If building a **RHEL 7.1** undercloud, download the RHEL 7.1 cloud image or copy
it over from a different location, and define the needed environment variables
for RHEL 7.1 prior to running ``instack-virt-setup``::
.. admonition:: RHEL
:class: rhel-tag
curl -O http://download.devel.redhat.com/brewroot/packages/rhel-guest-image/7.1/20150203.1/images/rhel-guest-image-7.1-20150203.1.x86_64.qcow2
export DIB_LOCAL_IMAGE=rhel-guest-image-7.1-20150203.1.x86_64.qcow2
export DIB_YUM_REPO_CONF=/etc/yum.repos.d/rhos-release-6-rhel-7.1.repo
::
::
export NODE_DIST=rhel7
instack-virt-setup
8. Run the script to setup your virtual environment:
.. admonition:: RHEL
:class: rhel-tag
Download the RHEL 7.1 cloud image or copy it over from a different location,
and define the needed environment variables for RHEL 7.1 prior to running
``instack-virt-setup``::
curl -O http://download.devel.redhat.com/brewroot/packages/rhel-guest-image/7.1/20150203.1/images/rhel-guest-image-7.1-20150203.1.x86_64.qcow2
export DIB_LOCAL_IMAGE=rhel-guest-image-7.1-20150203.1.x86_64.qcow2
export DIB_YUM_REPO_CONF=/etc/yum.repos.d/rhos-release-6-rhel-7.1.repo
::
instack-virt-setup
When the script has completed successfully it will output the IP address of the
instack vm that has now been installed with a base OS.