Skip to content

Commit

Permalink
Remove Google Cloud Debugger (GoogleCloudPlatform#1281)
Browse files Browse the repository at this point in the history
* Remove Cloud Debugger references from .md files

* Remove use of DISABLE_DEBUGGER env variable

* Disable clouddebugger.googleapis.com in Terraform

* Remove Cloud Debugger comments from emailservice

* Remove use of Cloud Debugger in microservices

* Generate recommendationservice's requirements.txt

* Generate paymentservice's package-lock.json

* Geerate currencyservice's package-lock.json
  • Loading branch information
NimJay authored Nov 29, 2022
1 parent 6a38ffd commit 5de83be
Show file tree
Hide file tree
Showing 23 changed files with 3,794 additions and 3,441 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Find **Protocol Buffers Descriptions** at the [`./pb` directory](./pb).
communicate to each other.
- **[Istio](https://istio.io):** Application works on Istio service mesh.
- **[Cloud Operations (Stackdriver)](https://cloud.google.com/products/operations):** Many services
are instrumented with **Profiling**, **Tracing** and **Debugging**. In
are instrumented with **Profiling** and **Tracing**. In
addition to these, using Istio enables features like Request/Response
**Metrics** and **Context Graph** out of the box. When it is running out of
Google Cloud, this code path remains inactive.
Expand Down
3 changes: 1 addition & 2 deletions docs/development-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ This doc explains how to build and run the OnlineBoutique source code locally us
- kubectl (can be installed via `gcloud components install kubectl`)
- [skaffold **2.0+**](https://skaffold.dev/docs/install/) (latest version recommended), a tool that builds and deploys Docker images in bulk.
- A Google Cloud Project with Google Container Registry enabled.
- Enable GCP APIs for Cloud Monitoring, Tracing, Debugger, Profiler:
- Enable GCP APIs for Cloud Monitoring, Tracing, Profiler:
```
gcloud services enable monitoring.googleapis.com \
cloudtrace.googleapis.com \
clouddebugger.googleapis.com \
cloudprofiler.googleapis.com
```
- [Minikube](https://minikube.sigs.k8s.io/docs/start/) (optional - see Local Cluster)
Expand Down
2 changes: 0 additions & 2 deletions kubernetes-manifests/currencyservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ spec:
value: "7000"
- name: DISABLE_PROFILER
value: "1"
- name: DISABLE_DEBUGGER
value: "1"
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:7000"]
Expand Down
2 changes: 0 additions & 2 deletions kubernetes-manifests/paymentservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ spec:
value: "50051"
- name: DISABLE_PROFILER
value: "1"
- name: DISABLE_DEBUGGER
value: "1"
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:50051"]
Expand Down
2 changes: 0 additions & 2 deletions kubernetes-manifests/recommendationservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ spec:
value: "productcatalogservice:3550"
- name: DISABLE_PROFILER
value: "1"
- name: DISABLE_DEBUGGER
value: "1"
resources:
requests:
cpu: 100m
Expand Down
2 changes: 1 addition & 1 deletion kustomize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Here is the list of the variations available as Kustomize components that you co
- [**Change to the Cymbal Shops Branding**](components/cymbal-branding)
- Changes all Online Boutique-related branding to Google Cloud's fictitious company — Cymbal Shops. The code adds/enables an environment variable `CYMBAL_BRANDING` in the `frontend` service.
- [**Integrate with Google Cloud Operations**](components/google-cloud-operations)
- Enables Monitoring (Stats), Tracing, Profiler, and Debugger for various services within Online Boutique. The code adds the appropriare environment variables (`ENABLE_STATS`, `ENABLE_TRACING`, `DISABLE_PROFILER`, `DISABLE_DEBUGGER`) for each YAML config file.
- Enables Monitoring (Stats), Tracing, and Profiler for various services within Online Boutique. The code adds the appropriare environment variables (`ENABLE_STATS`, `ENABLE_TRACING`, `DISABLE_PROFILER`) for each YAML config file.
- [**Integrate with Memorystore (Redis)**](components/memorystore)
- The default Online Boutique deployment uses the in-cluster `redis` database for storing the contents of its shopping cart. The Memorystore deployment variation overrides the default database with its own Memorystore (Redis) database. These changes directly affect `cartservice`.
- [**Integrate with Spanner**](components/spanner)
Expand Down
2 changes: 0 additions & 2 deletions kustomize/base/currencyservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ spec:
value: "7000"
- name: DISABLE_PROFILER
value: "1"
- name: DISABLE_DEBUGGER
value: "1"
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:7000"]
Expand Down
2 changes: 0 additions & 2 deletions kustomize/base/paymentservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ spec:
value: "50051"
- name: DISABLE_PROFILER
value: "1"
- name: DISABLE_DEBUGGER
value: "1"
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:50051"]
Expand Down
2 changes: 0 additions & 2 deletions kustomize/base/recommendationservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ spec:
value: "productcatalogservice:3550"
- name: DISABLE_PROFILER
value: "1"
- name: DISABLE_DEBUGGER
value: "1"
resources:
requests:
cpu: 100m
Expand Down
7 changes: 1 addition & 6 deletions kustomize/components/google-cloud-operations/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Integrate Online Boutique with Google Cloud Operations

By default, [Google Cloud Operations](https://cloud.google.com/products/operations) instrumentation is **turned off** for Online Boutique deployments. This includes Monitoring (Stats), Tracing, Profiler, and Debugger. This means that even if you're running this app on [GKE](https://cloud.google.com/kubernetes-engine), traces (for example) will not be exported to [Google Cloud Trace](https://cloud.google.com/trace).
By default, [Google Cloud Operations](https://cloud.google.com/products/operations) instrumentation is **turned off** for Online Boutique deployments. This includes Monitoring (Stats), Tracing, and Profiler. This means that even if you're running this app on [GKE](https://cloud.google.com/kubernetes-engine), traces (for example) will not be exported to [Google Cloud Trace](https://cloud.google.com/trace).

If you want to re-enable Google Cloud Operations instrumentation, the easiest way is to enable the included kustomize module, which enables traces, metrics, and adds a deployment of the [Open Telemetry Collector](https://opentelemetry.io/docs/collector/) to gather the traces and metrics and forward them to the appropriate Google Cloud backend.

Expand All @@ -27,7 +27,6 @@ PROJECT_ID=<your-gcp-project-id>
gcloud services enable \
monitoring.googleapis.com \
cloudtrace.googleapis.com \
clouddebugger.googleapis.com \
cloudprofiler.googleapis.com \
--project ${PROJECT_ID}
```
Expand All @@ -48,10 +47,6 @@ gcloud projects add-iam-policy-binding ${PROJECT_ID} \
gcloud projects add-iam-policy-binding ${PROJECT_ID} \
--member "serviceAccount:${GSA_NAME}@${PROJECT_ID}.iam.gserviceaccount.com" \
--role roles/cloudprofiler.agent
gcloud projects add-iam-policy-binding ${PROJECT_ID} \
--member "serviceAccount:${GSA_NAME}@${PROJECT_ID}.iam.gserviceaccount.com" \
--role roles/clouddebugger.agent
```

**Note**
Expand Down
12 changes: 3 additions & 9 deletions kustomize/components/google-cloud-operations/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ patchesStrategicMerge:
value: "1"
- name: DISABLE_PROFILER
$patch: delete
# currencyservice - tracing, profiler, debugger
# currencyservice - tracing, profiler
- |-
apiVersion: apps/v1
kind: Deployment
Expand All @@ -71,8 +71,6 @@ patchesStrategicMerge:
value: "1"
- name: DISABLE_PROFILER
$patch: delete
- name: DISABLE_DEBUGGER
$patch: delete
# emailservice - tracing, profiler
- |-
apiVersion: apps/v1
Expand Down Expand Up @@ -109,7 +107,7 @@ patchesStrategicMerge:
value: "opentelemetrycollector:4317"
- name: DISABLE_PROFILER
$patch: delete
# paymentservice - tracing, profiler, debugger
# paymentservice - tracing, profiler
- |-
apiVersion: apps/v1
kind: Deployment
Expand All @@ -127,8 +125,6 @@ patchesStrategicMerge:
value: "1"
- name: DISABLE_PROFILER
$patch: delete
- name: DISABLE_DEBUGGER
$patch: delete
# productcatalogservice - stats, tracing, profiler
- |-
apiVersion: apps/v1
Expand All @@ -149,7 +145,7 @@ patchesStrategicMerge:
value: "1"
- name: ENABLE_PROFILER
$patch: delete
# recommendationservice - tracing, profiler, debugger
# recommendationservice - tracing, profiler
- |-
apiVersion: apps/v1
kind: Deployment
Expand All @@ -167,8 +163,6 @@ patchesStrategicMerge:
value: "1"
- name: DISABLE_PROFILER
$patch: delete
- name: DISABLE_DEBUGGER
$patch: delete
# shippingservice - stats, tracing, profiler
- |-
apiVersion: apps/v1
Expand Down
2 changes: 1 addition & 1 deletion kustomize/components/network-policies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ redis-cart app=redis-cart 2m58s
shippingservice app=shippingservice 2m58s
```

_Note: `Egress` is wide open in these `NetworkPolicies` . In our case, we do this is on purpose because there are multiple egress destinations to take into consideration like the Kubernetes DNS, Istio control plane (`istiod`), Cloud Trace API, Cloud Profiler API, Cloud Debugger API, etc._
_Note: `Egress` is wide open in these `NetworkPolicies` . In our case, we do this is on purpose because there are multiple egress destinations to take into consideration like the Kubernetes DNS, Istio control plane (`istiod`), Cloud Trace API, Cloud Profiler API, etc._

## Related Resources

Expand Down
Loading

0 comments on commit 5de83be

Please sign in to comment.