Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(providers): Added documentation for missing providers #2167

Merged
merged 22 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
55 changes: 55 additions & 0 deletions docs/providers/documentation/auth0-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
rishisulakhe marked this conversation as resolved.
Show resolved Hide resolved
title: "Auth0"
sidebarTitle: "Auth0 Provider"
description: "Auth0 provider allows interaction with Auth0 APIs for authentication and user management."
---

## Inputs

- `client_id`: str : The client ID for the Auth0 application.
- `client_secret`: str : The client secret for the Auth0 application.
- `audience`: str : The audience for the API authorization request.
- `grant_type`: str : The type of authorization grant requested (e.g., `client_credentials`).

## Outputs

- `access_token`: The access token issued by Auth0 for authenticated requests.
- `expires_in`: The time in seconds before the access token expires.
- `token_type`: The type of token, typically `Bearer`.

## Authentication Parameters

To authenticate with Auth0, the following parameters are needed:
- **client_id**: The unique identifier for your Auth0 application.
- **client_secret**: A secret associated with your application, used for secure communication.
- **audience**: Defines the API resources you're trying to access.

These parameters can be retrieved from your Auth0 dashboard under the application's settings.

## Connecting with the Provider

The Auth0 provider connects to both the **Authentication API** and the **Management API**, enabling functionality such as token-based authentication and user management. Depending on your needs, you can:
- Use the **Authentication API** to obtain access tokens, manage user profiles, or handle multi-factor authentication.
- Use the **Management API** to automate the configuration of your Auth0 environment, register applications, manage users, and more.

## Example of usage

```yaml
workflow:
id: auth0-example
description: Auth0 example
triggers:
- type: manual
actions:
- name: auth0
provider:
type: auth0
config: "{{ providers.auth0config }}"
with:
client_id: "{{ secrets.auth0_client_id }}"
client_secret: "{{ secrets.auth0_client_secret }}"
audience: "https://api.example.com"
grant_type: "client_credentials"

##Usefull Links
-[Auth0 API Documentation](https://auth0.com/docs/api)
47 changes: 47 additions & 0 deletions docs/providers/documentation/bash-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
rishisulakhe marked this conversation as resolved.
Show resolved Hide resolved
title: "Bash"
sidebarTitle: "Bash Provider"
description: "Bash provider allows executing Bash commands in a workflow, with a limitation for cloud execution."
---

## Inputs

- `script`: str : The Bash script or command to execute.

## Outputs

- `stdout`: The standard output from the executed Bash command.
- `stderr`: The standard error output from the executed Bash command (if any).
- `exit_code`: The exit code of the Bash command.

## Authentication Parameters

_None required for local execution of Bash scripts._

## Connecting with the Provider

The Bash provider allows you to run Bash commands or scripts in your workflow. You can pass in any valid Bash command, and it will be executed in a local environment.

### **Cloud Limitation**
This provider is disabled for cloud environments and can only be used in local or self-hosted environments.
rishisulakhe marked this conversation as resolved.
Show resolved Hide resolved

## Example of usage

```yaml
workflow:
id: bash-example
description: Bash example
triggers:
- type: manual
actions:
- name: bash
provider:
type: bash
config: "{{ providers.bashtest }}"
with:
script: |
echo "Hello, World!"
ls -l

## Usefull Links
-[Bash Documentation](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html)
47 changes: 47 additions & 0 deletions docs/providers/documentation/bigquery-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: "BigQuery"
sidebarTitle: "BigQuery Provider"
description: "BigQuery provider allows interaction with Google BigQuery for querying and managing datasets."
---

## Inputs

- `query`: str : The SQL query to execute against the BigQuery dataset
- `dataset`: str : The name of the dataset in BigQuery to use for the query
- `project_id`: str : The Google Cloud project ID where the BigQuery dataset is located

## Outputs

- `result`: The results of the executed query, returned as a list of dictionaries.

## Authentication Parameters

