From d6ed8c78d22b99cac1028460e76fb13545492477 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Thu, 22 Feb 2024 05:55:00 -0800 Subject: [PATCH] fix(archivebox): Remove unused `postgres` section from `questions.yaml`, add docs (#18488) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** The `postgres` section in `questions.yaml` was added by accident in the [original new chart PR](https://github.com/truecharts/charts/pull/18258) because I copy-pasted a template from an existing project to modify and didn't notice that line. Additional minor changes included: - enable pod `liveness` `probe` on `/health/` by default - explicitly set `runAsNonRoot: false` and ingress port `protocol: http` - add new `docs/installation_guide.md` **โš™๏ธ Type of change** - [ ] โš™๏ธ Feature/App addition - [x] ๐Ÿ“– Documentation addition - [x] ๐Ÿช› Bugfix - [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] ๐Ÿ”ƒ Refactor of current code **๐Ÿงช How Has This Been Tested?** Tested in TrueNAS scale by installing incubator chart `archivebox` and setting postgres instaces to 0. **๐Ÿ“ Notes:** I still need help with a `missing Chart.yaml` error to get this working: - https://github.com/truecharts/charts/pull/18258#issuecomment-1958457400 - https://www.reddit.com/r/truenas/comments/1awtcbw/help_with_contributing_new_archivebox_chart/ **โœ”๏ธ Checklist:** - [x] โš–๏ธ My code follows the style guidelines of this project - [x] ๐Ÿ‘€ I have performed a self-review of my own code - [x] #๏ธโƒฃ I have commented my code, particularly in hard-to-understand areas - [x] ๐Ÿ“„ I have made corresponding changes to the documentation - [ ] โš ๏ธ My changes generate no new warnings - [ ] ๐Ÿงช I have added tests to this description that prove my fix is effective or that my feature works - [ ] โฌ†๏ธ I increased versions for any altered app according to semantic versioning --------- Signed-off-by: Nick Sweeting Signed-off-by: Kjeld Schouten Co-authored-by: Kjeld Schouten --- .../archivebox/docs/installation_guide.md | 59 +++++++++++++++++++ charts/incubator/archivebox/questions.yaml | 1 - charts/incubator/archivebox/values.yaml | 6 ++ 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 charts/incubator/archivebox/docs/installation_guide.md diff --git a/charts/incubator/archivebox/docs/installation_guide.md b/charts/incubator/archivebox/docs/installation_guide.md new file mode 100644 index 00000000000..3f262e0ca1f --- /dev/null +++ b/charts/incubator/archivebox/docs/installation_guide.md @@ -0,0 +1,59 @@ +--- +title: Installation Guide +--- + +## SCALE App +1. to setup archivebox: + +- `App Configuration > Admin Username & Admin Password` + Configure an initial admin username and password you want to log in with in the Web UI (only applied on first setup run). + Screenshot of example Admin Username & Password configuration + +- `Networking and Services > Service's Port(s) Configuration > Port` + Configure the port you want to access the ArchiveBox web interface on, or use the pre-populated default. + Screenshot of example Archivebox webserver port configuration + + +- `Storage and Persistence > App Data Storage` + Setup persistent a persistent storage volume to use for your ArchiveBox `/data` directory. + We recommend using a `Host Path` with `Automatic Permissions Configuration` disabled. + Screenshot of example App Data Storage configuration + Make sure whatever filesystem the data is located on supports FSYNC and doesn't squash permissions. + (NFS servers may need to set no_root_squash + no_all_squash) + For more info about ArchiveBox's filesystem requirements, see here: + - [ArchiveBox Filesystem Requirements](https://github.com/ArchiveBox/ArchiveBox#storage-requirements) + - [ArchiveBox Troubleshooting: Filesystems, NFS, FSYNC](https://github.com/ArchiveBox/ArchiveBox/wiki/Upgrading-or-Merging-Archives#filesystem-doesnt-support-fsync-eg-network-mounts) + - [ArchiveBox Issue #742](https://github.com/ArchiveBox/ArchiveBox/issues/742) (example of common filesystem issue with NFS) + + +- `Containers > Main Container > Extra Environment Variables` **(optional)** + Optionally add any other [ArchiveBox Configuration](https://github.com/ArchiveBox/ArchiveBox/wiki/Configuration) variables you want here. + Screenshot of example Archivebox extra configuration + + +2. โœ… Then **click `Install`** at the bottom, and wait a few minutes for it to finish deploying. + +3. Once deployed, **click `Applications > ArchiveBox > Web Portal` to access ArchiveBox** . + Screenshot TrueNAS Apps UI to access Web Portal + Screenshot ArchiveBox UI open in browser + Click the `Log In` (upper right) and proceed with the admin username and password you configured above. + Screenshot of ArchiveBox UI login page + Optionally change your password from the initial value by going to `Account` in the navbar (`/admin/password_change/`). + Screenshot of ArchiveBox navbar highlighting Account and Add buttons + Click `Add` in the menubar to get started adding new URLs to archive. + +--- + +## Further Reading + +- [ArchiveBox Documentation](https://github.com/ArchiveBox/ArchiveBox/wiki/) +- [ArchiveBox UI Usage](https://github.com/ArchiveBox/ArchiveBox/wiki/Usage#ui-usage) +- [ArchiveBox Security Overview](https://github.com/ArchiveBox/ArchiveBox/wiki/Security-Overview) +- [ArchiveBox Configuration](https://github.com/ArchiveBox/ArchiveBox/wiki/Configuration) +- [ArchiveBox Hosting Guide](https://github.com/ArchiveBox/ArchiveBox/wiki/Publishing-Your-Archive) +- [ArchiveBox Changelog](https://github.com/ArchiveBox/ArchiveBox/releases) + +### Ask For Help + +- [Archivebox Bug Tracker](https://github.com/ArchiveBox/ArchiveBox/issues) +- [ArchiveBox Community Forum / Chat Server](https://zulip.archivebox.io) diff --git a/charts/incubator/archivebox/questions.yaml b/charts/incubator/archivebox/questions.yaml index d044a59c25d..ce08a75d908 100644 --- a/charts/incubator/archivebox/questions.yaml +++ b/charts/incubator/archivebox/questions.yaml @@ -101,7 +101,6 @@ questions: type: int default: 568 # Include{resources} -# Include{postgresql} # Include{advanced} # Include{addons} # Include{codeserver} diff --git a/charts/incubator/archivebox/values.yaml b/charts/incubator/archivebox/values.yaml index 0987f8c24e0..f515a98f626 100644 --- a/charts/incubator/archivebox/values.yaml +++ b/charts/incubator/archivebox/values.yaml @@ -10,6 +10,7 @@ config: securityContext: container: readOnlyRootFilesystem: false + runAsNonRoot: false runAsGroup: 0 runAsUser: 0 @@ -18,6 +19,7 @@ service: ports: main: port: 9598 + protocol: http targetPort: 8000 workload: @@ -25,6 +27,10 @@ workload: podSpec: containers: main: + probes: + liveness: + type: http + path: /health/ env: ADMIN_USERNAME: "{{ .Values.config.admin_username }}" ADMIN_PASSWORD: "{{ .Values.config.admin_password }}"