Skip to content

Commit

Permalink
Update demos readme to make it a bit more easier
Browse files Browse the repository at this point in the history
Summary: TSIA, cleanup markdown format and fixup dev instructions.

Test Plan: Markdown linter is happy and rendered output looks ok.

Reviewers: htroisi

Reviewed By: htroisi

Signed-off-by: Vihang Mehta <vihang@pixielabs.ai>

Differential Revision: https://phab.corp.pixielabs.ai/D12355

GitOrigin-RevId: c5532d0169c4fabab72b7711a374105cd32c1f80
  • Loading branch information
vihangm authored and copybaranaut committed Oct 6, 2022
1 parent cab48e8 commit 03fcc4b
Showing 1 changed file with 33 additions and 24 deletions.
57 changes: 33 additions & 24 deletions demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,39 @@
These demo applications are packaged to allow `px deploy` to access them. The `manifest.json`
file describes the demo scenarios.

# General Notes
## General Notes

- For best results when running the continuous profiler, all Java applications should be run with `-XX:+PreserveFramePointer`.

# Instructions for adding a new demo
## Instructions for adding a new demo

1. Add a folder containing the demo yaml and license file.
2. Add the demo to the `manifest.json` file.
3. Test the CLI:
1. (Optional) Update the GCS bucket in the `demos/BUILD.bazel` demo_upload step. Set the artifacts URL appropriately.

```
# 1. (Optional) Update the GCS bucket in the `demos/BUILD.bazel` demo_upload step.
```shell
export DEV_DEMO_ARTIFACTS_URL=https://storage.googleapis.com/pl-infra-dev-artifacts/dev-demo-apps
```

# 2. Upload the demo artifacts to the dev bucket:
bazel run //demos:upload_dev_demo
2. Upload the demo artifacts to the dev bucket:

# 3. Test the CLI with the dev artifacts:
bazel run //src/pixie_cli:px demo list -- --artifacts <DEV_ARTIFACTS_URL>
bazel run //src/pixie_cli:px demo deploy <DEMO_NAME> -- --artifacts <DEV_ARTIFACTS_URL>
```shell
bazel run //demos:upload_dev_demo
```

# 4. After your PR is merged, upload the demo artifacts to the prod bucket:
bazel run //demos:upload_prod_demo
```
3. Test the CLI with the dev artifacts:

```shell
px demo list --artifacts "${DEV_DEMO_ARTIFACTS_URL}"
px demo deploy <DEMO_NAME> --artifacts "${DEV_DEMO_ARTIFACTS_URL}"
```

4. After your PR is merged, upload the demo artifacts to the prod bucket:

```shell
bazel run //demos:upload_prod_demo
```

## Updating the `px-kafka` demo

Expand All @@ -35,9 +45,9 @@ bazel run //demos:upload_prod_demo

3. Build a single yaml file for the demo:

```
kustomize build . > kafka.yaml
```
```shell
kustomize build . > kafka.yaml
```

4. Copy the yaml file to `pixie/demos/kafka`.

Expand All @@ -49,13 +59,12 @@ kustomize build . > kafka.yaml

3. Build a single yaml file for the demo:

```
kustomize . > finagle.yaml
```
```shell
kustomize . > finagle.yaml
```

4. Copy the yaml file to `pixie/demos/finagle`.


## Updating the `px-online-boutique` demo

Our custom `adservice` image includes the `-XX:+PreserveFramePointer` Java option. To build our custom `adservice` image:
Expand All @@ -64,8 +73,8 @@ Our custom `adservice` image includes the `-XX:+PreserveFramePointer` Java optio

2. Run the following commands:

```
cd src/adservice
docker build -t gcr.io/pixie-prod/demos/microservices-demo-app/adservice:1.0 .
docker push gcr.io/pixie-prod/demos/microservices-demo-app/adservice:1.0
```
```shell
cd src/adservice
docker build -t gcr.io/pixie-prod/demos/microservices-demo-app/adservice:1.0 .
docker push gcr.io/pixie-prod/demos/microservices-demo-app/adservice:1.0
```

0 comments on commit 03fcc4b

Please sign in to comment.