GoogleCloudPlatform / microservices-demo

Sample cloud-first application with 10 microservices showcasing Kubernetes, Istio, and gRPC.
https://cymbal-shops.retail.cymbal.dev
Apache License 2.0
17.12k stars 7.38k forks source link

How to run this on a local Windows machine #1804

Closed lonnietc closed 1 year ago

lonnietc commented 1 year ago

Hello,

I would like to run the demo on a local single Windows machine and not use any containers or cloud services.

How can this be done? Thanks

NimJay commented 1 year ago

Hi @lonnietc, :)

These statements below are true as of May 25, 2023.

Can you run Online Boutique locally on Windows? Yes, you can install kind on Windows. But Online Boutique won't work on ARM-based machines.

Can you avoid cloud services when running Online Boutique? Yes, kind is a local Kubernetes cluster.

Can you run Online Boutique without using containers? No. :(

Using kind will look like:

# Create the kind Cluster.
kind create cluster --name my-kind-cluster

# Clone Online Boutique.
git clone https://github.com/GoogleCloudPlatform/microservices-demo.git

# Set the context to the kind cluster.
kubectl config set-context kind-my-kind-cluster # Yes, the "kind-" prefix is intentional.

# Build and deploy Online Boutique (without the load generator).
cd microservices-demo
skaffold run --module=app

# Make frontend accessible.
kubectl port-forward deployment/frontend 8080:8080

# Visit frontend (or visit localhost:8080 on your browser).
curl localhost:8080 | grep loafers.jpg

# Delete the cluster.
kind delete cluster --name=my-kind-cluster

I haven't explicitly tested the above instructions myself. But it should (mostly) work.

Hope this helps.

lonnietc commented 1 year ago

Thanks for your input on this and maybe in the future it will be possible to run outside of containers.