That's the CI part of it. But now that we have our app built and tested and ready for primetime with users, we also want to deploy it. And CD is the part of it that actually does the deployment. And, yeah, again, it doesn't matter what environment you're deploying to, it could be a preview environment for your Vue app or it could be a production Kubernetes cluster that you're trying to get this software to or anything in between, really.
But, yeah, the continuous deployment step is that. And as you might imagine, this whole CI-CD thing has many dimensions that we need to essentially be on top of, we need to think of, we need to take care of in order to be successful. And, yeah, we need to be successful in every single one of them because every single one of them can actually hold you back and prevent you from having a good time developing something. So, yeah, in this talk, we will be untangling some of those dimensions and, yeah, breaking them down and talking about tips and tricks for it.
First one, probably most obvious dimension that we can think of is speed. How fast does your CI-CD pipeline run? That's like the most obvious thing you can think of, especially if developers are counting on your CI to actually tell them whether their work is essentially passing all the tests, is successful. As soon as you can get that information to them, the better because they can continue their work, but there's more to speed, much, much more to speed. The other one could be time to recovery from a failing build. If you're thinking that if you're working off a main branch and you merge something that doesn't pass the build, so, the build essentially goes red as opposed to green, you want to get that back to green, back to passing as soon as possible because your main branch is essentially where you can get all the deployment out to your users, to your testers, to your stakeholders. So, yeah, that's another very important facet of speed.
And then there's organizational speed considerations, like time to ship a feature, how long does my team need from getting a mandate to a product manager for a new feature to actually shipping that to users. CI can definitely help you build that continuously and obviously CD can definitely help you get that to users as soon as possible, as soon as it's ready, and, yeah, all the updates as well. And lastly, there's things like you might not think about a speed, but it could help you onboard new team members because, as I said, everything is configured in code, everyone can read YAML, hopefully. So a new team member can then be just pointed to this CICD configuration and tell, hey, these are the environments, everything, all the jobs that we're doing, all the different types of tests. Maybe you're doing unit tests, maybe you're doing integration tests, maybe you're initiating some smoke tests as well. Maybe you're doing like a canary deployment, like a really advanced type of deployment, and a new team member can actually understand what's happening and then ask you questions about individual portions of that essentially pipeline which is all automated, which is beautiful. Anyway, speed. Running things faster. First thing to do is really think about whether you're running things on the right size of machines. So, you've got a developer laptop and that's probably got a number of gigabytes of RAM, a number of virtual processors or threads that you can work with. And if your laptop is building something in a minute and your CI takes five minutes, maybe your CI needs more resources to get more up to speed, literally, to how quickly this might need to work. The second one is things like cache. For example, cache is just reusing things you've already done. For example, node modules, you've run npm install once, maybe if your package.json hasn't really changed, maybe that's enough for now, you don't need to update all the dependencies. Maybe you can just store them and pull them from cache next time so you don't have to take that loading hit each individual moment. Maybe you're using some advanced caching techniques, testing techniques with some testing utilities, and for that maybe you don't want to install everything on your Docker container, maybe you can just use a Docker image which has all of that pre-installed.
Comments