Latest / Talk Python To Me / #38: Continuous Integration and Delivery at Codeship
Transcript
- 0:00Have you heard about the It Works on My Machine certification program?
- 0:03This is a really awesome certification for developers.
- 0:06It was created by Joseph Cooney.
- 0:07Here's how it works.
- 0:08Step one, compile your application code.
- 0:11Getting the latest version of any recent code changes from other developers
- 0:16is purely optional and not a requirement for certification.
- 0:19Step two, launch the application or website that's just been compiled.
- 0:22Step three, cause one code path in the code you're checking in to be executed.
- 0:27Now, the preferred way to do this is with ad hoc manual testing
- 0:30of the simplest possible case for the feature in question.
- 0:33And you may omit this step if the code change was less than five lines
- 0:37or if in the developer's professional opinion,
- 0:40the code change could not possibly result in an error.
- 0:43Now, check in your changes to version control.
- 0:45Congratulations, you're certified.
- 0:47On this episode of Talk Python To Me, you'll meet Florian Motlik from CodeChip.
- 0:52He's here to tell us all about continuous integration and continuous delivery.
- 0:56Maybe you can help keep you and your team from getting certified as well.
- 0:59This is episode number 38, recorded December 10th, 2015.
- 1:04Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem,
- 1:34and the personalities.
- 1:35This is your host, Michael Kennedy.
- 1:37Follow me on Twitter where I'm @mkennedy.
- 1:39Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter via at Talk Python.
- 1:46This episode is brought to you by Hired and DigitalOcean.
- 1:50Thank them for supporting the show via Twitter where they're at Hired underscore HQ and at DigitalOcean.
- 1:56Hey, everyone.
- 1:57Thanks again for listening today.
- 1:59I have a few prize winners to announce before we get to the show.
- 2:02Two weeks ago, JetBrains and I gave away three PyCharm professional licenses.
- 2:06The lucky winners were Drew Kerr, Ben Kelly, and Seref Alvinides.
- 2:11And in episode 37 on computer security, Justin Seitz gave away a copy of Black Hat Python.
- 2:17The lucky winner there was Arek Fyla Kowalski.
- 2:20Congratulations to everyone.
- 2:22And if you want to be able to win these giveaways, all you have to do is be a friend of the show.
- 2:27Just visit talkpython.fm, click Friends of the Show in the navbar, and sign up.
- 2:31Now, let me introduce Flo.
- 2:33Florian Motlik is the co-founder and CTO of CodeShip, a continuous delivery service.
- 2:39While studying and working in the Technical University in Vienna, he stumbled into running test infrastructure for other teams and hasn't stopped since.
- 2:46He sometimes blogs on the CodeShip blog at blog.codeship.com or on his personal blog, flomotlik.me.
- 2:54You can also find him on Twitter, where he's at Flo Mollik.
- 2:57Flo, welcome to the show.
- 2:59Thanks. Thanks for having me.
- 3:00Yeah, I'm really excited to talk about building software, testing software, and automating the whole thing with you.
- 3:05So it'll be fun.
- 3:07Yeah, totally.
- 3:08For sure.
- 3:09So we're going to talk about continuous integration, continuous delivery, maybe throw in a little Docker, infrastructure, all those kinds of things.
- 3:17But before we get into those topics, maybe give me your story.
- 3:20How do you get into software and programming and this whole thing?
- 3:23Sure.
- 3:24Sure.
- 3:24So I mean, as most people at some point, I started playing games on my dad's old computer.
- 3:31And so that got me into a little bit of scripting and stuff like that and trying to look a little bit under the hood at like 10, 11 or something.
- 3:39And then when I was 15.
- 3:40So the school that I did had a computer science branch, basically, that I went to.
- 3:45And so there I really started to get into programming and what it actually means to develop software.
- 3:52So that was in school from like 15 on.
- 3:59So I'm originally from Vienna and then started software engineering.
- 4:07then, basically, and then basically, and at some level, really, the whole web development side of things really captured my interest.
- 4:14And so that's web development and infrastructure is what I've done since, basically.
- 4:20Oftentimes, I ask people how they got into Python because, you know, a lot of my guests are explicitly doing Python.
- 4:25But you guys are doing all sorts of languages.
- 4:28Can you maybe just tell me what areas you work in, what technologies?
- 4:31Sure.
- 4:32So in the past, basically, like I started with the typical Java, like school and university stack.
- 4:38So been doing Java for a long time.
- 4:40At some point, we switched.
- 4:41So when we started CodeShip, I looked at various technologies out there.
- 4:45And since it was a small startup and I was the only developer, like I looked into Ruby and Rails for getting stuff up and running quickly.
- 4:54So most of our stack, including our back end and like the build infrastructure that we're running for customers, was written in Ruby.
- 5:00And then in terms of production systems, like we've started moving more and more stuff to Go.
- 5:05So we've re-implemented a lot of the back end systems.
- 5:08A lot of that stuff is now in Go.
- 5:09So that's on the part of like developing our own systems.
- 5:12But then since we basically rerun software and we run the tests for many, many other people and support a lot of different technologies.
- 5:19I've dabbled in Python, in Java, of course, a lot of it, in Ruby, in many other languages that we support in our stack.
- 5:28So been playing with and enjoying the ecosystem of many different languages, but mostly programming in either Ruby, Java in the past or a little bit of Go now.
- 5:39Although I don't get to code a lot anymore, sadly.
- 5:42That is unfortunate.
- 5:43So I've worked for very large companies and very small companies.
- 5:48And I've been in a situation, like you just described, where I'm the only developer.
- 5:52And I have to say, it's pretty cool to start something new where you're the only developer.
- 5:58And you kind of get to look across the entire tech landscape and say, I can pick anything.
- 6:03Where do we start?
- 6:04You know, that's a really fun place to be.
- 6:08You work for CodeShip, obviously, and you guys have been a sponsor of the show for a long time.
- 6:12So thank you for that.
- 6:13Why don't you tell everyone what you guys do at CodeShip?
- 6:17Sure.
- 6:18So the main idea, I mean, just in terms of the messages, CodeShip is a continuous integration, hosted continuous integration and continuous delivery service.
- 6:27The main point there is that basically when you build software, you want to test it as fast and as often as possible to really know when something breaks.
- 6:35Like you want to do tests.
- 6:36You want to do test-driven development or write tests constantly.
- 6:39And then you need a separate system that whenever you change any of your code, push anything into the repo, that it runs all of your tests, all of your builds, basically.
- 6:48And doing that on your own local development machine is kind of a hassle.
- 6:52And oftentimes it's not done.
- 6:53Like we're all humans.
- 6:54Like we only think this small change will not break my whole application.
- 6:57And then it does.
- 6:59Yeah.
- 6:59Of course it does.
- 7:01And, you know, maybe it doesn't break on your machine.
- 7:03It breaks on someone else's machine.
- 7:05Exactly.
- 7:05Exactly.
- 7:06Have you seen the It Works on My Machine certification program?
- 7:10No, I haven't actually.
- 7:11So everyone out there listening, you should search Google for Works on My Machine certification.
- 7:16It's a really great certification program that basically marks you as a bad developer.
- 7:21Nice.
- 7:23I have to look at that.
- 7:24No, I haven't heard of that one before.
- 7:25Yeah.
- 7:25It's really like that whole thing is a huge problem.
- 7:28And so people really like the...
- 7:30And that's where the idea came from.
- 7:33Like we ran or I ran like CI for a lot of companies or like at university before.
- 7:37And it's just such a hassle.
- 7:39It's just so painful to run it yourself and maintain that stuff when you actually want to do...
- 7:45Like you actually want to get productive stuff done and like work on your customers' projects or like your own product.
- 7:50And yeah.
- 7:51So that's where it came from.
- 7:52Instead of having everybody else like do the boring task of maintaining the test infrastructure,
- 7:57we take that for them and then do it much better for everybody basically.
- 8:01Yeah.
- 8:01That's fantastic.
- 8:02When did you guys get started?
- 8:03We started in 2010.
- 8:06We talked a little bit about continuous integration.
- 8:09Maybe we could dig into that a little bit more.
- 8:12Like what is continuous integration?
- 8:14What are the steps?
- 8:15And like what's involved in that?
- 8:17Continuous integration as a term is heavily overloaded.
- 8:20I think at this point, a lot of people when they talk about continuous integration,
- 8:23especially in like small to medium sized teams, are talking about automated testing and running your automated tests on a separate system.
- 8:32So I think that's really the main goal of making sure that whenever anything changes on your code base, whenever you push anything anywhere,
- 8:41that it's run by a separate system, a separate system that makes sure that everything works and notifies you that the whole build has been working fine and everything has been working correctly.
- 8:53That's the main goal of the CI system.
- 8:55Right.
- 8:56I think a lot of people initially, you know, back when you guys started around 2010, saw that almost as a, here's an automated compile step.
- 9:05Maybe we'll run a couple of tests, you know, depending on whether you're working for with a group that's actually written the test.
- 9:13Right.
- 9:14And people have been adding more and more to it over time.
- 9:18Right.
- 9:19Yes, absolutely.
- 9:20So I think that's, that's something where like, I think continuous integration can be seen as more than just running your unit tests.
- 9:25I think that's something where in the end, like the way I would define is the important part is that at every point,
- 9:32the team should know that your application works as expected for your customers.
- 9:39I think that's the whole goal.
- 9:40Like, and that can be unit tests.
- 9:41That can be like functional level tests that can be deploying into a staging environment and like testing against that staging environment just to make sure it works there.
- 9:49I think it's the end goal.
- 9:51I think it's the definition that we really like is less about like the technical aspect of continuous integration.
- 9:56And I don't really like defining the continuous integration as like a technical process.
- 10:01It's more of like this thing needs to make sure that whenever I run something, that I never want to change something in my, my system.
- 10:10I can actually do that and not break anything for my customers.
- 10:13It should be very customer or like user driven.
- 10:16Like we want to make sure that we don't break anything because that's, that's actually like, that's why we, we build software.
- 10:22Like we want users to use the things that we've built.
- 10:25We don't want to break things for them constantly.
- 10:27And we want to move fast, like move fast and break things.
- 10:30But even better if you just move fast and don't break things.
- 10:33Right.
- 10:33Maybe you break them, but maybe you don't send the broken pieces to your customers.
- 10:37Yes, exactly.
- 10:38Exactly.
- 10:39Get, get that information very quickly.
- 10:41And I think especially like break things maybe in terms of like features that you remove or when you want to change your product, but not really like break things as in show a 500 error page.
- 10:51Like that just shouldn't be something that, that actually should be happening.
- 10:53And I think it's, I mean, all of us have like experienced that all, all the time.
- 10:58Like things when, when features break, when things don't work as expected anymore, when like there's a downtime, just a drain on like the product.
- 11:08You don't like the product as much anymore.
- 11:10And it just doesn't feel good at that point.
- 11:13And I think continuous integration and the process of really making sure from a customer's perspective that your application works is usually important and can really put a lot of, a lot of stop basically to unnecessary work that your team does.
- 11:27And has to do that.
- 11:27I mean, we've all been in those situations where we broke something.
- 11:31And so now the whole team has to jump onto fixing that thing.
- 11:34And like, it takes so much resources from the rest of the team.
- 11:37If you can capture that early and make sure that it actually works and it, and there's no issue.
- 11:42It just, it puts a lot less stress on the team.
- 11:45There's a lot less overwork that we need to do.
- 11:47So that's, I think the really important part of automating all of this and just making sure it works.
- 11:52It basically lets you focus on the fun part of software development.
- 11:56Writing cool new stuff.
- 11:58Yes.
- 11:58Not fixing things that were not broken previously.
- 12:01Absolutely.
- 12:02Absolutely.
- 12:03There's no worse thing than regressions that come in where things that are working or have been working are now broken for no particular reason, just because there wasn't anything in place to catch that.
- 12:13And so that's, that's, it's really important to make sure that that doesn't happen.
- 12:17Yeah.
- 12:17Yeah.
- 12:17I've noticed a lot of really interesting cultural behavioral shifts that seem to be out of proportion with the effort of setting up continuous integration.
- 12:26So for example, I've seen teams that they release every three months or every six months, you know, to me, that sounds insane, but that's how they were working.
- 12:36Right.
- 12:37Because they wanted to test it.
- 12:38They wanted to make sure they wanted to sort of put it in a box and say, okay, now we're ready to send out this next thing.
- 12:43And, you know, maybe the next week somebody created some great feature, but well, that's going to come out in three months because it's just too much effort to go through the release test deploy cycle.
- 12:55Yes.
- 12:55To justify going through that just to get this one feature out.
- 12:59But if, if all of that becomes push a button or push to a branch and it just happens, well, maybe all of a sudden when that feature is tested, it's ready to roll and you just push it out.
- 13:11Yep.
- 13:11And so I've, yeah, I've seen teams that have sort of gone from releasing these big, painful, slow things like, hey, we're all going to come in Sunday night when no customers are there, shut everything down, make sure the integration stuff works.
- 13:25It's to just much more fluid work.
- 13:29And I think that's great for the software.
- 13:31It's also great for the people that have to do it.
- 13:33It's way more fun to see your work that you do come right out.
- 13:37Yeah.
- 13:37Absolutely.
- 13:38I think that the whole team productivity and team happiness is a huge part of like automating your, your whole workflows and everything around it.
- 13:45Because I mean, in the end, the best people that we have in our team, and if you want to build like a high class engineering team, they don't want to fix broken things.
- 13:53They want to build interesting, new and cool stuff.
- 13:55So if you have a process that is continuously like bringing down the happiness in the team and continuously having the team have to shift resources between like building new stuff, but then fixing old stuff, building new stuff, fixing old stuff.
- 14:08That's just going to drive the best people in your team away.
- 14:11And I think that's a really good way to drive the whole engineering team into the ground.
- 14:15So I think making sure that automation and how we release processes all really help to strengthen team happiness and putting those into like the perspective of team happiness is, is really crucial because I mean, and also that that's something that we've seen that we've seen with customers that we've seen in our own team.
- 14:32Like when the build, like when the tests get unstable or something like that, that's a huge drain on like team productivity, team happiness.
- 14:40And just, it takes so much mental energy from the team and it just, it just puts people in a bad position.
- 14:46And I think that it really, like, it's not just about the technology.
- 14:50It's not just about the customers.
- 14:51It's a big part of that is that, but it's also about putting it into perspective of how can I make my team happy by not having them to do any like menial, boring tasks that I really don't want them to do on a daily basis.
- 15:03So that's some of the things that I think are really important when setting up all that automation.
- 15:08And, and we've seen that ourselves where we have teams basically like their release, even small teams, like their release process was like a week of like going through Excel, like having Excel sheets that had manual test cases in there.
- 15:20And like that took a whole week, like that, that took, like they took their backend, like backend, main backend engineers and just had them run through that because they didn't have any more people.
- 15:29Like their way of parallelizing all of that was basically getting more people, more engineering people in and like clicking through the application.
- 15:36And I mean, that obviously doesn't scale and like, and they've, but, but I think it's, it's so often like that path is just so set in stone for some teams that, that it really has to like, they really have to get the help to like be taken out of it and like see a different path, how it can automate this.
- 15:51And I'm sure like the developers were aware of how this could be done differently.
- 15:55But I think if you don't put it in terms of like making the team actually happy and just see it as a, that's just more time spent by the team and like not see it as, Hey, if we do this like two more times, like these three people will just leave.
- 16:07They just, they just won't keep up with this anymore.
- 16:10I think it's a much easier sell to actually do this.
- 16:12Yeah.
- 16:13That's a really interesting point.
- 16:15It seems crazy.
- 16:16Like as soon as you said Excel, like I started to get a little bit of a headache and, you know, it was just like, you don't want to do that.
- 16:24Right.
- 16:24Like that is, that is not what people signed on for, but you know, some places they seem to develop this culture where that's how software is built.
- 16:33And, you know, it comes probably from a good place.
- 16:35Like we can't break things.
- 16:36You know, maybe you're a bank or something and, and if you're down, it's, you lose a hundred thousand dollars an hour.
- 16:41Like you obviously want to avoid that.
- 16:43But you know, things like continuous integration and continuous delivery and all that sort of stuff can really help there.
- 16:50Yeah, totally.
- 16:50And I think it's also like, it doesn't necessarily, as you mentioned, we actually like there's like we, we, we worked with teams where they had exactly that, that problem that they were contractually obliged to not release.
- 17:01Like at a specific point in day, like they, they cannot release from, I think it was like 10 in the morning to like 6 PM or something like that.
- 17:07There is just like in the contract, you cannot release at that time.
- 17:12Just, you're not allowed to.
- 17:13So there is no continuous delivery for them.
- 17:15Like that's just not, or at least not directly to production because that's, that's not what their business is doing.
- 17:20But what they, they've done is just simply released to a staging environment, like continuously have something that is pretty much exactly what is, what production is released there on a continuous basis.
- 17:30And then run like tests against that staging environment to make sure it actually works then so that they can release like during the night or in the very early morning hours.
- 17:38And actually know that, that this works and then they're fine with that.
- 17:42So I think there's different ways how to set that up, how to make that work, that, that teams can do and that the teams can use.
- 17:49but it's really about like, how can I make my customers happy?
- 17:53How can I make my team happy?
- 17:54And how can I get the most like productivity and focus out of my team?
- 17:59Because I mean, in the end that's, we're in a, we're now in a world with software where like everything is basically software.
- 18:05Like every company, like an Uber is taking over the tax industry.
- 18:08Netflix and Amazon are taking over like basically everything or like the TV industry.
- 18:13So like a lot of these industries were in the past, they had a much stronger, part in like the real world, to call it the real world, are not taking over by companies that are software companies that are just intermediaries between like different people selling stuff.
- 18:27And so everything is software competition moves a lot faster in all of those fields because it's just so much easier and cheaper like AWS and all those other cloud services make it so much cheaper to get started with things.
- 18:38And then we have so little talent.
- 18:41Like there's so few engineers generally out there.
- 18:44Like everybody's constantly hiring.
- 18:46Everybody's constantly trying to find their people that it's just crazy to spend time of your engineers on doing something that some workflow or automated system could, could do for you.
- 18:56Because it's like, you need to get faster.
- 18:59Like you cannot slow down.
- 19:00Like you're just not allowed to slow down if you're in the software world anymore.
- 19:03It's just not, it's just over.
- 19:04Somebody else will come in and just eat your lunch.
- 19:06This episode is brought to you by Hired.
- 19:19Hired is a two-sided curated marketplace that connects the world's knowledge workers to the best opportunities.
- 19:26Each offer you receive has salary and equity presented right up front and you can view the offers to accept or reject them before you even talk to the company.
- 19:35Typically, candidates receive five or more offers in just the first week and there are no obligations ever.
- 19:41Sounds pretty awesome, doesn't it?
- 19:44Well, did I mention there's a signing bonus?
- 19:46Everyone who accepts a job from Hired gets a $2,000 signing bonus.
- 19:50And as Talk Python listeners, it gets way sweeter.
- 19:54Use the link Hired.com slash Talk Python To Me and Hired will double the signing bonus to $4,000.
- 20:02Opportunity's knocking.
- 20:04Visit Hired.com slash Talk Python To Me and answer the call.
- 20:07Yeah, that's for sure.
- 20:18Speed is definitely a foundation of your business itself, right?
- 20:22You mentioned Netflix.
- 20:23Those guys have tremendous amounts of software driving and cloud deployments and whatnot driving their whole business.
- 20:31And they have the policy that as an engineer, you can release whenever you want.
- 20:39Yep.
- 20:40You decide, yes, it's done.
- 20:42Out it goes.
- 20:43And they have all the processes in place.
- 20:44So it's that kind of stuff you can sort of make much more doable with continuous integration and delivery, right?
- 20:51Totally agree.
- 20:53Yeah, I think having those processes in place where I think for once putting a trust in the engineers,
- 20:57but also having things in place where maybe you just want to release this to like 1% of your customer base and just to try it.
- 21:04And like give those tools to your engineers.
- 21:05And it's obviously like at Netflix scale, that's a lot more doable than it is on like other people's scale,
- 21:11where like you can divert like 1% of your customer, like your requests to that specific new release.
- 21:19But I think in general, like I think teams should really think through like how can we support our team in like testing new things,
- 21:25in experimenting with new things, with moving faster.
- 21:28And yeah, continuous integration and continuous delivery are definitely an important part there to make sure that you can actually release there.
- 21:34And on the other hand, that you don't actually break stuff for your customers and you just don't break that buy button.
- 21:39So customers can actually give you money still.
- 21:41That's right.
- 21:42I think the other thing that would really helps people have confidence moving faster and just going with it is the ability to undo something, right?
- 21:53If the ability to say, oh, that's a bad, something broke, right?
- 21:57We thought we had the system in place.
- 21:59Turns out not quite everything was caught.
- 22:01And just push a button and roll it back as well, rather than, oh, we're going to be down for a day if we break this thing.
- 22:06Yep, absolutely.
- 22:08You need to have a way to either.
- 22:10So what we've seen often with continuous delivery, once people move to a point where like you can release so quickly, is that when you release like small batches at a time, then oftentimes people just don't.
- 22:21They don't really roll back.
- 22:23But oftentimes they just push forward with like, because you just released something that is incredibly small.
- 22:27So if there's a bug out there, you find it immediately.
- 22:30It's typically pretty quick to fix it.
- 22:32You fix it and push that new fix out there.
- 22:34So that's something that we've seen a lot of teams go to in terms of the process where you definitely need a way to roll back.
- 22:40Like that definitely needs to be in place.
- 22:43But we've seen a lot of teams that then just push forward and like just deploy a new version very quickly.
- 22:49Because you only deploy so small things that it's really easy to find like what the actual problem is.
- 22:55You don't deploy like work of like three weeks where like you have no idea, like something breaks and you have just no idea where it happens.
- 23:01It's just a combination of like five different things coming together and then breaking your application.
- 23:05But it's just actually a small thing.
- 23:07So because you're pushing so often and so fast, you can actually push more often and faster because you can find stuff so quickly and so easily.
- 23:16Yeah, I think that's a really good point.
- 23:17You talked about releasing on shorter cycles and sort of catching bugs early.
- 23:23I think, you know, the way that people run into trouble and the way that deployments become not fun at all is you save all of your work for three months and then you put it out on the real system.
- 23:35And then you figure out what works and what doesn't.
- 23:37And you find these problems.
- 23:38You have to go back and like completely analyze the whole system.
- 23:43Right.
- 23:43You know, what did you do the last three months?
- 23:45Well, let's start here.
- 23:46And the opposite of if I've been working for an hour, I put something out right then.
- 23:51Well, you probably know exactly what it is.
- 23:53Just like you said, it's super easy to fix, right?
- 23:55Yep.
- 23:56Yep, totally.
- 23:57And I think that's even something even for teams that have those three month release cycles, like where like maybe the business for some reason can only ship every three months.
- 24:05But then you need to find a way where push it to a staging environment, push it to like a QA environment, like push continuously somewhere.
- 24:13And make sure that that somewhere runs correctly and have some like sanity checks, like write a few test cases that just go through the happy paths and like one sad path of that application.
- 24:23And yeah, so happy path and sad path is basically like a test that should work and a test that shouldn't work as expected and walking through the application.
- 24:32And if you just, even though, you know, you're just releasing this in three months, but you know, today, like all the changes that have been happening over the three months have been pushed somewhere.
- 24:40They've been tested somewhere.
- 24:41Somebody looked at those somewhere.
- 24:43On a continuous basis.
- 24:44So once the release comes, there is no surprise anymore.
- 24:47There is no, no, nothing new that's coming in.
- 24:50It just, it's all been running somewhere.
- 24:51And, and I think that's something that every team can do.
- 24:54I think that's, that's, that there might be like, maybe somebody has some exotic example where this is absolutely not possible for some reason.
- 25:01But I think for the vast majority of teams, that's something that should not be too hard to do.
- 25:06And I think most people should be able to do that in some way or another, just to get that feedback early as possible to like make that feedback loop as small as possible and, and, and get going there.
- 25:18I find usually when people say that it's not possible, that usually is like some kind of sign that something's not quite put together right in the app.
- 25:26Right.
- 25:27So there's no way to test this part because it calls into this thing, which goes into this whole infrastructure, which does that other, you know, maybe, you know, you need some, some way to break your app up.
- 25:38Some design patterns, dependency injection, things like this, that will actually allow you to break your app into the small pieces that you can test and should be testing.
- 25:46Agreed.
- 25:47If it's too complex to test it, then it's probably just too complex for anything.
- 25:50Yeah, that's, that's a great, great way to put it.
- 25:53I have my own opinions on this, but I'll ask, I'll get yours.
- 25:57Is there like a size of a team where you should start doing continuous integration?
- 26:02Like if there's only two of us, should we do this?
- 26:05Is it worth it?
- 26:06And is there an upper bound?
- 26:08Like, you know, if you have 200 people, it's like just too, too crazy, too complicated.
- 26:12Yeah, I think I'm, I'm obviously like totally biased in that regard.
- 26:17But I think, yeah, there is definitely, I think you should do CI on, on every level of, on every team size.
- 26:23I think it just, the approach to CI becomes different on, on different team sizes.
- 26:28I think that especially like if you're one or two people, like early product, just a proof of concept or something,
- 26:35you might just want to do something where you write like a few tests and then it depends on like, do you have customers or not?
- 26:41But in the end, like you, you don't want to break stuff for your customers, especially not your early customers, because they're the ones, even though they expect it to break.
- 26:48They're the ones that can be the most committed evangelist for your product.
- 26:52So if you break it for them, then you just lose basically your whole marketing team in the early days.
- 26:57Like the evangelist, the people that you, the outside people, the outside users and customers, your early users are your marketing team.
- 27:04They are the ones who are going to talk to everybody else about your product.
- 27:07So you don't want to break it for them constantly.
- 27:09So what you can do there, instead of writing like a million small unit tests, you just make sure that you have like 10, 15, 20, very high level tests that make sure like the most important workflows of your application aren't broken.
- 27:21Like, so people can sign up, people can like, whatever is the main business function of your product.
- 27:26People can do that.
- 27:27Like the main things and, and, and those can be easy to write.
- 27:30They, they can be on a very high level.
- 27:32So they don't break constantly, even though you're changing your application and they just make sure that like your customers can do at least the most important stuff on a constant basis or like the, especially early users.
- 27:43Like if some small feature on the sidelines gets broken at some point, like they'll miss it and they'll tell you, but it's probably not going to break everything.
- 27:51For them and they're probably not going to like leave the product or like leave the, the, the, like evangelizing for you that quickly.
- 27:58But you should write something where like at least the most important and main paths of your application are covered so that you can push faster.
- 28:06I think that's also something like in your early times, like you want to move so fast, like you want to push your product out the door as quickly as possible.
- 28:12And then again, like if you push something out the door that breaks other features and you don't know it and you like, you only know, like after a couple of days that it happened,
- 28:20and you don't know exactly what broke, like it takes so much time away from, from actually doing something productive that spending a little time on like writing good tests and writing tests from the right perspective of the user on a very high level actually makes a lot more sense.
- 28:36So I think the larger the team gets, the larger the code base gets, you want to like go lower in, in that stack in terms of like high level tests.
- 28:43So you go away from like, maybe in the beginning, you just write tests like with Selenium or something where you actually like, you just point a browser at your application and just click through your application automatically.
- 28:52So you actually know that like these things work on a relatively low level as well and not just on the higher level, but you still want to keep that higher level tested very well.
- 29:13So you know, because in the end, like that's what customers care about.
- 29:16Like a customer doesn't care if the unit test for a validation on a model works or doesn't like, that's not important to them.
- 29:23The important part is, does the workflow work?
- 29:25Does the product work?
- 29:26Does the feature work?
- 29:27So that needs to be tested in my opinion at first.
- 29:30And once you've tested like those few happy and sad paths on the upper level, then you can go like, okay, I've tested like that a validation in generally fires and, and, and error message gets shown on the web UI.
- 29:43So now let's, let me write like 10 more tests about like all these different validations that we run on the model before we save it.
- 29:50and, and before that works, because I don't want to test all of them on a very high level because that would be really slow.
- 29:55So you want to have that mix of like slow, very high level tests to make sure that from a customer's perspective, it works.
- 30:01And then lots and lots of like smaller level tests that verify specific things that you, you wouldn't want to verify on the higher level because it would just take too long.
- 30:12So that's at least the mix that I, that I found and that we found works pretty well.
- 30:17And that really captures and catches a lot of problems early on that, that might impact your, your customers.
- 30:23That's a really pragmatic and powerful way to look at things.
- 30:28I guess the way I would kind of summarize that is don't let the perfect be the enemy of the good.
- 30:33You know, don't let, don't let the goal for saying we must have a hundred percent test driven development.
- 30:38We must have 95% code coverage push you into a point where you say, well, but we have to go faster.
- 30:43We're just going to do zero.
- 30:45Yeah, no, totally.
- 30:46I agree.
- 30:47And I think that's, it's, it's a misconception, misconception that that makes you faster, that not writing test makes you faster.
- 30:53It just makes you, it only makes you faster.
- 30:56If you don't count the times where you have to actually fix things.
- 30:59Like if you do that, then it's just not going to make you any faster.
- 31:03It's just going to make you slower in, in my opinion or, and in my experience, like that's what we, the experience that we've had from, from the teams that I've worked in and from many, many, many different customers that I've talked to.
- 31:15And I've worked with that writing, you have to do it the right way.
- 31:18Like, and I've seen teams that have gone up from like early teams that have written thousands and thousands of low level unit tests, but their application still broke constantly.
- 31:27Like that's not really the right way to go.
- 31:30Like the, in my opinion, the right way to go is really see it from a, from a customer perspective and whatever the customer needs to make sure that it validates well and that it works well.
- 31:39That's what you should focus on.
- 31:40Yeah, that's a good point.
- 31:41And my rule of thumb is kind of when I, when I look at the part that I'm trying to test or think about whether I should write a test for it, I think is the customer actually paying me for this part of my application?
- 31:55You know, is, is this my core business?
- 31:57So like, is this the trading engine?
- 31:58If I work at like a, a stock based company or is this, you know, the continuous integration execution part, if I work at CodeShip or something like, does the, the, about our team page work or not?
- 32:11Like, you know, I don't really care and I'm not going to put energy into it, but if people are paying me for that part, right?
- 32:16My company, then probably that part should have a test.
- 32:18Yeah, exactly.
- 32:19And I think it can be simple as like, open up the page and see if it, if the page throws an error, like it doesn't have to be like, that's like for, for a lot of things.
- 32:28And that's something, for example, like when we deploy something new, like we deploy into a staging environment and just simply open up the application.
- 32:34And that captured a lot of different problems from, or like not a lot, but like from time to time, it captures something where maybe we've done something wrong in the configuration of the page and just the whole web app doesn't load.
- 32:43And it really pays off to just load one single website or like one single page of the application just to make sure like, does this thing actually boot when we push it somewhere?
- 32:53And that definitely captured a couple of times where like, we would have pushed something out that, that wouldn't have, that would have gone bad.
- 32:58And it didn't.
- 33:00And it was very easy to catch and very easy to deploy a fix for that.
- 33:02And, and it never saw, saw the light of a customer.
- 33:05But I think that putting that, that in place.
- 33:08And I think especially the about page is, I think a good example, because that's something like you wouldn't put a lot of effort into setting up an infrastructure to test your about page.
- 33:16So that should just something that should be there because you need it for many other things as well, like to, to just make sure that your about page is actually loaded and can actually be shown is something that shouldn't take more than a few seconds basically to implement in, in a test.
- 33:30But it's really critical because you are, you also don't want to like, you don't want your about page.
- 33:35Like if somebody looks up your website and the about page breaks, that's kind of like, that's not really a good sign.
- 33:40Like, especially for a tech product, like I would at least expect the about page to load.
- 33:44And I think that's some of the things where like, it should be easy.
- 33:48It should be fast to, to test that.
- 33:50Then there should be like a lot of different ways how you can do that.
- 33:52But yeah, your developers shouldn't have to spend a lot of time on, on doing that.
- 33:55Yeah, I agree.
- 33:56And like you said, just making requests to the page and seeing if a 200 rather than a 500 comes back actually can do quite a bit.
- 34:04Yeah, that catches a lot of stuff.
- 34:05This episode is brought to you by DigitalOcean.
- 34:23DigitalOcean offers simple cloud infrastructure built for developers.
- 34:27Over half a million developers deployed to DigitalOcean because it's easy to get started, flexible for scale, and just plain awesome.
- 34:34In fact, DigitalOcean provides key infrastructure for delivering Talk Python episodes every day.
- 34:41When you, or your podcast client, download an episode, it comes straight out of a custom Flask app built on DigitalOcean, and it's been bulletproof.
- 34:48On release days, the measured bandwidth on my single $10 a month server jumps to over 900 megabit per second for sustained periods, and there's no trouble.
- 34:58That's because they provide great servers on great hardware at a great price.
- 35:02Head on over to DigitalOcean.com today and use the promo code TALKPYTHON, all caps, no spaces, to get started with a $10 credit.
- 35:10In the early days, back in 2008, 2009, 2010, it was all about continuous integration and making sure that we could check in our code,
- 35:29that if we're using a compiled language, it compiles for writing tests, the tests run in an automated sort of way.
- 35:36But since then, people have been moving on to actually turning this whole system into actually a deployment mechanism, right?
- 35:43Like I can check in and magically stuff is in production.
- 35:46And that's called continuous delivery, right?
- 35:48The main idea with continuous delivery is that you keep your application in a state which either can be or is deployed somewhere constantly.
- 35:58And I think the important part that can be through CI, that can be by deploying it to a staging environment,
- 36:02but that can also be by just pushing it out there on a continuous basis.
- 36:06How would I go about that?
- 36:08Like I totally know how I check into Git and I set up a continuous integration server to pull that and run my tests.
- 36:13But how do I get that, say, into my, like if I wanted to do continuous delivery,
- 36:19how would I actually make changes to my server in AWS, for example, or DigitalOcean, something like that?
- 36:25So I think the important part there is that to take one quick step back and something that we find really important for continuous delivery in general is how you start triggering those changes.
- 36:36Basically, I think continuous delivery and the whole deployment part of continuous delivery really needs to be also fully automated and done by like the CI or continuous delivery system for you.
- 36:49Because in the end, like what you want, even like on a daily basis, like if you deploy all the time, you don't actually want your developers to think about like, okay, now I actually have to deploy this.
- 36:58Like what you want them to do is here is code and like I'm merging code into master and just do stuff to it.
- 37:06Like, but, but you want them to like focus on the code all the time, like on a, on a daily basis.
- 37:11You, you don't want anybody to have to think about like deployment strategy and how, like which script do I run in which way and where do I get which credentials, all that kind of stuff.
- 37:19So I think the important part and the way we see it is in terms of triggering it is through the repository.
- 37:25So we think the repository, is a really great way to capture the intent of releasing something.
- 37:32Like if you merge something from a feature branch into the master branch, like there is some intent to like test it, but also put it somewhere.
- 37:39So you can use that and just say, basically whenever you're on a specific branch, like run all the test, commands and then also release them to, to production.
- 37:49But at that point, like the developer can already be working on something completely different.
- 37:53and, and just is already jumped into the next task and, and works on the next thing, next thing, or, or gets a coffee or has a chat with somebody else on the team, but they don't have to actually think about this.
- 38:03I think that's, that's a core part of continuous delivery.
- 38:06because you really only want your developers to focus on code on a daily basis.
- 38:10That also helps with a couple of other things because it's easy to move between different parts of the infrastructure then because so for example, it doesn't matter.
- 38:18If you're working on like, if you want to release changes to your DNS system or your main web application.
- 38:22If all the things you need to do is merge code from a feature branch into the master branch and then it gets released.
- 38:27Like that's easy to understand.
- 38:30for anybody and anybody can go into any part of the infrastructure application.
- 38:35And, and actually do it then.
- 38:36And from then on, it depends, totally depends on like the specific technologies.
- 38:39If you want to use something like a platform as a service, like a Roku or an AWS elastic beanstalk or have your own servers, different ways, different tools, different abilities.
- 38:49But I think the important part is really capturing it in an automated fashion, but in a way where like it just happens kind of automatically for, for developers.
- 38:58Like they know it happens, but they don't have to consciously think about it.
- 39:01Like at some point, like that merge button on GitHub in a pull request is just like you're merging code and then you're off to the next thing.
- 39:08And you don't really actually think about the deployment at all at that point anymore.
- 39:12Yeah.
- 39:12That's, that's really cool.
- 39:13Deploying modern software can involve a lot of infrastructure and a lot of pieces, especially if you're doing like microservices, it can involve a whole bunch of them.
- 39:22Right.
- 39:23And so if you can automate that, even if it takes you a week to automate that, and normally it would take you a half hour to do a deploy, the speed that you get on the other side of that, the ability to, like you said, push a button, merge to a branch and just magically new software is out.
- 39:37That's, that's really cool.
- 39:38Right.
- 39:38Totally.
- 39:39I think that's, it's just more of the, I think it's more of that focus and productivity for your engineering team.
- 39:45Like that's something that is always important.
- 39:48It's really, really, really important that the engineering team can focus as much as possible on getting new stuff out there and building new features and product for, for customers and anything else that is in the way.
- 40:00And that is manual testing that is thinking about the release process in terms of like, how do I actually get this out the door?
- 40:06That's all wasted time.
- 40:07Like that just shouldn't be.
- 40:09And it's not just wasted time on like existing engineers who actually know that, but actually when you onboard a new engineer and you have to walk them through like every single way that you deploy all the different systems.
- 40:19It, that's just a huge time investment that you need to do.
- 40:23And, and on the other hand, if you just tell them like, yeah, open up a feature branch and like that, then just merge it into the master branch.
- 40:29And like, this is just a technology, like technologically, you, you know, like it's just a, I don't know, Django or a rails application.
- 40:36Like, you know how to work with that.
- 40:38Like our infrastructure might be a little bit different than what you've seen in the past, but you don't really have to worry about that at all.
- 40:44Like just do your code and like, just merge it in.
- 40:46And over time you'll learn more about like how actually the whole system works.
- 40:51And I think it takes away some of that stress of onboarding new people.
- 40:56And that, like that, that wish that a lot of companies have where like you, you have somebody new and like they should release something on day number one, which I'm not the biggest fan of.
- 41:04But at least in the first week, I think that it just puts a lot of pressure, unnecessary pressure on everybody to have them release on day number one.
- 41:11But I think it removes a lot of that, that, that, the pressure, like the problem with like showing somebody how that stuff actually works.
- 41:18And instead, like you tell them five minutes how the workflow works and then they couldn't do it anywhere from, as I mentioned, the DNS system to like your main application, to your back end application, to whatever.
- 41:30Yeah, that makes a lot of sense.
- 41:32You talked about earlier having different levels of tests and running them possibly at different times.
- 41:37Obviously, you would want to run your tests before you go through and push it through the continuous delivery path.
- 41:43Do you see people having a different set of tests for like a regular feature branch check-in versus this final step?
- 41:52Would people write, like run more tests if maybe their tests are slow or something?
- 41:55Sometimes.
- 41:56I think that's mostly due to time constraints, though.
- 41:59I think that's, and I think that's also something like that.
- 42:02I mean, that's one of the challenges that we try to solve for them.
- 42:04It's basically giving them a system that makes it so fast that they can run anything in parallel.
- 42:08But yeah, we definitely see that where people like they have a lot of like they run their maybe unit tests on every feature branch and run like their full on like integration or like functional testing suite only on like the master branch.
- 42:24This definitely happens.
- 42:25But yeah, I think so from what I've seen, I haven't seen a team that says I don't want to run it on like all the tests on my branch.
- 42:33It's more I can't run it there because it's just too slow.
- 42:36So I think it's a lot of it is just down to like optimizations in the test suite and like making it faster and making it more parallelized, all that kind of stuff.
- 42:43Yeah.
- 42:44If it takes two hours to give you feedback, even on your feature branch, it's maybe better to save it for later.
- 42:49So you know right away whether it's mostly good, right?
- 42:51Yeah, exactly.
- 42:52Exactly.
- 42:53And I think that's so what we've seen.
- 42:54I think like a team should get their whole build on like a feature branch.
- 43:00I'm not including deployments on a master, but just like running their tests.
- 43:03If you can get it down to like two or three minutes, that's below the level of like where people actually have to think about it.
- 43:09So when I was thinking about it, like as a developer, like I code something locally, I commit something locally, I push it into the repository.
- 43:16And if I get an answer, if that works or not in like two or three minutes or in less than that, I actually, I don't think about it actually again.
- 43:25Like I'm still coding on the next thing.
- 43:27And at some point, like a notification pops up that tells me, hey, everything worked on that thing that you just pushed or a notification pops up.
- 43:33It didn't work.
- 43:34And like you have to like fix something that you broke on that feature branch.
- 43:38But it's not like while I'm still working on the other thing, I'm not thinking like, hey, did this already finish or is this still running?
- 43:43I think that's like two or three minute like level.
- 43:46I think anything beyond that.
- 43:47Then the problem is that you're sitting there, you're coding on your stuff.
- 43:51You're thinking, hey, wait, did my build already finish?
- 43:54Let's just look that up.
- 43:55So you go to a browser, you open up the build, you open up the build page, and you've just lost a little bit of time.
- 44:00You lost focus from your development effort.
- 44:02And like over time, like if you have a large team and like a lot of people that have to do this constantly, that just is a lot of focus lost from actually developing.
- 44:12So I think we like our goal is really to get any team of any size to a point where you can actually run the builds in like this two or three minute time window where you're not actually actively thinking about the results of your build.
- 44:27And you just basically keep working and you just constantly keep working and you just get notified, hey, this thing worked and now this thing worked and now this thing worked without having to go back.
- 44:36And I think that's something that in my opinion, people really should strive for.
- 44:40Again, it's all down to productivity and focus for your engineers.
- 44:44Anything that takes even slight productivity and focus away from your engineers is something that actually hurts your bottom line.
- 44:50And so that just you have to get rid of that.
- 44:54Yeah, there's a lot of talk in programming about flow and focus and getting into the zone.
- 44:58And these things just can really kill that if you're like half still thinking, well, the thing that I did, is it actually okay?
- 45:05Or can I go forward assuming it's okay?
- 45:07Or, you know, do you know because the build finished that you're fine, right?
- 45:11Exactly, exactly.
- 45:12And if it just takes 15 minutes, like you're just going to come back, like you're just going to open up the page.
- 45:16And like then you open the page, you wait for the build to finish, like you open up Reddit or something.
- 45:20And like it's just like all that kind of stuff is just it's taking away that focus.
- 45:24And I think it's really important to keep that flow, to keep that focus going.
- 45:27Sure.
- 45:28So what's the longest or the craziest build you've seen running?
- 45:32Definitely people who were like, so where it's been over, like we ran it through the night.
- 45:39And at some point, like we just we just stopped because it just took too long, basically.
- 45:43I mean, there's definitely things where like it takes hours and hours.
- 45:45And I think a lot of it comes down to, especially with the teams that we work with, they're not like huge enterprise, like 48 hours straight, like running through like 100% CPU usage.
- 45:57It's often just comes down to optimization.
- 45:59I think oftentimes teams, they build their test suite and it gets progressively slower.
- 46:05Like no team starts out with like a two minute build.
- 46:09And then like three weeks later, it's like at an hour.
- 46:12Like it just happens over a longer time.
- 46:14Like it's two minutes, then it's three minutes, then it's five minutes, eight minutes, 15 minutes.
- 46:18And just it gets slower and slower and slower.
- 46:21And the team never really does the decision to like make this faster and look into it.
- 46:26So I've certainly seen teams where the tests have been running and they've been running slow, but they've only been running slow because they didn't really look it.
- 46:34And I mean, that has been the case with us, like a couple of like or a year ago, like one of our engineers joined and he's really strong on like optimizing test suites.
- 46:42Like that's, that was, he's been doing like for a while and he got our test suite down from 15 minutes to like three or something.
- 46:49And that's, and we're pretty good with like test suites.
- 46:53And I think that's something where like he just invested the time.
- 46:56He had the experience, knowledge about it.
- 46:57Obviously he then blogged about it on our blog.
- 46:59So we always try to keep that up.
- 47:02But that really helps like spending time on actually making your test suite faster and seeing where it's slow and how to make it faster.
- 47:09And actually like setting an SLA.
- 47:10Like I think as a team, you should set an SLA on your test suite.
- 47:15And if it just takes longer than that SLA, you just put resources on it to make it faster.
- 47:20Because otherwise, if you're just progressively letting it get slower and slower and slower, again, it'll just stop the process.
- 47:27Like continuous delivery really relies on your test suite being fast.
- 47:31Because if it's not, then your developers have to constantly wait for the results of what's happening.
- 47:36And there's nothing worse than having to wait on like the build result getting in before you can open up a pull request.
- 47:42And like you can ask other people for like feedback or maybe somebody has already looked into it and like given you feedback and done a code review.
- 47:50But then the build comes back half an hour later and tells you, wait, this actually failed.
- 47:54Like you have to recode it in some way.
- 47:56And then they do have to do another, go over it and do a code review.
- 48:00And like that just takes so much productivity away from you.
- 48:03Yeah.
- 48:04And wait again, right?
- 48:05Wait that 15 minutes again.
- 48:06Exactly.
- 48:08So like once you feel like, and I think having a strict rule of like our build should be that fast.
- 48:14And then dedicating resources to it.
- 48:16It's so much cheaper than like just waiting, like putting the resources on features and just waiting.
- 48:21Like it's not going to magically become faster.
- 48:24And it's just going to block your team like crazy all the time.
- 48:27And it's just so frustrating if the test suite is slow that you really should dedicate resources to it.
- 48:33It's just, it's developer productivity.
- 48:35Developer productivity is really important.
- 48:36Developers are really expensive and it's really hard to get new ones.
- 48:40So you really, really should make sure that your team is productive, your team is happy and can actually work on the most important tasks.
- 48:47And yeah, making your test suites fast is definitely something that pays off very quickly.
- 48:53Yeah, totally agree.
- 48:54When you're talking about continuous delivery, the putting the new version of the source code or the compiled bits on the server and making that run, it's pretty straightforward.
- 49:03But usually it gets really sort of tricky when you're talking about databases.
- 49:07Yep.
- 49:08What do you see people doing there?
- 49:09Putting a lot of it into services.
- 49:12I think that's something that's a relatively consistent theme that we've seen is like maintaining databases is really, really hard.
- 49:19I think continuous delivery is definitely something where you can't, whenever you store state, that's really hard to continuously deliver.
- 49:28And so I think a lot of teams, and that's certainly us as well.
- 49:32We just put that off to a service and we just let Heroku in our case or Amazon RDS deal with that because they have the infrastructure and the knowledge to actually do that.
- 49:43If you run your own data system, it's definitely possible to do that with the follower, like do some level of replication and then switching that over.
- 49:50But it's generally really, really hard.
- 49:52And the question is, whenever I look at like how often we deploy our web application and how often we would have to upgrade our database, it's not really that big of a deal to deploy.
- 50:04Like you don't really have to deploy like some infrastructure parts and parts where you store state that often compared to like the things that you that don't store state and that you can actually push constantly.
- 50:15So I think a lot of teams don't even have to really spend a lot of cycle on like, how do I actually continuously deploy like my database?
- 50:24Because oftentimes it's just fine enough to do it like on a Sunday morning and like do a one hour window there where you like just do a follower, switch over and then stop out the other one.
- 50:35So I think that's something where I think it's again, like don't let perfect be the enemy of good.
- 50:41And I think really focusing the continuous delivery on the parts that you actually can control very easily, mainly being like everything that you don't have stayed in makes sense.
- 50:50And then I think putting the other systems into like a service, putting it into like a Roku, into an RDS, at least for us, I think that's like, I'm not, I'm not in the business of maintaining databases.
- 51:02Like that's not my product.
- 51:04I just need a database.
- 51:06So if somebody else can provide a really good product around the database, that's totally worth it for me.
- 51:11And so that I don't have to do that.
- 51:12And again, put my developers on a much more productive for our customers, much more productive and for our business, much more productive path.
- 51:19So I think that's how we typically try to deal with it.
- 51:23But I think, yeah, for most companies, if you really, really have to do like zero downtime database updates, then you're, you're probably in a position where like you have enough resources to do that.
- 51:35Because if you, if you're really small, but you have to do like zero downtime database deployments, you're something on the business sounds a little bit off because that sounds really hard to do.
- 51:47Like if you have little customers and you're a small team, but the customers don't pay you a lot.
- 51:51But on the other hand, they, they still can require like really hard technical things like continuously updating or like zero downtime deploying new databases.
- 51:59Like that's not easy.
- 52:00Like then there's probably, you're not making, like you should, you should totally get more money from them.
- 52:05But on the other hand, I think that's, yeah, just don't worry too much about it.
- 52:09If you can just get away with a like Sunday early morning update.
- 52:13I think it's just, it's just really hard for small teams to do that.
- 52:15Yeah, it definitely is.
- 52:16So one of the things I saw you guys talking about is Docker.
- 52:20And I think Docker is going to become increasingly important in the whole way that we host and maintain and evolve our applications.
- 52:28What's the story of Docker?
- 52:30So generally I fully agree.
- 52:32I think it's, it's definitely a very important part of how we will build Docker and like containers and generally like very low level and easy to do virtualization is a big part of how we're going to build infrastructure in the future.
- 52:46So for me, a lot of the things that are important there are that when the system can maintain itself, it just, you, you easily push a container out that has everything in there that to actually run your application, which also makes that separation between developers and operations much easier because the developers can actually fully control what's actually running as part of their, their application.
- 53:08But it's still fast.
- 53:09But it's still fast.
- 53:09So that's really important.
- 53:11And on the test and continuous integration side, obviously, it's really key for us in the future.
- 53:17So we've just rebuilt our whole system basically to run on top of Docker.
- 53:20And, and, and the main idea there is that developers should be able to control their build environment fully.
- 53:27And each repository is different.
- 53:29Each repository and each application needs a different setup.
- 53:33And, and Docker can definitely provide that.
- 53:36And that's just not limited to like code chip.
- 53:38I think that's, many people are using it for many different ways in their, their test and, and, and CI setup, but it's really about giving the development team a lot more power about the infrastructure that the code is running in.
- 53:50and so that the operations team, like there's a clear separation between like how to run the whole container.
- 53:57Like that's just a clear interface.
- 53:58And then whatever's inside of it, the development team has full control over that.
- 54:02And I think that's like that separation of concern that you don't just throw code over the wall basically, and just let the operations team or somebody else deal with it, is really key.
- 54:12And then you can do a lot of, a lot more automation around it, like a lot more health checks, a lot easier way to like, run several instances of that, get it up and running again.
- 54:21When something goes down, really use the most of your resources, in your machines.
- 54:26So I think Docker and, and the way I think it's less about just the technology of Docker and like Docker as a company, although I think they're doing great and, and they're providing great, a great product.
- 54:36I think the more important part there is that it really enables, developers and the whole team to take full control over their environment and work in a different way where it's not just about like, let's update those three servers that we're running, but just.
- 54:51Let's push this artifact into like our environment.
- 54:54And then our environment decides where, when, and in how many items this artifact is running.
- 55:00So I think that's something that is, is really critical where you have a lot of more separation of concerns there where you don't have to think about everything all the time.
- 55:08And there's just a system taking care of, of a lot of this, and nice abstractions in place, to make this, this run and work.
- 55:16Yeah, that's cool.
- 55:17It seems like Docker and continuous delivery go well together because now you're almost able to deliver the infrastructure.
- 55:24As part of this, right?
- 55:25Here's the Docker container for this version plus my code, right?
- 55:29Yeah, absolutely.
- 55:30You just have a bunch of servers running and that can be in a cloud that can be as a cloud service that can be on your own infrastructure.
- 55:35And all that thing provides is just a way to run arbitrary Docker containers.
- 55:40And I think that's really powerful because again, like the development team can take full charge.
- 55:45Like no, no operations person has to know which version of Java runs in there and they don't have to be involved in our Python or Ruby or whatever.
- 55:52They don't have to be involved in like updating that or making sure that like all the different projects that are running as part of the company all need to use the same Java version because otherwise like stuff will break all the time.
- 56:04Like it totally frees every team, every repository, every developer basically to use whatever is best for that specific problem and not have to deal with like all different complexities of running application, like many different applications on the same kind of infrastructure.
- 56:20And virtualization in the past has definitely gone a long way there.
- 56:23But then it's just like, it takes a lot more resources to do that.
- 56:27And with Docker and containers, it just takes a lot less resources that the underlying technology has been, is proven.
- 56:32Like Google runs their operating system on it.
- 56:34Facebook runs, runs their operating, like their data centers on it.
- 56:38So I think we can say that this actually scales to whatever.
- 56:42I think we just need the tools to make it scaled down.
- 56:44Like we just need the tools to make it scaled down to like small teams.
- 56:47And I think that's what really Docker is providing a great tooling for that we can use containers for like a lot of different stuff, a lot of different workflows, a lot of different processes in our either production systems, but also in, in our whole build environment, in our whole build system.
- 57:04So I think that's where it's, it's really about control and giving the developers the utmost level of control about everything they're running as part of their application and not have other people either take away control or have to worry about that control at all.
- 57:17So I think you're absolutely right.
- 57:19I think Docker just moves a little bit more of that control back to the software team.
- 57:25And by virtue of that moves it into this continuous integration story, right?
- 57:30So we can build out these Docker containers and I can say, you know, look, if we're going to switch from, let's say Python 3.4 to 3.5 and use some of the new features there, I don't have to make sure I coordinate with the infrastructure team to make sure that the right versions of Python are on the servers we're going to push to.
- 57:46When we do continuous delivery, we just say, well, we're just going to push a different version of the container and boom, it works, right?
- 57:52Yeah, exactly.
- 57:53And on different branches, maybe like on a different branch, you want to test against the new version of Python.
- 57:58Because like on the master, you're still running against a different version of Python, but on the feature branch, because you want to update, you're running against new version there.
- 58:04So you want the whole build environment and the whole deployment environment to run on a different version.
- 58:09So nothing other than that, than just changing it in a config file and using a different one.
- 58:13That's a really interesting component to it as well, because, you know, as you move forward, you're sort of moving forward in time on your infrastructure and all the other pieces as well on your, your branch.
- 58:24And so if you need to go back one month and run code from back then, if maybe solve a bug that somebody reported on a different version of your code or something, you, you know, to really do that.
- 58:34Genuinely, you have to like somehow roll back your system to that level, right?
- 58:39But if, if the Docker container specification is part of that, that check-in history, you can literally roll back to what you built it on, right?
- 58:47Yeah, absolutely.
- 58:48You can have the exact same.
- 58:50I think that's, I mean, and as I mentioned before, like that's, that's why we built a new system on top of Docker to be able to exactly support that.
- 58:56Like that should be easy.
- 58:57Like you should be able to run, to roll back to like your build workflow, your code, your environment that you built, like everything.
- 59:03You should be able to roll back everything and like have a complete history of, of everything that happened as part of your, your build and even production system.
- 59:12Because only then, like, as you mentioned before, like if you want to do a rollback, if you want to fix something, if you want to look into something, debug something, there isn't really any other way to do it than to be able to go back historically and like really look up what exactly happened there.
- 59:24Yeah.
- 59:24Yeah.
- 59:25Very cool.
- 59:25So yeah, we'll see more Docker in the future.
- 59:28I'm sure.
- 59:28I'm very sure.
- 59:30Yeah, definitely.
- 59:31Okay.
- 59:33So we're getting kind of to the end of the show.
- 59:35Do you have a final call to action or something you'd like to make sure people go out and try and do?
- 59:41So two things on, on, on, on, on the one side of obviously if, if people are interested in like a Docker based, CI system, give us a call.
- 59:48we're happy to show you guys, what we're doing there.
- 59:51But I think on a, on a non coaching basis, I think we really, really, really need to need to make sure that as a community, we focus more on the productivity and focus of our engineering teams.
- 1:00:04Like that needs to be number one, like customer success, obviously.
- 1:00:07And then, but that is driven and done through productivity and focus of, of our engineering team.
- 1:00:14So I think that anything, and we deeply need to analyze on a daily basis, like how is our engineering doing things?
- 1:00:20What can we change?
- 1:00:21What's in their way?
- 1:00:22How can we improve the processes?
- 1:00:24What can we automate?
- 1:00:25How can we automate operations more?
- 1:00:28How can we automate automatic health checks so that there's no downtimes and no issues or problems there?
- 1:00:32Like how can we do all of that, so that they can actually focus on building stuff for our customers that actually makes us money and is interested in new technology.
- 1:00:41So I think that's something that is, is really key and really important.
- 1:00:45And that would be my main takeaway for, for people like really, really focus on those processes to make sure that your team can actually focus as much as possible on to building stuff for your customers.
- 1:00:58Yeah, that's great.
- 1:00:58I really love the focus on team happiness because I think it often gets lost in the technical bits of this story, right?
- 1:01:06Yes, absolutely.
- 1:01:08Flo, it's been great talking to you.
- 1:01:10Thanks for being on the show.
- 1:01:11Yeah, thanks for having me.
- 1:01:13It was great.
- 1:01:13You bet.
- 1:01:14Talk to you later.
- 1:01:14This has been another episode of Talk Python To Me.
- 1:01:18Today's guest with Florian Motlick.
- 1:01:20And this episode has been sponsored by Hired and DigitalOcean.
- 1:01:23Thank you both for supporting the show.
- 1:01:25Hired wants to help you find your next big thing.
- 1:01:28Visit Hired.com slash Talk Python To Me to get five or more offers with salary and equity presented right up front and a special listener signing bonus of $4,000.
- 1:01:36DigitalOcean is amazing hosting blended with simplicity and crazy affordability.
- 1:01:42Create an account and within 60 seconds, you can have a Linux server with a 30 gig SSD at your command.
- 1:01:48Seriously, I do this all the time.
- 1:01:49Remember the discount code too.
- 1:01:51It's Talk Python, all caps, no spaces.
- 1:01:54You can find the links from today's show at talkpython.fm/episode slash show slash 38.
- 1:02:00Be sure to subscribe to the show.
- 1:02:03Open your favorite podcatcher and search for Python.
- 1:02:05We should be right at the top.
- 1:02:06You can also find the iTunes and direct RSS feeds in the footer of the website.
- 1:02:11Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.
- 1:02:15You can hear the entire song on talkpython.fm.
- 1:02:18Just look for music in the nav bar.
- 1:02:20This is your host, Michael Kennedy.
- 1:02:23Thank you so much for listening.
- 1:02:24Smix, take us out of here.
- 1:02:26I'll see you next time.
- 1:02:47you
- 1:02:48I'll put it in.
- 1:02:48Thank you.