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 smoothly) of upstream,
    • Provide useful API for components;
  • Be a GNU/Linux distribution agnostic, different deployments 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 the components described here. 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 the server at school is entirely dependent 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 the mothership, where skilled personal can support them effectively.)
  • the rest of school server functionality, which is not simple, is configured automatically
  • interaction only happens via these flows (via Internet if connectivity is good, and via sneakernet otherwise):
    • incoming system updates flow (also, the way to trigger some configuration changes), should be rare and a 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:

  • existing and configured out of Sugar Server servers at schools
  • the remaining environment that Sugar Server is not aware of

The key points:

  • servers at schools are 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 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 existing services that are 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 downstream as-is, in a way that is most practical for downstream.

Full cycle solution

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

Deployment model

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

Components

Sugar Server components.

sugar-server

The core component.

The singular program requires only on python, and obvious dependencies like coreutils, to allow all its services to function properly. It provides basic sugar related services, and uses 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.