- `service_account_key`: JSON key file for the Google Cloud service account with permissions to access BigQuery.

## Connecting with the Provider

1. Create a Google Cloud project and enable the BigQuery API.
2. Create a service account in your Google Cloud project and download the JSON key file.
3. Share the necessary datasets with the service account.
4. Configure your provider using the `service_account_key`, `project_id`, and `dataset`.

## Example of usage

```yaml
workflow:
id: bigquery-example
description: BigQuery example
triggers:
- type: manual
actions:
- name: bigquery
provider:
type: bigquery
config: "{{ providers.bigquerytest }}"
with:
query: "SELECT * FROM `my_dataset.my_table` WHERE condition = 'value'"
dataset: "my_dataset"
project_id: "my_project_id"

##Usefull Links
-[BigQuery Documentation](https://cloud.google.com/bigquery/docs)
48 changes: 48 additions & 0 deletions docs/providers/documentation/dynatrace-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "Dynatrace"
sidebarTitle: "Dynatrace Provider"
description: "Dynatrace provider allows integration with Dynatrace for monitoring, alerting, and collecting metrics."
---

## Inputs

- `metric_key`: str : The key of the Dynatrace metric to query.
- `time_range`: str (optional) : Time range for the query (e.g., `last30mins`, `last24hours`, etc.)
- `filters`: dict (optional) : Filters to apply to the Dynatrace query (e.g., entityId, host).

## Outputs

- `result`: The result of the Dynatrace metric query, returned in a JSON format.

## Authentication Parameters

- `api_token`: Dynatrace API token required to authenticate requests.
- `dynatrace_url`: URL of the Dynatrace environment (e.g., `https://<your-environment-id>.live.dynatrace.com`).

## Connecting with the Provider

1. Log in to your Dynatrace account and navigate to "Settings" → "Integration" → "Dynatrace API."
2. Generate an API token with appropriate permissions (e.g., Read metrics).
3. Get your environment's Dynatrace URL.
4. Configure the Dynatrace provider using the API token and Dynatrace URL.

## Example of usage

```yaml
workflow:
id: dynatrace-example
description: Dynatrace example
triggers:
- type: manual
actions:
- name: dynatrace
provider:
type: dynatrace
config: "{{ providers.dynatracetest }}"
with:
metric_key: "builtin:host.cpu.usage"
time_range: "last24hours"
filters:
entityId: "HOST-12345"
## Useful Links
-[Dynatrace API Documentation](https://docs.dynatrace.com/docs/dynatrace-api)
50 changes: 50 additions & 0 deletions docs/providers/documentation/github-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: "GitHub"
sidebarTitle: "GitHub Provider"
description: "GitHub provider allows integration with GitHub for managing repositories, issues, pull requests, and more."
---

## Inputs

- `repo`: str : The name of the repository (e.g., `user/repo-name`)
- `action`: str : The action to perform (e.g., `create_issue`, `close_pr`)
- `issue_title`: str (optional) : The title for a new issue (required for `create_issue` action)
- `issue_body`: str (optional) : The body content for the issue (optional but recommended for `create_issue`)
- `pr_number`: int (optional) : The pull request number (required for `close_pr` action)

## Outputs

- `result`: The result of the GitHub API call, returned as a dictionary.

## Authentication Parameters

- `github_token`: A personal access token (PAT) from GitHub to authenticate API requests.
- You can generate a token at [GitHub Tokens](https://github.com/settings/tokens).

## Connecting with the Provider

1. Go to your GitHub account and navigate to **Settings > Developer Settings > Personal Access Tokens**.
2. Generate a token with the required permissions (e.g., `repo`, `workflow`, etc.).
3. Copy the token and provide it as `github_token` in the provider configuration.

## Example of usage

```yaml
workflow:
id: github-example
description: GitHub example
triggers:
- type: manual
actions:
- name: github
provider:
type: github
config: "{{ providers.githubtest }}"
with:
repo: "user/repo-name"
action: "create_issue"
issue_title: "New Issue Title"
issue_body: "Description of the issue."

