"ci_ynh" -> Package Check as YunoHost app using Django

I just start GitHub - YunoHost-Apps/ci_ynh: Experimental YunoHost package check as a YunoHost app using Django... as a experiment…

The idea is to run something like the package check via YunoHost App. So every developer can easy maintain a own “CI Server” for his own projects, just by install “ci_ynh” :wink:

I plan to use these tools:

  • Django admin as “WebGUI” (managing the list of which packages to check, see results etc)
  • Huey task queue that will run the package checks

The idea is to install/backup/deinstall/restore one package and check if it’s available. Collect the output and store everything in the database.

But I will probably only have time for a first prototype.

See also:

2 Likes

I added a first source code dump :wink:

The question is: how to execute something like: “install package XY” ?
Currently i call something like: sudo yunohost app install ... via subprocess, here:

But that may not be a really good idea. At least, because of using sudo

It’s a little bit active (After i start Huey worker manually):

grafik

grafik

(Looks ugly because of not existing translations)

I am trying this approach right now:

I create a second user, add him to “sudo” group and start Huey worked as these user.

See: WIP: Use different user for Huey worker and add it to sudoes · YunoHost-Apps/ci_ynh@4d36254 · GitHub

But failed with:

Any ideas?

e.g.: Can i talk to a API endpoint to install/deinstall packages?!?

I try to run Huey task query as root, see: Run Huey as root · YunoHost-Apps/ci_ynh@afbdcbc · GitHub

Anybody with a better idea?

What’s about to create a user without need to enter the sudo password?!?
Or create a root service that handle the installation?

Any idea?

…but maybe it’s generally a bad idea to install the package directly and not using something like LXC. Because if the installation is faulty then we may stick with a unknown state and a de install may not cleanup everything.