10 Ready-to-Deploy GCP projects with DeployStack : Boost Your GCP skill!

Yesterday, while I was examining the Google documentation, I came across a fairly important resource that allows Google Cloud enthusiasts to go further and quickly practice 10 GCP projects. It is a series of applications that are prebuilt and architected to demonstrate common GCP architectures. Doesn’t that sound interesting? Let’s discover together!

DeployStack Overview

DeployStack offers a collection of pre-designed applications that showcase standard application architectures. Each DeployStack comes with Terraform scripts for infrastructure and starter code, which, when executed, create the architecture and deploy the code within it. You can then modify the code to fit your application requirements.

If DeployStack doesn’t have an application that meets your needs, consider visiting the Cloud Architecture Center for best practices, implementation suggestions, and more to assist you in designing a Google Cloud deployment tailored to your business needs. The DeployStack library is continuously expanding, so keep an eye out for new applications.

Each DeployStack is open-source. They will always contain the following files:

  • ./main.tf – the Terraform script that deploys the architecture
  • ./deploystack.json – a configuration file for the collection script.

These files dictate what information DeployStack will request and what infrastructure will be built.


https://cloud.google.com/

DeployStack GCP Projects

Cost Sentry

Cost Sentry is a collection of scripts and configurations designed to shut down resources when Google Cloud Billing Budgets are surpassed.

The script comprises the following components:

  • Events – Queue – Pub/Sub
  • Billing – Cost Controls – Budgets
  • Events – Event Handling – Cloud Functions
  • Compute – VMs – Compute Engine
  • Compute – Serverless – Cloud Run

This script establishes a budget, messaging queue, and Cloud Function to manage the entire process. It then initializes a sample VM and a container-backed service controlled by the system.


https://cloud.google.com/

  • Code Source Github : https://github.com/googlecloudplatform/deploystack-cost-sentry

ETL Pipeline

ETL Pipeline is an architecture for executing batch data processing pipelines using the extract, transform, load method. This architecture includes the following components:

  • Google Cloud Storage for storing source data
  • Dataflow for applying transformations to the source data
  • BigQuery as the destination for the transformed data
  • Cloud Composer environment for orchestrating the ETL process

https://cloud.google.com/

  • Code Source Github : https://github.com/googlecloudplatform/deploystack-etl-pipeline

Load Balanced Vms

Load Balanced VMs is a script for building infrastructure that establishes a cluster of virtual machines (VMs) and configures a Load Balancer to provide a public route to the VMs. The components involved include:

  • Compute – VMs – Compute Engine
  • Compute – Cluster – Managed Instance Group
  • Compute – Machine Template – Instance Template
  • Networking – Load Balancing – Cloud Load Balancer

This example application creates a basic static HTML site using NGINX and load balances it across the cluster.


https://cloud.google.com/

  • Code Source Github : https://github.com/googlecloudplatform/deploystack-load-balanced-vms

NoSQL Client Server

NoSQL Client Server will configure and create two Compute Engine instances:

  • Server — which will run MongoDB
  • Client — which will run a custom go application that talks to MongoDB and then exposes an API where you consume data from MongoDB

https://cloud.google.com/

  • Code Source Github : https://github.com/googlecloudplatform/deploystack-nosql-client-server

Ops Agent

Ops Agent creates a virtual machine and installs the Ops Agent for integrating with Monitoring and Logging services. It uses:

  • Compute Engine
  • Monitoring
  • Logging

Example sets up a simple single virtual machine and wires it up to report to Logging.


https://cloud.google.com/
  • Code Source Github : https://github.com/googlecloudplatform/deploystack-ops-agent

Single VM

Single VM stack creates an individual VM with a smart default, but also the ability to customize the Virtual Machine. It uses:

  • Compute – VMs – Compute Engine

Example sets up a simple single virtual machine, and allows you to ssh into it.


https://cloud.google.com/

  • Code Source Github : https://github.com/googlecloudplatform/deploystack-single-vm

Static Hosting with Domain

Static Hosting with Domain is a simple static website creator that uses a Storage Bucket to serve the website. The components involved include:

  • Storage – File Storage – Cloud Storage
  • Networking – Load Balancing – Cloud Load Balancer
  • Networking – DNS – Cloud DNS
  • Domain Management – Registrar – Cloud Domains

https://cloud.google.com/

  • Code Source Github : https://github.com/googlecloudplatform/deploystack-static-hosting-with-domain

Storage Event Function App

Storage Event Function App is an image directory and thumbnail maker. It consists of the following components:

  • A client application where users can upload images
  • Container hosted API and static site – Golang – Cloud Run
  • Storage – File Storage – Cloud Storage
  • An image processor that creates thumbnails of the images
  • Functions as a Service – Golang – Cloud Functions
  • A deployment pipeline
  • Deployment – Cloud Build

https://cloud.google.com/

  • Code Source Github : https://github.com/googlecloudplatform/deploystack-storage-event-function-app

Three Tier App

Three Tier App is a simple todo application architected as a vanilla 3-tier application with the following components:

Backend:

  • Database – MySQL – Cloud SQL
  • Caching – Redis – Cloud Memorystore

Middleware/API:

  • Container hosted API – Golang – Cloud Run

Front End/UI:

  • Container hosted UI – Nginx + HTML/JS/CSS – Cloud Run

Deployment:

  • Continuous Deployment – Cloud Build
  • Secret Management – Cloud Secret Manager

https://cloud.google.com/

  • Code Source Github : https://github.com/googlecloudplatform/deploystack-three-tier-app

Serverless End-To-End Photo Sharing Application

The Serverless End-To-End Photo Sharing Application is a scalable application that uses 11 Google Cloud products, Terraform, and Django to create a photo-sharing experience. It consists of the following components:

  • Cloud Run – running the app as the main server
  • Cloud SQL – storing relational database (user info, posts)
  • Cloud Storage – storing non-relational database (post media)
  • Cloud Load Balancer – serving traffic across multiple regions
  • Cloud DNS – mapping custom domain
  • Cloud Build – automatically deploying the app from gcloud
  • Secret Manager – improving the app’s security
  • Cloud VPC – connecting Cloud SQL with Cloud Run via private network
  • Cloud DNS – storing static cache for faster connections
  • Translation API – translating post captions in other languages cloud.google.comgithub.comcloud.google.com.

The application is deployed using Terraform, which helps ensure predictable and reliable deployments cloud.google.com.


https://cloud.google.com/

  • Code Source Github : https://github.com/googlecloudplatform/deploystack-serverless-e2e-photo-sharing-app

In conclusion, I hope that the projects mentioned in the context will be useful to you. If you decide to try them out, I would love to hear about your experiences with running these projects. Additionally, if you found the content helpful, feel free to share it with your friends.

Author

  • Mohamed BEN HASSINE

    Mohamed BEN HASSINE is a Hands-On Cloud Solution Architect based out of France. he has been working on Java, Web , API and Cloud technologies for over 12 years and still going strong for learning new things. Actually , he plays the role of Cloud / Application Architect in Paris ,while he is designing cloud native solutions and APIs ( REST , gRPC). using cutting edge technologies ( GCP / Kubernetes / APIGEE / Java / Python )

    View all posts
0 Shares:
You May Also Like