Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
0rax committed May 30, 2022
1 parent d30bbc2 commit d161ea5
Show file tree
Hide file tree
Showing 33 changed files with 900 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*
!/docs/Gemfile
!/docs/Gemfile.lock
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
*.sh text eol=lf
*.yaml text eol=lf
Makefile text eol=lf
Dockerfile text eol=lf
Dockerfile* text eol=lf
*.dockerignore text eol=lf
*.gitattributes text
.gitignore text
6 changes: 6 additions & 0 deletions Dockerfile.docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# syntax=docker/dockerfile:1.2
FROM ruby:3.1

WORKDIR /opt/docs
COPY docs/Gemfile docs/Gemfile.lock /opt/docs/
RUN bundle install
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ all: armhf arm64

builder:
$(info [BerryOS] Prepare builder)
docker compose build
docker compose build builder

armhf: builder
$(info [BerryOS] Build for armhf)
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ![BerryOS](https://github.com/0rax/BerryOS/wiki/assets/berryos-banner.png)
# ![BerryOS](docs/assets/berryos-banner.png)

## What is BerryOS ?

BerryOS is a lightweight distribution of Raspberry Pi OS, meant to be used as a clean base when configuring a new Raspberry Pi. It focuses on providing a lighter operating system than can be configured headlessly at first boot.

It was born out of the frustration of not being able to configure Raspberry Pi OS Lite using [`cloud-init`](https://cloudinit.readthedocs.io/en/latest/index.html) easily and the fact that alternatives such as Ubuntu includes way too many pieces of software by default (such as `snapd` or `unattended-upgrades` which can chew RAM and CPU cycles).
It was born out of the frustration of not being able to configure Raspberry Pi OS Lite using [`cloud-init`](https://cloud-init.io/) easily and the fact that alternatives such as Ubuntu includes way too many pieces of software by default (such as `snapd` or `unattended-upgrades` which can chew RAM and CPU cycles).

## Overview

Expand Down Expand Up @@ -37,8 +37,8 @@ The goal of the images provided by BerryOS is to provide a similar user experien

To do so, BerryOS is bootstrapped from the same base as Raspberry Pi OS Lite with a reduced list of package installed by default and the following changes to the default configuration:

- Addition of `cloud-init` to handle unattended provisioning at first boot
- Addition of `netplan` to handle Wi-Fi configuration using `cloud-init`
- Addition of [`cloud-init`](https://cloud-init.io/) to handle unattended provisioning at first boot
- Addition of [`netplan`](https://netplan.io/) to handle Wi-Fi configuration using `cloud-init`
- `openssh` enabled by default
- Serial console disabled by default
- Bluetooth support not configured by default
Expand Down Expand Up @@ -77,7 +77,7 @@ This default environment will also try to:
- Unmount your SD card, insert it in your Raspberry Pi, plug your Ethernet cable and provide it with power
- Congratulation, you are now running BerryOS !

More complex configuration scenario are available under the [`examples` folder](examples/) or in [this project wiki](https://github.com/0rax/BerryOS/wiki).
A more detailed explanation of most of what can be configured using `cloud-init` is available in [this project documentation](https://0rax.github.io/BerryOS/docs/config/). A set of [example `user-data` file](https://0rax.github.io/BerryOS/docs/examples/) is also available.

## Benchmark

Expand All @@ -92,7 +92,7 @@ Download and image sizes have been calculated using `ls -l --block-size=M`.

### `BerryOS/armhf`

| Stat | BerryOS Bullseye (2022.05.29) | RaspiOS Lite Bullseye (2022.04.04) |
| Stat | BerryOS Bullseye (2022.05.30) | RaspiOS Lite Bullseye (2022.04.04) |
| ---------------------- | ----------------------------- | ---------------------------------- |
| RAM usage | 37M | 57M |
| Running processes | 12 | 18 |
Expand All @@ -103,7 +103,7 @@ Download and image sizes have been calculated using `ls -l --block-size=M`.

### `BerryOS/arm64`

| Stat | BerryOS Bullseye (2022.05.29) | RaspiOS Lite Bullseye (2022.04.04) |
| Stat | BerryOS Bullseye (2022.05.30) | RaspiOS Lite Bullseye (2022.04.04) |
| ---------------------- | ----------------------------- | ---------------------------------- |
| RAM usage | 52M | 72M |
| Running processes | 12 | 20 |
Expand Down
20 changes: 20 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,23 @@ services:
- .:/opt/bootstrap
working_dir: /opt/bootstrap
privileged: true
docs:
image: berryos-jekyll
build:
context: .
dockerfile: Dockerfile.docs
environment:
- JEKYLL_ENV=docker
volumes:
- ./docs:/opt/docs:z
ports:
- 4000:4000
command:
- bundle
- exec
- jekyll
- serve
- --config
- _config.yml,_config.docker.yml
- --host
- 0.0.0.0
12 changes: 12 additions & 0 deletions docs/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* text=auto
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.md text=auto
user-data text eol=crlf
meta-data text eol=crlf
network-config text eol=crlf
Gemfile* text eol=lf
_config.yml text eol=lf
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/_site/
7 changes: 7 additions & 0 deletions docs/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"default": true,
"no-hard-tabs": true,
"line_length": false,
"MD025": false,
"MD022": false
}
14 changes: 14 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
source "https://rubygems.org"
gem "github-pages", group: :jekyll_plugins
group :jekyll_plugins do
end
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
gem "tzinfo", "~> 1.2"
gem "tzinfo-data"
end
gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?
gem "webrick", "~> 1.7"
gem "kramdown-parser-gfm"
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
gem "rubyzip", "~> 2.3.0"
gem "rouge"
Loading

0 comments on commit d161ea5

Please sign in to comment.