Difference between revisions of "Modularisation"

From stoney cloud
Jump to: navigation, search
[unchecked revision][unchecked revision]
(provisioning)
(GitHub)
Line 69: Line 69:
 
The following shows how a '''helpers''' directory structure could look like.
 
The following shows how a '''helpers''' directory structure could look like.
 
<pre>
 
<pre>
/helpers                 # Helper scripts and programmes, like notifications (quota, backup failed, rsnapshot, ...).
+
/helpers                                             # Helper scripts and programmes, like notifications (quota, backup failed, rsnapshot, ...).
/helpers/bin             # Binary / executable scripts and programmes.
+
/helpers/bin                                         # Binary / executable scripts and programmes.
/helpers/etc             # Configuration files and directories.
+
/helpers/etc                                         # Configuration files and directories.
/helpers/data             # Data used for the helpers.
+
/helpers/data                                       # Data used for the helpers.
/helpers/data/data.ldif   # The actual data, in this case a ldif file.
+
/helpers/data/data.ldif                             # The actual data, in this case a ldif file.
/helpers/test             # Tests (CLI, Unit-Tests, ...).
+
/helpers/test                                       # Tests (CLI, Unit-Tests, ...).
/helpers/README.md       # A simple readme file containing an overview and how to install as the absolute minimum.
+
/helpers/README.md                                   # A simple readme file containing an overview and how to install as the absolute minimum.
 
</pre>
 
</pre>
  
Line 82: Line 82:
 
<pre>
 
<pre>
 
/provisioning/provisioning                          # Scripts and programmes to provision services.
 
/provisioning/provisioning                          # Scripts and programmes to provision services.
/provisioning/bin                                    # Helper Scripts, like notifications (quota, backup failed, rsnapshot, ...): helper.pl
+
/provisioning/bin                                    # Binary / executable scripts and programmes.
/provisioning/etc                                    # Configuration
+
/provisioning/etc                                    # Configuration files and directories.
 
/provisioning/etc/Provsioning                        #
 
/provisioning/etc/Provsioning                        #
 
/provisioning/etc/Provsioning/Backup                #
 
/provisioning/etc/Provsioning/Backup                #
/provisioning/etc/Provsioning/Backup                #
+
/provisioning/lib                                    # Provisioning Perl-Modules for a dedicated Service (for example KVM.pm or rsnapshot.pm)
/provisioning/lib                                    # Provisioning Perl-Modules for a dedicated Service: KVM.pm or rsnapshot.pm
+
 
/provisioning/lib/perl                              #
 
/provisioning/lib/perl                              #
 
/provisioning/lib/perl/Provisioning                  #
 
/provisioning/lib/perl/Provisioning                  #

Revision as of 11:02, 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.

Self-Service Modules Installation

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?

  • Use memcached?
  • Use a file with one include per module?

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.

helpers

The following shows how a helpers 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.

provisioning

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

/provisioning/provisioning                           # Scripts and programmes to provision services.
/provisioning/bin                                    # Binary / executable scripts and programmes.
/provisioning/etc                                    # Configuration files and directories.
/provisioning/etc/Provsioning                        #
/provisioning/etc/Provsioning/Backup                 #
/provisioning/lib                                    # Provisioning Perl-Modules for a dedicated Service (for example KVM.pm or rsnapshot.pm)
/provisioning/lib/perl                               #
/provisioning/lib/perl/Provisioning                  #
/provisioning/lib/perl/Provisioning/Backup           #
/provisioning/lib/perl/Provisioning/Backup/Rsnapshot # 
/provisioning/libexec                                #
/provisioning/test                                   # Tests (CLI, Unit-Tests, ...): test.sh
/provisioning/README.md                              # A simple readme file containing an overview and how to install as the absolute minimum.