diff --git a/docs/content/getting-started/_index.md b/docs/content/getting-started/_index.md index 1120492f..7947b144 100644 --- a/docs/content/getting-started/_index.md +++ b/docs/content/getting-started/_index.md @@ -427,7 +427,7 @@ http://hello-world-debug.drasi.127.0.0.1.nip.io:8080 In addition to accessing the Debug Reaction via ingress, you can also port-forward the Debug Reaction service to your local machine. Run the following command in a terminal window: ```bash -kubectl port-forward services/hello-world-debug-gateway 8080:8080 -n drasi-system +drasi tunnel reaction hello-world-debug 8080 ``` Now open your browser and navigate to [http://localhost:8080](http://localhost:8080), where you will see the Debug Reaction UI shown here: {{< figure src="debug-reaction-ui.png" alt="Debug Reaction UI" width="70%" >}} diff --git a/docs/content/how-to-guides/configure-reactions/configure-drasi-debug-reaction/_index.md b/docs/content/how-to-guides/configure-reactions/configure-drasi-debug-reaction/_index.md index b047b906..b66a094c 100644 --- a/docs/content/how-to-guides/configure-reactions/configure-drasi-debug-reaction/_index.md +++ b/docs/content/how-to-guides/configure-reactions/configure-drasi-debug-reaction/_index.md @@ -85,15 +85,13 @@ drasi describe reaction hello-world-debug This will return the full definition used to create the Reaction along with more detailed status information. ## Viewing the Debug Reaction UI -Because the Drasi Debug Reaction is running inside a Kubernetes cluster, you need to enable access to the port through which you can view its Web UI. The easiest way to do this is to setup a port forward using `kubectl` and the following command: +Because the Drasi Debug Reaction is running inside a Kubernetes cluster, you need to enable access to the port through which you can view its Web UI. The easiest way to do this is to setup a tunnel using the CLI: -```kubectl -kubectl port-forward -n drasi-namespace services/hello-world-debug-gateway 8080:8080 +```sh +drasi tunnel reaction hello-world-debug 8080 ``` -The `-n` flag specifies the Kubernetes namespace containing the Drasi environment where you installed the Reaction. The name used to reference the Reaction has the structure`services/-gateway`. - -This will make the Drasi Debug Reaction UI available through port 8080 on the computer where you ran the port forward command. Assuming this is your local computer, you can open the Drasi Debug UI by browsing to the address [http://localhost:8080](http://localhost:8080), where you will see the Debug Reaction UI shown here: +This will make the Drasi Debug Reaction UI available through port 8080 on the computer where you ran the tunnel command. Assuming this is your local computer, you can open the Drasi Debug UI by browsing to the address [http://localhost:8080](http://localhost:8080), where you will see the Debug Reaction UI shown here: {{< figure src="debug-reaction-ui.png" alt="Debug Reaction UI" width="70%" >}} diff --git a/docs/content/how-to-guides/configure-reactions/configure-drasi-result-reaction/_index.md b/docs/content/how-to-guides/configure-reactions/configure-drasi-result-reaction/_index.md index c01e7e41..9775b0a3 100644 --- a/docs/content/how-to-guides/configure-reactions/configure-drasi-result-reaction/_index.md +++ b/docs/content/how-to-guides/configure-reactions/configure-drasi-result-reaction/_index.md @@ -91,14 +91,13 @@ This will return the full definition used to create the Reaction along with more ## Using the Result Reaction ### Port-forwarding the Result Reaction + The only way to retrieve the result set from the Result Reaction is through sending HTTP GET requests to the endpoints. For development and testing purposes, since the Result Reaction lives in a Kubernetes pod, it needs to be exposed using Kubernetes port-forwarding. This allows you to send HTTP GET requests to the Result Reaction endpoint from your local machine or from another application. Use the following command to set up port-forwarding for the Result Reaction deployed in the previous steps: ```bash -kubectl port-forward -n services/quick-result-reaction-gateway 8080:8080 +drasi tunnel reaction quick-result-reaction 8080 ``` -This command forwards port `8080` from your local machine to port `8080` on the Result Reaction service in the Kubernetes cluster. Replace `` with the Kubernetes namespace where the Result Reaction was deployed. The name used to reference the Reaction has the structure `services/-gateway`. - You can now access the service locally at `http://localhost:8080` and you can send GET requests to retrieve the result set of a particular query. Alternatively, you can create a Kubernetes Ingress to expose the service externally. This allows you to define a hostname and path for external access without relying on port forwarding. diff --git a/docs/content/how-to-guides/configure-reactions/configure-signalr-reaction/_index.md b/docs/content/how-to-guides/configure-reactions/configure-signalr-reaction/_index.md index f35221ea..f94feb20 100644 --- a/docs/content/how-to-guides/configure-reactions/configure-signalr-reaction/_index.md +++ b/docs/content/how-to-guides/configure-reactions/configure-signalr-reaction/_index.md @@ -189,12 +189,12 @@ spec: ### Local dev/test -For dev/test purposes, you can simply use a `kubectl port-forward` to expose the endpoint via a port on your local machine. +For dev/test purposes, you can simply use a `drasi tunnel` to expose the endpoint via a port on your local machine. The following command will open port 8080 on your local machine, which will point to the SignalR endpoint. -``` -kubectl port-forward services/-gateway 8080:gateway -n drasi-system +```sh +drasi tunnel reaction 8080 ``` Now, you could access the SignalR endpoint via `http://localhost:8080`. diff --git a/docs/content/how-to-guides/install-sample-applications/building-comfort/_index.md b/docs/content/how-to-guides/install-sample-applications/building-comfort/_index.md index 8625961b..75884bd2 100644 --- a/docs/content/how-to-guides/install-sample-applications/building-comfort/_index.md +++ b/docs/content/how-to-guides/install-sample-applications/building-comfort/_index.md @@ -166,7 +166,7 @@ The Gremlin Reaction is used to update the graph in Cosmos DB with the latest co To connect the React app to the SignalR Reaction, forward the gateway port for the SignalR reaction to a port on your local machine: ```bash -kubectl port-forward services/signalr-building-gateway 5001:8080 -n default +drasi tunnel reaction signalr-building 5001 ``` ### 3. Run the demo backend and frontend @@ -205,7 +205,7 @@ From the `apps/building-comfort/app` folder, edit the `config.json` file to spec ```json { "crudApiUrl": "http://localhost:7071", // LocalHttpPort of the backend Functions app - "signalRUrl": "http://localhost:5001/hub", // Kubectl port-forward of SignalR reaction + "signalRUrl": "http://localhost:5001/hub", // Tunnel of SignalR reaction ... } ``` diff --git a/docs/content/how-to-guides/install-sample-applications/curbside-pickup/_index.md b/docs/content/how-to-guides/install-sample-applications/curbside-pickup/_index.md index d3360bcd..d909be33 100644 --- a/docs/content/how-to-guides/install-sample-applications/curbside-pickup/_index.md +++ b/docs/content/how-to-guides/install-sample-applications/curbside-pickup/_index.md @@ -113,10 +113,10 @@ From the `/apps/curbside-pickup/devops` folder, use the drasi CLI to deploy the drasi apply -f signalr-reaction.yaml ``` -Create a port forward for the SignalR reaction to a port on your local machine. Currently we have to use `kubectl` to achieve this. +Create a port forward for the SignalR reaction to a port on your local machine. Currently we have to use `drasi tunnel` to achieve this. ```bash -kubectl port-forward services/signalr1-reaction-gateway 5001:8080 -n default +drasi tunnel reaction signalr1-reaction 5001 ``` ## Configure and start the App backend diff --git a/docs/content/tutorials/connecting-frontends/_index.md b/docs/content/tutorials/connecting-frontends/_index.md index 3db152d4..3fe6948d 100644 --- a/docs/content/tutorials/connecting-frontends/_index.md +++ b/docs/content/tutorials/connecting-frontends/_index.md @@ -43,7 +43,7 @@ drasi wait reaction hello-world-signalr Forward the SignalR gateway to your local machine on port 8082 with the following command. ```shell -kubectl port-forward services/hello-world-signalr-gateway 8082:8080 -n drasi-system +drasi tunnel reaction hello-world-signalr 8082 ``` If you are using GitHub codespaces, when the dialog pops up, make sure to click `Make Public`.