Skip to content

Commit

Permalink
Update docs content for mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
mosabua committed May 7, 2024
1 parent e4543a6 commit 34ddd86
Show file tree
Hide file tree
Showing 15 changed files with 67 additions and 476 deletions.
32 changes: 2 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,6 @@ A load balancer, proxy server, and configurable routing gateway for multiple

<img src="./docs/assets/logos/trino-gateway-h.png"/>

Find out more details from our documentation:
Find out more details from [our documentation at trinodb.github.io/trino-gateway](https://trinodb.github.io/trino-gateway)

<table>
<tr>
<td>
<ul>
<li><a href="./docs/quickstart.md">Quickstart</a></li>
<li><a href="./docs/installation.md">Installation</a></li>
<li><a href="./docs/security.md">Security</a></li>
<li><a href="./docs/operation.md">Operation</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="./docs/gateway-api.md">Gateway API</a></li>
<li><a href="./docs/resource-groups-api.md">Resource groups API</a></li>
<li><a href="./docs/routing-rules.md">Routing rules</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="./docs/design.md">Design</a></li>
<li><a href="./docs/development.md">Development</a></li>
<li><a href="./docs/release-notes.md">Release notes</a></li>
<li><a href="./docs/references.md">References</a></li>
</ul>
</td>
</tr>
</table>

<img src="./docs/assets/logos/trino-gateway-v.png"/>
<img src="./docs/assets/logos/trino-gateway-v.png"/>
34 changes: 0 additions & 34 deletions docs/design.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
**Trino Gateway documentation**

<table>
<tr>
<td>
<img src="./assets/logos/trino-gateway-v.png"/>
</td>
<td>
<ul>
<li><a href="quickstart.md">Quickstart</a></li>
<li><a href="installation.md">Installation</a></li>
<li><a href="security.md">Security</a></li>
<li><a href="operation.md">Operation</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="gateway-api.md">Gateway API</a></li>
<li><a href="resource-groups-api.md">Resource groups API</a></li>
<li><a href="routing-rules.md">Routing rules</a></li>
<li><a href="routing-logic.md">Routing logic</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="design.md">Design</a></li>
<li><a href="development.md">Development</a></li>
<li><a href="release-notes.md">Release notes</a></li>
<li><a href="references.md">References</a></li>
</ul>
</td>
</tr>
</table>

# Design

Trino Gateway is composed of the following main components:
Expand Down
45 changes: 5 additions & 40 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
**Trino Gateway documentation**

<table>
<tr>
<td>
<img src="./assets/logos/trino-gateway-v.png"/>
</td>
<td>
<ul>
<li><a href="quickstart.md">Quickstart</a></li>
<li><a href="installation.md">Installation</a></li>
<li><a href="security.md">Security</a></li>
<li><a href="operation.md">Operation</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="gateway-api.md">Gateway API</a></li>
<li><a href="resource-groups-api.md">Resource groups API</a></li>
<li><a href="routing-rules.md">Routing rules</a></li>
<li><a href="routing-logic.md">Routing logic</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="design.md">Design</a></li>
<li><a href="development.md">Development</a></li>
<li><a href="release-notes.md">Release notes</a></li>
<li><a href="references.md">References</a></li>
</ul>
</td>
</tr>
</table>

# Development

## Build requirements
Expand Down Expand Up @@ -61,8 +27,8 @@ verified and may run into unexpected issues.
Run `./mvnw clean install` to build `trino-gateway`. VM options required for
compilation and testing are specified in `.mvn/jvm.config`.

Edit the [config file](/gateway-ha/gateway-ha-config.yml) and update the mysql
db information.
Edit the configuration file `gateway-ha-config.yml` in the `gateway-ha` folder
and update the mysql db information.

```
cd gateway-ha/target/
Expand All @@ -71,8 +37,8 @@ java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.net=

#### In Docker

Follow the [separate instructions for building the container and running Trino
Gateway with docker compose](../docker/README.md)
Follow the separate instructions for building the container and running Trino
Gateway with docker compose from the `README.md` file in the `docker` folder.

#### Common Run Failures

Expand Down Expand Up @@ -109,8 +75,7 @@ for more details.
## Contributing

Want to help build Trino Gateway? Check out our [contributing
documentation](../.github/CONTRIBUTING.md)

documentation](https://github.com/trinodb/trino-gateway/blob/main/.github/CONTRIBUTING.md)

## Release process

Expand Down
19 changes: 18 additions & 1 deletion docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ details are available in the following resources:
* [Material for MkDocs website](https://squidfunk.github.io/mkdocs-material/)
* [MkDocs website](https://www.mkdocs.org/)

## Usage with local Python
## Writing documentation

Content is written as markdown files in the `docs` folder.

Writing style guidelines are identical to the
[Trino documentation](https://github.com/trinodb/trino/tree/master/docs) and
website.

Refer to the
[reference docs from Material for MkDocs for syntax information](https://squidfunk.github.io/mkdocs-material/reference/).

## Running site locally

Install `python` and `pipx`, for example with brew.

Expand All @@ -29,3 +40,9 @@ Access the site in your browser at http://127.0.0.1:8000/

Edit the site sources as desired and refresh pages as needed. Some changes
require a restart of mkdocs.

## Configuring MKDocs

MkDocs is configured in `mkdocs.yml`. Refer to the source, the
[Material for MkDocs website](https://squidfunk.github.io/mkdocs-material/)
and the [MkDocs website](https://www.mkdocs.org/) for more information.
34 changes: 0 additions & 34 deletions docs/gateway-api.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
**Trino Gateway documentation**

<table>
<tr>
<td>
<img src="./assets/logos/trino-gateway-v.png"/>
</td>
<td>
<ul>
<li><a href="quickstart.md">Quickstart</a></li>
<li><a href="installation.md">Installation</a></li>
<li><a href="security.md">Security</a></li>
<li><a href="operation.md">Operation</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="gateway-api.md">Gateway API</a></li>
<li><a href="resource-groups-api.md">Resource groups API</a></li>
<li><a href="routing-rules.md">Routing rules</a></li>
<li><a href="routing-logic.md">Routing logic</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="design.md">Design</a></li>
<li><a href="development.md">Development</a></li>
<li><a href="release-notes.md">Release notes</a></li>
<li><a href="references.md">References</a></li>
</ul>
</td>
</tr>
</table>

# Gateway API

## Add or update a backend
Expand Down
25 changes: 23 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
# Overview

<img src="./assets/logos/trino-gateway-v.png" style="float: right"/>

Trino Gateway is a load balancer, proxy server, and configurable routing
gateway for multiple [Trino](https://trino.io) clusters.

<img src="./assets/logos/trino-gateway-h.png"/>
## Use cases, advantages, and features

* Use of a single connections URL for client tool users with workload
distribution across multiple connectors.
* Automatic routing of queries to clusters for specific workloads.
* No-downtime upgrades for Trino clusters behind the Trino Gateway in a
blue/green model.
* Transparent change of capacity of Trino clusters behind the Trino Gateway
without user interruptions.

## Other resources

<img src="./assets/logos/trino-gateway-v.png"/>
* [Trino Gateway announment blog post](https://trino.io/blog/2023/09/28/trino-gateway)
* :fontawesome-brands-youtube:{ .youtube } [Many clusters and only one
gateway presentation at Trino Summit 2023](https://www.youtube.com/watch?v=2qwBcKmQSn0)
* [Lyft blog post](https://eng.lyft.
com/trino-infrastructure-at-lyft-b10adb9db01)
* [Pinterest blog post](https://medium.
com/pinterest-engineering/trino-at-pinterest-a8bda7515e52)
* [Zomato blog post](https://www.zomato.
com/blog/powering-data-analytics-with-trino)
* [Shopify blog post](https://shopify.
engineering/faster-trino-query-execution-infrastructure)
52 changes: 9 additions & 43 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
**Trino Gateway documentation**

<table>
<tr>
<td>
<img src="./assets/logos/trino-gateway-v.png"/>
</td>
<td>
<ul>
<li><a href="quickstart.md">Quickstart</a></li>
<li><a href="installation.md">Installation</a></li>
<li><a href="security.md">Security</a></li>
<li><a href="operation.md">Operation</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="gateway-api.md">Gateway API</a></li>
<li><a href="resource-groups-api.md">Resource groups API</a></li>
<li><a href="routing-rules.md">Routing rules</a></li>
<li><a href="routing-logic.md">Routing logic</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="design.md">Design</a></li>
<li><a href="development.md">Development</a></li>
<li><a href="release-notes.md">Release notes</a></li>
<li><a href="references.md">References</a></li>
</ul>
</td>
</tr>
</table>

# Installation

Trino Gateway is distributed as an executable JAR file. The [release
Expand Down Expand Up @@ -69,10 +35,11 @@ distribution is installed.

Trino Gateway requires a MySQL or PostgreSQL database.

Use the following scripts to initialize the database:
Use the following scripts in the `gateway-ha/src/main/resources/` folder to
initialize the database:

* [gateway-ha-persistence-mysql.sql](../gateway-ha/src/main/resources/gateway-ha-persistence-mysql.sql) for MySQL
* [gateway-ha-persistence-postgres.sql](../gateway-ha/src/main/resources/gateway-ha-persistence-postgres.sql) for PostgreSQL
* `gateway-ha-persistence-mysql.sql` for MySQL
* `gateway-ha-persistence-postgres.sql` for PostgreSQL

The files are also included in the JAR file.

Expand Down Expand Up @@ -121,9 +88,8 @@ HTTP if the request includes `X-Forwarded-Proto: HTTPS`.
After downloading or building the JAR, rename it to `gateway-ha.jar`,
and place it in a directory with read and write access such as `/opt/trinogateway`.

Copy the example config file
[gateway-ha-config.yml](../gateway-ha/gateway-ha-config.yml) into the same
directory, and update the configuration as needed.
Copy the example config file `gateway-ha-config.yml` from the `gateway-ha/`
directory into the same directory, and update the configuration as needed.

Each component of the Trino Gateway has a corresponding node in the
configuration YAML file.
Expand Down Expand Up @@ -175,15 +141,15 @@ java -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 \

Helm manages the deployment of Kubernetes applications by templating Kubernetes
resources with a set of Helm charts. The Trino Gateway Helm chart consists
of the following compnents:
of the following components:

* A `config` node for general configuration
* `dataStoreSecret`, `backendStateSecret` and `authenticationSecret` for
providing sensitive configurations through Kubernetes secrets,
* Standard Helm options such as `replicaCount`, `resources` and `ingress`.

The default [values.yaml](../helm/trino-gateway/values.yaml) includes basic
configuration options as an example. For a simple deployment, proceed with
The default `values.yaml` found in the `helm/trino-gateway` folder includes
basic configuration options as an example. For a simple deployment, proceed with
the following steps:

Create a yaml file containing the configuration for your `datastore`:
Expand Down
Loading

0 comments on commit 34ddd86

Please sign in to comment.