Skip to content

redvg/cloud-native-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Templates & blueprints to facilitate cloud-native development efforts. Can be imported into IntelliJ and VSCode via Cloud Code plugin.

PythonGoJavaScriptDockerKubernetesTerraformFastAPIApacheGitLabGoogle Cloud

made-for-VSCode Open Source Love svg3 MIT license PRs Welcome

Motivation

  • repository serves as a one-stop catalog hub of source files which may come handy during cloud-native endeavours
  • provided template can be a code snippet solving a simple task (e.g. prometheus alerting manifest) or a fully-fledged solution (e.g. well-architected gke deployment)
  • functional, rather than language or technology, folder structure. functional categories are highly opinionated and are subject to review
  • flat folder structure with a single root for each functional topic, and a sub-folder for each template
  • repository contains not only blueprints/battle-proven/reference solutions but also technology experiments which serve as a boostrap and may experience further improvements in terms of performance and best practices

Contents

Server

  • Python ASGI server (fastapi+uvicorn) Maintainer

  • Python WSGI server (flask+gunicorn) Maintainer

  • Golang RPC Maintainer

  • Golang gRPC unary Maintainer

  • Golang Kafka Maintainer

  • Golang Prometheus Maintainer

Platform

  • Well-architected PCI-compliant GKE Fork

  • Well-architected GKE microservices shop Fork

  • k8s Python guestbook Fork

  • k8s Golang guestbook Fork

  • k8s NodeJS guestbook Fork

  • IoT on GCP Maintainer

Ops

  • GCP Cloud Build which fetches secrets from Secret Manager, builds & pushes docker image to Artifact Registry and deploys image to Cloud Run Maintainer

  • GitLab CI runner which triggers GCP Cloud Build pipeline on push Maintainer

  • GitLab CI runner which provisions GCP resources with Terraform Maintainer

  • Load test with k6: CRR & hammer Maintainer

  • Workflow orchestration with Apache Airflow: GCP Firestore & Memorystore backup and Slack notification Maintainer

  • Workflow orchestration with Apache Airflow: synchronize GCP Cloud Storage buckets Maintainer

IDEs

Template Descriptor

The .cctemplate is a Template Descriptor file that describes the contents of your repository so that Cloud Code knows where to look for your templates. It should look something like the following:

{
    "metadata": {
        "version": "1"
    },
    "templates": [
        {
            "path": "path/to/my/template",
            "name": "My Template",
            "description": "This template helps you create something amazing!"
        },
        ...
    ]
}

You can learn more about the Template Descriptor schema here.

Usage

You can configure your IDE to recognize this repository and create applications based on the templates within. Follow the steps below to see Custom Templates in action:

  1. Install Cloud Code for IntelliJ or VS Code

  2. Import the Custom Template repo on IntelliJ or VS Code, using this repo's Git URL: https://github.com/shortcut/cloud-native-templates.git

Find out more at:

Contributing

  1. Create a new directory containing your own template (or make changes to any of the sample templates)
  2. If you are not originating a template make sure a license from sourced repo is included
  3. Establish a feedback channel by referencing either a maintainer or a source repo in the contents section
  4. Make any necessary updates to the templates in the .cctemplate file
  5. Import updated repository into Cloud Code