From 8edf7fe90c88ca3b122b35a5031f78619e13aac3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Wed, 7 Oct 2015 10:35:15 +0200 Subject: [PATCH] Documentation: Syntax checking before running playbooks This brings: 1) A new page to explain how can a deployer test its configuration files. 2) Links on the pages mentionning the playbooks that traditionally has errors because of the deployer's config. Change-Id: I434152a14de806e24e5886969dfa15e3ff1c4928 --- .../configure-configurationintegrity.rst | 29 +++++++++++++++++++ doc/source/install-guide/configure.rst | 1 + .../install-guide/install-foundation-run.rst | 5 +++- .../install-infrastructure-run.rst | 5 +++- 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 doc/source/install-guide/configure-configurationintegrity.rst diff --git a/doc/source/install-guide/configure-configurationintegrity.rst b/doc/source/install-guide/configure-configurationintegrity.rst new file mode 100644 index 0000000000..2c131b75bf --- /dev/null +++ b/doc/source/install-guide/configure-configurationintegrity.rst @@ -0,0 +1,29 @@ +`Home `_ OpenStack-Ansible Installation Guide + +Checking the integrity of your configuration files +-------------------------------------------------- + +Here are a few steps to execute before running any playbook: + +#. Make sure all the files edited in ``/etc/`` are ansible + YAML compliant. Guidelines can be found here: + ``_ + +#. Check the integrity of your yaml files using a yaml linter. + + .. note:: Here is an online linter: ``_ + +#. Run your command with syntax-check, for example, + in the playbooks directory: + + .. code-block:: bash + + $ openstack-ansible setup-infrastructure.yml --syntax-check + +#. Recheck that all indentation seems correct: the syntax of the + configuration files can be correct while not being meaningful + for openstack-ansible. + +-------------- + +.. include:: navigation.txt diff --git a/doc/source/install-guide/configure.rst b/doc/source/install-guide/configure.rst index 1698bc4bfe..3f83ebca23 100644 --- a/doc/source/install-guide/configure.rst +++ b/doc/source/install-guide/configure.rst @@ -20,6 +20,7 @@ Chapter 5. Deployment configuration configure-keystone.rst configure-openstack.rst configure-sslcertificates.rst + configure-configurationintegrity.rst **Figure 5.1. Installation work flow** diff --git a/doc/source/install-guide/install-foundation-run.rst b/doc/source/install-guide/install-foundation-run.rst index 124310c310..7c6b980df1 100644 --- a/doc/source/install-guide/install-foundation-run.rst +++ b/doc/source/install-guide/install-foundation-run.rst @@ -3,6 +3,10 @@ Running the foundation playbook ------------------------------- +.. seealso:: Before continuing, the configuration files may be validated using the guidance in "`Checking the integrity of your configuration files`_". + + .. _Checking the integrity of your configuration files: ../install-guide/configure-configurationintegrity.html + #. Change to the ``/opt/openstack-ansible/playbooks`` directory. #. Run the host setup playbook, which runs a series of sub-playbooks: @@ -10,7 +14,6 @@ Running the foundation playbook .. code-block:: bash $ openstack-ansible setup-hosts.yml - Confirm satisfactory completion with zero items unreachable or failed: diff --git a/doc/source/install-guide/install-infrastructure-run.rst b/doc/source/install-guide/install-infrastructure-run.rst index f42eac4902..3d787ba41d 100644 --- a/doc/source/install-guide/install-infrastructure-run.rst +++ b/doc/source/install-guide/install-infrastructure-run.rst @@ -3,6 +3,10 @@ Running the infrastructure playbook ----------------------------------- +.. seealso:: Before continuing, the configuration files may be validated using the guidance in "`Checking the integrity of your configuration files`_". + + .. _Checking the integrity of your configuration files: ../install-guide/configure-configurationintegrity.html + #. Change to the ``/opt/openstack-ansible/playbooks`` directory. #. Run the infrastructure setup playbook, which runs a series of @@ -11,7 +15,6 @@ Running the infrastructure playbook .. code-block:: bash $ openstack-ansible setup-infrastructure.yml - Confirm satisfactory completion with zero items unreachable or failed: