Add hasura connector plugins docs

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9872
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: 3095dc3f892001ccc053a592b4d4f1572773a4d7
This commit is contained in:
Sandeep Raj Kumar 2023-07-19 18:06:36 +05:30 committed by hasura-bot
parent 1451e0ecea
commit 47a2eaf686
11 changed files with 469 additions and 0 deletions

View File

@ -0,0 +1,4 @@
{
"label": "Hasura Data Connector Plugin",
"position": 5
}

View File

@ -0,0 +1,5 @@
{
"label": "Commands",
"position": 3
}

View File

@ -0,0 +1,41 @@
---
sidebar_label: hasura connector
sidebar_position: 1
description: Hasura Connector CLI. using the Hasura CLI
keywords:
- hasura
- docs
- CLI
- connector
---
# Hasura CLI: connector
Hasura Data Connector CLI
## Synopsis
This Hasura CLI plugin enables deployment and management of custom Hasura Data Connector agents to Hasura Cloud.
Further Reading:
- https://hasura.io/docs/latest/databases/data-connectors/
- https://github.com/hasura/graphql-engine/tree/master/dc-agents/reference
- https://github.com/hasura/graphql-engine/blob/master/dc-agents/DOCUMENTATION.md
## Options
```sass
-h, --help help for connector
```
## SEE ALSO
- [hasura connector create](/hasura-cli/connector-plugin/commands/connector_create.mdx) - Create a new Hasura Cloud connector using CLI
- [hasura connector delete](/hasura-cli/connector-plugin/commands/connector_delete.mdx) - Delete a Hasura Cloud connector.
- [hasura connector list](/hasura-cli/connector-plugin/commands/connector_list.mdx) - List all Hasura Cloud data connectors owned by the user.
- [hasura connector logs](/hasura-cli/connector-plugin/commands/connector_logs.mdx) - Tails logs of a deployed custom Hasura data connector.
- [hasura connector status](/hasura-cli/connector-plugin/commands/connector_status.mdx) - Prints the current status of the custom Hasura data connector deployment.
- [hasura connector version](/hasura-cli/connector-plugin/commands/connector_version.mdx) - get version information of connector CLI
_Auto generated by spf13/cobra_

View File

@ -0,0 +1,58 @@
---
sidebar_label: hasura connector create
sidebar_position: 2
description: Create a new Hasura Cloud connector using CLI using the Hasura CLI
keywords:
- hasura
- docs
- CLI
- connector create
---
# Hasura CLI: connector create
Create a new Hasura Cloud Data Connector using the CLI plugin.
## Synopsis
This command triggers deployment of a custom Hasura Data Connector agent to Hasura Cloud. The source of the connector is fetched from the GitHub repository provided to the flag --github-repo-url. Please note:
- The provided repository must be publicly accessible.
- The provided repository should follow the GDC spec: https://github.com/hasura/graphql-engine/blob/master/dc-agents/DOCUMENTATION.md
- The provided repository should have a Dockerfile at the root directory which will be used to build the image.
Further Reading:
- https://hasura.io/docs/latest/databases/data-connectors/
- https://github.com/hasura/graphql-engine/tree/master/dc-agents/reference
- https://github.com/hasura/graphql-engine/blob/master/dc-agents/DOCUMENTATION.md
```bash
hasura connector create [connector-name] [flags]
```
## Examples
```bash
# source code for the connector is at HEAD of the main branch
hasura connector create my-connector:v1 --github-repo-url https://github.com/hasura/weaviate_gdc/tree/main
# source code for the connector is at HEAD of a custom branch, eg - abhinav/fix_in_operator
hasura connector create my-connector:v2 --github-repo-url https://github.com/hasura/weaviate_gdc/tree/abhinav/fix_in_operator
# source code for the connector is at commit ref, eg - 93e644c87567c44e7dced66362fa7100f5a93042
hasura connector create my-connector:v3 --github-repo-url https://github.com/hasura/weaviate_gdc/tree/93e644c87567c44e7dced66362fa7100f5a93042
```
## Options
```sass
--github-repo-url string url of the github repo which contains connector source code
-h, --help help for create
```
## SEE ALSO
- [hasura connector](/hasura-cli/connector-plugin/commands/connector.mdx) - Hasura Connector CLI.
_Auto generated by spf13/cobra_

