
This patch provides a starting point for developers who want to help out with scripts development. More information can be added later, but this should already be reasonably useful. Change-Id: I64732aadc8a3e7c8eec12d886fa5b1ce52dab0af
2.8 KiB
Contributing to training-labs scripts
General
Contributing code to training-labs scripts follows the usual OpenStack process as described in How To Contribute in the OpenStack wiki. Our main blueprint contains the usual links for blueprints, bugs, etc.
Getting started
The main script is osbash.sh. It will call libraries and other scripts to build the training-labs setup. The setup can be customized in labs/config where all scripts keep their configuration files.
Prerequisites
The labs scripts are designed to have minimal dependencies: bash and VirtualBox. To support OS X, we keep the host-side scripts compatible with bash 3.2 (don't use features not present in that somewhat dated version).
For testing the generated Windows batch scripts, any supported version of Windows (Vista and later) will do. After having created the batch files using osbash.sh, just copy the whole labs directory to Windows. If you don't have access to that operating system, comparing the output in labs/wbatch will tell you how your changes affect behavior on that platform.
Coding style
We follow the conventions of other OpenStack projects. Since labs scripts are currently all written in bash, the examples to follow are this project and devstack.
DevStack bash style guidelines can be found at the bottom of: https://github.com/openstack-dev/devstack/blob/master/HACKING.rst
Testing
The labs scripts don't have automated tests yet. Patch submitters should be aware of their responsibility for ensuring that their code works and can be tested by reviewers.
Useful tools for checking scripts:
- bashate (must pass)
- shellcheck (optional)
Submitting patches
These documents will help you submit patches to OpenStack projects (including this one):
If you change the behavior of the scripts as documented in the training-guides, add a DocImpact flag to alert the documentation team. For instance, add a line like this to your commit message:
DocImpact new option added to osbash.sh
Reviewing
Learn how to review (or what to expect when having your patches reviewed) here: - https://wiki.openstack.org/wiki/GerritWorkflow
Anything not covered here
Check README.md and get in touch with other scripts developers.