SME Server:Documentation:Developers Manual:Chapter1/de

From SME Server
Jump to navigationJump to search


height=48px SME Server Handbücher

Administration
Benutzer
Entwickler

height=48px Zusätzliche Dokumentation

Technikerhandbuch
Häufig gestellte Fragen
HowTo-Anleitungen

height=48px Erweiterungen
Individuelle SME Server Erweiterungen

Kapitel 1: Der SME Server im Überblick

Über dieses Handbuch

Mitel hat diese Dokumentation erstellt, um Entwicklung auf der Plattform des SME Servers zu ermöglichen. Diese Dokumentation, die darin enthaltenen Code-Beispiele und der SME Server selbst sind unter open source Lizenz veröffentlicht.

Für wen ist dieses Handbuch?

Dieses Handbuch ist Entwicklern gewidmet und stellt Informationen zur Integration von Anwendungen in die SME Server Plattform bereit. Das Handbuch beschreibt Schlüsselkonzepte des SME Servers wie die Konfigurations-Datenbank, Vorlagen für Konfigurationsdateien und das Modell der Actions und Events, das den SME Server deutlich von anderen Linux-Distributionen differenziert.

Dieses Handbuch ist keine Anleitung für Administratoren, um ein bestrimmtes Release schneller zu machen. Es stellt vielmehr einige Beispiele bereit und zeigt damit best practice Softwareentwicklung für den SME Server. Auch für Administratioren ist dieses Handbuch interessant, weil es erklärt, wie der SME Server unter der Haube funktioniert.

Was ist der SME Server?

Der SME Server ist eine Softwarelösung, die auf einem Standard PC in weniger als 30 Minuten installiert werden kann und den PC damit in eine vollständige Netzwerkserver und Firewall-Lösung verwandelt. Der SME Server basiert auf der CentOS Linux Server Distribution und ist so erstellt, dass keine Linux-Kenntnisse zur Installation und Benutzung erforderlich sind. Softwarepakete von CentOS werden ohne Modifikationen verwendet und automatisch konfiguriert, um best practice services von Administrations-Experten zur Verfügung zu stellen.

Der SME Server läuft auf einer breiten Palette von PC' und unterstützt eine ganze Reihe von Konfigurationen und Geräten wie

  • RAID Festplattenspiegelung
  • Viele verschiedene Netzwerkkarten
  • Backup auf Bandlaufwerken
  • Drucker am Parallel-Port, USB oder Netzanschluss
  • Viele verschiedene Optionen zur Verbindung mit dem Internet, einschließlich Kabelmodem, DSL/PPPoE, statische IP-Adresse und Einwahlverbindungen

Die Software für den SME Server ist mit dem RPM Package Manager (RPM) erstellt. Vorhandene Pakete von CentOS oder von Drittherstellern werden wenn immer möglich verwendet. Dabei wird für den SME Server das Prinzip best of breed verwedet, um die besten Lösungen aus dem Open Source Umfeld zusammen zu nutzen. Der Server ist so designed, dass diese Pakete unmittelbar ersetzt werden können, wenn neue Versionen oder andere Alternativen erhältlich sind. Die aktuellen SW-Pakete sind:

SME Server SW-Pakete
Webserver Apache
Mailserver qmail
DNS-Server djbdns und dnscache
FTP-Server ProFTPd
Windows Dateiserver Samba
Macintosh Dateiserver Netatalk
Fern-Administration SSH, PPTP, HTTP über SSL
Band-Backup Flexbackup
Webmail Horde IMP

Design-Philosophie

Perfektion ist nicht dann erreicht, wenn etwas hinzugefügt werden kann, sondern wenn nichts mehr entfernt werden kann.

--Antoine de Saint-Exupéry

Der SME Server automatisiert best practices von erfahrenen Systemadministratoren mit einem einfachen Web-Frontend für die Benutzer, das gleichzeitig für Entwickler modular erweiterbar ist.

Prinzip 1: Automatisierung von best practices

Ein guter Systemadministrator weiß, welche Aufgaben regelmäßig und gelegentlich erledigt werden müssen, um einen Server zu administrieren, der ständig mit dem Internet verbunden ist. Einige Aufgaben, wie z.B. Sicherungen oder Systemsicherheit sind regelmäßig durchzuführen. Andere Aufgaben, wie z.B. die Einrichtung gemeinsamer Laufwerke oder das Hinzufügen neuer Benutzer müssen nur gelegentlich durchgeführt werden. In jedem Fall weiß ein guter Systemadministrator nicht nur, wie diese Aufgaben durchgeführt werden, sondern auch, wie diese sicher, dauerhaft und effizient erledigt werden: eben als Industrie Standard im Sinne von best practices.

