Increase App Confidence Using CI/CD and Infrastructure as Code

Rate this content
Bookmark

Ever run code in CI/CD and builds pass only to fail during deployment? This presentation will discuss the advantages of Smoke Test patterns in CI/CD pipelines using Infrastructure as Code (IaC). Learn how teams can leverage automation to ensure apps are tested live in target environments which provide valuable insights pre-deployment. Angel will demonstrate how to leverage IaC to provision infrastructure, deploy apps, test then destroy all the resources created in a single CI/CD pipeline run.

This talk has been presented at DevOps.js Conf 2021, check out the latest edition of this JavaScript Conference.

FAQ

The speaker of the talk is Angel Rivera, a developer advocate at CircleCI.

The main topic of the talk is increasing app confidence using Continuous Integration, Continuous Deployment (CICD), and Infrastructure as Code.

The purpose of the talk is to discuss how to leverage CICD and Infrastructure as Code to implement tests that can determine if deployments are broken after being deployed to target environments.

Continuous Integration (CI) is the practice of merging all developers' working copies or changes to a shared code repository frequently to enable collaboration and quick feedback on code changes.

Continuous Deployment (CD) is the practice of automatically deploying new software to target environments following the CI process, ensuring that the software is always in a deployable state.

Some common types of tests mentioned in the talk include unit tests, smoke tests, functional tests, integration tests, and regression tests.

A smoke test is a preliminary test that focuses on specific functionality and is designed to be quick and limited in scope to identify any obvious failures.

The benefits of using smoke tests include gaining valuable insights into deployments, exposing missing bugs, verifying application behavior in target environments, and rejecting failed software releases.

Common reasons for post-deployment failures include defective configurations, integration faults, and invalid credentials or authentication issues.

Infrastructure as Code can help in CICD pipelines by enabling the creation and destruction of target environments for testing, managing and controlling changes within those environments, and ensuring reliable and fast deployments.

Angel Rivera
Angel Rivera
31 min
01 Jul, 2021

Comments

Sign in or register to post your comment.

Video Summary and Transcription

The Talk discusses how to increase app confidence using CICD and infrastructure as code. It explores different types of testing, including smoke tests, and the benefits of continuous deployment. Common post-deployment failure reasons are identified, and the importance of quick smoke tests is emphasized. The Talk also highlights the use of infrastructure as code to deploy and test applications, and the value of smoke testing Kubernetes deployments. The Q&A session covers the depth of smoke tests and the role of quick smoke tests in ensuring application functionality.

1. Introduction to the Talk

Short description:

Hello, everyone. The talk's title is increasing your app confidence, using CICD and infrastructure as code. I'm going to speak to how you can leverage continuous integration, continuous deployment, along with CICD, along with infrastructure as code to implement tests that can figure out if your deployments are broken after they're actually deployed to target environments. I'll discuss how you can increase your app confidence within your releases using CICD and infrastructure as code. My name is Angel Rivera. I'm a developer advocate at CircleCI. I engage the community at a grassroots level, discussing technology and learning from developers' experiences. You can connect with me on Twitter at punk data.

Hello, everyone. I want to thank you all for attending my talk today. The talk's title is increasing your app confidence, using CICD and infrastructure as code. In this talk, I'm going to basically speak to how you can leverage continuous integration, continuous deployment, along with CICD, along with infrastructure as code to basically implement tests that can figure out if your deployments are broken after they're actually deployed to target environments.

Here's an agenda that I put together for this talk. A real quick intro into myself and what I do at CircleCI. Then I'm going to jump into a very brief discussion around testing. And then we're going to jump into talking about broken deployments, right? And finally, I'm going to discuss, you know, how you can increase your app confidence within your releases using CICD and infrastructure as code. And then I want to end with a demo that will kind of show all those concepts in action.

So, my name is Angel Rivera. I'm a developer advocate at CircleCI. And essentially what I do as a developer advocate is engage the community at a grassroots level. When I'm engaging the community, I'm discussing all things technology, right? Doesn't matter if it's CICD related or DevOps related. I'm interested in learning about how folks, especially developers are using technology and some of the troubles that they're having with technologies as well, right? I've been in the industry for a good part of 27 years now. So, I do have quite a bit of experience and I like to kind of, you know, share some of my experience and knowledge with the community, right? Especially when they're struggling with things. And by the way, I'm also learning from everyone as well, right? So, it's not a one way street where I'm just like, you know, dumping data or my experience on the folks. I'm also learning from other people's experience. And with those learnings, I bring them back to CircleCI so that we can leverage that information in determining the next features that we're going to build so that we can add value instead of just, you know, building features just to build them. Anyway.

