Unattended setup wizard

Hello everyone
I am trying to package indico for yunohost.
But I failed to get indico setup wizard non interactive.
I don’t remember precisely what I have tried.
Any help would be very appreciated
Thanks

The solution is to not run it at all. Create the config file and directories manually (or rather automatically ;)), and run the indico setup create-symlinks command to create the wsgi file and static symlink.

You may also want to create the ~/.indico.conf symlink pointing to the config file so there’s no need for an INDICO_CONFIG env var.

I recommend having a look at the code of indico/cli/setup.py to see what the wizard does.

1 Like

I will check that and come back to you.
Thanks for the fast reply

Thanks, it works. The install goes till the end without noticeable problems.
YunoHost has a validation process that checks for errors after a successful install. This check fails :


 > Validating that the app indico can/can't be accessed with its URL...

URL     : https://sub.domain.tld/    (redirected to: https://sub.domain.tld/bootstrap)
Title   : Indico - Hello there!
Content extract:
Hello there!
Indico needs just a little bit more data from you...

English

Deutsch (Deutschland)

E
Assets  :
  - FAIL (code 404) https://sub.domain.tld/dist/css/common.c31173ad.css
  - https://sub.domain.tld/assets/i18n/en_GB.js
Errors  :
    - Asset https://sub.domain.tld/dist/css/common.c31173ad.css (automatically derived from the page's html) answered with code 404, expected 200? Effective url: https://sub.domain.tld/dist/css/common.c31173ad.css
FAIL

Full log

I checked on a browser, there are no 404 errors and the file exists.
The ci checks use curl, in case it matters.

The install script here

Are you sure your Python versions are correct? I see references to Python 3.11 in the output, but Indico requires 3.12, so while it may technically work on 3.11, installing it correctly should actually fail because of requires-python = '>=3.12.2, <3.13' in the package metadata.

Maybe add indico --version since there’s right now a very good chance that you are getting an older (and unsupported) Indico version (3.2.x), since only 3.3 declares compatibility with (and requires) Python 3.12.

This one should not be needed at all, it’s covered by indico setup create-symlinks:

ln -s $install_dir/.venv/lib/python$python_version/site-packages/indico/web/static $install_dir/web/static

Anyway, for anything that 404s maybe add explicit ls -l commands to your setup script to confirm the file exists (and check what else is in the folder if not)…


BTW, you should run these two commands before running indico db prepare etc to get rid of the warnings about a missing logging config:

indico setup create-symlinks $install_dir
indico setup create-logging-config $install_dir/etc

I am very grateful for your help.

Yes, yunohost uses the default python version shipped with debian 12. I have added an install function for it.

Yes, when I open the app administration, I get a notification about available updates.

There are no errors anymore using python 3.12.7

Done :+1:

Now I have to make backup, restore, upgrade and change_url work correctly. This won’t be hard (I hope). It will take time for checking all possible scenarios and debugging.

Btw, can the admin user be created inside the script using indico user create --name $name --email $email --etc $etc or should I handle it using curl?

I am very happy to announce that indico is available in the yunohost catalog :
https://apps.yunohost.org/app/indico
Here is the package repo :

For testing it, you need to install yunohost on a server, vps or pc, virtual machine, raspberry pi, etc…

I am also happy I found indico, I learn new things while packaging it.
Thanks a lot for your help. I have a lot of questions since I am planning to use it in our university.

1 Like