profit_image - stock.adobe.com
In an era of agile development and shortened software release cycles, many organizations have adopted continuous integration and delivery processes to systematize and accelerate their DevOps workflows -- and, increasingly, serverless functions will become part of this process.
A refresher on DevOps and CI/CD pipelines
Before exploring serverless for DevOps workflows, it's important to first understand CI/CD pipelines.
Define and standardize the processes between code development and application delivery to programmatically implement them, improve repeatability and reduce the time between software changes and deployed updates.
As illustrated in the below image, a DevOps workflow and toolchain typically progresses through four stages: build automation, continuous integration, app deployment and configuration management, and, finally, infrastructure deployment.
This workflow consists of a sequential series of events, triggered initially by a developer's code changes and actions within a source code repository. Once automated, this workflow becomes an event-driven system in which the successful completion of one stage triggers the next. Serverless functions support the execution of code in response to particular events.
While DevOps and CI/CD tools predate serverless computing, serverless functions, alongside cloud services, might change how pipelines are built.
Serverless DevOps evolves
Despite the conceptual match, there's an inherent gap between serverless and DevOps tools. Whether it's because the latter predate software such as Jenkins and Travis CI -- or because the overhead to run a Jenkins server is modest -- there has been little effort to create equivalent open source CI/CD tools with a serverless design. However, several products, such as Serverless Framework, simplify and automate the development of serverless applications.
One CI/CD project that has embraced serverless is Serverless Jenkins, an offshoot of Jenkins X on Kubernetes that developers at CloudBees proposed. The project, according to a blog post by CloudBees coder and Jenkins X co-creator James Rawlings, aims to have Jenkins solely process pipelines when a build is needed to minimize a cloud computing bill.
CloudBees' principal software delivery strategist and developer advocate, Viktor Farcic, described in another blog the internal workings of Serverless Jenkins as the company's attempt to redefine CD and GitOps inside Kubernetes clusters through the combination of several tools, including Prow. Prow, an event-driven CI/CD system built for and that uses Kubernetes, automates various GitHub actions. As Rawlings notes, Prow originated from the Kubernetes development team's struggle to scale Jenkins to handle the large number of GitHub repos and CI/CD jobs the project required.
Get familiar with serverless cloud services
Most people correctly conflate serverless with the cloud, since services such as AWS Lambda, Google Cloud Functions, Azure Functions and Logic Apps are the easiest and most popular tools to run application code on serverless infrastructure. While there are open source serverless implementations, such as OpenWhisk, Fission and Fn, they have yet to reach the same level of maturity or acceptance as their cloud competitors. A DevOps team could also use Lambda or Azure Functions to build a DIY toolchain, however, they would effectively have to reinvent the wheel, while each of the major cloud providers already has a serverless offering for every stage of the CI/CD pipeline.
Azure, Google Cloud and AWS offer a portfolio of on-demand, event-driven DevOps tools that don't require server set up or management.
Regardless of which cloud an enterprise uses, cloud-native developers and DevOps teams that are comfortable with SaaS for their toolchains can integrate multiple services into a serverless DevOps workflow.
Make a plan
In many scenarios, serverless code improves the efficiency and scalability of an application while it reduces operating costs. To use serverless for DevOps workflows, consider the following:
- Organizations that already use Jenkins and have converted some applications to container infrastructure should investigate Serverless Jenkins X.
- DevOps teams without a fully automated code development and deployment pipeline should evaluate the previously mentioned cloud services; implement these services in a piecemeal fashion to fill gaps in existing toolsets, or use them in combination to build a complete pipeline.
Take advantage of available training opportunities to learn about specific tools and see how other organizations use them to automate development workflows. Investigate the available product integrations that enable cloud services to work with DevOps tools that are already installed.
Besides services from the major cloud providers, organizations that have just started to automate their DevOps processes should evaluate CI/CD-as-a-service, which includes products such as CloudBees Codeship, CloudBees Rollout and Harness.