Difference between revisions of "Modularisation"

From stoney cloud
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Directory Structure Service Module)
Line 1: Line 1:
 +
== Overview ==
 +
As the stoney cloud actually tries to act as a collection of all aspects of a high availability cloud infrastructure, we have roughly three main sections:
 +
* '''Infrastructure''': The basis of the whole ecosystem (Build Server, Binary Package Server, Mirror Server, Puppet Server, Operating System).
 +
* '''stoney cloud''': The actual cloud with an easy to use multi-tenant web based interface.
 +
* '''Self-Service Modules''': Modules that expand the functionality of the stoney cloud.
 +
To make the base installation of the stoney cloud as small and simple as possible, everything is as modularised as possible.
 +
 
== Requirements ==
 
== Requirements ==
Core
+
=== Infrastructure ===
* User, Customer, Reseller
+
The article [[Gentoo Infrastructure]] describes how use gentoo as an infrastructure backbone for creating a complete and modern IT architecture.
* Roles and rights
+
* Billing
+
* Forgot Password
+
* ...
+
* Each reseller (and maybe the customer) entry needs a default flag, which tells us, if a customer or person is allowed to log in (maybe we need two flags). Use <code>sstUseSelfcare</code>. This must be set for every single person.
+
  
Modules: Service/Product specific:
+
=== stoney cloud ===
* Online Backup (stoney backup)
+
The main framework called [[:Category:stoney core|stoney core]] is responsible for shared functionality.
* Mail Hosting (stoney mail)
+
* The basic installation and configuration of the initial stoney cloud components (OpenLDAP server, Apache web server, GlusterFS, ...).
* VM-Manager (stoney conductor)
+
* Reseller, customer and user management.
* VM-Manager light (stoney vm): Start, stop, access a VM.
+
* Roles and rights management.
 +
* Billing functionality.
 +
* Searching functionality.
 +
* A consistent look and feel between modules.
 +
* Internationalization.
  
GitHub:
+
This functionality is accessible via:
* Form follows function: we choose the functionality name (so we are backwards compatible)
+
* A [[:Category:REST_API|REST API]], which serves as the data and business logic abstraction layer and uses JSON as the primary data interchange format.
  
== Module Naming ==
+
This [[:Category:REST_API|REST API]] is currenty accessible via:
The names of the modules are derived from the service functionality. They are different from the marketing names. These marketing names should be configurable per reseller. Needs a schema modification.
+
* A '''c'''ommand '''l'''ine '''i'''nterface.
 +
* An Ajax based web interface.
 +
* Any scripting language which supports a REST API and JSON.
  
 
=== Self-Service Modules ===
 
=== Self-Service Modules ===
* self-service-backup (on-line backup module, marketing name is [[:Category:stoney backup|stoney backup]])
+
The [[:Category:Self-Service Modules|Self-Service Modules]] expand the initial stoney cloud functionality. Some examples:
* self-service-storage (on-line storage module, marketing name is [[:Category:stoney box|stoney box]])
+
* [[:Category:stoney conductor|stoney conductor]]: A cloud and virtual machine management tool (storage, network, cpu, memory, virtual machines, backups, snapshots, ...).
* self-service-web
+
* [[:Category:stoney vm|stoney vm]]: A simplified sub set of the [[:Category:stoney conductor|stoney conductor]] functionality (start, stop, access a virtual machine).
* (self-service-database) -> may be part of self-service-web
+
* [[:Category:stoney backup|stoney backup]]: An on-line backup service for desktops, servers and virtual machines.
* self-service-dns (currently API code only)
+
* [[:Category:stoney mail|stoney mail]]: A mail service with optional collaboration functionality (based on Open-Xchange).
 +
* [[:Category:stoney monitor|stoney monitor]]: Monitoring (with Zabbix).
 +
* [[:Category:stoney orchestra|stoney orchestra]]: Configuration Management (with Puppet).
 +
