This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
bos:start [2020/10/08 10:48] brinkhaus |
bos:start [2021/07/11 15:52] (current) brinkhaus |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Brinkhaus-OS (BOS) ist eine Betriebssystemvorlage, mit der ein Embedded-PC mit einem für Brinkhaus-Projekte standardmäßig genutzten Echtzeitbetriebssystem ausgestattet werden kann. | + | Brinkhaus-OS (BOS) is an operating system template that can be used to equip an embedded PC with a real-time operating system used as standard for Brinkhaus projects. |
| - | Kurzfristig noch offene Ziele: | + | == Achieved goals == |
| - | * Schutz des Kernsystems per Overlay-FS | + | * Standardized operating system template for edge PCs |
| - | * Update per swupdate per A/B-Partitionsschema | + | * Installation using special boot USB sticks; installation as automatic sequence |
| + | * Modified kernel supports real-time behavior of apps | ||
| + | * Standardized equipping with apps | ||
| + | * Separation of data/settings/logs supports separate backup of apps | ||
| + | * Boot stick creation and placement of BOS specific content on boot stick from code management; generation of boot stick image as automatic process | ||
| + | * Protection of the core system via write protection of the main partition | ||
| + | * Update with own installer application via A/B partition scheme | ||
| - | == Erstinbetriebnahme == | + | == Initial setup == |
| - | Der mit BOS einzurichtende PC muss per DHCP mit dem Internet verbunden sein. Bevor er mit Spannung versorgt wird, muss ein von Brinkhaus gestellter USB-Stick gesteckt werden. | + | The PC to be set up with BOS must be connected to the Internet via DHCP. Before it is supplied with voltage, a USB stick provided by Brinkhaus must be inserted. |
| - | Schließt man den PC an Spannung an, kann man die automatische Installation beobachten. Nach Durchlauf der Installation liegt ein wie unten beschriebener Rechner vor. | + | If you connect the PC to voltage, you can follow the automatic installation. After that you will have a standardized Edge PC set up as described below. |
| - | == Betriebssystembasis == | + | == Operating system base == |
| - | BOS basiert auf Debian 10. Das System wird automatisch eingerichtet und dabei wir unten genannt bespielt. Es wird eine Minimalkonfiguration vorgenommen. Insbesondere wird keine grafische Oberfläche installiert. | + | BOS is based on Debian 10. The system is automatically set up and recorded as described below. A minimal configuration - without graphical user interface - is performed. |
| - | Der installierte Kernel ist ein Standard-Debian-Kernel, der mit der Option "PREEMPT" kompiliert wurde. Er bietet also alle Standardschnittstellen, unterstützt aber zusätzlich die Erstellung von Apps mit stabil reproduzierbarem Zeitverhalten, solange Programmierer dafür geeignete Scheduler für ihre Echtzeitthreads wählen (insbesondere SCHED_FIFO). | + | The installed kernel was recompiled on the basis the standard Debian kernel sources with the option "PREEMPT". It thus offers all standard interfaces, but additionally supports the creation of apps with stably reproducible timing. For programmers to achieve this, they must move their real-time tasks to suitable schedulers (in particular SCHED_FIFO). |
| - | == Zugriff innerhalb des Systems == | + | == Access within the system == |
| - | Es gibt im System keine über die Standardmechanismen des Debian hinausgehenden hinausgehenden Schutzmechanismen. Insbesondere gibt es keine Trennung von Apps in einzelne Schutzbereiche. Apps werden, damit sie auf Hardware zugreifen können, als Benutzer "root" ausgeführt. | + | There are no protections in the system beyond the standard Debian ones. In particular, there is no separation of apps into individual protection areas. Apps, so that they can access hardware, are run as user "root". |
| == Login == | == Login == | ||
| - | Im Auslieferungszustand gilt: es gibt zwei User: //root// und //bos//. | + | By default, there are two users: //root// and //bos//. |
| - | Beide haben das Passwort "bos1234!". Man kann sich per SSH auf das System einloggen. Dabei ist es nicht möglich, sich direkt per SSH als //root// einzuloggen. Stattdessen muss ein Login als Benutzer //bos// erfolgen. Danach kann man per //su// in eine Root-Shell wechseln. | + | Both have the password "bos1234!". You can log in to the system via SSH. It is not possible to log in directly via SSH as //root//. Instead you have to login as user //bos//. After that you can switch to a root shell via //su//. |
| - | == Verzeichnisstruktur, Partionierung im Auslieferungszustand == | + | == Directory structure, partitioning in delivery state == |
| - | * 500MB EFI-Partition | + | * 500MB EFI partition |
| - | * 4GB System (gemounted auf /) | + | * 4GB system (mounted on /) |
| - | * 4GB System (gemounted auf /reserve), genutzt für Updates | + | * 4GB system (mounted on /reserve), used for updates |
| - | * kein Swap | + | * no swap |
| - | * 2 GB unter /var/bos/apps | + | * 2GB under /var/bos/apps |
| - | * 2 GB unter /var/bos/settings | + | * 2 GB under /var/bos/settings |
| - | * 2 GB unter /var/bos/logs | + | * 2 GB under /var/bos/logs |
| - | In jedem der Verzeichnisse unter /var/bos existiert ein Verzeichnis APP_NAME pro App mit APP_NAME als Namen der App. | + | In each of the directories under /var/bos there is one APP_NAME directory per app with APP_NAME as the name of the app. |
| - | * /var/bos/apps/APP_NAME: beinhaltet die eigentliche App; bei Systemstart wird /var/bos/apps/APP_NAME/run.sh ausgeführt | + | * /var/bos/apps/APP_NAME: contains the actual app; at system start /var/bos/apps/APP_NAME/run.sh is executed |
| - | * /var/bos/settings/APP_NAME: beinhaltet die Einstellungen der App | + | * /var/bos/settings/APP_NAME: contains the settings of the app |
| - | * /var/bos/logs/APP_NAME: beinhaltet die Logs der App | + | * /var/bos/logs/APP_NAME: contains the logs of the app |
| - | == Start von Apps == | + | == Starting apps == |
| - | Unter /var/bos/bin liegen drei Skripte, welche bei Servicetätigkeiten relevant sind. | + | Under /var/bos/bin there are three scripts which are relevant for service activities. |
| - | * reInitBosApps.sh : stoppt alle zuvor von diesem Skript eingerichteten Dienste. Legt hiernach pro Verzeichnis in /var/bos/apps einen SystemD-Dienst im Modus "simple" an, der bei Hochlauf das Skript run.sh im jeweiligen Verzeichnis startet. | + | * reInitBosApps.sh : stops all services previously set up by this script. Creates hereafter per directory in /var/bos/apps a SystemD service in the mode "simple", which starts on startup the script run.sh in the respective directory. |
| - | * stopBosApps.sh: stoppt alle mit reInitBosApps angelegten Dienste manuell per Aufruf an SystemD. | + | * stopBosApps.sh: stops all services created with reInitBosApps manually by calling SystemD. |
| - | * startBosApps.sh: startet alle mit reInitBosApps angelegten Dienste manuell per Aufruf an SystemD. | + | * startBosApps.sh: starts all services created with reInitBosApps manually by calling SystemD. |
| - | == Ausführung von Containern == | + | == Execution of containers == |
| - | Container können eine BOS-App sein. Dazu wird empfohlen, den Container als tar-File zu exportieren. Das Tar-File sollte dann mit dem Dockerfile im App-Verzeichnis platziert werden. In der run.sh ist dann als erstem Schritt ein "docker load -i" auf das tar-File auszuführen. Dann kann man per "docker-compose up" den Container starten. | + | Containers can be a BOS app. For this it is recommended to export the container as a tar file. The tar file should then be placed in the app directory with the Dockerfile. The first step in run.sh is to execute a "docker load -i" on the tar file. Then you can start the container via "docker-compose up". |
| - | == Updates von Apps und deren Einstellungen per SFTP == | + | == Updates of apps and their settings via SFTP == |
| - | Apps können per SFTP verzeichnisweise geschrieben und ausgetauscht werden. Ebenso ihre Einstellungen. Mittels der o.g. Skripte kkann die run-sh von Apps in den Status von SystemD-Diensten erhoben werden. | + | Apps can be written and exchanged directory by directory via SFTP. Also their settings. Using the above scripts, the run-sh of apps can be raised to the status of SystemD services. |