From d161ea5d070914ab44e0d0820415918aeeb9473f Mon Sep 17 00:00:00 2001 From: JP Roemer Date: Mon, 30 May 2022 04:31:11 +0200 Subject: [PATCH] Add documentation --- .dockerignore | 2 + .gitattributes | 5 +- Dockerfile.docs | 6 + Makefile | 2 +- README.md | 14 +- docker-compose.yaml | 20 ++ docs/.gitattributes | 12 + docs/.gitignore | 1 + docs/.markdownlint.json | 7 + docs/Gemfile | 14 + docs/Gemfile.lock | 277 ++++++++++++++++++ docs/_config.docker.yml | 1 + docs/_config.yml | 25 ++ docs/_includes/head_custom.html | 4 + docs/assets/berryos-banner.png | Bin 0 -> 8743 bytes docs/assets/berryos-logo.png | Bin 0 -> 2033 bytes docs/config/01-system.md | 75 +++++ docs/config/02-users.md | 126 ++++++++ docs/config/03-network.md | 129 ++++++++ docs/config/04-packages.md | 71 +++++ docs/config/index.md | 8 + .../examples/docker-ce/arm64}/user-data | 10 +- .../examples/docker-ce/armhf}/user-data | 10 +- docs/examples/docker-ce/index.md | 20 ++ docs/examples/index.md | 10 + docs/examples/log2ram/index.md | 12 + {examples => docs/examples}/log2ram/user-data | 8 +- docs/favicon.ico | Bin 0 -> 6841 bytes docs/getting-started/index.md | 9 + docs/index.md | 13 + docs/overview/index.md | 9 + examples/README.md | 9 - rootfs/boot/user-data | 24 +- 33 files changed, 900 insertions(+), 33 deletions(-) create mode 100644 Dockerfile.docs create mode 100644 docs/.gitattributes create mode 100644 docs/.gitignore create mode 100644 docs/.markdownlint.json create mode 100644 docs/Gemfile create mode 100644 docs/Gemfile.lock create mode 100644 docs/_config.docker.yml create mode 100644 docs/_config.yml create mode 100644 docs/_includes/head_custom.html create mode 100644 docs/assets/berryos-banner.png create mode 100644 docs/assets/berryos-logo.png create mode 100644 docs/config/01-system.md create mode 100644 docs/config/02-users.md create mode 100644 docs/config/03-network.md create mode 100644 docs/config/04-packages.md create mode 100644 docs/config/index.md rename {examples/docker-ce-arm64 => docs/examples/docker-ce/arm64}/user-data (94%) rename {examples/docker-ce-armhf => docs/examples/docker-ce/armhf}/user-data (94%) create mode 100644 docs/examples/docker-ce/index.md create mode 100644 docs/examples/index.md create mode 100644 docs/examples/log2ram/index.md rename {examples => docs/examples}/log2ram/user-data (96%) create mode 100644 docs/favicon.ico create mode 100644 docs/getting-started/index.md create mode 100644 docs/index.md create mode 100644 docs/overview/index.md delete mode 100644 examples/README.md diff --git a/.dockerignore b/.dockerignore index 72e8ffc..4988b39 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,3 @@ * +!/docs/Gemfile +!/docs/Gemfile.lock diff --git a/.gitattributes b/.gitattributes index a524e62..f6361b3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/Dockerfile.docs b/Dockerfile.docs new file mode 100644 index 0000000..25d978d --- /dev/null +++ b/Dockerfile.docs @@ -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 diff --git a/Makefile b/Makefile index c9d30a0..1cdb88e 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/README.md b/README.md index 9095a5c..8362870 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 @@ -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 | @@ -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 | diff --git a/docker-compose.yaml b/docker-compose.yaml index df0f247..f17de6f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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 diff --git a/docs/.gitattributes b/docs/.gitattributes new file mode 100644 index 0000000..73455a8 --- /dev/null +++ b/docs/.gitattributes @@ -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 diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..bd3f1fa --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +/_site/ diff --git a/docs/.markdownlint.json b/docs/.markdownlint.json new file mode 100644 index 0000000..2c877a7 --- /dev/null +++ b/docs/.markdownlint.json @@ -0,0 +1,7 @@ +{ + "default": true, + "no-hard-tabs": true, + "line_length": false, + "MD025": false, + "MD022": false +} diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 0000000..5650a44 --- /dev/null +++ b/docs/Gemfile @@ -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" diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 0000000..5ee7c6e --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,277 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (6.0.5) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + zeitwerk (~> 2.2, >= 2.2.2) + addressable (2.8.0) + public_suffix (>= 2.0.2, < 5.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.11.1) + colorator (1.1.0) + commonmarker (0.23.4) + concurrent-ruby (1.1.10) + dnsruby (1.61.9) + simpleidn (~> 0.1) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + ethon (0.15.0) + ffi (>= 1.15.0) + eventmachine (1.2.7) + execjs (2.8.1) + faraday (2.3.0) + faraday-net_http (~> 2.0) + ruby2_keywords (>= 0.0.4) + faraday-net_http (2.0.3) + ffi (1.15.5) + ffi (1.15.5-x64-mingw-ucrt) + forwardable-extended (2.6.0) + gemoji (3.0.1) + github-pages (226) + github-pages-health-check (= 1.17.9) + jekyll (= 3.9.2) + jekyll-avatar (= 0.7.0) + jekyll-coffeescript (= 1.1.1) + jekyll-commonmark-ghpages (= 0.2.0) + jekyll-default-layout (= 0.1.4) + jekyll-feed (= 0.15.1) + jekyll-gist (= 1.5.0) + jekyll-github-metadata (= 2.13.0) + jekyll-include-cache (= 0.2.1) + jekyll-mentions (= 1.6.0) + jekyll-optional-front-matter (= 0.3.2) + jekyll-paginate (= 1.1.0) + jekyll-readme-index (= 0.3.0) + jekyll-redirect-from (= 0.16.0) + jekyll-relative-links (= 0.6.1) + jekyll-remote-theme (= 0.4.3) + jekyll-sass-converter (= 1.5.2) + jekyll-seo-tag (= 2.8.0) + jekyll-sitemap (= 1.4.0) + jekyll-swiss (= 1.0.0) + jekyll-theme-architect (= 0.2.0) + jekyll-theme-cayman (= 0.2.0) + jekyll-theme-dinky (= 0.2.0) + jekyll-theme-hacker (= 0.2.0) + jekyll-theme-leap-day (= 0.2.0) + jekyll-theme-merlot (= 0.2.0) + jekyll-theme-midnight (= 0.2.0) + jekyll-theme-minimal (= 0.2.0) + jekyll-theme-modernist (= 0.2.0) + jekyll-theme-primer (= 0.6.0) + jekyll-theme-slate (= 0.2.0) + jekyll-theme-tactile (= 0.2.0) + jekyll-theme-time-machine (= 0.2.0) + jekyll-titles-from-headings (= 0.5.3) + jemoji (= 0.12.0) + kramdown (= 2.3.2) + kramdown-parser-gfm (= 1.1.0) + liquid (= 4.0.3) + mercenary (~> 0.3) + minima (= 2.5.1) + nokogiri (>= 1.13.4, < 2.0) + rouge (= 3.26.0) + terminal-table (~> 1.4) + github-pages-health-check (1.17.9) + addressable (~> 2.3) + dnsruby (~> 1.60) + octokit (~> 4.0) + public_suffix (>= 3.0, < 5.0) + typhoeus (~> 1.3) + html-pipeline (2.14.1) + activesupport (>= 2) + nokogiri (>= 1.4) + http_parser.rb (0.8.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + jekyll (3.9.2) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 0.7) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 2.0) + kramdown (>= 1.17, < 3) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 4) + safe_yaml (~> 1.0) + jekyll-avatar (0.7.0) + jekyll (>= 3.0, < 5.0) + jekyll-coffeescript (1.1.1) + coffee-script (~> 2.2) + coffee-script-source (~> 1.11.1) + jekyll-commonmark (1.4.0) + commonmarker (~> 0.22) + jekyll-commonmark-ghpages (0.2.0) + commonmarker (~> 0.23.4) + jekyll (~> 3.9.0) + jekyll-commonmark (~> 1.4.0) + rouge (>= 2.0, < 4.0) + jekyll-default-layout (0.1.4) + jekyll (~> 3.0) + jekyll-feed (0.15.1) + jekyll (>= 3.7, < 5.0) + jekyll-gist (1.5.0) + octokit (~> 4.2) + jekyll-github-metadata (2.13.0) + jekyll (>= 3.4, < 5.0) + octokit (~> 4.0, != 4.4.0) + jekyll-include-cache (0.2.1) + jekyll (>= 3.7, < 5.0) + jekyll-mentions (1.6.0) + html-pipeline (~> 2.3) + jekyll (>= 3.7, < 5.0) + jekyll-optional-front-matter (0.3.2) + jekyll (>= 3.0, < 5.0) + jekyll-paginate (1.1.0) + jekyll-readme-index (0.3.0) + jekyll (>= 3.0, < 5.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) + jekyll-relative-links (0.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-remote-theme (0.4.3) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-seo-tag (2.8.0) + jekyll (>= 3.8, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-swiss (1.0.0) + jekyll-theme-architect (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-cayman (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-dinky (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-hacker (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-leap-day (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-merlot (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-midnight (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-minimal (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-modernist (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-primer (0.6.0) + jekyll (> 3.5, < 5.0) + jekyll-github-metadata (~> 2.9) + jekyll-seo-tag (~> 2.0) + jekyll-theme-slate (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-tactile (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-time-machine (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-titles-from-headings (0.5.3) + jekyll (>= 3.3, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + jemoji (0.12.0) + gemoji (~> 3.0) + html-pipeline (~> 2.2) + jekyll (>= 3.0, < 5.0) + kramdown (2.3.2) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.3) + listen (3.7.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.3.6) + minima (2.5.1) + jekyll (>= 3.5, < 5.0) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + minitest (5.15.0) + nokogiri (1.13.6-x64-mingw-ucrt) + racc (~> 1.4) + nokogiri (1.13.6-x86_64-linux) + racc (~> 1.4) + octokit (4.23.0) + faraday (>= 1, < 3) + sawyer (~> 0.9) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (4.0.7) + racc (1.6.0) + rb-fsevent (0.11.1) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.5) + rouge (3.26.0) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + safe_yaml (1.0.5) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sawyer (0.9.1) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) + simpleidn (0.2.1) + unf (~> 0.1.4) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) + typhoeus (1.4.0) + ethon (>= 0.9.0) + tzinfo (1.2.9) + thread_safe (~> 0.1) + tzinfo-data (1.2022.1) + tzinfo (>= 1.0.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.8.2) + unicode-display_width (1.8.0) + wdm (0.1.1) + webrick (1.7.0) + zeitwerk (2.5.4) + +PLATFORMS + x64-mingw-ucrt + x86_64-linux + +DEPENDENCIES + github-pages + http_parser.rb (~> 0.6.0) + kramdown-parser-gfm + rouge + rubyzip (~> 2.3.0) + tzinfo (~> 1.2) + tzinfo-data + wdm (~> 0.1.0) + webrick (~> 1.7) + +BUNDLED WITH + 2.3.7 diff --git a/docs/_config.docker.yml b/docs/_config.docker.yml new file mode 100644 index 0000000..8822b61 --- /dev/null +++ b/docs/_config.docker.yml @@ -0,0 +1 @@ +url: "http://localhost:4000" diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..9df0c59 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,25 @@ +title: "BerryOS" +repository: "0rax/BerryOS" +remote_theme: "just-the-docs/just-the-docs" +color_scheme: "light" +logo: "/assets/berryos-logo.png" +search_enabled: true +search: + heading_level: 2 + rel_url: true + button: false +aux_links: + "BerryOS on GitHub": + - "https://github.com/0rax/BerryOS" +aux_links_new_tab: true +heading_anchors: true +back_to_top: true +back_to_top_text: "Back to top" +footer_content: "Copyright © 2022 Jean-Philippe Roemer. Distributed under an ISC license." +gh_edit_link: true +gh_edit_link_text: "Edit this page on GitHub." +gh_edit_repository: "https://github.com/0rax/BerryOS" +gh_edit_branch: "main" +gh_edit_source: docs +gh_edit_view_mode: "tree" +pa_domain: 0rax.github.io/berryos diff --git a/docs/_includes/head_custom.html b/docs/_includes/head_custom.html new file mode 100644 index 0000000..6c404a5 --- /dev/null +++ b/docs/_includes/head_custom.html @@ -0,0 +1,4 @@ +{% if site.pa_domain != nil %} + +{% endif %} + diff --git a/docs/assets/berryos-banner.png b/docs/assets/berryos-banner.png new file mode 100644 index 0000000000000000000000000000000000000000..9bf0dede371a824b702bcc35be48d7a76d9078c1 GIT binary patch literal 8743 zcmbVSRaBh8lKydr;O_3ho#5^;F!*30IKd$h+zIXw2<|XA1RE^DLU4Bv65Jsyci;Bm zzHGmAm-ScGeY#GaQys0Pp@@Y}h7JG#ma>wZ4gerR0RXNK72%aL#0g7$o$9sJ^yFV& zUS5~a&(A9>D<~)^*Voq%4-a&7bk)_>5D289q2b`*;Q08Mlan(dB4S`*U~+P@q@)B4 z2J`dtkBp3LZ*RxM#NgoI1Ox=w*x2al>AASL5D*ZUn3!B#T&Sw5GBY!uot??Z$Rs8v zdV70QQc{kOkLTy-r>3Uf-rjn6cyxAl=H%pPX=y1aC^R=WZ)|Lkl9Jln+h=BG1_uYv z&d!R8iuUyMw70iQNJ!Y)+LB)WTmb-D9%VUcJ)foH-r!gFfuL{C6~qVGYVUYc?BK>zO%-t}o&og5YZt+-W-ltX+$W~fMbViSWFDlOyAGj(;1kuMqvm>hJs z^+E;9=;6Qk%kh8xy-QHhSsx@POe?-KX!T`T&i)8)Z?XJv^|uaCw_vg05 ztH=Cz-fIRHcfxk9^JyxsLhR1=qrn+xpMocaOJ8Vk6Gp>;Wj0}N~QozUK_t{{U-EKPvflPd>8}yVp4;t2LllP(8AB!=)~>JxVC3#)fA%H zP*;!?0|bRiO|wRVG;e&57EEfkF9hd?ie8!RrGn`G_b}=sT0U0gT&^QBfPsGoBNOWJ zo`S!C`&^Xl4>}+W{v&VXy;kwjwL8^{N`RLLaMhZ@a0N!B1TZ`=R{}JPn78{!_`ejEHz%`87X@b$$AZppz@kd8PmvqHXH(X zx87aZoYu5R>YFST57{LCl3!^=yg)9jo+AfG`B zDf;{9A3q)m=KeJ?4II3oT)hG}mMJD}nqC9nPVywkbzI9Q6=T?^VIw0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X5Pgvf0D literal 0 HcmV?d00001 diff --git a/docs/config/01-system.md b/docs/config/01-system.md new file mode 100644 index 0000000..2178ccf --- /dev/null +++ b/docs/config/01-system.md @@ -0,0 +1,75 @@ +--- +title: System Configuration +parent: Configuration +nav_order: 1 +permalink: /docs/config/system/ +--- + +# System Configuration +{: .no_toc } + +--- + +## Table of contents +{: .no_toc .text-delta } + +1. TOC +{:toc} + +--- + +## Introduction + +The main goal of using [`cloud-init`](https://cloud-init.io/) in BerryOS is to be able to easily configure your system during its first startup. It provides quite a lot of possibilities out of the box that we will explore here. + +Most of the example shown here are related to your [`/boot/user-data`](https://github.com/0rax/BerryOS/blob/main/rootfs/boot/user-data) file unless stated otherwise. This file is the main way you interact with `cloud-init`. + +## Configuring hostname + +Setting the system hostname can be done quite easily using the `hostname` and `manage_etc_hosts` parameters. `hostname` will define which hostname to use while `manage_etc_hosts` will make sure that the `/etc/hosts` files is updated accordingly. + +```yaml +#cloud-config +hostname: berry +manage_etc_hosts: true +``` + +Other options are available in the [Set Hostname `cloud-init` module](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#set-hostname) such as setting a fully qualified domain name using the `fqdn` directive if needed. + +## Setting the system timezone + +The timezone can be setup easily using the `timezone` directive. If set, it must be a valid file under `/usr/share/zoneinfo`. + +```yaml +#cloud-config +timezone: "Europe/London" +``` + +## Updating the system locale + +By default, BerryOS does not ship with any generated locale to save on space. This means that we cannot use the [Locale `cloud-init` module](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#locale) to update it. Instead, it should be configured post-provisioning using `localectl`. We can instruct `cloud-init` to do so using the `runcmd`, which allows us to run arbitrary commands after all other modules have run. + +For example, if we wanted to update the system locale to `en_US.UTF-8`, this could be done as follows: + +```yaml +#cloud-config +runcmd: + - localectl set-locale en_US.UTF-8 +``` + +## Using custom NTP pools + +BerryOS ships by default with `systemd-timesyncd` installed and activated to handle network time synchronization. This is pretty essential on the Raspberry Pi as it does not have a battery backed hardware clock. If you need to or want to update which NTP pools the system uses to synchronize itself, they can be updated using the [NTP `cloud-init` module](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#ntp). + +For example, to use your local pools if you are in the UK, they can be set via: + +```yaml +#cloud-config +ntp: + enabled: true + pools: + - 0.uk.pool.ntp.org + - 1.uk.pool.ntp.org + - 2.uk.pool.ntp.org + - 3.uk.pool.ntp.org +``` diff --git a/docs/config/02-users.md b/docs/config/02-users.md new file mode 100644 index 0000000..c8a5b9c --- /dev/null +++ b/docs/config/02-users.md @@ -0,0 +1,126 @@ +--- +title: User Configuration +parent: Configuration +nav_order: 2 +permalink: /docs/config/users/ +--- + +# User Configuration +{: .no_toc } + +--- + +## Table of contents +{: .no_toc .text-delta } + +1. TOC +{:toc} + +--- + +## Introduction + +BerryOS comes by default with a single accessible user created on first boot by [`cloud-init`](https://cloud-init.io/). This default user can be configured or overwritten quite easily in your [`/boot/user-data`](https://github.com/0rax/BerryOS/blob/main/rootfs/boot/user-data) file. + +## Default User + +The default user created on first boot if not configured is set up as follows: + +- Username: `pi` +- Password: `raspberry` + +You can log in with these credentials on any TTY, but you will not be able to SSH to your system using them. For security reason and to follow [the decision made by the Raspberry Pi OS team in April 2022](https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/), password based SSH access to any user must be explicitly enabled. + +### Updating user password & enabling password access + +To configure our user, update its password and allow password authentication when using SSH to log in, we will rely on the [Set passwords `cloud-init` module](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#set-passwords). + +This module exposes 3 parameters: `ssh_pwauth`, `password` and `chpasswd` which control SSH password access, the password itself and the password expiration respectively. + +Let's first update our user password using `password` and `chpasswd`. + +```yaml +#cloud-config +password: "mypassword" +chpasswd: { expire: false } +``` + +The `password` field can either be a plaintext password or a hashed version of it. On *NIX system, a password can be hashed easily using the `openssl passwd -6` command. On the other hand, here we just set the `chpasswd` parameter to `{ expire: false }` to disable password expiration. + +Finally, to enable password SSH access, we just need to set the `ssh_pwauth` parameter to true. With a hashed password, your `user-data` file would look like: + +```yaml +#cloud-config +password: $6$kEE0sV/2tz/jWBtQ$tRpM0XqKhl3xEroj837u6VCQadIoSL......nSY48unRmtsZv0 +chpasswd: { expire: false } +ssh_pwauth: true +``` + +Be careful when enabling SSH password authentication as it is inherently less secure than using SSH key based authentication. If this is an option, you should always prefer keeping it off and import your SSH keys instead + +### Importing SSH keys + +Another option available to enable SSH access is to import your SSH public keys as `authorized_keys` for the default user. This can be done quite easily using the [`ssh_authorized_keys`](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#authorized-keys) and [`ssh_import_id`](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#ssh-import-id) directives. + +You can set up your public keys explicitly using: + +```yaml +#cloud-config +ssh_authorized_keys: + - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAGEA3FSyQwBI6Z+nCSjUU ... + - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3I7VUf2l5gSn5uavROsc5HRDpZ ... +``` + +Another option is to use `ssh-import-id` which can import your public keys from GitHub or Launchpad by specifying your username of the platform prefixed by `gh` or `lp` respectively: + +```yaml +#cloud-config +ssh_import_id: + - gh:user + - lp:user +``` + +## Creating custom users + +Another option available it to create your own users instead of using the default user, all the options available for the default user can also be used for your custom users and can be used in combination. User creation is handled using the [User and Groups module](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#users-and-groups) under the `users` directive. + +By default, this directive is configured as follows: + +```yaml +#cloud-config +users: + - default +``` + +This instructs `cloud-init` to create the and configure the default user as configured by the system, you can disable this behavior by removing `default` in the list. In that case you will need to add your own user instead. + +As an example, let's create a new user named `0rax` and see what each option allows us to configure: + +```yaml +#cloud-config +users: + - name: 0rax # User name + gecos: "JP Roemer" # User description + sudo: ALL=(ALL) NOPASSWD:ALL # Allow passwordless sudo + shell: /bin/bash # Default shell + groups: # User groups + [adm, dialout, cdrom, sudo, audio, video, plugdev, games, users, input, render, netdev] + passwd: berryos # User password + chpasswd: { expire: false } # Do not expire user password + ssh_pwauth: false # Disabble SSH password auth + ssh_authorized_keys: [] # List of ssh authorized keys + ssh_import_id: + - gh:0rax # Import authorized keys from GitHub +``` + +You can also use this directive to create `system` users if the application you will be setting up requires it: + +```yaml +#cloud-config +users: +- default +- name: myapplication + shell: /usr/sbin/nologin + system: true + lock_passwd: true +``` diff --git a/docs/config/03-network.md b/docs/config/03-network.md new file mode 100644 index 0000000..8ced0a4 --- /dev/null +++ b/docs/config/03-network.md @@ -0,0 +1,129 @@ +--- +title: Network Configuration +parent: Configuration +nav_order: 3 +permalink: /docs/config/network/ +--- + +# Network Configuration +{: .no_toc } + +--- + +## Table of contents +{: .no_toc .text-delta } + +1. TOC +{:toc} + +--- + +## Introduction + +Network configuration in BerryOS is handle by [`cloud-init`](https://cloudinit.readthedocs.io/en/latest/topics/network-config.html) with the help of [`netplan`](https://netplan.io/) inside the [`/boot/network-config`](https://github.com/0rax/BerryOS/blob/main/rootfs/boot/network-config) file. + +We decided to use the [version 2 networking config format](https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html) as it is capable of configuring both the `eth0` and `wlan0` interface on the Raspberry Pi easily thanks to `netplan`'s ability to configure `systemd-networkd` renderer. + +## Default configuration + +By default, BerryOS is configured to configure the `eth0` interface using DHCP for IPv4 assignation by using the following configuration: + +```yaml +version: 2 +ethernets: + eth0: + dhcp4: true +``` + +## Connecting to a Wi-Fi network + +To connect to a Wi-Fi network, we will need to update our `network-config` file to include the necessary directive to enable the `wlan0` interface. + +```yaml +version: 2 +ethernets: + eth0: + dhcp4: true +wifis: + wlan0: + dhcp4: true + optional: true + access-points: + "My Access Point": + password: "AP Password" +``` + +From there you can specify the access point you want to by replacing `"My Acess Point"` with the SSID of your Wi-Fi network. Be careful, the SSID must be enclosed in quotation marks. You should also replace `"AP Password"` with the password of your network. + +Password do not need to be set in plain text, they can also be set directly as WPA PSK. The PSK form of a password can be generated using the [`wpa_passphrase`](https://linux.die.net/man/8/wpa_passphrase) utility on any system with `wpa_supplicant` installed. This would look like this: + +```yaml +version: 2 +ethernets: + eth0: + dhcp4: true +wifis: + wlan0: + dhcp4: true + optional: true + access-points: + "My Access Point": + password: 046ea35be8d6bd70480d233602146ff58aded1c2892d3aa67c5f6be635e8163f +``` + +## Using a static IPv4 + +To use a static IPv4 instead of using DHCP for an interface, we need to disable the `dhcp4` parameter and add the static network configuration we want using `addresses` to set up the IP / netmask combo and `routes` to set up the default route: + +```yaml +version: 2 +ethernets: + eth0: + dhcp4: false + addresses: + - 192.168.1.128/24 + routes: + - to: 0.0.0.0/0 + via: 192.168.1.1 +``` + +## Enabling IPv6 support + +In order to enable IPv6 support via DHCP for an interface, the `dhcp6` parameter of said interface should be added and set to true. For example, to enable it for the `eth0` interface, your configuration should look like: + +```yaml +version: 2 +ethernets: + eth0: + dhcp4: true + dhcp6: true +``` + +Manual configuration can also be done by using the `addresses` & `routes` parameters: + +```yaml +version: 2 +ethernets: + eth0: + dhcp4: false + dhcp6: false + addresses: + - 192.168.1.128/24 + - 2001:cafe:face:beef::dead:dead/64 + routes: + - to: 0.0.0.0/0 + via: 192.168.1.1 + - to: ::/0 + via: 2001:cafe:face::1 +``` + +## References + +- [`cloud-init` Networking Config Version 2](https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html) +- [`netplan` Reference Manual](https://netplan.io/reference/) +- [`netplan` Configuration Examples](https://netplan.io/examples/) + +> **Note** +> +> The [`netplan` documentation](https://netplan.io/examples/#using-dhcp-and-static-addressing) shows that a default route can be configured with the `default` alias as the `to` target in `routes`. This **does not work** on BerryOS as it is not currently supported by the `networkd` renderer, you **must** use the `0.0.0.0/0` or `::/0` form instead. +> diff --git a/docs/config/04-packages.md b/docs/config/04-packages.md new file mode 100644 index 0000000..a0c19fa --- /dev/null +++ b/docs/config/04-packages.md @@ -0,0 +1,71 @@ +--- +title: Package Management +parent: Configuration +nav_order: 4 +permalink: /docs/config/packages/ +--- + +# Package Management +{: .no_toc } + +--- + +## Table of contents +{: .no_toc .text-delta } + +1. TOC +{:toc} + +--- + +## Introduction + +During first boot, [`cloud-init`](https://cloud-init.io/) can be asked to manage enabled repositories, installed packages or even upgrade your system using the [Package module](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#package-update-upgrade-install) in your [`/boot/user-data`](https://github.com/0rax/BerryOS/blob/main/rootfs/boot/user-data) file. + +## Installing packages + +To install packages during the system provisioning phase you need to configure both the `package_update` & `packages` parameters. `package_update` instruct the system to refresh the local package list from configured repositories and `packages` define the list of package to install. + +For example, if you wanted to install the `vim` and `htop` packages during provisioning, it would look like this: + +```yaml +#cloud-coufig +package_update: true +packages: + - vim + - htop +``` + +## Updating system packages + +It is also possible, and recommended, to upgrade all existing package in the system at first-boot. This will make sure that your newly configured system is up-to-date with the latest security fixes available. + +To do we, we will need to use the `package_update` and `package_upgrade` directives, we can also use the `package_reboot_if_required` parameter to define if we want the `cloud-init` to reboot the system if a package requiring it has been updated. This can be important if the kernel is updated though might not be required if you instruct `cloud-init` to reboot the system post-provisioning using the [Power State module](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#power-state-change). + +```yaml +#cloud-coufig +package_update: true +package_upgrade: true +package_reboot_if_required: true +``` + +## Adding extra repositories + +There might be cases where you want to set up extra package repositories to install packages not available in the official Debian ones. This can be done quite easily using the [Apt Configure `cloud-init` module](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#apt-configure). + +For example, to add the Docker CE repository to your system, you would set it up as follows (replace `` with its real data): + +```yaml +#cloud-coufig +apt: + preserve_sources_list: true + sources: + docker-ce.list: + source: "deb [arch=armhf] https://download.docker.com/linux/raspbian bullseye stable" + key: | + -----BEGIN PGP PUBLIC KEY BLOCK----- + + -----END PGP PUBLIC KEY BLOCK----- +``` + +A complete configuration that also install and configure `docker` is available [here](https://github.com/0rax/BerryOS/blob/main/examples). diff --git a/docs/config/index.md b/docs/config/index.md new file mode 100644 index 0000000..df2cbd1 --- /dev/null +++ b/docs/config/index.md @@ -0,0 +1,8 @@ +--- +title: Configuration +has_children: true +nav_order: 4 +permalink: /docs/config/ +--- + +# Configuration diff --git a/examples/docker-ce-arm64/user-data b/docs/examples/docker-ce/arm64/user-data similarity index 94% rename from examples/docker-ce-arm64/user-data rename to docs/examples/docker-ce/arm64/user-data index cee1d8d..0e56679 100644 --- a/examples/docker-ce-arm64/user-data +++ b/docs/examples/docker-ce/arm64/user-data @@ -2,14 +2,20 @@ # vim: syntax=yaml # +## Setup hostname hostname: berryos-docker-arm64 manage_etc_hosts: true +## Create users (respect OS default) users: - default -timezone: "Etc/UTC" +## Configure default user access +password: berryosd +chpasswd: { expire: false } +ssh_pwauth: true +## Add `docker-ce` APT repository apt: preserve_sources_list: true sources: @@ -79,6 +85,7 @@ apt: =0YYh -----END PGP PUBLIC KEY BLOCK----- +## Update system and install required packages package_update: true package_upgrade: false packages: @@ -86,6 +93,7 @@ packages: - docker-ce-cli - docker-compose-plugin +## Start and enable docker & add the default user to the docker group runcmd: - systemctl enable --now docker - usermod -aG docker pi diff --git a/examples/docker-ce-armhf/user-data b/docs/examples/docker-ce/armhf/user-data similarity index 94% rename from examples/docker-ce-armhf/user-data rename to docs/examples/docker-ce/armhf/user-data index 64a8b7d..8223bcc 100644 --- a/examples/docker-ce-armhf/user-data +++ b/docs/examples/docker-ce/armhf/user-data @@ -2,14 +2,20 @@ # vim: syntax=yaml # +## Setup hostname hostname: berryos-docker-armhf manage_etc_hosts: true +## Create users (respect OS default) users: - default -timezone: "Etc/UTC" +## Configure default user access +password: berryosd +chpasswd: { expire: false } +ssh_pwauth: true +## Add `docker-ce` APT repository apt: preserve_sources_list: true sources: @@ -79,6 +85,7 @@ apt: =0YYh -----END PGP PUBLIC KEY BLOCK----- +## Update system and install required packages package_update: true package_upgrade: false packages: @@ -86,6 +93,7 @@ packages: - docker-ce-cli - docker-compose-plugin +## Start and enable docker & add the default user to the docker group runcmd: - systemctl enable --now docker - usermod -aG docker pi diff --git a/docs/examples/docker-ce/index.md b/docs/examples/docker-ce/index.md new file mode 100644 index 0000000..a7ba9df --- /dev/null +++ b/docs/examples/docker-ce/index.md @@ -0,0 +1,20 @@ +--- +title: Install Docker CE +parent: Examples +nav_order: 1 +permalink: /docs/examples/docker-ce/ +--- + +# Install Docker CE + +## On `BerryOS/armhf` + +```yaml +{% include_relative armhf/user-data %} +``` + +## On `BerryOS/arm64` + +```yaml +{% include_relative arm64/user-data %} +``` diff --git a/docs/examples/index.md b/docs/examples/index.md new file mode 100644 index 0000000..01c5770 --- /dev/null +++ b/docs/examples/index.md @@ -0,0 +1,10 @@ +--- +title: Examples +has_children: true +nav_order: 99 +permalink: /docs/examples/ +--- + +# Cloud Config Examples + +Other examples can be found in the official [`cloud-init` documentation](https://cloudinit.readthedocs.io/en/latest/topics/examples.html). diff --git a/docs/examples/log2ram/index.md b/docs/examples/log2ram/index.md new file mode 100644 index 0000000..e3e5e59 --- /dev/null +++ b/docs/examples/log2ram/index.md @@ -0,0 +1,12 @@ +--- +title: Log2Ram Setup +parent: Examples +nav_order: 2 +permalink: /docs/examples/log2ram/ +--- + +# Log2Ram Setup + +```yaml +{% include_relative user-data %} +``` diff --git a/examples/log2ram/user-data b/docs/examples/log2ram/user-data similarity index 96% rename from examples/log2ram/user-data rename to docs/examples/log2ram/user-data index 76b85f1..9d58495 100644 --- a/examples/log2ram/user-data +++ b/docs/examples/log2ram/user-data @@ -10,7 +10,12 @@ manage_etc_hosts: true users: - default -## Setup extra APT source.list +## Configure default user access +password: berryosd +chpasswd: { expire: false } +ssh_pwauth: true + +## Add `azlux` APT repository apt: preserve_sources_list: true sources: @@ -96,6 +101,7 @@ write_files: COMP_ALG=lz4 LOG_DISK_SIZE=150M +## Start log2ram on boot runcmd: - systemctl enable log2ram diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..34804a37f2c9cc75c459aae5527a3ae6b998cf86 GIT binary patch literal 6841 zcmaiYWmFW}_x8{oLw9!%At~hyB_Z84gmg*>LrD$|lF~>cA)ufV<1loINJt1nOQ!=U z^5@?B<^Axk_4~Bfv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yrcri$)wEsK7~qqI|4E`a_h4D#&YNa-0L-08@jy`+^khKJ7@n#~Dt zEIE(4W2HX>Zd+l!a(|xt`i)4N5j;?`^OG5ZhSw+U9#?M7*53s-0VXET^X}mpJFm}+ z6pndfiTt?yZoAlcOs-t*Ek!e}#NbsQfqxeT-A(IMj>K3MpN%lWrqa;LT*^Yg;g~t_ zjI7Hn+WiHqU(QRHaV5pVYFlB%a!J7=bu|>Vy!mzvlH`e3kg+<9@9dJr^2=XI-`dia z#QXK>orGj}?odqD0_|Ey&dNLN2Lk^38*8Zn<@XoXHnkBhw}vY&7@E;dpY2HlgPNk> z=`827xVQi(jy9ahf}5geb&6lgNW6BNb7<0qI!Q~O%gpPNC!pPgf2qCwMASO%jQ8Gn z8&#D{hyX2I2m9QnrLNc;t>gCxu?OaKZNWWbeo)Q5%(CT4-=s9|C_Mhond1(z&#Pk% zofdH$`VP}V^d9ddtBc1O@nO+9>|iD{iS-74AS9xdb;lHDrq7vRe_tOa{qcU1wvGlK zzztC|g}Vf)#cW3P0eKF>oypq_KnUxn_7^mVfMgF&74rHV{>h<9 zbD^>mf>zoU@O$xombBhGZ%3`_N`{QymR}W_Ix@p63)eq+2f{fbU;OQIod$!LZ{LME zX;n8&r$-hIYHT7q-$=0C&bHHG8ZD`u=x&bAW}ThRe-JuXch=tlPG+OSW(Ot~7zOlf zG!l#(g&x6svyPkZm3qw3%2~-X;`FgAXbsL=CwGNDjRbNpp=o%x)H~81wU0i0uTphc zWNcR->D!O<7*8v zh!wMHkEQYFOA}r#&|h&HsV<_mnjM)>xcoQ;i%hDor#&^rqUEsVEpItcI`YIIl7bSK k(y0*f$fR+HRaHBw#^kc<^gAp*72%I)llRsC@0;uY00RBFSpWb4 literal 0 HcmV?d00001 diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md new file mode 100644 index 0000000..c04a46e --- /dev/null +++ b/docs/getting-started/index.md @@ -0,0 +1,9 @@ +--- +title: Getting Started +nav_order: 3 +permalinkg: /docs/getting-started/ +--- + +# Getting Started + +## Work in progress diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..1a91323 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,13 @@ +--- +title: Home +nav_order: 1 +permalink: / +--- + +# ![BerryOS](assets/berryos-banner.png) + +[Download latest release](https://github.com/0rax/BerryOS/releases/latest){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [View it on GitHub](https://github.com/0rax/BerryOS){: .btn .fs-5 .mb-4 .mb-md-0 } + +--- + +## Work in progress diff --git a/docs/overview/index.md b/docs/overview/index.md new file mode 100644 index 0000000..77b3e6a --- /dev/null +++ b/docs/overview/index.md @@ -0,0 +1,9 @@ +--- +title: Overview +nav_order: 2 +permalinkg: /docs/overview/ +--- + +# Overview + +## Work in progress diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index da70705..0000000 --- a/examples/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# BerryOS Cloud Config Examples - -Available examples: - -- [Install Docker CE on `BerryOS/arm64`](docker-ce-arm64/user-data) -- [Install Docker CE on `BerryOS/armhf`](docker-ce-armhf/user-data) -- [Install & configure Log2Ram](log2ram/user-data) - -Other examples can be found in the official [`cloud-init` documentation](https://cloudinit.readthedocs.io/en/latest/topics/examples.html). diff --git a/rootfs/boot/user-data b/rootfs/boot/user-data index 96df221..a8f1599 100644 --- a/rootfs/boot/user-data +++ b/rootfs/boot/user-data @@ -11,17 +11,6 @@ # # - https://cloudinit.readthedocs.io/en/latest/topics/modules.html#set-hostname # # - https://cloudinit.readthedocs.io/en/latest/topics/modules.html#update-etc-hosts -# ## Configure NTP pools -# ntp: -# enabled: true # Enable NTP module -# pools: # Specift custom pool uri -# - 0.uk.pool.ntp.org -# - 1.uk.pool.ntp.org -# - 2.uk.pool.ntp.org -# - 3.uk.pool.ntp.org -# # Reference(s): -# # - https://cloudinit.readthedocs.io/en/latest/topics/modules.html#ntp - # ## Configure default user access # password: berryos # Set default user password # chpasswd: { expire: false } # Do not expire password after first login @@ -44,7 +33,7 @@ # shell: /bin/bash # Set user default shell # groups: # Set user groups # [adm, dialout, cdrom, sudo, audio, video, plugdev, games, users, input, render, netdev] -# plain_text_passwd: berryos # Set user password +# passwd: berryos # Set user password # chpasswd: { expire: false } # Do not expire password after first login # ssh_pwauth: true # Allow SSH password auth for the user # ssh_authorized_keys: # Set SSH authorized keys for the user @@ -60,6 +49,17 @@ # # Reference(s): # # - https://cloudinit.readthedocs.io/en/latest/topics/modules.html#timezone +# ## Configure NTP pools +# ntp: +# enabled: true # Enable NTP module +# pools: # Specift custom pool uri +# - 0.uk.pool.ntp.org +# - 1.uk.pool.ntp.org +# - 2.uk.pool.ntp.org +# - 3.uk.pool.ntp.org +# # Reference(s): +# # - https://cloudinit.readthedocs.io/en/latest/topics/modules.html#ntp + # # Update package list, upgrade system or install new packages on first boot # package_update: true # Update package list # package_upgrade: true # Update system package on first-noot