A solution framework to generate a project with built-in structure and modules
Project description
Google Cloud Solutions Builder
A solution framework to generate a new project with built-in structure and modules to accelerate your project setup.
TL;DR
Solutions Builder is a boilerplate template for building repeatable solutions with the best practices in architecture on Google Cloud, including GKE clusters, Cloud Run, Test Automation, CI/CD, as well as development process.
This template provides built-in and ready-to-ship modules including:
- Easy-to-deploy Terraform boilerplate modules
- Container-based microservices, can be deployed to a Kubernetes cluster or Cloud Run.
- Unified deployment using Skaffold.
- Automatically generated API documentation with Swagger UI.
- CI/CD deployment (with Github Actions).
- Cloud Run templates.
Roadmap
Please see Feature Requests in the Github issue list.
Prerequisite
Tool | Required Version | Installation |
---|---|---|
Python | >= 3.9 | |
gcloud CLI | Latest | https://cloud.google.com/sdk/docs/install |
Terraform | >= v1.3.7 | https://developer.hashicorp.com/terraform/downloads |
Skaffold | >= v2.4.0 | https://skaffold.dev/docs/install/ |
[Optional] If you plan to deploy services on a GKE cluster, please install the following:
Tool | Required Version | Installation |
---|---|---|
Kustomize | >= v5.0.0 | https://kubectl.docs.kubernetes.io/installation/kustomize/ |
Installing Solutions Builder CLI
With pip
:
pip install solutions-builder
With pipx
:
pip install --user pipx
pipx install solutions-builder
Getting Started
Set up GCP project
# Optional: create a new GCP project. You can also use an existing GCP project.
gcloud projects create my-solution-gcp-id
# Set gcloud CLI to the GCP project.
gcloud config set project my-solutions-gcp-id
Generate a new solution folder.
sb new my-solution .
This will prompt options and variables:
🎤 What is your project name? (Spaces are allowed.)
my-solution
🎤 What is your Google Cloud project ID?
my-solution-gcp-id
🎤 What is your Google Cloud project number?
12345678
🎤 Which Google Cloud region?
us-central1
🎤 Use GCS Bucket for Terraform backend?
Yes
Go to the newly created project folder and initialize the solution.
cd my-solution
sb infra init
Add a RESTful API service with Todo data model to this solution.
sb components add restful_service
Fill details in the prompt:
- Component name: todo_service
- Resource name: todo-service
- Relative path: todo-service
- GCP region: us-central1
- Data model name: todo
- Add Cloud Run to deployment methods: yes
- Create network endpoint group (NEG) for serverless ingress: yes
- Default deploy method? (cloudrun or gke): Cloud Run
Add a HTTP Load Balancer for Cloud Run service(s)
sb add component terraform_httplb_cloudrun
sb infra apply 3-httplb-cloudrun
Build and deploy
sb deploy
- See other deployment options in solutions_builder/modules.
Additional Documentations
You can find more documentations in docs folder. In a nutshell, it covers the following:
- INSTALLATION.md - The overall installation guide.
- DEVELOPMENT.md - Development guide and code submission process.
- TROUBLESHOOTING.md - Development guide and code submission process.
In the docs/components folder, it contains a few more guidance based on each component/feature available in this template.
- gke.md covers the overall developmeng guidance on Google Kubernetes Engine.
- cloudrun.md covers the guidance if you want to deploy microservice to Cloud Run.
FAQ
-
Who are the target audience/users for this Solutions Builder?
- A: Any engineering team to start a new solution development project.
-
Can I choose to deploy microservice just to Cloud Run?
- A: Yes, please refer to Setting up Google Cloud Project in this README.md to choose where to deploy microservices. Or you can refer to INSTALLATION.md for more details.
-
Can I use this template for non-Google or multi-Cloud environments?
- A: We design this Solutions Builder to work 100% out of the box with Google Cloud products. However you could customize the solution to meet your needs on multi-Cloud environment. See Why Google Cloud for details.
Troubleshoot
See TROUBLESHOOTING.md for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for solutions_builder-1.17.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e759690796a6b0090acad2ebb07e9bc49475e67fb2fcbf88905398eaf1324f04 |
|
MD5 | 48584ea95b4193db6089c4f766203af3 |
|
BLAKE2b-256 | 88ad58f746fca10017f3d788a6401ed3e9823629ef25f0bc75cbadb1b29200fe |