Blog Open Source Announcing GitLab Serverless deploying to Cloud Run for Anthos
Published on: November 19, 2019
4 min read

Announcing GitLab Serverless deploying to Cloud Run for Anthos

Discover how we're making it easier to deploy serverless workloads on-premise with Anthos.

gitlab-serverless-blog.png

This week at Google Cloud Next ’19 UK, Google Cloud grew its Anthos product portfolio with the addition of Cloud Run for Anthos running on-prem. I’m excited to share that GitLab has been collaborating with Google Cloud product teams to support this launch and enable customers with CI/CD and GitLab Serverless capabilities for quicker and easier adoption of serverless solutions. In the spirit of our partnership, our support for Cloud Run for Anthos is a continuation of our collaboration announced earlier this year at Google Cloud Next ’19 in San Francisco, where we showed how you can deploy a serverless function to Cloud Run using the same developer workflow you’re already familiar with in GitLab. Now, we’re looking to bring that same UX and workflow consistency to Cloud Run deployments on Anthos running on-premise. Overall, together, GitLab and Google Cloud are aiming to lower the barrier of adoption for customers looking to architect scalable, cloud native solutions.

However, when discussing cloud native, oftentimes ‘public cloud infrastructure’ comes to mind. But when I think of cloud native, I think of the various, modern ways of architecting scalable solutions, backed by managed services to make operations more convenient. Until very recently, infrastructure-centric managed services like Google Kubernetes Engine (GKE), Cloud Run, StackDriver, etc. have been traditionally associated with workloads running within cloud data centers. Given the recent announcements of Google Cloud Anthos, Google is clearly broadening the boundaries of cloud native across hybrid and heterogeneous environments, including customer data centers. As the infrastructure landscape diversifies, as application development intertwines with abstraction layers of managed services, and as workload flexibility becomes inherent with microservice containerization, the one thing you can rely on staying consistent is GitLab’s developer workflow to supplement all the above. In the context of all things serverless, let's take a closer look at what’s available today, what we’re still working on, and what that means for our users.

What’s available today

GitLab serves as a single application for all of DevOps, which includes building, deploying, and managing serverless applications. GitLab serverless enables developers to focus on writing application code without having to worry about Kubernetes or Knative YAML configuration. GitLab provides templates allowing developers to easily build and deploy Knative services that can be deployed to Cloud Run. Here is a quick video walkthrough on the anatomy of a serverless project hosted in GitLab and deployed to Knative. With Google, you have a few options on how to leverage Cloud Run as a deployment target for GitLab CI/CD. As of this week, you can run Cloud Run in three different flavors:

  1. Cloud Run: This is a fully managed cloud service powered by Knative for serverless apps. GitLab supports deploying to Cloud Run and the full CI/CD workflow to leverage GitLab Runners to build and test functions. GitLab takes in the serverless.yml file within the root of your source code repository to define and deploy to Cloud Run.

  2. Cloud Run for Anthos running on Google Cloud: This is a managed deployment of Knative on Anthos GKE clusters running on Google Cloud Platform. This enables you to install a managed Cloud Run deployment on top of your own Kubernetes cluster. Similar to above, GitLab also supports deploying to Cloud Run via the full CI/CD workflow, but as of right now, the highest version of Knative supported by GitLab is 0.7. Latest version support for Knative is coming in GitLab 12.6 on Dec. 22, 2019.

  3. Cloud Run for Anthos running on-premise: Similar to above, this flavor of Cloud Run enables users to run a managed Cloud Run deployment on top of Anthos GKE On-Prem in your own data center. Currently, Knative v.0.9 is deployed in GKE-OP clusters. GitLab is soon to release support for Knative v0.9 and users can track the progress of this work in this open issue today. If you like what we’re working on, stop by and give us a thumbs up for feedback. So far, internal testing has been very positive and we look forward to formally supporting Cloud Run for Anthos running on-premise in the coming months/releases. The user experience will be almost identical to the prior two use cases listed above as you would expect.

Where to get started

If you’re interested in getting started with some sample code, check out our documentation and sample app project for reference. Additionally, here is a walkthrough of deploying a demo app to Cloud Run from GitLab. If you’re looking to get started with Serverless on Google Cloud Platform, sign up for GitLab.com here and then sign up for $200 additional free GCP credits.

We want to hear from you

Enjoyed reading this blog post or have questions or feedback? Share your thoughts by creating a new topic in the GitLab community forum. Share your feedback

Ready to get started?

See what your team could do with a unified DevSecOps Platform.

Get free trial

Find out which plan works best for your team

Learn about pricing

Learn about what GitLab can do for your team

Talk to an expert