So, if anyone's interested in having conversations with me after this talk, you can hit me up on Twitter, my Twitter handle is at punk data. Generally, it's the easiest way to get ahold of me these days. So, please feel free to contact me and discuss whatever it is that you want to discuss. I'm open to all kinds of conversations. All right.

2. Understanding Different Types of Testing

Short description:

Testing is crucial to understand and compare the expected results of our applications. There are different types of tests, such as unit tests and smoke tests, which focus on specific functionality and are designed to be fast. On the other hand, functional integration and regression tests are more comprehensive and slower, but ensure expected results. Smoke tests, like the ones used by a plumber to check for leaks in pipes, are limited in scope and provide a quick way to identify issues.

So, the first thing I want to talk about is testing, right? Because we leverage testing to basically understand how our applications are behaving. And also understand if they're behaving as we expect them to, right? So, we have to implement tests in order to understand and compare the results that we're expecting, right, from our applications.

And of course, right, we have to create test cases. And when we're comparing those results, we want to make sure that, you know, again, we're getting the results that we are expecting per the system requirements or the business requirements, right, that we're automating within our programs.

There are multiple types of testing, though, right? So, not all testing is equal, so to speak. And here's a nice list of some of the more common tests that we run as developers or that we develop as developers. The first I want to talk about is the unit test and smoke test, which are basically tests that are designed to be limited in scope, right? They're focused on specific functionality. And what we're doing there is trying to suss out any kind of common bugs or bugs that are common pattern or common practice bugs, right? So, things like, you know, is a variable's data type or the values that the data type has or the variable has, are they integers, string, right, flow, are they compatible within the framework? You know, those are the kind of things that we're testing. We're also testing maybe for okay 200s on a server. You know, things like that. They're very limited scope, focused on specific functionality and specific use cases. And also, they're designed to be super fast, right, like we don't want to be testing things at a comprehensive level, right? So, again, these unit tests and smoke tests are designed to be fast so that, again, you know, we're getting a nice, warm fuzzy around the code that we're building. And most of the time these tests are great for kind of, you know, ensuring that any kind of breaking changes are quickly identified and can be quickly mitigated.

So, after speaking about those fast, you know, limited in scope type testing, I wanted to talk about functional integration and regression tests. Again, these tests are larger in scope, meaning they are more comprehensive, they will touch a lot more of the code to ensure that you are getting the expected results. Generally, these types of tests are slower, right? Because they are more comprehensive, right? Because they are doing a lot more things. They may be connecting to other services that your application uses. One of the other kind of values, or actually, the disregard to one of the other factors is they are very expensive. And what I mean by that is they can cost, they can be expensive financially. They can also be expensive in regards to manpower, like developer or operations team type time, right? So, like, if you have these tests running, maybe someone is monitoring them because of, you know, while they are running because of some of the intricacies of these tests. And again, they tend to be slower, more comprehensive tests. And these are okay, right? So, these are things that are running I would say more of an end-to-end type of experience, right? So, that you're fully encompassing all the functionality within the application. Now, the reason why I bring these up is because I wanted to start talking about smoke test, which are essentially the tests that, again, are super fast, limited in scope. And I'll tell you a quick story before I get started. When I was a teenager back in the day working in a construction company during the summers, right, I would work with folks in construction. I actually got paired up with a plumber and the plumber was there, you know, basically putting a new plumbing into this new facility that we were working on. But when he was done, you know, soldering all the copper piping and making sure that, you know, the water pipes were complete, he ended up connecting this smoke apparatus, right, like a smoke machine type apparatus. And I was curious as to like, why he was doing that. So I asked him and he basically told me that, well, if I were to fill these pipes with water to test my, you know, connections and make sure they were sealed properly, it could potentially be a big mess because if he had a leak in some of his couplings, right, or they weren't soldered properly, there could be water spraying all over the place. So in essence, what he was doing was this smoke test, right? He was connecting the smoke machine apparatus, pumping smoke through it, and it was a clean, easy, quick way for him to figure out if there was any leaks in his connections.

QnA