training-labs/HACKING.rst

3.2 KiB

Contributing to replace-labs scripts

First things first

Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/

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://opendev.org/openstack/devstack/src/branch/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:

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 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: - https://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.