Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I started moving my team to elixir mix tasks and it really feels like a sensible shell script. 1) our scripts must live in our repo, so changes are tracked with the evolution of our software, 2) many of these scripts are deployment and resource management, so they share elixir code anyways. 3) debugging and testing are easier than shell, or even python. 4) one of the things I'm doing is PXE booting, and we have functional DHCP, tftp, and http services that are very easily instrumentable can run the lifetime of the script instead of turning then on and off using some fragile config file twiddling and sudo systemctl dhcpcd incantation or whatever.


That does seem interesting. I could definitely see that as something I would want to use for the functionality rather than the "underlying feature". The story around this is pretty weak in most language ecosystems from what I have seen.


Do you mind elaborating a bit on your use case for PXE booting?


sorry, can't give too many details on the specific, but the PXE booting spec requires that you start up a:

- DHCP server that responds to broadcasts on 0.0.0.0

- TFTP server that responds to requests for the bootstrap image

- HTTP server (for most linux distros, anyways) that fetches more boot resources that are big enough that TFTP is probably not the best protocol (UDP doesn't have packet transmission guarantees).

I use a dead-simple, transient erlang HTTP server that my buddy wrote: https://github.com/StoneCypher/htstub

And hand-rolled custom DHCP and TFTP servers (existing options are not exactly what I need) that basically operate like htstub.

This is all tied into a mix task, so you start the mix task, then walk over to your target machine (or IPMI), reboot it, and then it's provisioned from scratch, reproducibly, with two-touches. Since everything is done in a single language, if something is wrong in your provisioning scheme, it's really easy to figure out what went wrong and deploy a fix.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: