source code: setup/FACTORY_SERVER.md
Chrome OS Factory Server¶
This document explains what is the Chrome OS Factory Server, how to install and how to use it.
[TOC]
Introduction¶
The Chrome OS Factory Server is a collection of software components running on a server deployed in factory manufacturing line, as the single portal for DUTs (device under test) for accessing shop floor backends, storing logs, syncing system time, and many other “server” related services.
Currently the server is a Docker image containing following components:
Dome, the web based front end for accessing server.
Umpire, provides imaging and partial updates to software, and also controls other services.
Overlord, a remote monitoring service.
Instalog, a robust logging pipeline.
And usually you will only need to access the server via browser using http://localhost:8000 (default port for Dome), which can configure all other components.
Prerequisite¶
Hardware¶
The factory server can run on any machines that can run Docker, but we’d recommend a dedicated host with large storage.
Minimal requirements¶
CPU: x86-64 CPU
Memory: Just enough to run host OS, Docker, nginx + django; for example 2G.
Storage: Enough space for logs and resources in bundles; for example 256G.
Software¶
Docker currently supports Windows, Linux and MacOS, but the recommended setup is an x86-64 machine running Linux Server, which has best performance for production servers.
The deployment script cros_docker.sh
currently supports Linux and MacOS so you
can use both systems for development or experiments. It is possible to run
Factory Server on Windows, but you have to deploy manually and that is not
officially supported.
Linux Server¶
Current recommendation is to use Ubuntu Linux 20.04.x server (focal), please download the server image from here.
During installation, please specify the system to be formatted by GPT instead of MBR to gain maximum disk space.
Docker saves everything in
/var/lib
and the Chrome OS Factory Server saves its own data in/cros_docker
so you should make sure the partition is large enough for these two folders. A simple solution is to not creating any additional partitions (only have/
and/boot
).
Mac OSX¶
If you run factory sever on Mac OSX, the shared folder is in
${HOME}/cros_docker
instead of/cros_docker
, for example/Users/admin/cros_docker
.
Docker¶
If your server is running recommended Ubuntu, simply run following commands to install Docker:
sudo apt-get update && sudo apt-get install docker.io
Otherwise, read Docker docs to find the right instruction for your server.
Type
docker version
and make sure your Docker server is ready.known incompatible docker versions: version < 1.10.3 or version > 24.0.9
known compatible docker versions: version ==
20.10.21
Note: If you need, please contact the Google contact of your project to request supporting for newer docker version.
Installation¶
Get deployment script¶
The deployment of all Chrome OS Factory Server components are managed by a
cros_docker.sh
script. To obtain that, you have three
choices - just choose one of them:
Download latest version from web. Make sure you have
curl
andbase64
then type following commands:URL="https://chromium.googlesource.com/chromiumos/platform/factory/+/main/setup/cros_docker.sh?format=TEXT" curl -L "${URL}" | base64 --decode >cros_docker.sh sh ./cros_docker.sh update # Self-test and change file permission.
Or, check out from factory software repository:
git clone https://chromium.googlesource.com/chromiumos/platform/factory cd factory/setup
Now you have
./cros_docker.sh
.Or, (only for Chrome OS partners) download the prepared factory bundle from CPFE, extract, then find the script in
setup
folder.
Download and install factory server¶
Run following command to download the Docker image on a machine which has access to internet:
./cros_docker.sh pull
If your target server machine does not have public network, copy
cros_docker.sh
and files listed on the screen to the target computer.On the target server machine, run following command to load Docker images:
./cros_docker.sh install
Run following command to start the front end Dome. Note: When we uprev the
UMPIRE_VERSION
, Umpire instances will be updated automatically after we run following command at first time../cros_docker.sh run
Update deployment script and server images¶
The version of server image is tracked inside deployment script
cros_docker.sh
. To update deployment script and server images to latest
version, do:
./cros_docker.sh update
Then repeat the steps in previous section to update Docker images.