Platform Team/Server Kit/Architecture

Intention

  • Common project within Sugar Labs to keep core development process in one place;
  • It is not about configuring and supporting the whole server at school from scratch but about having a set of tough, local, doing its job well modules that might be included/excluded in downstream solutions;
  • Friendly support of customization on purpose in downstream products:
    • Modularizing, when components might be included on purpose to fulfill local needs,
    • Not patching in downstream but supplementing the upstream, e.g., install upstream packages and just add new packages with local customization or overrides (but not overriding installed files to let PMS work smooth) of upstream,
    • Provide useful API for components;
  • Be a GNU/Linux distribution agnostic, different deployment might decide to use different GNU/Linux distributions.
  • It is not only about supporting XO laptops but about any Sugar based environments;
  • Up to 1000 students per server.

Functionality model

This is all about how real functionality of servers at schools might looks like, at least Sugar Server is being designed and implemented in this direction. Sugar Server is not intended to cover all, described here, components. It is just the global picture from Sugar Server point of view.

Two pure models might describe Sugar Server design, the final model might be an intermediate variant of both of them.

Black box model

The model where server at school is entirely depended on Sugar Server design decisions. There are two types of machines:

  • servers at schools under Sugar Server control
  • optional mothership(s) to control school servers

The key points:

  • functionality of such servers is simple, only basic services (complex, thus not trivial for maintenance, services are on mothership where skilled personal can support them effectively)
  • the rest of school server functionality, that is not simple, is being configured automatically
  • the only interaction happen via these flows (via internet if connectivity is good, and via sneakernet otherwise):
    • incoming system updates flow (the way to trigger some configuration changes as well), should be rare and batch process
    • incoming data flow for sugar related stuff like leases, activities or content
    • outgoing data flow to monitor servers

One package model

The model with minimal Sugar Server design influence:

  • existed and configured out of Sugar Server servers at schools
  • the rest of environment Sugar Server is not aware about

The key points:

  • servers at schools are being supported out of Sugar Server
  • admins install sugar-server package from upstream binary repositories and just launch it
  • sugar-server starts to serve all sugar boxes around providing only basic sugar specific functionality
  • sugar-server doesn't break the system configuration (it just touches nothing)

Distribution model

How Sugar Server might be reused from downstream excluding most obvious way, download its sources.

Core packages

Sugar Server is designed to avoid patching its sources in downstream. Reusing upstream binary packages as-is from repositories on http://download.sugarlabs.org is how Sugar Server is being designed. Downstream might create new packages, that don't have file collisions with upstream packages, to have tweaks for local environment. It is being accomplished by:

  • sugar-server project has services formed as plugins, from downstream packages such services might be:
    • enabled/disabled
    • added new services, e.g., variants of existed services highly tuned for local needs
  • mace tool that processes configuration from sugar-server-base packages is designed to have several configuration sources for the same service, so downstream configuration packages might change/hide/complement upstream configuration

There are three upstream packages:

  • sugar-server
  • sugar-server-base
  • mace

These packages might be reused as-is in downstream in most practical, for downstream, way.

Full cycle solution

Except just having binary packages, it should be possible to build downstream packages and final OS images on http://packages.sugarlabs.org using only its web UI. The resulted files will be accessible for download from http://download.sugarlabs.org. It is Open Build Service based service to build packages and images for rpm and deb based GNU/Linux distributions.

Deployment model

It is entirely downstream decision how to deploy Sugar Server based solutions.

Components

Sugar Server components.

sugar-server

The core component.

The singular program with only python, and obvious ones like coreutils, dependency required to let its all services function properly. It provide basic sugar related services and formed as one CLI tool to manage all its functionality.

This component provides:

  • Required services:
    • Student identification
  • Optional services:

sugar-server-base

This component contains only configuration of basic external services that need to be installed and configured on bare servers at school.

These services are:

  • System configuration like iptables and sudo
  • Jabber
  • Web cache
  • Content filter
  • SSH
  • NTP
  • DNS
  • DHCP

mace

Apply configuration templates to the final systems

It is how external services configuration happen within Sugar Server based solutions. The core of this component is mace utility.