From 03fcc4b1ca67e3300a9a6c69e102cc617ac29738 Mon Sep 17 00:00:00 2001 From: Vihang Mehta Date: Thu, 6 Oct 2022 11:46:38 -0700 Subject: [PATCH] Update demos readme to make it a bit more easier 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 Differential Revision: https://phab.corp.pixielabs.ai/D12355 GitOrigin-RevId: c5532d0169c4fabab72b7711a374105cd32c1f80 --- demos/README.md | 57 ++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/demos/README.md b/demos/README.md index de90d962c9a..81542c97c1a 100644 --- a/demos/README.md +++ b/demos/README.md @@ -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 -bazel run //src/pixie_cli:px demo deploy -- --artifacts + ```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 --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 @@ -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`. @@ -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: @@ -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 + ```