Changes to the repository layout to incorporate the following: 1. Migrate to dedicated repository 2. Rebranding osbash to openstack-labs 3. Adding Python specific bits 4. Allowing a wrapper and switch to osbash meanwhile the python scripts (stacktrain) is underprogress The current repository structure will allow us to carry out the above mentioned changes while the stable code base is usable and will also allow us to update the version of OpenStack being deployed on osbash. This is the rough sketch of the repository ignoring the boilerplate: . |-- doc |-- openstack-labs | |-- img | |-- osbash | | |-- config | | |-- lib | | |-- tools | | |-- scripts | | |-- osbash.sh | | `-- wbatch | |-- stacktrain | | `-- lib | `-- stacktrain.py `-- oslabs.py Note: Also adds/edits existing boilerplate (README's, Tools etc.) Co-Authored-By: Roger Luethi <rl@patchworkscience.org> Co-Authored-By: Sayali Lunkad <sayali.92720@gmail.com>
3.2 KiB
Contributing to replace-labs scripts
First things first
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
General
Contributing code to replace 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
Prerequisites
Coding style
We follow the conventions of other OpenStack projects.
StackTrain
Osbash
Osbash is written in BASH and follows conventions of DevStack: devstack.
DevStack bash style guidelines can be found at the bottom of: https://git.openstack.org/cgit/openstack-dev/devstack/blob/master/HACKING.rst
Structure
OSBASH:
autostart
osbash/wbatch copy shell scripts (*.sh) into this directory to have them automatically executed (and removed) upon boot.
config
Contains the configuration files for all the scripts. The setup can be customized here.
img
By default osbash will put into this directory its base disk images (base-*-<distro>.vdi), the VM export images (labs-<distro>.ova), and all installation ISO images it may download.
lib
This directory contains bash libraries used by scripts.
log
Contains the log files written (and removed) by osbash/wbatch and the scripts running within the VMs.
scripts
All scripts in this directory run within the VMs.
wbatch
Files in this directory are Windows batch files generated by osbash to configure host-only networks, produce a base disk, and build OpenStack replace-labs VMs as configured when osbash created them.
Testing
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):
- http://docs.openstack.org/infra/manual/developers.html#development-workflow
- https://wiki.openstack.org/wiki/GitCommitMessages
If you change the behavior of the scripts as documented in the replace-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: - http://docs.openstack.org/infra/manual/developers.html#development-workflow
TODO
Anything not covered here
Check README.md and get in touch with other scripts developers.