GRI-1937: setup wizard, setup mode and Settings screen #145
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!145
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/GRI-1937-setup-wizard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part 3 of the plan on GRI-1937 (document
setup-wizard-plan): a first-run setup wizard and a Settings screen, so a non-technical admin can set the server up from the browser.Server
/health, the setup status, the settings routes and two database routes. Every other/api/v1path answers503 setup_required.config.databaseis now optional;config.toml.exampleno longer sets a placeholder URL.settings.file, default/var/lib/grimoire-signage/settings.toml, mode 0600). It sits betweenconfig.tomland the environment. The panel cannot writeconfig.toml:/etcis read-only to the service under the systemd unit. A value set by anSIGNAGE_*variable is reported asenvironmentand refused on write (setting_locked).SIGNAGE_HTTP_PUBLIC_URL,SIGNAGE_SETTINGS_FILE,SIGNAGE_ENROLMENT_TRUSTED_PROXIES(comma list).GET/PUT /api/v1/settings,POST /api/v1/server/restart,POST /api/v1/setup/database/test,POST /api/v1/setup/database.GET /setup/statusaddsdatabase_configured.execof/proc/self/exe(same PID; works under systemd, Docker, Kubernetes and a shell). Ifexecfails, the process exits 75 and the supervisor restarts it.CREATEonpublic, the right a hand-made database most often lacks. Both database routes answer409once a database exists, so they cannot be used to make the server probe other hosts.POST /setupalready lets anybody create the first admin.Panel
psql/createdbcommands to create it, a test button, and save + restart.Settings (new nav entry) shows the same values with their source, locks environment-set values, saves, and offers "Restart now".
Installer
--nativewithout PostgreSQL: pressing Enter at the URL question (or no terminal) now starts the server in setup mode, and the panel asks for the database. Before, the installer stopped with an error.database.envdrop-in is optional (EnvironmentFile=-).Tested
cargo clippy --all-targets -D warnings,cargo fmt --check: clean.cargo test -p server --include-ignoredagainst Postgres: everything passes except two PDF tests. They needpdftoppm, which this build host does not have; CI does.npm run check: 31 tests (new: proxy/no-proxy flow, trust-all warning, database step, Settings save + restart).Not in this PR: the upgrade documentation per install type (item 4).