View File

@ -0,0 +1,46 @@
---
sidebar_label: hasura connector delete
sidebar_position: 3
description: Delete a Hasura Cloud connector. using the Hasura CLI
keywords:
- hasura
- docs
- CLI
- connector delete
---
# Hasura CLI: connector delete
Delete a Hasura Cloud Data Connector.
## Synopsis
This command deletes a custom Hasura Data Connector deployed on Hasura Cloud. Once deleted, this deployment and its corresponding URL will no longer be accessible.
Further Reading:
- https://hasura.io/docs/latest/databases/data-connectors/
```bash
hasura connector delete [connector-name] [flags]
```
## Examples
```bash
# delete the custom connector with the name my-custom-connector:v1
hasura connector delete my-custom-connector:v1
```
## Options
```sass
-h, --help help for delete
```
## SEE ALSO
- [hasura connector](/hasura-cli/connector-plugin/commands/connector.mdx) - Hasura Connector CLI.
_Auto generated by spf13/cobra_

View File

@ -0,0 +1,45 @@
---
sidebar_label: hasura connector list
sidebar_position: 4
description: List all Hasura Cloud data connectors owned by the user. using the Hasura CLI
keywords:
- hasura
- docs
- CLI
- connector list
---
# Hasura CLI: connector list
List all Hasura Cloud Data Connectors owned by the user.
## Synopsis
This command lists all custom Hasura Data Connector deployments triggered by the current user. It lists the connector names, endpoints to access, whether the connector is deployed and status of the deployment.
Further Reading:
- https://hasura.io/docs/latest/databases/data-connectors/
```bash
hasura connector list [flags]
```
## Examples
```bash
# list all custom data connectors
hasura connector list
```
## Options
```sass
-h, --help help for list
```
## SEE ALSO
- [hasura connector](/hasura-cli/connector-plugin/commands/connector.mdx) - Hasura Connector CLI.
_Auto generated by spf13/cobra_

View File

@ -0,0 +1,46 @@
---
sidebar_label: hasura connector logs
sidebar_position: 5
description: Tails logs of a deployed custom Hasura data connector. using the Hasura CLI
keywords:
- hasura
- docs
- CLI
- connector logs
---
# Hasura CLI: connector logs
Prints live logs of a deployed custom Hasura Data Connector.
## Synopsis
Print the live logs of a deployed custom Hasura Data Connector. Will print logs found in the last 10 minutes and then continue with live logs.
Further Reading:
- https://hasura.io/docs/latest/databases/data-connectors/
```bash
hasura connector logs [connector-name] [flags]
```
## Examples
```bash
# tail logs of the custom connector with the name: my-custom-connector:v1
hasura connector logs my-custom-connector:v1
```
## Options
```sass
-h, --help help for logs
```
## SEE ALSO
- [hasura connector](/hasura-cli/connector-plugin/commands/connector.mdx) - Hasura Connector CLI.
_Auto generated by spf13/cobra_

View File

@ -0,0 +1,45 @@
---
sidebar_label: hasura connector status
sidebar_position: 6
description: Prints the current status of the custom Hasura data connector deployment. using the Hasura CLI
keywords:
- hasura
- docs
- CLI
- connector status
---
# Hasura CLI: connector status
Print the current status of the custom Hasura Data Connector deployment.
## Synopsis
Print the status of the custom Hasura Data Connector deployment. Will also print the logs, if they are available, of the image build from the source code from the GitHub repository.
Further Reading:
- https://hasura.io/docs/latest/databases/data-connectors/
```bash
hasura connector status [connector-name] [flags]
```
## Examples
```bash
# fetch deployment status of the custom connector with the name: my-custom-connector:v1
hasura connector status my-custom-connector:v1
```
## Options
```sass
-h, --help help for status
```
## SEE ALSO
- [hasura connector](/hasura-cli/connector-plugin/commands/connector.mdx) - Hasura Connector CLI.
_Auto generated by spf13/cobra_

View File

