This GitHub repository contains the Terraform and Kubernetes YAML used by the Jump Start Solution (JSS) entitled Ecommerce web app deployed on Kubernetes, available on Google Cloud.
The Deploy this solution section below contains a brief summary of how you can deploy this solution to your Google Cloud project. For more detailed instructions including troubleshooting guidance, see the solution guide.
The following is a description of what's deployed by this solution:
- Cymbal Shops: This solution deploys a demo application called Cymbal Shops (also known as Online Boutique). Cymbal Shops consists of about 10 microservices. The source code of each microservice is available in a separate, open source GitHub repository.
- 3 Google Kubernetes Engine (GKE) clusters: This solution provisions a total of 3 GKE cluster — 2 clusters in the US, and 1 cluster in Europe. One of the US clusters will be used for configuring multi-cluster ingress, while the other 2 clusters will host the microservices of the Cymbal Shops application (including the frontend microservice).
- Static external IP address: The Cymbal Shops application will be pubicly acessible via an IP address, reserved and output (into your command line interface) by the Terraform. The IP address may take about 5 minutes to actually serve the frontend since multi-cluster ingress takes a few minutes to warm up.
- Single Redis cart database: The items in users' carts are managed in a single Redis databases, only deployed to a US cluster — for data consistency.
To learn more about the deployed infrastructure, read the solution guide on cloud.google.com.
The best way to deploy this solution is through the Jump Start Solutions page on Google Cloud Console. But if you specifically want to deploy the Terraform inside this git branch or commit, follow the instructions below.
- A terminal environment with the following CLI tools available:
terraform
gcloud
- A Google Cloud project that is not currently using a Multi Cluster Ingress.
git clone https://github.com/GoogleCloudPlatform/terraform-ecommerce-microservices-on-gke
cd terraform-ecommerce-microservices-on-gke/infra
The infra/
directory contains all the Terraform code for this solution.
terraform init
terraform apply -var 'project_id=MY_PROJECT_ID'
Replace MY_PROJECT_ID
with your Google Cloud Project ID. We recommend creating a new project so you can easily clean up all resources by deleting the entire project.
You may need to type "Yes", after you run terraform apply
.
a. Search the existing list of GitHub issues.
b. If there isn't already a GitHub issue for your bug, create a new GitHub issue.
Get the external IP address where Cymbal Shops will be accessible about 5 minutes after terraform apply
successfully completes:
gcloud compute addresses list \
--filter="name=('multi-cluster-ingress-ip-address-1')" \
--project=MY_PROJECT_ID
Replace MY_PROJECT_ID
with your Google Cloud Project ID.
Name | Description | Type | Default | Required |
---|---|---|---|---|
labels | A set of key/value label pairs to assign to the resources deployed by this blueprint. | map(string) |
{} |
no |
project_id | The Google Cloud project ID. | string |
n/a | yes |
resource_name_suffix | Optional string added to the end of resource names, allowing project reuse. This should be short and only contain dashes, lowercase letters, and digits. It shoud not end with a dash. |
string |
"-1" |
no |
Name | Description |
---|---|
deployment_ip_address | Public IP address of the deployment |
neos_toc_url | Neos Tutorial URL |
If you would like to contribute to this repository, read CONTRIBUTING.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See Code of Conduct for more information.
Apache 2.0 - See LICENSE for more information.