This patch implements:
- The OpenStack Manuals documentation theme.
- Some minor content changes to the index pages to ensure
that they render correctly.
- Adjustments to the tox/requirements configuration in order
to implement doc8 checks to facilitate improved documentation
checking for incoming patches.
- Adjustments to the sphinx configuration for easier
maintenance.
Note:
The bug_title in the openstackdocstheme is not currently
customisable. A patch to implement the ability to do so
has been submitted: https://review.openstack.org/338299
Partially-Implements: blueprint osa-install-guide-overhaul
Change-Id: I8af1a7ce9008e70abad00be96614c9997f59596b
In order to prepare for implementing requirements management by the
OpenStack requirements management process, and to enable the use of
tox to execute the functional test, this patch implements
some changes to the tox configuration:
- The minimum tox version is increased in order to be able to use
constraints for the python packages.
- The OpenStack upper-constraints are used when preparing the test
venv for the linters checks.
- Any proxy environment variables set on the test host are passed
into the venv to enable testing from behind a proxy.
- The environment variables used by Ansible tests are moved into
a new venv called 'ansible' and this environment is inherited
by all Ansible-related tests.
- The docs test will clean-up an existing build directory before
executing the docs build.
- The releasenotes build cannot use upper-constraints at this point,
so it doesn't.
- The Ansible role download will no longer ignore errors so that any
problems discovered will result in a failed test.
- A functional test environment which executes the gate-check-commit
script is added in order to allow the switch to using the same
functional test execution job in OpenStack-CI as is used for the
roles. This, in turn, enables the execution of the job for multiple
Operating Systems (CentOS, Ubuntu Xenial, etc).
- The 'ansible' and 'ansible-lint' requirements are moved from
test-requirements to the tox file in order to ensure that we
can abide by the global-requirements contract.
- The test-requirement for 'mock' has its formatting changed to
be consistent with other test-requirements.
Change-Id: Ida78a2eae93da5fc56ec6a3d58e75c7db0f08b16
Til now, the main() function of the script did all the input/output
logic of reading in the openstack_inventory.json file and creating the
backup files after multiple runs. While this is functional, it makes
elements of the script hard to test. Either files have to be written to
the file system during tests, which means they must be cleaned up
correctly, or very invasive mocking has to be done at a high level to
test other interactions.
This change moves the creation of the tar backup and the loading of the
openstack_inventory.json file into their own functions that can be
mocked in future tests. Because of their nature, testing of these two
functions is being done with invasive mocks to provide a starting point
in extracting actual filesystem I/O from happening unless explicitly
planned for. With this, future tests could provide mocked versions of
make_backup that are essentially no-ops, and provide smaller, more
customized structures via a mocked get_inventory. Such future changes
could then remove the manipulation of symlinks to
etc/openstack_deploy/openstack_user_config.yml.
Also, this extraction means the implementations could be overriden to
provide different sources and storage, though this is not as robust as a
fully extensible system such as plugins.
The get_backup_name function was created as an easier mocking point,
since the mock module does not allow for replacing builtin Python types,
which include datetime. While specific datetime manipulation libraries
do exist, they were not included here in order to reduce the scope of
changes and external dependencies.
Change-Id: I4bd2a0d06366844b2a60e29cc9c5481903ada4e2
This change allows Ansible to be installed and executed from within
a virtual environment.
Closes-Bug: 1431324
Implements: blueprint ansible-2-1-support
Change-Id: I2fb19dd8218753f75bd7550ed7ba9b79f777083d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Using the coverage report will show how much of the dynamic_inventory.py
script is actually exercised by tests. As of this commit, there is no
enforced coverage level, rather it is used for informational purposes
only. In the future, an enforce coverage percentage would be a good
idea.
Change-Id: Ic2ccc9ae5f306465b6990d935c82f81bb7b7956a
This version of ansible is broken due to the following upstream
Ansible issue:
* https://github.com/ansible/ansible-modules-extras/issues/2042
Change-Id: I832073c31f1ea1828ee48a541b03acb9e836e431
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Bashate is pinned to ensure that for the rest of the cycle, and
once this becomes a stable branch, there are no code changes
needed for updates to the linting tool.
Also, the tox configuration is updated to ensure that it consumes
the dev-requirements file for all lint testing.
Finally, a small pep8 failure is fixed in the dynamic inventory script.
Change-Id: I78056d1d22228f073c44e9ee4e78534a4010effe
ansible-lint 2.3.7 added a rule checking for use of the deprecated
'sudo' and 'sudo_user' directives. They have been replaced with 'become'
and 'become_user' respectively.
Change-Id: I2271fe8468840884f19f41abba37e696c6296350
openstack-infra are creating images containing an apt.d configuration
that sets AllowUnauthenticated to true to support their custom apt
repos which contain unsigned packages. The presence of this file causes
openstack-ansible-security to fail. We can either remove the file, or
skip the V-38462 tag. Skipping the tag in the gate is probably the
better long term solution.
Additionally, ansible-lint 2.3.8 was released today and is now causing
a number of ANSIBLE0008 errors to fail the gate. This is a temporary
cap to unblock the gate.
Change-Id: I2c78f4e913e99e5fc5d84fba9e28197b73ac8f25
As per the release process changes for liberty and mitaka [1], the
reno tooling is being added to the repository for the purpose of
implementing on-going release note additions.
[1] http://lists.openstack.org/pipermail/openstack-dev/2015-November/078301.html
Change-Id: Ibbf4dc43b1fd5704a72cc7af82ddccfb1464926b
This is a cosmetic change to bring our requirement.txt files inline
with other OpenStack project.
Change-Id: I759acbbe9655884815df512835353dbb009b002c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>