@ -0,0 +1,37 @@
---
sidebar_label: hasura connector version
sidebar_position: 7
description: get version information of connector CLI using the Hasura CLI
keywords:
- hasura
- docs
- CLI
- connector version
---
# Hasura CLI: connector version
Get the current version of the Hasura CLI Data Connector plugin.
## Synopsis
Get the current version of the Hasura CLI Data Connector plugin.
```bash
hasura connector version [flags]
```
**Alias:** runs
## Options
```sass
-h, --help help for version
-o, --output string specify output format (json/yaml)
```
## SEE ALSO
- [hasura connector](/hasura-cli/connector-plugin/commands/connector.mdx) - Hasura Connector CLI.
_Auto generated by spf13/cobra_

View File

@ -0,0 +1,90 @@
---
title: Commands
description: Use Connector plugin tooling to deploy connectors in Hasura cloud
keywords:
- hasura
- docs
- CLI
- connector
- commands
slug: index
---
# Commands
## Overview
The Hasura CLI Data Connector plugin utilizes a typical command / flag syntax enabling you to quickly manage your Hasura Data Connector deployments. A typical
command structure will follow this pattern:
```bash
hasura connector <command> --<optional_flag> "<optional_flag_value>"
```
A real-world example following this structure would be:
```bash
hasura connector create my-connector:v1 --github-repo-url https://github.com/hasura/weaviate_gdc/tree/main
```
This snippet illustrates the `create` command and the `github-repo-url` flag,
and the value of the `github-repo-url`.
## Getting help
At any time, you can use the `--help` flag on a certain command. Running
`hasura connector --help` will return information on available commands and flags:
```
This Hasura CLI plugin enables deployment and management of custom Hasura Data Connector agents to Google Cloud Platform.
Further Reading:
- https://hasura.io/docs/latest/databases/data-connectors/
- https://github.com/hasura/graphql-engine/tree/master/dc-agents/reference
- https://github.com/hasura/graphql-engine/blob/master/dc-agents/DOCUMENTATION.md
Usage:
connector [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
create Create a new Hasura Cloud connector using CLI
delete Delete a Hasura Cloud connector.
help Help about any command
list List all Hasura Cloud data connectors owned by the user.
logs Tails logs of a deployed custom Hasura data connector.
status Prints the current status of the custom Hasura data connector deployment.
version get version information of connector CLI
Flags:
-h, --help help for connector
Use "connector [command] --help" for more information about a command.
```
Whereas running `hasura connector status --help` will return commands and flags specific to the `actions` category of commands:
```
This command prints the status of the custom Hasura Data Connector deployment. It also prints the image build logs, if they are available yet, of the image build from the source code from the GitHub repository.
Further Reading:
- https://hasura.io/docs/latest/databases/data-connectors/
Usage:
connector status [connector-name] [flags]
Examples:
# fetch deployment status of the custom connector with the name: my-custom-connector:v1
hasura connector status my-custom-connector:v1
Flags:
-h, --help help for status
```
:::info hasura connector commands
A complete list of all Data Connector plugin commands, including details and examples, can be found in the side navigation to the left
under the Commands heading.
:::

View File

@ -0,0 +1,52 @@
---
description: Hasura Data Connector plugin
keywords:
- hasura
- docs
- command line interface
- cli
sidebar_class_name: cloud-icon
---
# Hasura Data Connector plugin on Hasura Cloud
This Hasura CLI plugin enables deployment and management of custom
[Hasura Data Connector](https://hasura.io/docs/latest/databases/data-connectors/) agents to Hasura Cloud.
## Install the Hasura CLI Data Connector plugin
To start deploying Data Connectors using the Data Connector plugin, the following pre-requisites need to be in place:
1. Install [Hasura CLI](/hasura-cli/install-hasura-cli.mdx)
2. Update plugin index
```bash
hasura plugins list
```
3. Install `cloud` plugin
```bash
hasura plugins install cloud
```
4. Authenticate the CLI with Hasura Cloud
```bash
hasura cloud login
```
5. Install `connector` plugin
```bash
hasura plugins install connector
```
6. Verify installation with the `--help` flag
```bash
hasura connector --help
```
## Uninstall the Hasura CLI Data Connector plugin
To uninstall the Hasura CLI Data Connector plugin, use the `uninstall` command:
```bash
hasura plugins uninstall connector
```