3 ms·
Sorry OT, but TIL about piku [0] I have a old laptop in need of a new purpose. Might have a play with that. [0] https://github.com/piku/piku https://github.co
by kitd 6y ago
Sorry OT, but TIL about piku [0]
I have a old laptop in need of a new purpose. Might have a play with that.
[0] https://github.com/piku/piku https://github.com/piku/piku
edit: good post, otherwise!
- rcarmo 6y agoThanks! Piku has been my go-to for dev environments, Linux IoT and general-purpose stuff for a long while now, as it is simpler to iterate (no container build cycles, no need for a registry, relies on rock solid nginx/uwsgi, etc.). I usually start with that and then containerize as needed, but this time it was actually the other way around -- since I didn't know what Node-RED modules I'd need and didn't see much point in going beyond a single core, I just sidestepped my custom Node-RED containers* and pushed out a Node-RED deployment (https://github.com/piku/deploy-node-red https://github.com/piku/deploy-node-red) to a underused, single-core piku instance. (You can just steal the cloud-config from https://github.com/piku/deploy-on-azure https://github.com/piku/deploy-on-azure and toss it onto any cloud provider) (FWIW, I have a running k3s setup with the Azure equivalent of spot instances, but Node-RED can't take advantage of that setup and I mostly wanted the GUI and higher-level abstractions. You'd be surprised how much mileage you can get from something like this...) * - https://github.com/insightfulsystems/node-red https://github.com/insightfulsystems/node-red
- jarpineh 6y agoThis looks interesting. What is the service runtime controller in Piku? Is Piku mainly about configuring and controlling Nginx which directs Uwsgi that in turn runs app runtimes? Also, does the k3s setup have publicly available provisioning code? Sometimes there's a need for temporary apps which happen to come with k8s configs.
- rcarmo 6y agoThe runtime controller is uwsgi, which acts as supervisor for all processes of an app _or_ embeds the right interpreter-it's pretty much perfect for that, as it also has a cron scheduler and an on-demand, fire-up-an-interpreter-upon-request mode. In a nutshell, piku handles SSH git pushes, looks at the contents, figures out what language runtime to use, creates its equivalent of an isolated venv, and writes config files for every uwsgi process (which then start automatically and, if necessary, talk to nginx - which in turn understands what is going on and sets up cloudflare, SSL, etc.) As to the k3s stuff, it's all here: https://github.com/rcarmo/azure-k3s-cluster https://github.com/rcarmo/azure-k3s-cluster. I update this from time to time as I occasionally nuke the entire cluster and rebuild it (I use AKS for non-hobby workloads, but a single master is just fine for most of my stuff).
- jarpineh 6y agoMost excellent! We use Uwsgi in production with Django. I have often wondered why it isn’t more known. There’s support for many runtimes and features for larger scale. Only thing that’s hard is setting up configuration for your use case. Perhaps with Picu one could package best practices for various tech stacks. Then just serve the apps with ease. I’ll definitely take a look. Thank you also for the k3s setup. Testing K8s apps locally and developing my own is far easier than in the cloud. Like making Picu work from within container and publishing apps under managed K8s. Without having to deal with kube things individually.