Solution for CI/CD?

Hi !

I am a huge fan of Yunohost that I use for maybe about 4 years. With no special background in IT, it allows me to do pretty much everything I can dream of in a self hosted and clean environment. Thanks a lot everyone for your dedication and great work !

I run several Yunohost instances that are installed on OVH VPS.

Apart from the webapps, I have a few custom-made static websites generated with Hugo (built from RStudio with the Blogdown package), so they’re not very complicated and I can easily host them on my Yunohost instances thanks to the my webapp with SFTP access.

I currently use Gitea for versioning and I’ve been trying to set up self hosted continuous integration and deployment for those websites to be automatically rebuild upon commits. This would also provide new possibilities (like easier collaboration with my teams and integration of a self hosted comment management with Staticman).

All apps I could find for this purpose seems not to be maintained anymore (Jenkins and Drone) except Gitlab which is very heavy and kind of looses me with all its features but mostly that I cannot manage to set up correctly (every time I try to enable the Gitlab Pages service, I end up breaking Nginx…).

So I don’t really know what direction to take.

I have no knowledge in app packaging. I am thinking maybe installing Drone in a Docker container could do the trick. But I’ve never used Docker and I couldn’t really manage to understand how to integrate Docker in Yunohost (and all apps I found on the matter - like those listed in #678 - don’t seem to be maintained anymore, and this ).

So my question is as follow: Does anyone have a solution for CI/CD with Yunohost? And is installing an app like Drone as a Docker image in Yunohost a viable option for this purpose?

Maybe Gitlab is the way to go as its integration in Yunohost seems solid, but I find documentation very scarce and set up quite difficult. As for my last try:

  • I added pages_external_url “http://pages.gitlab.mydomain.fr/” in /etc/gitlab/gitlab-persistent.rb
  • ran the gitlab-ctl reconfigure command which ended with the following error:
There was an error running gitlab-ctl reconfigure:
runit_service[nginx] (nginx::enable line 18) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx ----
STDOUT: timeout: down: /opt/gitlab/service/nginx: 1s, normally up, want up
STDERR: 
---- End output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx ----
Ran /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx returned 1  

If anyone could share its working workflow or set me on the right tracks I am ready to contribute in any way (like providing a documentation or something).

Bonjour à tous !

Je fais une traduction pour les francophones :slight_smile:

J’adore Yunohost que je dois utiliser depuis environ 4 ans.J’ai aucun bagage particulier en informatique mais grâce à Yunohost j’arrive fonctionner dans un environnement largement autohébergé. Merci à tous les contributeurs !

J’ai plusieurs instances Yunohost, toutes installées sur des VPS chez OVH.

En dehors des applications, j’utilise aussi Yunohost pour héberger des sites internets statiques (générés avec Hugo à partir de RStudio/Blogdown pour ceux que ca intéresse) grâce à l’application my webapp et son accès SFTP.

J’utilise Gitea pour le versionnage et j’essaie de mettre en oeuvre l’intégration et le déploiement continu qui permettrait de re-générer les sites automatiquement à chaque commit. Cette solution m’ouvrirai de nouvelles possibilités en terme de collaboration mais aussi pour la gestion des commentaires par exemple (avec des solutions Staticman).

Toutes les applications que j’ai trouvé semblent ne plus être maintenues (Jenkins et Drone) sauf Gitlab. Mais Giitlab est assez lourd. Je me perds dans toutes les fonctionnalités et surtout je ne parviens pas à configurer le service Gitlab Pages (a chaque fois je finis par casser Nginx…).

Donc je ne sais pas trop dans quelle direction aller. Je n’ai aucune connaissance en packaging d’applications. Je pensais qu’une bonne option pourrait être d’installer Drone dans un conteneur Docker. Mais je n’ai jamais utilisé Docker et je n’arrive pas à comprendre comment intégrer Docker à Yunohost (toutes les applications que j’ai pu trouver - comme celles évoquées dans cette conversation #678 - semblent ne plus être maintenues).

Donc ma question est la suivante : Est-ce que quelqu’un aurait une solution pour l’intégration continue avec Yunhost ?
Et est-ce qu’installer une application comme Drone dans un conteneur Docker dans Yunohost est une option viable ?

Peut-être que la meilleure option est d’utiliser Gitlab qui est bien intégré dans Yunohost mais la configuration est difficile. Lors de mon dernier essai:

  • J’ai ajoutée pages_external_url “http://pages.gitlab.mondomain.fr/” in /etc/gitlab/gitlab-persistent.rb
  • puis lancé la commande : gitlab-ctl reconfigure qui m’a donné l’erreur suivante :

There was an error running gitlab-ctl reconfigure:
runit_service[nginx] (nginx::enable line 18) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx ----
STDOUT: timeout: down: /opt/gitlab/service/nginx: 1s, normally up, want up
STDERR:
---- End output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx ----
Ran /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx returned 1

  • et maintenant quand je me rends gitlab.mydomain.fr, je tombe sur 522 Bad Gateway Nginx error.

je serais très reconnaissant si quelqu’un pouvais partager une solution qui fonctionne correctement ou juste m’orienter dans une bonne direction.
Au besoin, je suis prêt à contribuer pour faciliter la reproduction de la solution en rédigeant une documentation par exemple.