As serverless adoption increases, how does it impact the CI/CD pipeline and process? No credible organization today uses a development model without DevOps. Key to establishing DevOps that brings agility to application deployment is a friction-free CI/CD pipeline that allows software code to move from development environment to production. Serverless is slowly bringing in a mindset change among developers and they are moving from local development to cloud-based development and deployment models using browser-based IDEs or IDEs integrated with cloud deployment platforms like serverless platforms. Does it change how CI/CD is done and what kind of impact does serverless platforms have on DevOps?
The abstraction provided by serverless platforms redefines the way DevOps is done as it removes operations out of the picture as the platform providers take care of the underlying platform operations. This allows for code development in the development environment itself without having to worry about local development and debugging. Having said that, most serverless platforms provide the necessary local IDE integration and SDK to give developers more options. Since a serverless platform provides a consumption model that doesn’t require any operational overhead to use the platform and the cost is optimized based on executions, the CI/CD pipeline can be set up by using the same platform in Dev, Test and Production. This offers several advantages but also brings in some challenges.
Serverless CI/CD Advantages
- Serverless removes the operational overhead out of DevOps. This makes the CI/CD workflow seamless, accelerating the flow of software code to production. Also, such a deployment model ensures that the same environment is available across Dev, Test and Production, reducing errors dramatically (Remember the “it worked in development but not production” claims?)
- The on-demand nature of serverless platforms also improves developer productivity, enabling them to operate at the speed of business
- Seamless scalability also allows developers to scale test their applications in the CI/CD pipeline
- Since deployable units are functions, it allows developers to use any Git branching model for an application. This allows for a more fine grained flow of the code in the CI/CD pipeline
- For some serverless platforms, Infrastructure as Code (IaC) can be leveraged to automate the CI/CD pipeline
- With serverless abstraction, developers and testing teams can focus on what they are supposed to do than worrying about setting up the environment for their tasks
CI/CD Challenges With Serverless
- Since serverless functions are event driven and called asynchronously, setting up automated end-to-end testing could be more complex
- It could also impact test data with serverless functions creating duplicate data. It is important to ensure that the data is cleaned up to meet organizational requirements and standards
- Depending on the platform used, there could be limited access to monitoring and logging (we will be writing a separate blog post on this topic)
Serverless provides various advantages to streamlining the CI/CD pipeline. However, it also imposes some limitations. It is critical to understand these limitations and take remediation measures so that you can fully benefit from using serverless platforms