PRODUCTS & SERVICES

Simplify deployment of CI/CD pipelines on Google Cloud

Oct 04, 2023

CMC Telecom’s MultiCloud expert guides businesses in applying CI/CD processes on Google Cloud Platform (GCP), to optimize time and ensure applications always operate smoothly on the cloud platform by Google.

Overview of the CI/CD process

CI/CD (Continuous Integration/ Continuous Deployment) is a process that helps programmers (developers) focus on writing new source code without worrying about regular integration and application deployment. Continuous integration (CI) ensures that source code is automatically tested and integrated with the main source code when new changes are made, avoiding errors. Meanwhile, CD helps businesses deploy continuously but still ensures the application is ready to deploy and run at any time.

CMCTelecom’s GCP expert said: “Currently, automating operational processes has become an indispensable requirement for businesses. Because this process brings businesses a number of benefits when deploying on the MultiCloud platform, especially with GCP.”


Activity flow diagram of a CI/CD process

According to CMC Telecom representative, there are 5 main benefits when deploying CI/CD on GCP, including:

Speed up development: CI/CD automation helps shorten the time from coding to product deployment. Thanks to that, programmers can focus on perfecting new features for the application.

Quality assurance: Continuous integration and testing of new source code makes it easy to detect and fix errors as soon as problems arise. This ensures application quality before release into production environments.

Easy to deploy and manage: GCP provides fully-managed services, businesses do not need to invest and manage their own infrastructure, while reducing management time and the risk of errors due to human intervention. People.

Scalability: GCP enables automatic scaling of CI/CD pipelines based on application needs and traffic. On the other hand, Google is committed to ensuring high reliability with stable system load and error tolerance to help the system always operate smoothly.

Strong security: IAM identity management mechanism and data encryption help control user access, as well as ensure important business information is always safe.

6 steps to build a CI/CD process on GCP


Architecture overview diagram of a serverless CI/CD on GCP

To deploy a CI/CD process on GCP requires the following 6 steps:

Step 1: Source Control Management (SCM). Enterprises need to store and deploy source code on the SCM system. GCP has Cloud Source Repositories to ensure strict management of source code versions and creation/deletion of separate branches. This is to help continuously develop new features and avoid conflicts when fixing bugs. In particular, this service also supports the feature of automatically checking all security vulnerabilities right on the repository and issuing warnings when uploading new code. In addition, programmers can replace with: GitHub, GitLab…

Step 2: Build CI/CD tool. To build a CI/CD automation process for continuous application testing and deployment, businesses can use Cloud Build. Accordingly, businesses need to create and configure a config file (eg cloudbuild.yaml); For example: checking source code/docker type, packaging the application, building Docker images, storing images on the Artifact Registry, sending success/failure notifications…

After creating and storing this configuration file to the SCM source code repository, Cloud Build will automatically trigger a build and deployment every time a new change is posted to the source code repository.

Step 3: Automate testing. In fact, on GCP there is Firebase Test Lab or Google Cloud Testing API to support businesses in performing common types of testing. For example: Unit Testing, Integration Testing, and Black Box Testing to ensure the stability and quality of the application before deployment.

Step 4: Store and manage artifact versions. Businesses can use Artifact Registry. This service allows managing changes and versions of artifacts. In particular, Artifact Registry allows businesses to easily share these artifacts between development and deployment teams throughout the entire software development process while still ensuring security through IAM (Identity & Identity) integration. Access Management) of GCP. In addition, the service also supports storing file formats such as: Docker container images, Java (Maven/Gradle), npm, NuGet, Python…

Step 5: Automate deployment of container applications on Kubernetes. Businesses can use the fully-managed service Google Kubernetes Engine (GKE). With this service, businesses just need to upload the application container and GKE will automatically take care of the operation. Not only that, GKE also supports the autoscaling feature to automatically scale resources such as nodes and pods based on application traffic.

Step 6: Deploy the application. Businesses can use Cloud Deploy (REST API). This is a service used to automate the deployment process – Continuous Delivery (CD) including: Scheduled deployment, event-based deployment (eg when new source code is available), mass deployment of many applications at once , deploy according to processes, monitor implementation progress, etc.


Flow diagram of CI/CD services on GCP

As a senior partner of Google in Vietnam, CMC Telecom has many years of experience implementing services and solutions on GCP. The business provided customers with insights into the CI/CD pipeline on GCP with support from Cloud Build (CI) and Cloud Deploy (CD).