* [[:Category:stoney box|stoney box]]: An on-line storage service (Webbrowser access via HTTPS, WebDAV via HTTPS and synchronisation to multiple devices).
 +
* [[:Category:stoney web|stoney web]]: Web & Database hosting service (based on Apache and MariaDB).
  
=== Provisioning Modules ===
+
=== Self-Service Modules Naming ===
* prov-web-apache
+
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.
* prov-database-mariadb
+
* prov-database-mysql
+
* prov-database-postgresql
+
* prov-dns-powerdns
+
* prov-backup-kvm
+
* prov-backup-rsnapshot
+
  
 
== GitHub ==
 
== GitHub ==
Proposed directory structure on GitHub.
+
The [[Release Management]] page gives you a nice overview about Release Cycles, Versioning and Development Procedure. The chapter [[Release_Management#Source_Code_Organization |Source Code Organization]] describes nicely, where the code is located on [https://github.com/stoney-cloud/ GitHub].
  
=== Directory Structure Self-Service Module ===
+
The following directory structure is proposed:
 
<pre>
 
<pre>
/data             #  
+
/api             # REST Application Programming Interface.
/data/ldif        # LDAP: load.ldif
+
/cli            # A command Line Interface, which uses the REST API to read or write data.
/api              # API (PHP): api.php
+
/helpers        # Helper scripts and programmes, like notifications (quota, backup failed, rsnapshot, ...).
/api/...          # Structure from CWI according to best practice from the Yii-Framework (a separation of configuration and code would be nice).
+
/provisioning    # Scripts and programmes to provision services.
/api/...          # It would be nice, if the configuration files could be outside the web root (htdocs), so that a miss-configuration of
+
/web             # Ajax based web interface.
/api/...          # the web server does not lead to password leaks.
+
/README.md      # A simple readme file containing an overview and how to install as the absolute minimum.
/web              # Web Interface (HTML/JS/CSS, uses API): gui.js
+
/web/...          #
+
/cli              # CLI (Python, Perl, PHP, Bash with curl ... uses API): api.sh
+
/cli/...          #
+
/test             # Tests (GUI, Unit-Tests, ...): test.xml
+
/test/...        #  
+
 
</pre>
 
</pre>
  
It would be nice to be able to install new modules without the need to modify the main configuration file. Maybe with single configuration files per module? Or do you have other suggestions?
+
Every sub folder must contain (where applicable):
* Use [http://www.memcached.org/ memcached]?
+
* A simple readme file containing an overview and how to install as the absolute minimum.
* Use a file with one include per module?
+
* Structure according to best practice of the programming language or framework (a separation of configuration and code would be nice).
 +
* Tests (Unit-Tests, Test-Cases, Test-Data, ...).
 +
* Documentation.
  
=== Directory Structure Provisioning Module ===
+
=== provisioning ===
Example for prov-backup-rsnapshot:
+
The following shows how a '''provisioning''' directory structure could look like.
 
<pre>
 
<pre>
/bin                                    # Helper Scripts, like notifications (quota, backup failed, rsnapshot, ...): helper.pl
+
/helpers                  # Helper scripts and programmes, like notifications (quota, backup failed, rsnapshot, ...).
/etc                                    # Configuration
+
/helpers/bin              # Binary / executable scripts and programmes.
/etc/Provsioning                        #
+
/helpers/etc             # Configuration files and directories.
/etc/Provsioning/Backup                #
+
/helpers/data            # Data used for the helpers.
/etc/Provsioning/Backup                #
+
/helpers/data/data.ldif  # The actual data, in this case a ldif file.
/lib                                    # Provisioning Perl-Modules for a dedicated Service: KVM.pm or rsnapshot.pm
+
/helpers/test             # Tests (CLI, Unit-Tests, ...).
/lib/perl                              #
+
/helpers/README.md        # A simple readme file containing an overview and how to install as the absolute minimum.
/lib/perl/Provisioning                  #
+
/lib/perl/Provisioning/Backup          #
+
/lib/perl/Provisioning/Backup/Rsnapshot #
+
/libexec                                #
+
/test                                   # Tests (CLI, Unit-Tests, ...): test.sh
+
 
</pre>
 
</pre>
  
 
[[Category:Development]][[Category:Documentation]]
 
[[Category:Development]][[Category:Documentation]]

Revision as of 11:56, 18 April 2014

Overview

As the stoney cloud actually tries to act as a collection of all aspects of a high availability cloud infrastructure, we have roughly three main sections:

  • Infrastructure: The basis of the whole ecosystem (Build Server, Binary Package Server, Mirror Server, Puppet Server, Operating System).
  • stoney cloud: The actual cloud with an easy to use multi-tenant web based interface.
  • Self-Service Modules: Modules that expand the functionality of the stoney cloud.

To make the base installation of the stoney cloud as small and simple as possible, everything is as modularised as possible.

Requirements

Infrastructure

The article Gentoo Infrastructure describes how use gentoo as an infrastructure backbone for creating a complete and modern IT architecture.

stoney cloud

The main framework called stoney core is responsible for shared functionality.

  • The basic installation and configuration of the initial stoney cloud components (OpenLDAP server, Apache web server, GlusterFS, ...).
  • Reseller, customer and user management.
  • Roles and rights management.
  • Billing functionality.
  • Searching functionality.
  • A consistent look and feel between modules.
  • Internationalization.

This functionality is accessible via:

  • A REST API, which serves as the data and business logic abstraction layer and uses JSON as the primary data interchange format.

This REST API is currenty accessible via:

  • A command line interface.
  • An Ajax based web interface.
  • Any scripting language which supports a REST API and JSON.

Self-Service Modules

The Self-Service Modules expand the initial stoney cloud functionality. Some examples:

  • stoney conductor: A cloud and virtual machine management tool (storage, network, cpu, memory, virtual machines, backups, snapshots, ...).
  • stoney vm: A simplified sub set of the stoney conductor functionality (start, stop, access a virtual machine).
  • stoney backup: An on-line backup service for desktops, servers and virtual machines.
  • stoney mail: A mail service with optional collaboration functionality (based on Open-Xchange).
  • stoney monitor: Monitoring (with Zabbix).
  • stoney orchestra: Configuration Management (with Puppet).
  • stoney box: An on-line storage service (Webbrowser access via HTTPS, WebDAV via HTTPS and synchronisation to multiple devices).
  • stoney web: Web & Database hosting service (based on Apache and MariaDB).

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.

GitHub

The Release Management page gives you a nice overview about Release Cycles, Versioning and Development Procedure. The chapter Source Code Organization describes nicely, where the code is located on GitHub.

The following directory structure is proposed:

/api             # REST Application Programming Interface.
/cli             # A command Line Interface, which uses the REST API to read or write data.
/helpers         # Helper scripts and programmes, like notifications (quota, backup failed, rsnapshot, ...).
/provisioning    # Scripts and programmes to provision services.
/web             # Ajax based web interface.
/README.md       # A simple readme file containing an overview and how to install as the absolute minimum.

Every sub folder must contain (where applicable):

  • 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 (Unit-Tests, Test-Cases, Test-Data, ...).
  • Documentation.

provisioning

The following shows how a provisioning directory structure could look like.

/helpers                  # Helper scripts and programmes, like notifications (quota, backup failed, rsnapshot, ...).
/helpers/bin              # Binary / executable scripts and programmes.
/helpers/etc              # Configuration files and directories.
/helpers/data             # Data used for the helpers.
/helpers/data/data.ldif   # The actual data, in this case a ldif file.
/helpers/test             # Tests (CLI, Unit-Tests, ...).
/helpers/README.md        # A simple readme file containing an overview and how to install as the absolute minimum.