Thank you for contributing to OpenShift Ansible. This document explains how the repository is organized, and how to submit contributions.
Before submitting code changes, get familiarized with these documents:
.
├── inventory Contains dynamic inventory scripts, and examples of
│ Ansible inventories.
├── library Contains Python modules used by the playbooks.
├── playbooks Contains Ansible playbooks targeting multiple use cases.
└── roles Contains Ansible roles, units of shared behavior among
playbooks.
These are plugins used in playbooks and roles:
.
├── ansible-profile
├── callback_plugins
├── filter_plugins
└── lookup_plugins
.
├── bin [DEPRECATED] Contains the `bin/cluster` script, a
│ wrapper around the Ansible playbooks that ensures proper
│ configuration, and facilitates installing, updating,
│ destroying and configuring OpenShift clusters.
│ Note: this tool is kept in the repository for legacy
│ reasons and will be removed at some point.
└── utils Contains the `atomic-openshift-installer` command, an
interactive CLI utility to install OpenShift across a
set of hosts.
.
└── docs Contains documentation for this repository.
.
└── test Contains tests.
See the RPM build instructions.
This section covers how to run tests for the root of this repo, running tests for the oo-install wrapper is described in utils/README.md.
We use tox to manage virtualenvs and run tests. Alternatively, tests can be run using detox which allows for running tests in parallel
pip install tox detox
List the test environments available:
tox -l
Run all of the tests with:
tox
Run all of the tests in parallel with detox:
detox
Running a particular test environment (python 2.7 flake8 tests in this case):
tox -e py27-ansible22-flake8
Running a particular test environment in a clean virtualenv (python 3.5 pylint tests in this case):
tox -r -e py35-ansible22-pylint
If you want to enter the virtualenv created by tox to do additional testing/debugging (py27-flake8 env in this case):
source .tox/py27-ansible22-flake8/bin/activate
- Go through the guides from the introduction.
- Fork this repository, and create a work branch in your fork.
- Make changes and commit. You may want to review your changes and run tests before pushing your branch.
- Open a Pull Request.
One of the repository maintainers will then review the PR and submit it for testing.
The default
test job is publicly accessible at
https://ci.openshift.redhat.com/jenkins/job/openshift-ansible/. The other jobs
are run on a different Jenkins host that is not publicly accessible, however the
test results are posted to S3 buckets when complete.
The test output of each job is also posted to the Pull Request as comments.