Changes

Modularisation

2,955 bytes added, 15:24, 5 January 2015
/* schema */
=== Self-Service Modules Naming ===
The names of the modules are derived from the service functionality. These can be different from the marketing names. These marketing names must configurable per reseller and per customer.
 
Naming Convention for Provisioning modules belonging to a Self-Service module:
* prov-<SERVICE>-<TYPE>
** prov-mail-ox
** prov-backup-kvm
** prov-backup-rsnapshot
** prov-monitoring-zabbix
** prov-configuration-management-puppet
=== Self-Service Modules Installation ===
* Use [http://www.memcached.org/ memcached]?
* Use a file with one include per module?
 
=== Self-Service Modules Splitting ===
The [[:Category:Self-Service Modules|Self-Service Modules]] are split into different parts, based on their functionality:
* '''api''': REST Application Programming Interface.
* '''cli''': A command Line Interface, which uses the REST API to read or write data.
* '''docs''': The self-service module documentation.
* '''helpers''': Helper scripts and programmes, like notifications (quota, backup failed, rsnapshot, ...).
* '''prov-<SERVICE>-<TYPE>''': Scripts and programmes to provision services.
* '''web''': Ajax based web interface.
 
Where nothing else is defined, the following rules apply:
* All source code is hosted on [https://github.com/stoney-cloud GitHub]. See the the [[#GitHub | GitHub]] chapter below for more information.
* Version control via Git, according to [http://nvie.com/posts/a-successful-git-branching-model/ Git flow]. TBD.
* Bug & Enhancement Tracking via GitHub (reproduction of the sprints on GitHub).
* PHP Coding-Standards according to [http://symfony.com/doc/current/contributing/code/standards.html Symfony Coding Standards], otherwise fall-back to [http://www.php-fig.org/psr/psr-2/ PSR-2].
* Unit Tests according [http://phpunit.de/ PHPUnit] (like to [http://symfony.com/doc/current/book/testing.html Symfony]).
* Versions schema according [http://semver.org/ Semantic Versioning]. TBD
* Programming languages:
** '''api''': Symfony.
** '''cli''': Bash or Perl.
** '''helpers''': Bash or Perl. Other languages possible.
** '''prov-<SERVICE>-<TYPE>''': Perl
** '''web''': JavaScript Framework AngularJS (with HTML5).
== GitHub ==
/api # REST Application Programming Interface.
/cli # A command Line Interface, which uses the REST API to read or write data.
/docs # The self-service module documentation.
/examples # Example scripts for proof of concept and similar scripts.
/helpers # Helper scripts and programmes, like notifications (quota, backup failed, rsnapshot, ...).
/provisioning # Scripts and programmes to provision services.
/schema # Description, validation specification and documentation of the REST API.
/web # Ajax based web interface.
/LICENSE # The license the self-service module is released under.
/README.md # A simple readme file containing an overview and how to install as the absolute minimum.
</pre>
* A simple readme file containing an overview and how to install as the absolute minimum.
* Structure according to best practice of the programming language or framework (a separation of configuration and code would be nice).
* Tests A test directory (Unit-Tests, Test-Cases, Test-Data, ...).
* Documentation.
</pre>
=== provisioning schema ===The following shows how a '''provisioningschema''' directory structure could look like.<pre>/schema # Description, validation specification and documentation of the REST API./schema/core.schema.json # Every module has a master file, which includes all json files (the name is derived from the Git Repo module name)/schema/base.schema.json # Type definitions./schema/reseller.schema.json # Per resource on file./schema/people.schema.json # /schema/README.md # Information how the schema file(s) can be used and how the documentation can be extracted.</pre> === prov-<SERVICE>-<TYPE> ===The following shows how a '''prov-<SERVICE>-<TYPE>''' directory structure could look like. The following example is done with '''prov-backup-rsnapshot'''.
<pre>
/provisioning/provisioning prov-backup-rsnapshot # Scripts and programmes to provision services./provisioningprov-backup-rsnapshot/bin # Binary / executable scripts and programmes./provisioningprov-backup-rsnapshot/etc # Configuration files and directories./provisioningprov-backup-rsnapshot/etc/Provsioning #/provisioningprov-backup-rsnapshot/etc/Provsioning/Backup #/provisioningprov-backup-rsnapshot/lib # Provisioning Perl-Modules for a dedicated Service (for example KVM.pm or rsnapshot.pm)/provisioningprov-backup-rsnapshot/lib/perl #/provisioningprov-backup-rsnapshot/lib/perl/Provisioning #/provisioningprov-backup-rsnapshot/lib/perl/Provisioning/Backup #/provisioningprov-backup-rsnapshot/lib/perl/Provisioning/Backup/Rsnapshot # /provisioningprov-backup-rsnapshot/libexec #/provisioningprov-backup-rsnapshot/test # Tests (CLI, Unit-Tests, ...): test.sh/provisioningprov-backup-rsnapshot/README.md # A simple readme file containing an overview and how to install as the absolute minimum.
</pre>
[[Category:Development]][[Category:Documentation]]
SLB, editor, reviewer
3,368
edits