-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the px-mongo demo to the CLI (#1802)
Summary: This PR adds a demo app to test the mongo protocol tracing feature. Related issues: Closes #640 Type of change: /kind feature Test Plan: Uploaded the `px-mongo` demo artifact to the GCS dev bucket. Tested the CLI and then deployed the demo to my cluster. Skaffolded Pixie with the latest mongo tracing changes and used the scratch pad to execute the mongo pxl script to verify data is being collected from the demo. <img width="1401" alt="Screenshot 2023-12-06 at 1 29 39 PM" src="https://github.com/pixie-io/pixie/assets/62078498/57aba6ed-dce5-4721-8c55-c4cd23f9ed0d"> Changelog Message: ``` Adds the `px-mongo` demo to the CLI ``` Signed-off-by: Kartik Pattaswamy <[email protected]>
- Loading branch information
1 parent
4044463
commit cd4d093
Showing
4 changed files
with
263 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,230 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: px-mongo | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
kompose.cmd: /snap/kompose/19/kompose-linux-amd64 convert -f ../docker-compose.yml | ||
kompose.version: 1.21.0 (992df58d8) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: back | ||
name: back | ||
namespace: px-mongo | ||
spec: | ||
ports: | ||
- name: "8085" | ||
port: 8085 | ||
targetPort: 8085 | ||
selector: | ||
io.kompose.service: back | ||
status: | ||
loadBalancer: {} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
kompose.cmd: /snap/kompose/19/kompose-linux-amd64 convert -f ../docker-compose.yml | ||
kompose.version: 1.21.0 (992df58d8) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: front | ||
name: front | ||
namespace: px-mongo | ||
spec: | ||
ports: | ||
- name: "8080" | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
io.kompose.service: front | ||
status: | ||
loadBalancer: {} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
kompose.cmd: /snap/kompose/19/kompose-linux-amd64 convert -f ../docker-compose.yml | ||
kompose.version: 1.21.0 (992df58d8) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: mongodb | ||
name: mongodb | ||
namespace: px-mongo | ||
spec: | ||
ports: | ||
- name: "27017" | ||
port: 27017 | ||
targetPort: 27017 | ||
selector: | ||
io.kompose.service: mongodb | ||
status: | ||
loadBalancer: {} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
kompose.cmd: /snap/kompose/19/kompose-linux-amd64 convert -f ../docker-compose.yml | ||
kompose.version: 1.21.0 (992df58d8) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: back | ||
name: back | ||
namespace: px-mongo | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
io.kompose.service: back | ||
strategy: {} | ||
template: | ||
metadata: | ||
annotations: | ||
kompose.cmd: /snap/kompose/19/kompose-linux-amd64 convert -f ../docker-compose.yml | ||
kompose.version: 1.21.0 (992df58d8) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: back | ||
spec: | ||
containers: | ||
- env: | ||
- name: CONN_STR | ||
value: mongodb://mongodb:27017 | ||
- name: PORT | ||
value: "8085" | ||
image: gcr.io/pixie-prod/demos/px-mongo/backend:1.0.0 | ||
imagePullPolicy: "" | ||
name: back | ||
ports: | ||
- containerPort: 8085 | ||
resources: {} | ||
initContainers: | ||
- command: | ||
- sh | ||
- -c | ||
- set -xe; while ! mongosh mongodb://mongodb:27017 --eval "db.serverStatus()" | ||
; do echo "waiting until mongodb is available"; sleep 2; done; | ||
image: mongo:7.0 | ||
name: mongodb-wait | ||
restartPolicy: Always | ||
serviceAccountName: "" | ||
volumes: null | ||
status: {} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
kompose.cmd: /snap/kompose/19/kompose-linux-amd64 convert -f ../docker-compose.yml | ||
kompose.version: 1.21.0 (992df58d8) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: front | ||
name: front | ||
namespace: px-mongo | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
io.kompose.service: front | ||
strategy: {} | ||
template: | ||
metadata: | ||
annotations: | ||
kompose.cmd: /snap/kompose/19/kompose-linux-amd64 convert -f ../docker-compose.yml | ||
kompose.version: 1.21.0 (992df58d8) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: front | ||
spec: | ||
containers: | ||
- image: gcr.io/pixie-prod/demos/px-mongo/frontend:1.0.0 | ||
imagePullPolicy: "" | ||
name: front | ||
ports: | ||
- containerPort: 8080 | ||
resources: {} | ||
restartPolicy: Always | ||
serviceAccountName: "" | ||
volumes: null | ||
status: {} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
kompose.cmd: /snap/kompose/19/kompose-linux-amd64 convert -f ../docker-compose.yml | ||
kompose.version: 1.21.0 (992df58d8) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: load | ||
name: load | ||
namespace: px-mongo | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
io.kompose.service: load | ||
strategy: {} | ||
template: | ||
metadata: | ||
annotations: | ||
kompose.cmd: /snap/kompose/19/kompose-linux-amd64 convert -f ../docker-compose.yml | ||
kompose.version: 1.21.0 (992df58d8) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: load | ||
spec: | ||
containers: | ||
- image: gcr.io/pixie-prod/demos/px-mongo/load:1.0.0 | ||
imagePullPolicy: "" | ||
name: load | ||
resources: {} | ||
restartPolicy: Always | ||
serviceAccountName: "" | ||
volumes: null | ||
status: {} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
kompose.cmd: /snap/kompose/19/kompose-linux-amd64 convert -f ../docker-compose.yml | ||
kompose.version: 1.21.0 (992df58d8) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: mongodb | ||
name: mongodb | ||
namespace: px-mongo | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
io.kompose.service: mongodb | ||
strategy: {} | ||
template: | ||
metadata: | ||
annotations: | ||
kompose.cmd: /snap/kompose/19/kompose-linux-amd64 convert -f ../docker-compose.yml | ||
kompose.version: 1.21.0 (992df58d8) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: mongodb | ||
spec: | ||
containers: | ||
- image: mongo:7.0 | ||
imagePullPolicy: "" | ||
name: mongodb | ||
ports: | ||
- containerPort: 27017 | ||
resources: {} | ||
restartPolicy: Always | ||
serviceAccountName: "" | ||
volumes: null | ||
status: {} |