diff --git a/docs/docs/data-sources/grpc.md b/docs/docs/data-sources/grpc.md index 5afb81d526..9c8adf06e4 100644 --- a/docs/docs/data-sources/grpc.md +++ b/docs/docs/data-sources/grpc.md @@ -1,11 +1,88 @@ +--- +id: grpc +title: gRPC +--- -# grpc +
Self-hosted only
-ToolJet can connect to GRPC databases to read and write data. +:::caution +only self-hosted deployments will have access to a gRPC datasource that is capable of handling unary requests and responses. +::: -- [Connection](#connection) -- [Getting Started](#querying-grpc) +- [Setup](#setup) +- [Querying gRPC](#querying-grpc) -## Connection +## Setup -## Querying GRPC \ No newline at end of file +### Step 1: Upgrade ToolJet to the version 2.5 or above + +Find instructions on how to do this in the setup guides located here: https://docs.tooljet.com/docs/setup/. + +### Step 2: Add proto files + +At the root, create a directory named "**protos**" and add a "**service.proto**" file inside it. + + +### Step 3: Mount Volumes + +In the `docker-compose.yml` add + +```bash +./protos:/app/protos +``` + +to the 2 volume sections for **plugins** and **server** + + +
+ +gRPC: datasource + +
+ +
+ +gRPC: datasource + +
+ +### Step 4: Reboot the instance + +```bash +docker-compose up -d +``` + +## Querying gRPC + +After setting up your proto files, you should be able to establish a connection to gRPC by going to the [global datasource](/docs/data-sources/overview) page. + +### Connect the gRPC datasource + +ToolJet requires the following to connect to gRPC servers: + +- **Server URL** +- **Authentication type** (None, Basic, Bearer, and API key) + +
+ +gRPC: connection + +
+ +Once you have added the gRPC from the global datasource page, you'll find it on the query panel of the application. + +
+ +gRPC: connection + +
+ +### Creating query + +You can now query a particular RPC method of the added services. + +
+ +gRPC: connection + +
\ No newline at end of file diff --git a/docs/sidebars.js b/docs/sidebars.js index 73f65d0182..fddffa1d56 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -63,6 +63,7 @@ const sidebars = { 'data-sources/gcs', 'data-sources/google.sheets', 'data-sources/graphql', + 'data-sources/grpc', 'data-sources/influxdb', 'data-sources/mailgun', 'data-sources/mariadb', diff --git a/docs/static/img/datasource-reference/grpc/connection.png b/docs/static/img/datasource-reference/grpc/connection.png new file mode 100644 index 0000000000..48492b060b Binary files /dev/null and b/docs/static/img/datasource-reference/grpc/connection.png differ diff --git a/docs/static/img/datasource-reference/grpc/grpcgds.png b/docs/static/img/datasource-reference/grpc/grpcgds.png new file mode 100644 index 0000000000..279c9f96e3 Binary files /dev/null and b/docs/static/img/datasource-reference/grpc/grpcgds.png differ diff --git a/docs/static/img/datasource-reference/grpc/proto1.png b/docs/static/img/datasource-reference/grpc/proto1.png new file mode 100644 index 0000000000..f6efdd1f19 Binary files /dev/null and b/docs/static/img/datasource-reference/grpc/proto1.png differ diff --git a/docs/static/img/datasource-reference/grpc/proto2.png b/docs/static/img/datasource-reference/grpc/proto2.png new file mode 100644 index 0000000000..2680ad5a22 Binary files /dev/null and b/docs/static/img/datasource-reference/grpc/proto2.png differ diff --git a/docs/static/img/datasource-reference/grpc/query.png b/docs/static/img/datasource-reference/grpc/query.png new file mode 100644 index 0000000000..32f9e7edca Binary files /dev/null and b/docs/static/img/datasource-reference/grpc/query.png differ