Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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%" >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<reaction_name>-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%" >}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <drasi-namespace> 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 `<drasi-namespace>` with the Kubernetes namespace where the Result Reaction was deployed. The name used to reference the Reaction has the structure `services/<reaction_name>-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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<reaction name>-gateway 8080:gateway -n drasi-system
```sh
drasi tunnel reaction <reaction name> 8080
```

Now, you could access the SignalR endpoint via `http://localhost:8080`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
...
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/content/tutorials/connecting-frontends/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down