From 009a9adae80a59da49c7ac67d070d8b71b14137a Mon Sep 17 00:00:00 2001 From: Paul Yuknewicz Date: Mon, 21 Mar 2022 16:28:16 -0700 Subject: [PATCH] Fixing regressions to broken tests (new link) and dev container (#617) * moving devcontainer to root to enable * Fix for tutorials to point to new dapr-cli-link Signed-off-by: Paul Yuknewicz * Fixed additional broken links found by MMD `make validate` in tutorials. Signed-off-by: Paul Yuknewicz * Changing readme to call python3 instead of python per best practices Signed-off-by: Paul Yuknewicz * Fixed zipkin api bug failing tests. Duration with current multiply code will never be slow enough to return traces results! Signed-off-by: Paul Yuknewicz --- .../.devcontainer => .devcontainer}/Dockerfile | 0 .../devcontainer.json | 0 .../first-run-notice.txt | 0 README.md | 2 +- pub_sub/java/http/README.md | 2 +- pub_sub/java/sdk/README.md | 2 +- service_invocation/java/http/README.md | 2 +- state_management/java/http/README.md | 2 +- state_management/java/sdk/README.md | 2 +- tutorials/bindings/README.md | 2 +- tutorials/distributed-calculator/README.md | 2 +- tutorials/hello-kubernetes/README.md | 2 +- tutorials/hello-world/README.md | 2 +- tutorials/observability/README.md | 16 ++++++++-------- tutorials/pub-sub/README.md | 4 ++-- tutorials/secretstore/README.md | 4 ++-- 16 files changed, 22 insertions(+), 22 deletions(-) rename {tutorials/.devcontainer => .devcontainer}/Dockerfile (100%) rename {tutorials/.devcontainer => .devcontainer}/devcontainer.json (100%) rename {tutorials/.devcontainer => .devcontainer}/first-run-notice.txt (100%) diff --git a/tutorials/.devcontainer/Dockerfile b/.devcontainer/Dockerfile similarity index 100% rename from tutorials/.devcontainer/Dockerfile rename to .devcontainer/Dockerfile diff --git a/tutorials/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json similarity index 100% rename from tutorials/.devcontainer/devcontainer.json rename to .devcontainer/devcontainer.json diff --git a/tutorials/.devcontainer/first-run-notice.txt b/.devcontainer/first-run-notice.txt similarity index 100% rename from tutorials/.devcontainer/first-run-notice.txt rename to .devcontainer/first-run-notice.txt diff --git a/README.md b/README.md index f079311e..b766fa5c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Join the chat at https://gitter.im/Dapr/samples](https://badges.gitter.im/Dapr/samples.svg)](https://gitter.im/Dapr/samples?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache-yellow.svg)](https://www.apache.org/licenses/LICENSE-2.0) -If you are new to Dapr and haven't done so already, it is recommended you go through the Dapr [Getting Started](https://docs.dapr.io/getting-started/install-dapr/) instructions. +If you are new to Dapr and haven't done so already, it is recommended you go through the Dapr [Getting Started](https://docs.dapr.io/getting-started/install-dapr-cli/) instructions. ### Quickstarts Pick a building block API (for example, pub-sub, state management) and rapidly try it out in your favorite language SDK (recommended), or via HTTP. Visit the [Dapr Docs Quickstarts Guide](https://docs.dapr.io/getting-started/quickstarts/) for a comprehensive walkthrough of each example. diff --git a/pub_sub/java/http/README.md b/pub_sub/java/http/README.md index d84549a0..9c1dde26 100644 --- a/pub_sub/java/http/README.md +++ b/pub_sub/java/http/README.md @@ -16,7 +16,7 @@ And one subscriber: ## Pre-requisites -* [Dapr and Dapr Cli](https://docs.dapr.io/getting-started/install-dapr/). +* [Dapr and Dapr Cli](https://docs.dapr.io/getting-started/install-dapr-cli/). * Java JDK 11 (or greater): * [Microsoft JDK 11](https://docs.microsoft.com/en-us/java/openjdk/download#openjdk-11) * [Oracle JDK 11](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11) diff --git a/pub_sub/java/sdk/README.md b/pub_sub/java/sdk/README.md index e166f379..f3498774 100644 --- a/pub_sub/java/sdk/README.md +++ b/pub_sub/java/sdk/README.md @@ -16,7 +16,7 @@ And one subscriber: ## Pre-requisites -* [Dapr and Dapr Cli](https://docs.dapr.io/getting-started/install-dapr/). +* [Dapr and Dapr Cli](https://docs.dapr.io/getting-started/install-dapr-cli/). * Java JDK 11 (or greater): * [Microsoft JDK 11](https://docs.microsoft.com/en-us/java/openjdk/download#openjdk-11) * [Oracle JDK 11](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11) diff --git a/service_invocation/java/http/README.md b/service_invocation/java/http/README.md index 83eb78b0..1be26551 100644 --- a/service_invocation/java/http/README.md +++ b/service_invocation/java/http/README.md @@ -14,7 +14,7 @@ And one order processor service: ## Pre-requisites -* [Dapr and Dapr Cli](https://docs.dapr.io/getting-started/install-dapr/). +* [Dapr and Dapr Cli](https://docs.dapr.io/getting-started/install-dapr-cli/). * Java JDK 11 (or greater): * [Microsoft JDK 11](https://docs.microsoft.com/en-us/java/openjdk/download#openjdk-11) * [Oracle JDK 11](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11) diff --git a/state_management/java/http/README.md b/state_management/java/http/README.md index 2454ee57..bc3b7e54 100644 --- a/state_management/java/http/README.md +++ b/state_management/java/http/README.md @@ -8,7 +8,7 @@ Visit [this](https://docs.dapr.io/developing-applications/building-blocks/state- ## Pre-requisites -* [Dapr and Dapr Cli](https://docs.dapr.io/getting-started/install-dapr/). +* [Dapr and Dapr Cli](https://docs.dapr.io/getting-started/install-dapr-cli/). * Java JDK 11 (or greater): * [Microsoft JDK 11](https://docs.microsoft.com/en-us/java/openjdk/download#openjdk-11) * [Oracle JDK 11](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11) diff --git a/state_management/java/sdk/README.md b/state_management/java/sdk/README.md index ab299eb1..0c3ef156 100644 --- a/state_management/java/sdk/README.md +++ b/state_management/java/sdk/README.md @@ -8,7 +8,7 @@ Visit [this](https://docs.dapr.io/developing-applications/building-blocks/state- ## Pre-requisites -* [Dapr and Dapr Cli](https://docs.dapr.io/getting-started/install-dapr/). +* [Dapr and Dapr Cli](https://docs.dapr.io/getting-started/install-dapr-cli/). * Java JDK 11 (or greater): * [Microsoft JDK 11](https://docs.microsoft.com/en-us/java/openjdk/download#openjdk-11) * [Oracle JDK 11](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11) diff --git a/tutorials/bindings/README.md b/tutorials/bindings/README.md index 17c2ac8b..5db79a09 100644 --- a/tutorials/bindings/README.md +++ b/tutorials/bindings/README.md @@ -18,7 +18,7 @@ Dapr allows us to deploy the same microservices from the local machines to Kuber ### Prerequisites to Run Locally -- [Dapr CLI with Dapr initialized](https://docs.dapr.io/getting-started/install-dapr/) +- [Dapr CLI with Dapr initialized](https://docs.dapr.io/getting-started/install-dapr-cli/) - [Node.js version 8 or greater](https://nodejs.org/en/) - [Python 3.4 or greater](https://www.python.org/) diff --git a/tutorials/distributed-calculator/README.md b/tutorials/distributed-calculator/README.md index 57baff67..94b6eb8a 100644 --- a/tutorials/distributed-calculator/README.md +++ b/tutorials/distributed-calculator/README.md @@ -362,7 +362,7 @@ working_dir: "./node" ## Running the quickstart in a Kubernetes environment 1. Navigate to the deploy directory in this quickstart directory: `cd deploy` > **Note**: `appconfig.yaml` is not used directly for this quickstart but is present for the [observability quickstart](../observability). -2. Follow [these instructions](https://docs.dapr.io/getting-started/configure-redis/) to create and configure a Redis store +2. Follow [these instructions](https://docs.dapr.io/getting-started/tutorials/configure-state-pubsub/#step-1-create-a-redis-store) to create and configure a Redis store 3. Deploy all of your resources: diff --git a/tutorials/hello-kubernetes/README.md b/tutorials/hello-kubernetes/README.md index 3a477697..81660afb 100644 --- a/tutorials/hello-kubernetes/README.md +++ b/tutorials/hello-kubernetes/README.md @@ -70,7 +70,7 @@ You will see output like the following. All services should show `True` in the H Dapr can use a number of different state stores (Redis, CosmosDB, DynamoDB, Cassandra, etc) to persist and retrieve state. This demo will use Redis. -1. Follow [these steps](https://docs.dapr.io/getting-started/configure-redis/) to create a Redis store. +1. Follow [these steps](https://docs.dapr.io/getting-started/tutorials/configure-state-pubsub/#step-1-create-a-redis-store) to create a Redis store. 2. Once your store is created, add the keys to the `redis.yaml` file in the `deploy` directory. > **Note:** the `redis.yaml` file provided in this quickstart will work securely out-of-the-box with a Redis installed with `helm install bitnami/redis`. If you have your own Redis setup, replace the `redisHost` value with your own Redis master address, and the redisPassword with your own Secret. You can learn more [here](https://docs.dapr.io/operations/components/component-secrets/). 3. Apply the `redis.yaml` file and observe that your state store was successfully configured! diff --git a/tutorials/hello-world/README.md b/tutorials/hello-world/README.md index 869c427a..e3c2debf 100644 --- a/tutorials/hello-world/README.md +++ b/tutorials/hello-world/README.md @@ -17,7 +17,7 @@ This quickstart requires you to have the following installed on your machine: ## Step 1 - Setup Dapr -Follow [instructions](https://docs.dapr.io/getting-started/install-dapr/) to download and install the Dapr CLI and initialize Dapr. +Follow [instructions](https://docs.dapr.io/getting-started/install-dapr-cli/) to download and install the Dapr CLI and initialize Dapr. ## Step 2 - Understand the code diff --git a/tutorials/observability/README.md b/tutorials/observability/README.md index 1ac5b4d6..b0df15ec 100644 --- a/tutorials/observability/README.md +++ b/tutorials/observability/README.md @@ -100,7 +100,7 @@ name: Curl validate ```bash -curl -s "http://localhost:9411/api/v2/traces?spanName=calllocal%2Fhello-tracing%2Fneworder" -H "accept:application/json" -o output.json && python -m json.tool output.json +curl -s "http://localhost:9411/api/v2/traces?spanName=calllocal%2Fhello-tracing%2Fneworder" -H "accept:application/json" -o output.json && python3 -m json.tool output.json ``` @@ -154,10 +154,10 @@ dapr stop --app-id hello-tracing This quickstart builds on the [distributed calculator](../distributed-calculator/README.md) quickstart and requires Dapr to be installed on a Kubernetes cluster along with a state store. It is suggested to go through the distributed calculator quickstart before this one. If you have not done this then: -1. Clone this repo using `git clone [-b ] https://github.com/dapr/quickstarts.git` and go to the directory via `cd quickstarts/obervability`. +1. Clone this repo using `git clone [-b ] https://github.com/dapr/quickstarts.git` and go to the directory via `cd quickstarts/tutorials/obervability`. 2. [Install Dapr on Kubernetes](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/). -3. [Configure Redis](https://docs.dapr.io/getting-started/configure-redis/) as a state store for Dapr. -4. Configure host and password for Redis state store Component in `../distributed-calculator/deploy/redis.yaml`. +3. [Configure Redis](https://docs.dapr.io/getting-started/tutorials/configure-state-pubsub/#step-1-create-a-redis-store) as a state store for Dapr. +4. Review the host and password for Redis state store Component in `../distributed-calculator/deploy/redis.yaml`. > **Note**: See https://github.com/dapr/quickstarts#supported-dapr-runtime-version for supported tags. Use `git clone https://github.com/dapr/quickstarts.git` when using the edge version of dapr runtime. ## Configure Dapr tracing in the cluster @@ -252,7 +252,7 @@ annotations: ... ``` -For this quickstart, a configuration has already been enabled for every service in the distributed calculator app. You can find the annotation in each one of the calculator yaml files. For example review the yaml file for the calculator front end service [here](https://github.com/dapr/quickstarts/blob/master/distributed-calculator/deploy/react-calculator.yaml#L36). +For this quickstart, a configuration has already been enabled for every service in the distributed calculator app. You can find the annotation in each one of the calculator yaml files. For example review the yaml file for the calculator front end service [here](https://github.com/dapr/quickstarts/blob/master/tutorials/distributed-calculator/deploy/react-calculator.yaml#L36). Note you did not introduce any dependency on Zipkin into the calculator app code or deployment yaml files. The Zipkin Dapr component is configured to read tracing events and write these to a tracing backend. @@ -319,7 +319,7 @@ kubectl get pods Then, open the distributed calculator UI. -If this is the first time trying the distributed calculator, find more detailed instructions in the [distributed-calculator](https://github.com/dapr/quickstarts/blob/master/distributed-calculator/README.md) quickstart. +If this is the first time trying the distributed calculator, find more detailed instructions in the [distributed-calculator](https://github.com/dapr/quickstarts/tree/master/tutorials/distributed-calculator) tutorial. > **Note:** If the distributed calculator is already running on your cluster you will need to restart it for the tracing to take effect. You can do so by running: @@ -454,7 +454,7 @@ Dapr adds a HTTP/gRPC middleware to the Dapr sidecar. The middleware intercepts ![Zipkin](./img/zipkin-2.png) -Now look for any performance issues by filtering on any requests that have taken longer than 250 ms using the `minDuration` criteria: +Now look for any performance issues by filtering on any requests that have take too long. You can use `minDuration` criteria to query for long requests only: ![Zipkin](./img/zipkin-3.png) @@ -478,7 +478,7 @@ name: Curl validate --> ```bash -curl -s http://localhost:19411/api/v2/traces?minDuration=250000 -H accept:application/json -o output.json && python -m json.tool output.json +curl -s http://localhost:19411/api/v2/traces -H accept:application/json -o output.json && python3 -m json.tool output.json ``` diff --git a/tutorials/pub-sub/README.md b/tutorials/pub-sub/README.md index 20d17c39..f177f113 100644 --- a/tutorials/pub-sub/README.md +++ b/tutorials/pub-sub/README.md @@ -23,7 +23,7 @@ Dapr allows you to deploy the same microservices from your local machines to the ### Prerequisites to run locally -- [Dapr CLI with Dapr initialized](https://docs.dapr.io/getting-started/install-dapr) +- [Dapr CLI with Dapr initialized](https://docs.dapr.io/getting-started/install-dapr-cli/) - [Node.js version 8 or greater](https://nodejs.org/en/) and/or [Python 3.4 or greater](https://www.python.org/): You can run this quickstart with one or both microservices ### Prerequisites to Run in Kubernetes @@ -295,7 +295,7 @@ To run the same code in Kubernetes, first set up a Redis store and then deploy t Dapr uses pluggable message buses to enable pub-sub, in this case Redis Streams (enabled in Redis version 5 and above) is used. You'll install Redis into the cluster using helm, but keep in mind that you could use whichever Redis host you like, as long as the version is greater than 5. -1. Follow [these steps](https://docs.dapr.io/getting-started/configure-state-pubsub/#create-a-redis-store) to create a Redis store using Helm. +1. Follow [these steps](https://docs.dapr.io/getting-started/tutorials/configure-state-pubsub/) to create a Redis store using Helm. > **Note**: Currently the version of Redis supported by Azure Redis Cache is less than 5, so using Azure Redis Cache will not work. 2. Once your store is created, add the keys to the `redis.yaml` file in the `deploy` directory. Don't worry about applying the `redis.yaml`, as it will be covered in the next step. > **Note:** the `redis.yaml` file provided in this quickstart takes plain text secrets. In a production-grade application, follow [secret management](https://docs.dapr.io/developing-applications/building-blocks/secrets/) instructions to securely manage your secrets. diff --git a/tutorials/secretstore/README.md b/tutorials/secretstore/README.md index f8c0c36f..656dee2a 100644 --- a/tutorials/secretstore/README.md +++ b/tutorials/secretstore/README.md @@ -7,7 +7,7 @@ This tutorial shows you how to use the Dapr secrets API to access secrets from s ### Prerequisites to run Locally -- [Dapr CLI with Dapr initialized](https://docs.dapr.io/getting-started/install-dapr/) +- [Dapr CLI with Dapr initialized](https://docs.dapr.io/getting-started/install-dapr-cli/) - [Node.js version 8 or greater](https://nodejs.org/en/) - [Postman](https://www.getpostman.com/) [Optional] @@ -29,7 +29,7 @@ cd quickstarts ### Step 1 - Setup Dapr on your local machine -Follow [instructions](https://docs.dapr.io/getting-started/install-dapr/) to download and install the Dapr CLI and initialize Dapr. +Follow [instructions](https://docs.dapr.io/getting-started/install-dapr-cli/) to download and install the Dapr CLI and initialize Dapr. ### Step 2 - Understand the code and configuration