med-mastodon.com is one of the many independent Mastodon servers you can use to participate in the fediverse.
Medical community on Mastodon

Administered by:

Server stats:

372
active users

#pyinfra

0 posts0 participants0 posts today
It's Richie<p><a href="https://hachyderm.io/tags/CommunityHosting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CommunityHosting</span></a> <a href="https://hachyderm.io/tags/Ops" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Ops</span></a> </p><p>A small group of us are working on community level hosting of 'self-hosted' FOSS tools (think <a href="https://hachyderm.io/tags/NextCloud" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NextCloud</span></a> and more) setup as a local service offering for local grassroots organisations. We're seeking advice/tips/guidance.</p><p>We're keen to do some orchastration but want to avoid the complexity of say Kubernetes.</p><p>As a start we were looking at Ansible with Docker Swarm but we're now exploring other alternatives.</p><p>Anyone have experience at this sort of hobbist just a bit bigger than <a href="https://hachyderm.io/tags/HomeLab" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HomeLab</span></a> Ops scale?</p><p><a href="https://hachyderm.io/tags/Pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Pyinfra</span></a> is being considered as an Ansible, in the projects words "Think ansible but Python instead of YAML, and a lot faster." (<a href="https://pyinfra.com" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">pyinfra.com</span><span class="invisible"></span></a>)</p><p>Anyone have experience at this homelab/small hosting level? Would love any tips/suggestions for tools/approaches.</p><p>One source of inspiration is the 12Factor app methodology: <a href="https://12factor.net" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">12factor.net</span><span class="invisible"></span></a></p><p>Personally, as a rubyist I'm always keen to know what the ruby community is doing in this space also. </p><p>Haven't seen many others doing work at this scale, lets use the tag <a href="https://hachyderm.io/tags/CommunityHosting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CommunityHosting</span></a> to keep connected :)</p><p><span class="h-card" translate="no"><a href="https://adlsolarpunk.net/@digital_justice_society" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>digital_justice_society</span></a></span></p><p>cc: <span class="h-card" translate="no"><a href="https://hachyderm.io/@jadehopepunk" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>jadehopepunk</span></a></span> <span class="h-card" translate="no"><a href="https://hachyderm.io/@ryan" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>ryan</span></a></span> @gilbert @bounding_star <span class="h-card" translate="no"><a href="https://hachyderm.io/@steph" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>steph</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.online/@moxvallix" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>moxvallix</span></a></span> <span class="h-card" translate="no"><a href="https://adlsolarpunk.net/@organvoid" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>organvoid</span></a></span> <span class="h-card" translate="no"><a href="https://aus.social/@teq" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>teq</span></a></span> </p><p><a href="https://hachyderm.io/tags/CommunityHosting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CommunityHosting</span></a> <a href="https://hachyderm.io/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://hachyderm.io/tags/DevOps" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DevOps</span></a> <a href="https://hachyderm.io/tags/ruby" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ruby</span></a> <a href="https://hachyderm.io/tags/RubyOnRails" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RubyOnRails</span></a> <a href="https://hachyderm.io/tags/SelfHosting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SelfHosting</span></a> <a href="https://hachyderm.io/tags/Orchastration" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Orchastration</span></a> <a href="https://hachyderm.io/tags/FOSS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FOSS</span></a> <a href="https://hachyderm.io/tags/OpenTofu" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenTofu</span></a> <a href="https://hachyderm.io/tags/SelfHosting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SelfHosting</span></a> <a href="https://hachyderm.io/tags/SelfHosted" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SelfHosted</span></a></p>
scy<p>The idea of <a href="https://chaos.social/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a> is great. The execution however&nbsp;…</p><p>Let's just say, I would've done a few things in a different way.</p>
scy<p>In the <a href="https://chaos.social/tags/Hetzner" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Hetzner</span></a> Cloud API, you can refer to resources by their ID (an integer) or their name. Both are unique. The name is user-defined and designed to be human-readable, but needs to be identifier-like.</p><p>For example, you'd name a server "db01" or a volume "db-main" or an IP address "db01-v6".</p><p>However, in <a href="https://chaos.social/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a>, "name" is a reserved word and I can't use it, but "id" is something else, too.</p><p>For now I've used "handle" instead of "name", but I wonder whether you have better suggestions.</p>
dilawar<p><a href="https://fosstodon.org/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a> is good, almost great! Give it a try.</p><p>Nothing against <a href="https://fosstodon.org/tags/ansible" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ansible</span></a> but its nice to write <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> over markup/text.</p><p>```bash<br>uvx pyinfra -y -vvv \<br> @ssh/gitlab \<br> --data ssh_key=~/.ssh/dilawar-ap-south-1.pem \<br> --data ssh_user=ec2-user \<br> operations/update_gitlab.py<br>```</p>
Jeff Toon<p><b>Eine Frage an die PyInfra-Admins</b> hier im fediverse. Ich hab mich in den letzten Tagen mit diesem Tool beschäftigt und so einige deploy-scripte geschrieben. Nun komme ich an Punkte, wo ich nicht sicher bin, ob das, was ich gerade mache, so im Sinne des Erfinders ist.</p><p>Ich möchte ein paar Server (6 - 10) per pyinfra einrichten. Dabei werden einige Server komplette Webserver mit PHP, PHP-FPM, diversen WebApps (Nextcloud, CMS, WIKI, etc.) und einige bekommen nur einen VPN-Server. Das ist so ganz grob mein Ziel.</p><p>Ich bin so weit, dass PyInra mir den kompletten Server aufsetzt. Von der statischen IP, ein paar Anpassungen an der .bashrc, den SSH-Port ändert, Apache, LetsEncrypt, fail2ban, php, php-fpm (beides für verschiedene php-versionen) usw. alles installiert. Toll!</p><p>Jetzt bin ich garde dabei, ein Deploy-Script zu schreiben, das mir die Umgebung für eine WebApp einrichtet: vhost.conf für die Domain erstellen und konfigurieren, User, Gruppe, HomeDirs, LogDirs usw. erstellen, LetsEncrypt-Zertifikate holen, usw.</p><p>Danach sollen dann all die WebApps (also zum Beispiel nextcloud) per deploy-script installiert werden.</p><p>Das sieht alles schon ziemlich gut aus und ich kann mir vorstellen, wie das alles zusammen spielen wird. Aber es ist noch ein weiter Weg.</p><p>Mein Problem ist gerade, dass mein Inventory-Script allein nur für einen Host in Kürze bei etwa 200 Zeilen an Host-Data Umfang hat. Ich habe die Befürchtung, dass ich bei dem Umfang an Parametern den Überblick verliere und Fehler mache. Wenn man nur mit dem simplen Dictonary von Python arbeitet, kann man leicht einen Fehler machen, wenn man einen Key angibt und sich dabei vertippt. Es gibt ja keine Fehlerkorrektur oder ein Check, dass der Name des Keys richtig geschrieben wurde. Oder man vergisst einen Eintrag im Dictonary - also in der Beschreibung des Hostes - vorzunehmen. Und dann fliegt hinterher alles auseinander. Ich bin nun dabei, eigene Klasse für die Hosts, Apps und so weiter zu erstellen und dafür zu sorgen, dass dort alles korrekt ist. Aber das ist eine riesige Menge an Arbeit, die mal nicht in 2 Tagen erledigt scheint.</p><p>Ist das sinnvoll? Ist das der richtige Weg? Wie handhabt ihr das?</p><p><br><span class="h-card"><a href="https://mastodon.online/users/robertmx" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>robertmx</span></a></span> <span class="h-card"><a href="https://linux.community/c/linux" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>linux</span></a></span> <a href="https://friendica.opensocial.space/search?tag=pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a> <a href="https://friendica.opensocial.space/search?tag=linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>linux</span></a> <a href="https://friendica.opensocial.space/search?tag=administration" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>administration</span></a> <a href="https://friendica.opensocial.space/search?tag=it" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>it</span></a></p>
Jeff Toon<p><b>Wer hat Ahnung von PyInfra?</b> Ich arbeite mich da gerade rein und bin eigentlich ziemlich angetan. Abgesehen davon, dass ich ständig bei meinen Suchanfragen im Netz auf Tipps zu alten Versionen stoße, die dann meist nicht funktioniert 🙁</p><p>Ich würde zum Beispiel aktuell gern wissen, wie ich die Existenz einer Datei auf dem Server prüfen kann, wenn die Datei nur mit root-Rechten zu sehen ist. Ein "_sudo=True" kann man nicht überall einbauen. Auch das globale "_sudo=True" scheint nicht zu helfen.</p><p>Also irgendwas der Art:</p><blockquote>myfile = host.get_fact(<br> File,<br> "/root/.bashrc",<br>)</blockquote><p><br>Hat da einer eine Idee?</p><p><a href="https://friendica.opensocial.space/search?tag=pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a> <a href="https://friendica.opensocial.space/search?tag=Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <span class="h-card"><a href="https://linux.community/c/linux" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>linux</span></a></span></p>
David Zaslavsky<p><span class="h-card" translate="no"><a href="https://frankfurt.social/@malte" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>malte</span></a></span> 😂 </p><p>I have also been looking into pyinfra lately. If nothing else, it's that much less code I have to write in YAML and that's a win.</p><p><a href="https://techhub.social/tags/DevOps" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DevOps</span></a> <a href="https://techhub.social/tags/Ansible" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Ansible</span></a> <a href="https://techhub.social/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a></p>
Malte<p>It's this time of year again where I think about replacing ansible with something else.</p><p>This year it's pyinfra.</p><p>Funny side note: macos wants to replace ansible with unusable. :D</p><p><a href="https://frankfurt.social/tags/ansible" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ansible</span></a> <a href="https://frankfurt.social/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a></p>
robertmx<p>* The selfhosting docs on deltachat are somewhat rudimentary. Theres a github repo and some <a href="https://mastodon.online/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a> scripts, but compared to <a href="https://mastodon.online/tags/synapse" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>synapse</span></a> and <a href="https://mastodon.online/tags/xmpp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xmpp</span></a>, the docs are less sophisticated</p><p>In conclusion I would recommend <a href="https://mastodon.online/tags/xmpp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xmpp</span></a> for a closed organizational messaging due to LDAP integration and "enterprise" features and delta chat for nontechnical communication (if you can live without video / audio).</p><p>3/3</p>
David Zaslavsky<p><span class="h-card" translate="no"><a href="https://mastodon.social/@sumanthvepa" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>sumanthvepa</span></a></span> For everything you want to do, I'm pretty sure you'll have to do a lot of custom coding regardless of how you do it, but you could check out <a href="https://techhub.social/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a> which is like a more lightweight version of Ansible. Or I should say, it's a lighter-weight tool that tries to do the same thing Ansible does (basically, scripting but optimized for configuring systems). I don't know if it will actually make your job easier, I'm just suggesting it's worth a quick look to see.</p>
David Zaslavsky<p><span class="h-card" translate="no"><a href="https://social.linux.pizza/@nebucatnetzer" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>nebucatnetzer</span></a></span> I'm working on it, for my personal infrastructure. It is wayyyy more pleasant (and efficient) to be writing code in an actual programming language instead of in YAML, but the tradeoff is losing access to Ansible's huge library of tasks and roles. So you wind up having to implement more things yourself in pyinfra. Personally, I think it's well worth it so I will continue to plug away with pyinfra, but I can see how someone who's working on a large body of infrastructure and has limited time might consider it not viable.</p><p><a href="https://techhub.social/tags/DevOps" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DevOps</span></a> <a href="https://techhub.social/tags/Ansible" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Ansible</span></a> <a href="https://techhub.social/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a></p>
nebucatnetzer<p>Did someone migrate from Ansible to <a href="https://social.linux.pizza/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a>?</p><p>How much work was it?<br>Would you do it again?<br>Was it an improvement in terms of maintenance?</p>
Serge from Babka<p>Setting up Podman with PyInfra, I keep thinking "I should make this a PyInfra module", but if I do that now, I'll never get to my goal.</p><p><a href="https://babka.social/tags/Programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Programming</span></a> <a href="https://babka.social/tags/Devops" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Devops</span></a> <a href="https://babka.social/tags/Podman" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Podman</span></a> <a href="https://babka.social/tags/PyInfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyInfra</span></a> <a href="https://babka.social/tags/ADHD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ADHD</span></a></p>
Alejandro Baez<p>I discovered <a href="https://fosstodon.org/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a>, and now I want to use it. It's like skipping using <a href="https://fosstodon.org/tags/yaml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>yaml</span></a> in <a href="https://fosstodon.org/tags/ansible" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ansible</span></a>. Similar to <a href="https://fosstodon.org/tags/fabric" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>fabric</span></a>, but less low level. 😅</p><p>With pyinfra, you still have things like ansible roles abstractions. But you write your roles all in <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a>. 😎 All I know is here I go again with this rabbit hole. 🫠</p><p><a href="https://docs.pyinfra.com/en/3.x/getting-started.html" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">docs.pyinfra.com/en/3.x/gettin</span><span class="invisible">g-started.html</span></a></p>
Wesley Moore<p>New post: <a href="https://www.wezm.net/v2/posts/2024/tiny-cdn/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">wezm.net/v2/posts/2024/tiny-cd</span><span class="invisible">n/</span></a></p><p>I built a tiny CDN for my website to reduce the latency for visitors in different parts of the world.</p><p><a href="https://mastodon.decentralised.social/tags/Linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linux</span></a> <a href="https://mastodon.decentralised.social/tags/ChimeraLinux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ChimeraLinux</span></a> <a href="https://mastodon.decentralised.social/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a></p>
robertmx<p><span class="h-card" translate="no"><a href="https://babka.social/@serge" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>serge</span></a></span> </p><p>Thanks for that post, didn't know of <a href="https://mastodon.online/tags/PyInfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyInfra</span></a> before. I'm using <a href="https://mastodon.online/tags/Ansible" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Ansible</span></a> a lot and sometimes I really hate the difficulties of doing data transformations that are trivial in python but a PITA in YAML.</p>
Serge from Babka<p>I've written a blog post about choosing a configuration management system. Let me know your thoughts!</p><p><a href="https://blog.emacsen.net/blog/2024/09/29/sysadmin-config-management/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.emacsen.net/blog/2024/09/</span><span class="invisible">29/sysadmin-config-management/</span></a></p><p><a href="https://babka.social/tags/sysadmin" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>sysadmin</span></a> <a href="https://babka.social/tags/ConfigurationManagement" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ConfigurationManagement</span></a> <a href="https://babka.social/tags/devops" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>devops</span></a> <a href="https://babka.social/tags/ops" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ops</span></a> <a href="https://babka.social/tags/Puppet" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Puppet</span></a> <a href="https://babka.social/tags/CFengine" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CFengine</span></a> <a href="https://babka.social/tags/Chef" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Chef</span></a> <a href="https://babka.social/tags/PyInfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyInfra</span></a> <a href="https://babka.social/tags/Ansible" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Ansible</span></a></p>
Serge from Babka<p>PyInfra demonstrates a powerful point. With Ansible if you want to feed information to Ansible, you must do through so Yaml. Yaml is fine, but PyInfra simply lets you feed information directly to it without an intermediary file format.</p><p>Why do we complicate our lives with these intermediate formats when they're often unnecessary? Wouldn't pure programming be better for the user?</p><p>I'm looking at you, OpenTofu.</p><p><a href="https://babka.social/tags/PyInfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyInfra</span></a> <a href="https://babka.social/tags/Yaml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Yaml</span></a> <a href="https://babka.social/tags/Programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Programming</span></a> <a href="https://babka.social/tags/DSL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DSL</span></a> <a href="https://babka.social/tags/OpenTofu" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenTofu</span></a> <a href="https://babka.social/tags/Terraform" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Terraform</span></a></p>
Serge from Babka<p>I was skeptical of PyInfra at first, but I had a working system within minutes and was building out my own deploys (sort of like Ansible Playbooks), but without any weird Yaml syntax.</p><p>I've used cfengine, Puppet, Chef, and Ansible, and while I might still use an agent based system if I had thousands of hosts, so far PyInfra has been the easiest and most straightforward configuration management system I've used. It's as straightforward as Chef, but agentless like Ansible.</p><p>It's been absolute pleasure to use so far.</p><p><a href="https://babka.social/tags/ConfigurationManagement" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ConfigurationManagement</span></a> <a href="https://babka.social/tags/Ansible" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Ansible</span></a> <a href="https://babka.social/tags/PyInfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyInfra</span></a> <a href="https://babka.social/tags/SysAdmin" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SysAdmin</span></a></p>
David Zaslavsky<p><span class="h-card" translate="no"><a href="https://mastodon.world/@darthwonka" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>darthwonka</span></a></span> FWIW I have high hopes for <a href="https://techhub.social/tags/pyinfra" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinfra</span></a> (<a href="https://pyinfra.com/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">pyinfra.com/</span><span class="invisible"></span></a>) to be able to do this kind of thing better but I only discovered it a few days ago so I dunno 🤷</p>