Deployment Platform/XO reference distribution

From Sugar Labs
Jump to navigation Jump to search

Summary

This is one of possible reference implementations of Harmonic Distribution based solutions. The goal is creating Sugar based downstream distribution to run on OLPC XO laptops by end-users. Created reference implementation is intended to be a template for final deployment distribution.

Overview

The task is creating XO image capable for further support.

Image will be composed using olpc-os-builder utility and will be populated with the following content:

System packages

Package will be installed from the following sources:

Initial Sugar Activities

Harmonic Distribution based solution are based on Sugar Network when all Sugar Activities are accessible from local school server or Internet located one. But, it is useful to have some first-time activities already included to the image.
Activities will be downloaded from the Sugar Network and placed to ~/Activities directory in the image.

Deployment configuration

This is how final systems will be initially configured and supported afterwards. All deployment configuration is placed to meta package in deployment repository. This meta package contains dependencies and configuration files for all other packages needed to be installed on final systems. Further, if there is a need to change configuration on already installed systems, meta package will be updated and spread among users.

Start new implementation

These are step-by-step instruction how to create new deployment distribution basing on this reference implementation.

Deployment repository

Make sure you have Fedora repository accessible from building host and end-users. If you are looking for building and hosting environment, try packages.sugarlabs.org which is an instance of Open Build Service.

If you are using packages.sugarlabs.org, create new project and add Fedora-14 repository from Sweets Distribution project your implementation is based on. For example, there is reference project based on SweetsDistribution:Factory repositories.

Deployment package

Use reference package as a template. Copy its source and tune for local needs. Look for comments for better understanding.

Structure of reference package is:

  • etc/
    These files will be copied as-is. Place here all configuration files you need to support afterwards.
  • post.d/*.sh
    These files will be executed right after installing package. Place here routines that can't be represent by configuration files.
  • image/
    olpc-os-builder files to create XO images.
  • Makefile
    Handy makefile to create sources tarball.
  • deployment.spec
    RPM spec file to create package.

This is the only package that will be installed implicitly after including sweets olpc-os-builder module. Thus, add to deployment.spec all dependencies final systems require. Note that there is no need in installing Sugar Activities or its dependencies, these routines will be handled automatically after setting offline_activities option in olpc-os-builder configuration file.

Put sources to the new git project and commit them.

To create package tarball, call the command:

make dist

If you are using packages.sugarlabs.org, call osc utility to upload newly create sources tarball and spec file to OBS.

Create images

First of all, attach proper Sweets Distribution repository and install olpc-os-builder package from there. This package is different from upstream, it contains additional modules (see image/*.ini files for details).

Then, go to image/ directory and call one the the following commands to create images:

olpc-os-builder --additional-defaults common.ini xo-1.ini
olpc-os-builder --additional-defaults common.ini xo-1.5.ini

Consult olpc-os-builder's home page for more information.

Post-install support

Post installation supporting is all about update packages in deployment repository, e.g., update configuration in deployment package. Then, using one of deployment scenarios, spread package updates among users.

Try reference implementation

To try reference implementation on an XO laptop, download one of prebuilt images and proceed below instructions to flash it. Note that images were built using recent development version of software. So, images might be used to easily test recent changes.

XO-1

  • First, ensure that your laptop is unlocked.
  • Download os.img and os.crc files to the root directory of a USB stick or SD card.
  • Drop to the "ok" prompt by pressing Esc.svg (Esc) repeatedly during boot.
  • Type the command: copy-nand u:\xo.img for a USB stick or copy-nand sd:\xo.img for a SD card followed by Key enter.jpg (enter).
  • Wait for the display to fill in with color and the "ok" prompt to return
  • Type the command reboot followed by Key enter.jpg (enter)
  • The XO will reboot, finish writing, reboot itself, and take you to the naming and color choice process
  • During the reboots, keep the charger connected to allow OFW to self-update

XO-1.5

  • First, ensure that your laptop is unlocked.
  • Download os.zd to the root directory of a USB stick
  • Drop to the "ok" prompt by pressing Esc.svg (Esc) repeatedly during boot
  • Type the command: fs-update u:\xo.zd followed by Key enter.jpg (enter)
  • Wait for the display to fill in with color and the "ok" prompt to return
  • Type the command reboot followed by Key enter.jpg (enter)
  • The XO will reboot and take you to the naming and color choice process

Downstreams

The list of solutions based on this reference implementation: