4 ms·
I'm a fan of this approach in general, but I've been looking for a way to accomplish almost the same thing, except I would like to have the version defined in a
by xmodem 3y ago
I'm a fan of this approach in general, but I've been looking for a way to accomplish almost the same thing, except I would like to have the version defined in a git repository.
I suppose I could git pull on a cron job, copy over the systemd unit files, and restart, but I'd like to have just a little more smarts than that. I've been working on my own tool to accomplish this but it's not super stable just yet.
- gkhartman 3y agoI've been using Ansible to deploy ~10 services from git repos to a set of KVMs. After paying the time tax of writing the playbooks, I just update a release version variable for the service I want to update and rerun the playbook. It will even take care of the systemd restarts. I'm pretty happy with that set up. Ansible has just enough smarts to be less tedious than shell scripting, but dumb enough that it's behavior is easy to figure out in most cases. Now I'm tempted to try running it nightly from cron.
- AlexITC 3y agoWe are on the same boat, my ansible scripts have barely changed in the past 7 years, still, I have been wondering about getting rid of ansible for simple scripts to handle everything, the main reasons being speed and simplicity (1 file vs many files).
- turboponyy 3y agoNixOS, whilst being a huge time sink, delivers exactly on that promise and then some.
- fhaldridge7 3y agoI switched from Ansible and YAML-hell to NixOS and never looked back. Still learning Nix but it's easy to get started with the basics and then refactor things later
- xupybd 3y agoI do this with gitlab and Cron. Commit to main on gitlab and a ci script builds the project and sftps a zip to the staging server. A Cron job checks for new zips in the directory and unzips, then installs the update. After that it restarts the job and I have a new version ready to test in staging.
- J_tt 3y agoHave you considered installing a GitLab runner on your deploy machine to run jobs specifically tagged to deploy that app? It’s a super easy setup and saves managing SSH keys in env variables etc while still being really quick!
- xupybd 3y agoI didn't think about doing that. It's a great idea.
- Zoolaris 3y agoI made a small python flask app that would listen to a webhook and then do a git pull on the directory. This has worked super well for the few random website projects i host
- kubanczyk 3y ago> I suppose I could git pull on a cron job, copy over the systemd unit files, and restart, but I'd like to have just a little more smarts than that. How complex... You know that you can simply git push to just about any ssh account, right?
- xmodem 3y agoOf course, but the point is not just to get configuration into git, it's also to get out of the business of SSH'ing to individual servers.