Leider gibt es nicht für jeden Server einen gut ausgebildeten, erfahrenen Systemadministrator. Das ist besonders in Kleinunternehmen der Fall, in denen meistens nur wenig IT-Mitarbeiter vorhanden sind. Deshalb ist es das Ziel des SME Servers, die Aufgaben eines Systemadministrators möglichst gut zu automatisieren. Vom einfachen Hinzufügen eines Benutzers, über Durchführen von Sicherungen und anderer komplexer Aufgaben, all dies muss auch von jemanden erledigt werden können, der keine oder nur wenige Systemkenntnisse besitzt.

Prinzip 2: Vereinfachung

The SME Server is characterized by its tight focus on providing network server functions. For the end-user, the SME Server provides simple, extensible web-based management. For developers, the SME Server provides clean, consistent, extensible interfaces to allow features to be added and modified.

Some Linux distributions are aimed at desktop users, general purpose server applications, or "enterprise" server applications. The SME Server is different in that it is targeted towards providing network server functionality for small to medium enterprises. Because of this, the SME Server is much smaller than many other Linux distributions, as software packages which are not needed for this purpose (for example, the X window system) are not included in the distribution.

The SME Server is also simple for a non-technical person to manage. For an end-user administering the server, choices are kept to a minimum. If a decision is very likely to be the same for all small businesses, the answer is assumed and the end user is not required to make a choice. When decisions are required, they are phrased in terms independent of the underlying technology, so that end-users are not required to be intimately familiar with Linux or Linux applications.

For developers, the simplicity is in the architecture of the SME Server system. Features are layered in such a way that additional features can be added without affecting the current services, and often without requiring modifications to the user interface.

Prinzip 3: Erweiterbarkeit

SME Server's third design goal is extensibility, which provides a balance to the simplicity previously described. Since the simplest possible server will not suit every need, we make it easy to customize and extend the server in a number of ways.

Firstly, interfaces are provided for experienced users to customize the system from the Linux command line. These include tools to manipulate the configuration database, trigger events, or modify the configuration files for the various software installed on the system.

Secondly, applications allows developers to create additional software modules which can be easily installed and configured by end-users. Applications may provide application software for the server's users, administration tools, network services, or any other type of software or data.

The SME Server architecture explicitly supports developers by making it easy to drop software into place and remove it without needing to modify existing files. For instance, a web application does not need to edit the web server configuration file, but can simply drop a template fragment into the appropriate directory on the system and be assured that it will be expanded into the configuration file as required.

Prinzip 4: Zuverlässigkeit

The SME Server is designed to run without intervention 24 hours per day, seven days a week. This reliability has been designed from the ground up: stable, well supported versions of the Linux kernel and applications, RAID disk mirroring, automatic firewall, and process supervision. Where applications have been shown to be insecure or unreliable, we use stable, secure replacements. The modular architecture allows this to be done without affecting the system administrator's view of the system and with only localised effect on the developer's view.

Architektur Überblick

The SME Server consists of a simplified CentOS installation, together with a number of server applications, and a layer of software that manages those server applications. The management software presents users with a simplified user interface and automatically configures the server applications as necessary.

The applications are not recompiled or modified to work within the SME Server framework. Rather, the framework automates the tasks of an experienced system administrator, and configures each application in a sensible, standard way.

The SME Server framework has four components:

   *
     server-manager and console user interfaces
   *
     configuration databases
   *
     template system, used to generate configuration files
   *
     events and actions

When a user configures an aspect of the server through one of the user interfaces, the SME Server automatically configures the server applications relevant to that change. The SME Server does so using these steps:

   *
     The user interface changes values in the configuration database. This database (actually a collection of databases) contains parameters describing the state of the system (IP address assignments, policy settings, domain names, email server configuration, user accounts, and so on). The user interface does not perform the application reconfiguration, but instead signals an event to perform the changes.
   *
     The event relevant to the changes being made to the configuration database is signalled. For example, changes related to email configuration might signal the "email-update" event. These events are collections of scripts and an event can be extended to perform additional functions by adding scripts to the event directory. The actions for an event are run in a defined order to produce the desired system state.
   *
     The actions within the event ensure that the configuration files used by the server applications are configured correctly. This is done by combining "templates" for the configuration file with the values in the configuration database.
   *
     The actions then inform the applications that their configuration has been changed and that the application should re-read the file, or restart, as appropriate.

Figure 5-1. SME Server Architecture

So, to recap: here are the steps performed when a system parameter is changed in the user interface (the same steps are used both for the console and for the web-based manager):

   *
     The user interface code modifies the settings in the configuration databases to specify the new system configuration.
   *
     The user interface code signals an event to inform the system that the configuration has changed.
   *
     The event triggers a sequence of actions.
   *
     The actions process a set of templates in order to generate new configuration files based on the current settings and reconfigure services where necessary.