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.

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.

Available in Español

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

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Levelling up Monorepos with npm Workspaces
DevOps.js Conf 2022DevOps.js Conf 2022
33 min
Levelling up Monorepos with npm Workspaces
Top Content
Learn more about how to leverage the default features of npm workspaces to help you manage your monorepo project while also checking out some of the new npm cli features.
Automating All the Code & Testing Things with GitHub Actions
React Advanced Conference 2021React Advanced Conference 2021
19 min
Automating All the Code & Testing Things with GitHub Actions
Top Content
Code tasks like linting and testing are critical pieces of a developer’s workflow that help keep us sane like preventing syntax or style issues and hardening our core business logic. We’ll talk about how we can use GitHub Actions to automate these tasks and help keep our projects running smoothly.
Fine-tuning DevOps for People over Perfection
DevOps.js Conf 2022DevOps.js Conf 2022
33 min
Fine-tuning DevOps for People over Perfection
Top Content
Demand for DevOps has increased in recent years as more organizations adopt cloud native technologies. Complexity has also increased and a "zero to hero" mentality leaves many people chasing perfection and FOMO. This session focusses instead on why maybe we shouldn't adopt a technology practice and how sometimes teams can achieve the same results prioritizing people over ops automation & controls. Let's look at amounts of and fine-tuning everything as code, pull requests, DevSecOps, Monitoring and more to prioritize developer well-being over optimization perfection. It can be a valid decision to deploy less and sleep better. And finally we'll examine how manual practice and discipline can be the key to superb products and experiences.
Why is CI so Damn Slow?
DevOps.js Conf 2022DevOps.js Conf 2022
27 min
Why is CI so Damn Slow?
We've all asked ourselves this while waiting an eternity for our CI job to finish. Slow CI not only wrecks developer productivity breaking our focus, it costs money in cloud computing fees, and wastes enormous amounts of electricity. Let’s take a dive into why this is the case and how we can solve it with better, faster tools.
The Zen of Yarn
DevOps.js Conf 2022DevOps.js Conf 2022
31 min
The Zen of Yarn
In the past years Yarn took a spot as one of the most common tools used to develop JavaScript projects, in no small part thanks to an opinionated set of guiding principles. But what are they? How do they apply to Yarn in practice? And just as important: how do they benefit you and your projects?
In this talk we won't dive into benchmarks or feature sets: instead, you'll learn how we approach Yarn’s development, how we explore new paths, how we keep our codebase healthy, and generally why we think Yarn will remain firmly set in our ecosystem for the years to come.
End the Pain: Rethinking CI for Large Monorepos
DevOps.js Conf 2024DevOps.js Conf 2024
25 min
End the Pain: Rethinking CI for Large Monorepos
Scaling large codebases, especially monorepos, can be a nightmare on Continuous Integration (CI) systems. The current landscape of CI tools leans towards being machine-oriented, low-level, and demanding in terms of maintenance. What's worse, they're often disassociated from the developer's actual needs and workflow.Why is CI a stumbling block? Because current CI systems are jacks-of-all-trades, with no specific understanding of your codebase. They can't take advantage of the context they operate in to offer optimizations.In this talk, we'll explore the future of CI, designed specifically for large codebases and monorepos. Imagine a CI system that understands the structure of your workspace, dynamically parallelizes tasks across machines using historical data, and does all of this with a minimal, high-level configuration. Let's rethink CI, making it smarter, more efficient, and aligned with developer needs.

Workshops on related topic

Deploying React Native Apps in the Cloud
React Summit 2023React Summit 2023
88 min
Deploying React Native Apps in the Cloud
WorkshopFree
Cecelia Martinez
Cecelia Martinez
Deploying React Native apps manually on a local machine can be complex. The differences between Android and iOS require developers to use specific tools and processes for each platform, including hardware requirements for iOS. Manual deployments also make it difficult to manage signing credentials, environment configurations, track releases, and to collaborate as a team.
Appflow is the cloud mobile DevOps platform built by Ionic. Using a service like Appflow to build React Native apps not only provides access to powerful computing resources, it can simplify the deployment process by providing a centralized environment for managing and distributing your app to multiple platforms. This can save time and resources, enable collaboration, as well as improve the overall reliability and scalability of an app.
In this workshop, you’ll deploy a React Native application for delivery to Android and iOS test devices using Appflow. You’ll also learn the steps for publishing to Google Play and Apple App Stores. No previous experience with deploying native applications is required, and you’ll come away with a deeper understanding of the mobile deployment process and best practices for how to use a cloud mobile DevOps platform to ship quickly at scale.
MERN Stack Application Deployment in Kubernetes
DevOps.js Conf 2022DevOps.js Conf 2022
152 min
MERN Stack Application Deployment in Kubernetes
Workshop
Joel Lord
Joel Lord
Deploying and managing JavaScript applications in Kubernetes can get tricky. Especially when a database also has to be part of the deployment. MongoDB Atlas has made developers' lives much easier, however, how do you take a SaaS product and integrate it with your existing Kubernetes cluster? This is where the MongoDB Atlas Operator comes into play. In this workshop, the attendees will learn about how to create a MERN (MongoDB, Express, React, Node.js) application locally, and how to deploy everything into a Kubernetes cluster with the Atlas Operator.
Azure Static Web Apps (SWA) with Azure DevOps
DevOps.js Conf 2022DevOps.js Conf 2022
13 min
Azure Static Web Apps (SWA) with Azure DevOps
WorkshopFree
Juarez Barbosa Junior
Juarez Barbosa Junior
Azure Static Web Apps were launched earlier in 2021, and out of the box, they could integrate your existing repository and deploy your Static Web App from Azure DevOps. This workshop demonstrates how to publish an Azure Static Web App with Azure DevOps.
How to develop, build, and deploy Node.js microservices with Pulumi and Azure DevOps
DevOps.js Conf 2022DevOps.js Conf 2022
163 min
How to develop, build, and deploy Node.js microservices with Pulumi and Azure DevOps
Workshop
Alex Korzhikov
Andrew Reddikh
2 authors
The workshop gives a practical perspective of key principles needed to develop, build, and maintain a set of microservices in the Node.js stack. It covers specifics of creating isolated TypeScript services using the monorepo approach with lerna and yarn workspaces. The workshop includes an overview and a live exercise to create cloud environment with Pulumi framework and Azure services. The sessions fits the best developers who want to learn and practice build and deploy techniques using Azure stack and Pulumi for Node.js.