Skip to content

Improve kernelci-api user experience on initial install#647

Open
nuclearcat wants to merge 3 commits intokernelci:mainfrom
nuclearcat:fix-install
Open

Improve kernelci-api user experience on initial install#647
nuclearcat wants to merge 3 commits intokernelci:mainfrom
nuclearcat:fix-install

Conversation

@nuclearcat
Copy link
Member

And also it will make automation a bit easier.

Add automatic initial-admin provisioning during API startup.
Behavior:
- On startup, check whether any superuser exists.
- If none exists, require KCI_INITIAL_PASSWORD and create the first admin.
- If KCI_INITIAL_PASSWORD is missing in that case, fail fast and exit.
- Support optional KCI_INITIAL_ADMIN_USERNAME and KCI_INITIAL_ADMIN_EMAIL for identity defaults.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Update documentation to describe automatic initial admin creation via KCI_INITIAL_PASSWORD
and optional identity env vars. Remove references to manual setup_admin_user flow and
delete scripts/setup_admin_user.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Fail fast during startup with a single clear validation error
for required environment variables instead of piecemeal runtime
failures.
Validated at startup:
- SECRET_KEY
- MONGO_SERVICE
Also make MONGO_SERVICE mandatory in DB initialization
and update env/docs to reflect required first-boot configuration.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant