Show HN: Emissary – a Slack bot for running and scheduling shell commands
1–2 of 2 posts
Re: Show HN: Emissary – a Slack bot for running and scheduling shell commands
#2The bot currently has 2 slash commands, /sh [`command`] runs the command immediately and returns the output to you, and /notify [@user or #channel] [`command`] [cron expression] will run the command on the cron schedule and notify the user or channel of the output of that command.
At the moment it's running on a single t3.small EC2 instance with a t3.micro RDS database. Cron triggers are stored in the DB, which would allow me to add more worker nodes to distribute the load in future, if there is enough demand.
Each command runs as a non-root user in its own container under docker, on top of Google's gVisor kernel (https://github.com/google/gvisor). I've also limited the containers in their resource usage and mounted a read-only root FS (there's also a writeable tmpfs mounted at /data). Each command can run for a maximum of 5 seconds before it is automatically killed.
I'd love to hear your thoughts!