## Useful Links
-[GitHub REST API Documentation](https://docs.github.com/en/rest?apiVersion=2022-11-28)
48 changes: 48 additions & 0 deletions docs/providers/documentation/gke-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "Google Kubernetes Engine (GKE)"
Matvey-Kuk marked this conversation as resolved.
Show resolved Hide resolved
sidebarTitle: "GKE Provider"
description: "GKE provider allows managing Google Kubernetes Engine clusters and related resources."
---

## Inputs

- `cluster_name`: str : The name of the GKE cluster to manage
- `action`: str : The action to perform on the cluster (e.g., `create`, `delete`, `scale`)
- `node_count`: int (optional) : The number of nodes (used in scaling the cluster)

## Outputs

- `status`: The status of the action performed on the GKE cluster, returned as a response message.

## Authentication Parameters

- `gcp_credentials`: JSON containing Google Cloud credentials with the necessary permissions to manage GKE clusters.
- `project_id`: Google Cloud project ID where the GKE cluster is deployed.
- `zone`: The zone where the GKE cluster is hosted.

## Connecting with the Provider

1. Obtain Google Cloud credentials by following the steps in [Google Cloud's service account guide](https://cloud.google.com/iam/docs/creating-managing-service-account-keys).
2. Ensure your service account has the necessary permissions to manage GKE clusters (`roles/container.admin`).
3. Provide the `gcp_credentials`, `project_id`, and `zone` in your provider configuration.

## Example of usage

```yaml
workflow:
id: gke-example
description: GKE example
triggers:
- type: manual
actions:
- name: gke
provider:
type: gke
config: "{{ providers.gketest }}"
with:
cluster_name: "my-cluster"
action: "create"
node_count: 3

## Usefull Links
-[Google Kubernetes Engine Documentation](https://cloud.google.com/kubernetes-engine/docs)
58 changes: 58 additions & 0 deletions docs/providers/documentation/kafka-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: "Kafka"
sidebarTitle: "Kafka Provider"
description: "Kafka provider allows integration with Apache Kafka for producing and consuming messages."
---

## Inputs

- `topic`: str : The Kafka topic to produce/consume messages from.
- `message`: str (optional) : The message to send to the Kafka topic when producing (not required for consuming).
- `action`: str : The action to perform (`produce` or `consume`).

## Outputs

- `result`: The result of the action. If consuming, this will return the message(s) from the Kafka topic.

## Authentication Parameters

- `kafka_broker`: The URL of the Kafka broker (e.g., `localhost:9092` or the broker's public URL).
- `kafka_client_id`: The client ID to authenticate the Kafka producer/consumer.
- `kafka_security_protocol`: (Optional) Security protocol for Kafka (e.g., `PLAINTEXT`, `SSL`, `SASL_SSL`).
- `kafka_sasl_mechanism`: (Optional) SASL mechanism for authentication (e.g., `PLAIN`, `SCRAM-SHA-256`).
- `kafka_username` & `kafka_password`: (Optional) Username and password for SASL authentication if required.

## Connecting with the Provider

1. Set up a Kafka broker (or use an existing one) and make sure it is accessible.
2. Get the broker URL (e.g., `localhost:9092` or a remote Kafka service URL).
3. (Optional) If using secure communication, provide the security protocol, SASL mechanism, username, and password.
4. Configure the provider with these parameters.

## Example of usage

```yaml
workflow:
id: kafka-example
description: Kafka example
triggers:
- type: manual
actions:
- name: kafka-produce
provider:
type: kafka
config: "{{ providers.kafkatest }}"
with:
topic: "example-topic"
action: "produce"
message: "Hello, Kafka!"

- name: kafka-consume
provider:
type: kafka
config: "{{ providers.kafkatest }}"
with:
topic: "example-topic"
action: "consume"
## Usefull Links
-[Kafka Clients Documentation](https://kafka.apache.org/documentation/)
Loading
Loading