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 Tech 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

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
NPM workspaces help manage multiple nested packages within a single top-level package, improving since the release of NPM CLI 7.0. You can easily add dependencies to workspaces and handle duplications. Running scripts and orchestration in a monorepo is made easier with NPM workspaces. The npm pkg command is useful for setting and retrieving keys and values from package.json files. NPM workspaces offer benefits compared to Lerna and future plans include better workspace linking and adding missing 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
We will learn how to automate code and testing with GitHub Actions, including linting, formatting, testing, and deployments. Automating deployments with scripts and Git hooks can help avoid mistakes. Popular CI-CD frameworks like Jenkins offer powerful orchestration but can be challenging to work with. GitHub Actions are flexible and approachable, allowing for environment setup, testing, deployment, and custom actions. A custom AppleTools Eyes GitHub action simplifies visual testing. Other examples include automating content reminders for sharing old content and tutorials.
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
DevOps is a journey that varies for each company, and remote work makes transformation challenging. Pull requests can be frustrating and slow, but success stories like Mateo Colia's company show the benefits of deploying every day. Challenges with tools and vulnerabilities require careful consideration and prioritization. Investing in documentation and people is important for efficient workflows and team growth. Trust is more important than excessive control when deploying to production.
Why is CI so Damn Slow?
DevOps.js Conf 2022DevOps.js Conf 2022
27 min
Why is CI so Damn Slow?
Slow CI has a negative impact on productivity and finances. Debugging CI workflows and tool slowness is even worse. Dependencies impact CI and waiting for NPM or YARN is frustrating. The ideal CI job involves native programs for static jobs and lightweight environments for dynamic jobs. Improving formatter performance and linting is a priority. Performance optimization and fast tools are essential for CI and developers using slower hardware.
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
Today's Talk discusses rethinking CI in monorepos, with a focus on leveraging the implicit graph of project dependencies to optimize build times and manage complexity. The use of NX Replay and NX Agents is highlighted as a way to enhance CI efficiency by caching previous computations and distributing tasks across multiple machines. Fine-grained distribution and flakiness detection are discussed as methods to improve distribution efficiency and ensure a clean setup. Enabling distribution with NX Agents simplifies the setup process, and NX Cloud offers dynamic scaling and cost reduction. Overall, the Talk explores strategies to improve the scalability and efficiency of CI pipelines in monorepos.
The Zen of Yarn
DevOps.js Conf 2022DevOps.js Conf 2022
31 min
The Zen of Yarn
Let's talk about React and TypeScript, Yarn's philosophy and long-term relevance, stability and error handling in Yarn, Yarn's behavior and open source sustainability, investing in maintenance and future contributors, contributing to the JavaScript ecosystem, open-source contribution experience, maintaining naming consistency in large projects, version consistency and strictness in Yarn, and Yarn 4 experiments for performance improvement.

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.