Building Blocks with Jeff Lindsay
Jeff Lindsay joined the show to talk about workflow automation, designing apis, and building the society we want to live inâŚplus a surprise special announcement!
Matched from the episode's transcript đ
Jeff Lindsay: Yeah, so a lot of kind of function as a service is usually designed around HTTP, so youâre writing web handlers and you can kind of shell out and do whatever if you have containers. Usually, these things arenât made to work for â you know, letâs say you have a script. A lot of peopleâs automation in their companies is based on Bash, or various scripts, and in order for people to run those scripts, they have to download the script, or install it as a package, make sure you have all the dependencies, and of course, youâre not running in containers because youâre talking about peopleâs development environments⌠So everybody has to have the right dependencies, and then if there are secrets â like, letâs say your tool is gonna go do stuff with AWS and it needs your AWS credentials and you have to share your credentials with everybody for it to work⌠So this was a way to basically say, âYou can put that script in the cloud⌠Itâll run in the cloud, itâll run with secrets that you specify that nobody else has access to, and you can run those commands with SSH.â So you can say âSSH my deploy site commandâ from your company or your app or whatever, and itâll go and deploy from anywhere.
They are stateless in that you donât have â but you can pull from Git, you can kind of do anything you want from the command line. However, one of the things that Iâve been working on for a while is a way to expose your current directory to it. That will open up the possibility of writing tools that actually interact with the file system and particular files in your project.
Again, itâs kind of like the speed to get somebody working on your project, have all the right tools and stuff like that - you can actually put all those in the cloud, and then they kind of run a command⌠And itâs working on your file system, but the code is executing somewhere else. So itâs run consistently, and any secrets or passwords are protected, and you can share access to commands. So itâs a really powerful â itâs a dumb primitive. I did it because itâs â itâs not like, you know, the most amazing primitive, but there are use cases, especially when it comes to groups, trying to automate things like deployment in kind of an opsy world⌠And you could easily throw a Slack interface onto it, and now you have ChatOps type of stuff.
[44:25] So function as a service, focusing on command line⌠Thatâs really what it is. And yeah, itâs a great tool. So I was gonna rebuild that using this component; itâs using an older version of it, and isnât as componentized as it could be, but this is a way that people can kind of see âOh, hereâs how youâd build an application or a system thatâs fairly complicated (not super complicated) from scratch, using these kinds of components.â And a lot of those components will go into future projects as well.
A common one that we have besides HTTP is SSH. We have a really great SSH library for Go, people donât know⌠GliderLabs SSH. It wraps the existing crypto SSH library and gives you an interface that looks a lot like the HTTP interface for servers. So it becomes really easy to build SSH servers and do stuff with SSH⌠Which is a really cool protocol by the way, because it can do connection tunneling, and all kinds of neat stuff. As a protocol it has a lot of interesting primitives inside it.
Brad Fitzpatrick said he thought that it was dope, so I think thatâs good. He said itâs refreshing to see good API design⌠I was like, âWell, Iâm just copying HTTP, soâŚâ