The opportunity to write a Puppet 8 book landed in David Sandilands’s lap when he had just started at Puppet and with a child on the way. About a year and a half later in mid-2023, “Puppet 8 for DevOps Engineers” launched via Packt. This is the story of everything that happened in the middle.
Speakers:
- Ben Ford, Community Lead at Puppet by Perforce
- David Sandilands, Senior Solutions Architect at Puppet by Perforce
Learn More About Puppet + DevOps
Highlights:
- What other Puppet books didn’t have
- The joy of creating a book that doesn’t have to cater to one audience or another
- What it's like to work with a publisher
- Learning to lean on your community for support
- Hard-learned tips for writing your own book
Links:
- Check out David's book, “Puppet 8 for DevOps Engineers,” via Packt
- “Puppet Best Practices” by Chris Barbour and Jo Rhett
- Ben Ford on Twitter/X
- David Sandilands on Twitter/X
Transcript
Ben Ford [0:19] Hello again and welcome to today's episode of Pulling the Strings Podcast, as always powered by Puppet. My name's Ben Ford, I'm our Developer Relations Director here at Puppet and I'm pretty active in the community as @benford2k. Today we are talking with a coworker and a friend, David Sandilands, about a new book that he wrote. This is the Puppet 8 book if you have seen it. So we're going to talk about the book and we're also going to talk about the process of writing a book. That's something that I'm really curious about. But let's get started with a real quick introduction. David, I know you've got lots and lots of interesting stories. Could you maybe tell us a little bit about yourself? Who you are and a little bit about your background and why you were interested in this? And maybe a fun story or something in your past that got you to where you are today?
David Sandilands [1:01] Sure. So my name's David Sandilands. I'm currently a product manager for Ecosystems and Puppet, which covers things like PDK, the Forge, content, and so on. My background is I worked for the Royal Bank of Scotland and now known as NatWest for a combined 13 years and I worked on Open Source Puppet there and I kind of made the business case and got them into Puppet Enterprise. I then joined Puppet as a solutions architect and that was kind of the point I was approached around writing the Puppet 8 for DevOps engineers book by Packt. I think it was kind of identified as having that sort of business experience of implementing Puppet and then coming into Puppet to work on the best practices and how large a customers can implement Puppet solutions.
Ben Ford [1:53] Nice. So business and technical both. Yeah.
David Sandilands [1:55] Yeah. So I guess if I was to say a funny thing is going back to actually how I started Puppet. I started Puppet at Sky, BSkyB, in Britain, which is a cable broadcaster. And I'd been working on what was known as the building block script system, which was all done in shell scripts and so on. And a new system was coming in that was using various tools including Puppet, which I was bitterly opposed to. And it wasn't because there was anything wrong with implementing Puppet, it was actually just because of the way... Their ambition was to rewrite all the code from shell script to Puppet in two weeks.
Ben Ford [2:33] Oh, my heart hurts for you.
David Sandilands [2:34] Yeah, so I said six months minimum just to write the OS stuff because taking to mind the shell scripts actually configured OS, WebView, Oracle. It was very good for his time in 2011. But anyway, obviously once that project didn't get anywhere after about eight weeks, they then came to myself and some other colleagues and that's how I started learning to write Puppet was I was made to move over to the new system. So it was a very strange way to... I enjoyed learning it very much, but obviously it sounds very strange. I started to learn Puppet because I was forced to tear up the system I liked. But after doing that for about a kind of year of really learning it from scratch there, it so happened that I found out that the Royal Bank of Scotland who I had left two years before were now using Puppet. And it seemed like the ultimate challenge to me to get an organization, like RBS was at the time, to actually properly adopt Puppet and have that kind of enforcement and stateful approach. Because the RBS I first worked for my first time, they worked off Excel spreadsheets and people copying/pasting in commands from what were known as sequence of events. So that was the sort of job dream in terms of actually getting an organization like that turned around into that.
Ben Ford [4:00] So in my career here at Puppet, one of the things that I did is build some of our early educational material. And that example right there, it could have come right out of our training because that is precisely the way that we tell people not to adopt Puppet. The whole boiling the ocean approach.
David Sandilands [4:20] Yeah, I mean it's funny. We actually went through lots of negotiation stages of could you not just replace one component at the time and things like that. And the other big thing I had to warn them was I don't know exactly how all these shell scripts actually worked in a stateful way. I just know that, procedurally, they do this. So I've kind of made Puppet procedurally do that, but I can't guarantee that was the state the original author had in mind.
Ben Ford [4:50] That sounds like a recipe for disaster. And very much not a best practice your book teaches us now.
David Sandilands [4:56] Exactly. And I think that's the funny thing, is those experiences can really much embed in your mind. And the way that our system was taken over there also embedded in mind the things in the book I try and talk about. Adoption, in terms of doing the technical stuff well is not enough. You need to be promoting it. You need to have decision makers understanding what you're doing. You need to really be shouting out about the good work you're doing.
Ben Ford [5:24] Yeah. And it's almost like approaching it from a product perspective. What do you need? What do you need first? How do you prioritize what to do? And then how do you do that in small consumable chunks, so that you can keep your velocity going and not get bogged down trying to do everything all at once.
David Sandilands [5:42] Yeah, absolutely. I've worked for a couple of big organizations and I think it's a very common problem is even when people are in a bad place and doing things very manually, when they then plan of what they want to be for automation, sometimes everything's got to be perfect at once and it can lead to these never ending projects that are so complex that nobody can quite complete. And the frustration just builds as it never quite gets off the runway.
Ben Ford [6:17] Next to our workspace in the education team we had one of those pithy posters like the 'Live, Laugh, Love' kind of things. And it said, 'Perfection is the enemy of the good.’
David Sandilands [6:27] Yes. No, absolutely. And I think it does take a bit of courage because when we were first doing things at RBS there was obviously big questions when we were going from Open Source Puppet to Puppet Enterprise. The big question was, okay, well just switch the code over. You're using an open source to Enterprise. It'll be fine. And we were like, oh no, no, no. This is code that was written for Puppet 3. We were going to Puppet 5. Also, we were using a customized MongoDB angular system and instead of Puppet Enterprise console. So there was all sorts of issues of and reasons why it needed to be refactored and rewritten. But it is just being able to make that business case and show somebody how you're progressively going to get there.
Ben Ford [7:14] So you said you started this book when you joined the Solution Architects team, I think is what I heard you say. That was a couple years back. So how long have you been working on this and did they approach you? Did you go to them? Did you have the idea for the book?
David Sandilands [7:28] So I guess it's one of these things where it sounds incredibly... A series of incredibly stupid things that I had going on to accept something else on. So I just moved jobs and I was six months in at Puppet. My wife was six or seven months pregnant and then Packt approached me about the book. So they approached me on LinkedIn and said, is this something I'd be interested in? I was aware of how crazy it was taking a lot of things on like that. But it was something I'd always wanted to do because I'd recently done the Puppet certification before I actually moved to Puppet and I used one of the books, I think it was Puppet Best Practices. But that book was relatively old even when I was doing it two years ago. I think it was 2019 or maybe 2018 that it was released. So I was kind of having that-
Ben Ford [8:21] Jo Rhett's book?
David Sandilands [8:23] ... That's right. Yeah. It's a very good book. But even at two years ago, it was obviously two years old and I think the majority of the content had been written for Puppet 5 at the time. So I already had a feeling of, man, we need a new Puppet book. And from some of the work I'd been doing with some of our larger customers, I had ideas in my head of... I've read a few puppet books and I've read some training material, so I have an outline in my head of some things I'd like to see more of in a Puppet book. And then Packt, basically, they give you an outline document to try and put down the chapters and the sections and they give you a kind of template to work this out. And they also ask you to think of what the top comparison books are and how your book differs or what you improve on or what things you relate to. And just talk about your target audience and so on.
Ben Ford [9:22] That's an interesting next topic, too, is what do you see as your target audience and how do you see your books differing from other books in the field?
David Sandilands [9:31] Yeah, I obviously had a bit of a bias to myself in terms of when I was learning Puppet at BSkyB and the Bank, there was a number of Puppet books out. I always felt there was this odd bias to a more Open Source Puppet approach. Not saying there's anything wrong with Open Source Puppet, but it was just sometimes it felt like you would learn a bunch of stuff and then be like oh, well I'm going to be using Puppet Enterprise. I'm not quite sure how the structure applies here. And it felt like a lot of books, they mentioned Puppet Enterprise and maybe just a kind of end section just to tell you, by the way, you can get Puppet Enterprise, but it didn't feel like it guided you very well in terms of these things apply to everything, these things apply to open source, Enterprise is going to go this way, and these are extra features of Enterprise.
Ben Ford [10:28] It's a real fascinating comparison there. I once did a chart that showed all the different topics and the learning journey of how you learn Open Source Puppet versus how you learn PE. And it's fascinating how much overlap there was. It was like 80% some over overlap, but then the things that were different were interwoven all the way through. So it's not like you could say do this 80% and then here's 20% here and 20% there. It was just all the way through, there are little bits that were different all over.
David Sandilands [10:59] I completely agree with that, and that that's how I found writing the book is the vast majority is absolutely the same and that's what feels good for writing the book is it's not having to cater for one audience or the other. You're safely able to write for Puppet in general. And when you get to sections where classification tends to be one of the bigger areas where Enterprise and Open Source diverge, you're then able to write a section and say here's all the options and you know can use them in Enterprise. But the kind of supported recommended approach in classification is no groups. That was just the way I wanted to take it, to highlight those differences back and forth so that particularly as well for people who do Open Source and have an eye on Enterprise, it's good to have that kind of view of how your implementations might need to change.
Ben Ford [11:51] It might, actually, even be worth taking a little tangent too and talk about Puppet 8 a little bit. You're trying to talk about some of the newer things that are coming out. So what do you see are some of the big, interesting things to pay attention to in Puppet 8?
David Sandilands [12:07] Yeah, I think overall Puppet 8 isn't the most major release. It's not like going from Puppet 3 to 4 or something.
Ben Ford [12:15] That one hurt.
David Sandilands [12:16] Yeah, that one did hurt. But I think some of the key things of the internal components increasing version, ruby getting to 3.2, I highlighted in the book that's tended to have more consequences for developers extending Puppets, but it certainly helps organizations with their security commitments and you'd certainly expect to see performance boosts as well. I think one of the big changes, which I think is a lot more relevant than people realize, is that the way that event reporting is defaulting to not include unchanged resources. Everything's got a lot bigger in scale, particularly from when I started. And when you've now got all these event reports coming in with all these unchanged things, it just takes up space, it takes up processing, it takes up everything. So I think that's actually going to be a major feature.
Ben Ford [13:12] Every single report processor that I ever wrote, the very first thing that I did is filter out all of those and discard them.
David Sandilands [13:19] Yeah and it is important to note that is available in Puppet 7, that you can change the switch from true to false, to you make sure you remove event reporting for unchanged events. But that being a default in Puppet 8 is good. Facts are not including legacy facts, I think is in a similar vein. It's just that thing when you end up working at such scale you just have to be cutting all the things that are just unnecessary. And again, Hiera 3 being dropped, I think there's just a reality that hopefully nobody's been using Hiera 3 for quite some time and just removing anything you don't need is always going to be a good thing.
Ben Ford [14:02] I did an analysis of the Forge modules and there were only four or five that were still published on the Forge, and they didn't seem to be updated for a very, very long time. So we've got that going for us. The factor thing I think is an interesting one because there's a lot of code out there that still uses these legacy facts and people are going to have to start updating their modules to use some of the more modern facts. Do you have suggestions for people on ways to go about that?
David Sandilands [14:33] Yeah, I mean I believe the PDK now has linters in it to look for the use of legacy facts. So I think definitely checking your code over with the PDK will help there. And certainly contacting into the Vox Slack channel and the Forge Channel to speak to either Vox or Cat who've gone through this. So if you are having issues working out the right modern facts to use, they're certainly in position to help and advise.
Ben Ford [15:02] It didn't seem to be a big scary upgrade but that does have a couple of gotchas. It might surprise people. Do you talk about that, the upgrade, very much in the book?
David Sandilands [15:14] Yeah, I mean what I try to do is I try to talk about the modern era of Puppet, which I can consider from Puppet 5 onwards. And it's always a careful balance, but I try to think about things I expect that could reasonably still be in code and just try and put those notes in to say if you encounter something that looks like this, by the way, that was probably from Puppet 5 or 6 or whatever version. And the way that is done in a modern approach is this. I think one thing in particular is things like I try to highlight the benefits of going from ERB templates to EPP templates. There's a huge performance boost. And I know actually from conversations in the Vox community channel today, they're actually looking at developing some tools to help automate that conversion from ERB to EPP. So it's definitely worth looking out for that.
Ben Ford [16:11] That's pretty cool. So switching topics back again, as somebody who's actually considered writing a book before... Like I said, I built a lot of the training material and considered taking that and turning it into a book. I'm curious about the process, the logistics and the time management and everything that went into this. What was it like? Did you have late hours and deadlines that were looming over you or were you able to figure out a good cadence?
David Sandilands [16:41] I guess in hindsight it was rather silly starting it, relatively new in a new job and with my second son arriving, but I would've still have done it again because it always takes more time... I spoke to authors at other conferences and they told me that you have this battle between publisher and technical writer. And technical writers keep wanting to investigate things and make sure they've not missed anything and publishers want to get the book out there and make money and make sure you get there and don't kind of always keep chasing the one last thing you can't quite find. So it can be really difficult because... Particularly as you start investigating, because the thing I found was there was areas which I just hadn't really looked into because I hadn't had a full chance to implement them. Bolt was one of the most interesting areas for me personally because I'd used Bolt. I'd worked on PECDM as a solutions architect and I'd used it with many customers. But I hadn't really looked in it in full depth and gone into the full specification and full manuals. So my original estimate that it would be 20 pages was completely blown out the water as it became 36 pages and I moved the Puppet Enterprise's orchestration section into the Puppet Enterprise chapter. So I think it's that thing of preparing yourself for how long it can take. And in my case I was very fortunate. Puppet were very supportive in terms of the project. When I approached my boss at the time, Nigel Kirsten, he advised that we'll make some time during the workday and also worked a lot of evenings. And it was just trying to get as much done as I could. When Jude had chicken pox that brought my time down to almost zero. But at other times grandparents were able to take family away and I would get a weekend to sit down and crack on with a book. It is just perseverance and realizing it's that thing of it is not forever. And when you get to the end of it, you feel very different as to when you're halfway through and it feels like you can't find a way to finish things off.
Ben Ford [18:51] So it sounds like just being creative about time and using the resources that you have and also being aware that you're never going to be able to plan out the time the way that you think that you are. It sounds a lot like a software project.
David Sandilands [19:07] Absolutely. And I think that's the thing is being honest and realistic with your publishers. And I always just try to tell them upfront, my editor, to say, you know what? Jude's ill, Joan's ill, something's happened, big customer has major problems. Whatever it is, just being absolutely upfront and saying this has happened right now. I will tell you when it's not happening. So the publisher can reasonably adjust dates. Because I think the book was technically a year late, which worked out well because that meant it came out roughly three, two to three months, after Puppet 8 was launched so I was able to add content to update it to be a Puppet 8 book. But it is a very creative process and I think because it takes so much research, you're never quite sure how long it's going to take and whether you've fully judged the content correctly.
Ben Ford [20:02] So what would you recommend to somebody else who wanted to write a book or if they were approached to write a book? Or maybe do you have things that maybe you would've done differently?
David Sandilands [20:12] I don't know if I'd have done anything differently. I think it's almost one of these things of a bit like Terry Pratchett's Night Watch caught with... You think that's the answer of going back and telling yourself the experience. But the reality is you have to go through it to fully grasp the process. But I think just being prepared for how difficult it's going to be and how much hard work it's going to be, using your colleagues and community well and asking for that help and being fully upfront about what you're trying to do and really using everything you got at your disposal. Because for me, the Puppet community and Slack was invaluable. There's lots of little questions dotted about there that when I was just trying to clarify things and so many people who were so helpful, just explaining things through to me as I tried to get a full grasp of some things that I functionally understood, but I wanted to really understand technically so I explained it well in the book.
Ben Ford [21:20] Yeah, you never really understand something until you can explain it to somebody else. I learned that a lot in my educational career there. It sounds like you had a lot of fun though. The way that you talk about it, you say all these hard things, but you always say it with a smile on your face. I know you're not some kind of masochist, so you must have had some kind of fun doing this, right?
David Sandilands [21:42] Yeah, I think it was one of these things of you never really have the chance to go into certain areas. Your job's focused on delivering a certain thing for a customer, so you're focused in on that. Whereas in this case it was, let's go exploring what this kind of thing can do and just trying things out and really getting a feel for it. And so many people were telling me stories of how things got to the point they did. You ask hey, how did we come up with this pattern? And you get the story of, well we looked at it like this. And all that was very fun and very interesting. And it's just interesting to see how a language develops over time. My first... Well, funnily enough, my first Puppet language at Sky, as I was mentioning was 3.4. And then when I went back to RBS actually dropped down to 2.7. So I've seen it from quite early versions. And for me, the funny thing I guess is that probably five of the chapters wouldn't have existed in earlier Puppet versions. So I think that's one of the real values of the book for me is I've tried to highlight things I felt someone like myself, who would've gone through older versions of Puppet and come up through, should understand that are now there. Because I particularly think with the approaches you're now seeing with platform engineering and Puppet being more integrated and allowing more self-service, people have to really focus more on secure Puppet development. So things like having parameterized execs so that you can't sneak things into the command line on an exec. And thinking about how useful strict mode Twitch... I didn't mention earlier, but strict mode is now enabled for variables in Puppet 8. And I think although it's potentially breaking because undefined variables will now error and it'll prevent certain actions such as adding a number to string, I think it makes sure that we are very certain about how we're handling things.
Ben Ford [23:50] We had a bug in our installer some years ago that the root cause of it came down to an undefined variable. And so, the installer constructed a path with the first half of it missing, and so it broke a lot of files on the file system. So these things have huge consequences.
David Sandilands [24:08] Yeah, and as well as things like data types. There'll be lots of users who are used to just declaring variables on their classes and so on and not thinking about data types and how to do higher values well and so on. So I think that, to me, is one of the key takeaways.
Ben Ford [24:29] Well this is very exciting. I have looked a little bit at the sales rankings and everything. And at least on Amazon it looks like your book is doing really, really well. So I'm excited for you and I'm glad to see what the future holds.
David Sandilands [24:43] Yeah, no, I mean it's been really great to see the uptick because when there's not been a book in a while, you're always wondering. Particularly with the way learning's gone these days, there's a lot of good free material, particularly the Puppet learning classes themselves. You can get free self-paced service and so on. So it is great to see there's the demand there.
Ben Ford [25:05] Cool, cool. Well, as we close up today, I think what I'm hearing from you is that there's a lot of opportunity to learn here. And I think that you're saying that writing a book is a real big time investment in everything, but it's a real satisfying thing to do. Real personally rewarding and maybe it's something that isn't quite such an onerous process.
David Sandilands [25:29] Yeah, I think when you're first approaching, it's one of these things of you're starting with a blank page and you're like, how the heck am I ever going to get all this done? But I think as you start to get into your stride and you start to get a good working process and your editor doesn't have to keep reminding you to get your capitalizations right on technologies and so on, you start to really look into technologies that... You're writing a book about it, hopefully it's a great interest to you. So you have that opportunity and that time that you've made to really go into depth into things and to really get a stronger understanding for them, as you said, so you can explain them to someone else. And then I think some of the great satisfaction is when people have been reviewing sections for me and actually said, "This is great. This has helped me learn something." Or somebody commented that they thought everybody in Puppet should read this chapter, which was a really nice thing for them to say. Hopefully people get the value out of it and expands the knowledge and improves how people are using Puppet.
Ben Ford [26:33] So I'm sure that people have follow up questions or more conversation for you. Can you be reached on the community Slack or social media?
David Sandilands [26:42] Absolutely. I'm on Community Slack. I tend to be very boring with everything, so I'm basically David Sandilands on everything except Twitter/X because a driving instructor from Glasgow got David Sandilands on the Twitter/X side. But I think I'm Dave Sandilands on Twitter/X. But yeah, you find me there. I talk about Puppet, I put the announcements out for the products coming out. And any questions, do feel free to reach out.
Ben Ford [27:07] Well, cool. And we'll put links of those in the show notes as well. Let's wrap today. Once again, thank you all for listening. And David, thank you so much for being on Pulling the Strings Podcast powered by Puppet.