training-labs: Rewrite training-labs in python

Rewriting training labs in python for allowing better agility and growth
of the project. Allows the project to add new features like public cloud
support, better support for windows platform and more.

Change-Id: I1c1fef61a378eaaf6bad8a3179fc80658066a556
This commit is contained in:
Pranav Salunke 2016-10-28 22:11:04 +02:00 committed by Roger Luethi
parent 4ef9b26500
commit aee2779952
1 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,105 @@
..
This work is licensed under a Creative Commons Attribution 3.0 Unported
License.
http://creativecommons.org/licenses/by/3.0/legalcode
=========================
Training-labs Python port
=========================
https://blueprints.launchpad.net/openstack-manuals/+spec/labs-python-port
Training labs was originally written in Bash. But it has grown from a simple
set of scripts to a full blown project. Moving to a modern interpreted
programming language is the next logical step. Hence, rewriting training-labs
in Python allows us to increase the agility, quality and features supported.
Python is an obvious choice. It is a programming language which should cater
the current demands, features while being the language of the OpenStack
community. Python is shipped by default on Mac OS X and Linux platforms.
Problem description
===================
Training labs is growing with ever increasing features and complexity. There
is a demand from users to add support for more features and plugins like
Public Cloud support. Moving to a modern programming language addresses
many inherent limitations of Bash for the given use-cases. The following
short comings, new feature demands are listed below which explain the need
for this rewrite.
* Adding new functionality like public cloud support (AWS, GCE, RackSpace).
* Providing better support for Windows platform.
* Using better configuration format.
* Supporting multiple architectures for OpenStack.
* Reducing the complexity for better testing, bug fixing, and more.
* Better support for new features like PXE booting.
* Providing proper modularity and abstraction for the host side scripts.
Proposed change
===============
Rewriting the host side scripts in Python. Host side scripts carry out tasks
to orchestrate the hypervisors (KVM/VirtualBox) and manage virtual networks,
provide logging, inject guest side scripts etc.
Initially, we plan to introduce Python scripts in parallel with existing Bash
scripts to eliminate the impact of this change to the end-users. Once the
Python port is tested, we will remove the host side Bash scripts. At this
point the end-users will invoke training-labs via Python. The impact to the
end-users is minimal to zero.
This is a major rewrite of the project and should impact the entire project
itself. But the migration plans provide a safe way to implement this change
and have minimal impact.
Alternatives
------------
* Use similar programming language like Ruby, Go Lang, etc.
* Improve the architecture and add relevant features to Bash.
Implementation
==============
Assignee(s)
-----------
Primary assignee:
Roger Luethi <rl@patchworkscience.org>
Other contributors:
Pranav Salunke <dguitarbite@gmail.com>
Work Items
----------
* Initial one to one rewrite to Python.
* Improve and refactor the python code.
* Remove older host side code (Bash code).
Dependencies
============
* None
Testing
=======
Mostly manual testing in the initial phases. During the latter part of the
implementation, the CI system should also carry out automated testing.
References
==========
None