/gcp-tutorials

The repo contains the source code for various GCP related tutorials.

Primary LanguagePythonApache License 2.0Apache-2.0

GCP tutorials

The repo contains the source code for GCP tutorials written by Premise.

Please clone and star this repo to stay up to date on changes.

Packages by Premise

Goblet: An easy-to-use framework that enables developers to quickly spin up fully featured REST APIs with python on GCP

Goblet Workflows: A wrapper around GCP Workflows, which is a fully-managed orchestration platform that executes services in an order that you define: a workflow. These workflows can combine services including custom services hosted on Cloud Run or Cloud Functions, Google Cloud services such as Cloud Vision AI and BigQuery, and any HTTP-based API.

Slack Approvals: This python library serves as the basis for managing and deploying a lightweight approval workflow based on Slack and GCP. This library contains two key classes, SlackRequest and SlackProvision as well as the logic to deploy them to GCP (See 008 for tutorial).

Goblet GCP Client: Goblet GCP Client is a util library with support for creating GCP resource clients, GCP integration tests, and other related utils.

Backstage Dynamic Data Form Extension: Backstage plugins that allow you to fetch data dynamically from an endpoint and populate Backstage templates.

Tutorials

001 - Forward Github Security Findings to Security Command Center [ Source ] [ Written] - This tutorial goes over implementation on how to automatically forward Github security findings to GCP's security command center.

002 - Using Cloud Custodian Metric Filters to safely find and remove cloud resources [ Source ] [ Written] - Learn how to combine GCP's powerful built in metrics with Cloud Custodian to easily discover potential security risks, evaluate the impact those resources currently have in your environment, and then safely address those issues.

003 - Setup Daily Cost Alerts on your Daily GCP Spend [ Source ] [Written] - Deploy a cloudfunction that checks your daily GCP spend for any large cost increases or decreases in a service and notifies a slack channel

004 - Create Dynamic Serverless Loadbalancers [ Source ] [Written] - A simple, scalable, and customizable solution to deploy and maintain load balancers for any number of serverless applications.

005 - Bucket Replication [ Source ] Written] - A simple way to set up bucket replication, leveraging goblet's use of decorators to set up cloud function triggers.

006 - Service Account Key Rotater [ Source ] [Written] - A pluginable solution to automate Service Account Key rotations that currently supports Github Secrets and Cloud Storage.

007 - BigQuery Usage Detection [ Source ] Written] - A cloud function to retrieve processing info about your BigQuery jobs, send a Slack message to inform of most expensive jobs, and upload a detailed summary to a Cloud Storage bucket.

008 - Slack Approval Process [ Source ] Written] - A quick walk-through on setting up an approval process facilitated by slack.

009 - Cloudrun Cloudbuild Configs [ Source ] [ Written ] - A quick walk-through on configuring cloudrun builds with goblet, including traffic, secrets, and artifact registries.

010 - Cloudrun Jobs [ Source ] [ Written ] - A tutorial on how to deploy cloudrun jobs using goblet.

011 - Cloudrun Cors Anywhere [ Source ] [ Written ] - A tutorial on how to deploy cors-anywhere proxy on Cloud Run.

012 - Backend Alerts [ Source ] [ Written ] - A tutorial on how to deploy backend alerts alongside your codebase using goblet.

013 - BigQuery Remote Functions [ Source ] [ Written ] - A tutorial on how to deploy BigQuery Remote Functions on GCP using goblet.

014 - Private Service Access using Goblet [ Source ] [ Written ] - A tutorial on how on deploying and connecting to private GCP services using Goblet

015 - CloudTasks with Goblet [ Source ] [ Written ] - A tutorial on how to deploy CloudTaskQueues, enqueue CloudTasks and handle CloudTasks all with Goblet.

016 - GCP Cloud Run Low Usage Slack Alerts [ Source ] [ Written ] - A tutorial on how to deploy a Scheduled Job with Goblet that monitor low usage and send recomendations for downscaling through Slack.

017 - Goblet IAM [ Source ] [ Written ] - A tutorial on how Goblet simplfies GCP IAM by auto generating required deployment permissions and creating a deployment service account.

018 - Dataform and BiqQuery Remote Functions [ Source ] [ Written ] - A tutorial on how to deploy BiqQuery Remote Functions for a Dataform pipeline.