After going through the getting_started/installation.adoc section and having installed all the operators, you will now deploy a Trino cluster and the required dependencies. Afterwards you can verify that it works by running some queries against Trino or visit the Trino web interface.
A working Trino cluster and its web interface require only the commons, secret and listener operators to work. Simple tests are possible without an external data source (e.g. PostgreSQL, Hive or S3), as internal data can be used.
Create a file named trino.yaml
with the following content:
link:example$getting_started/code/trino.yaml[role=include]
and apply it:
link:example$getting_started/code/getting_started.sh[role=include]
Wait for the Trino cluster to get ready:
link:example$getting_started/code/getting_started.sh[role=include]
At first, make sure the StatefulSets are ready:
kubectl get statefulset
The output should show all pods in the StatefulSets ready:
NAME READY AGE
simple-trino-coordinator-default 1/1 5m
simple-trino-worker-default 1/1 5m
Create a port-forward for the coordinator to access Trino easily in the next steps:
link:example$getting_started/code/getting_started.sh[role=include]
We use the Trino CLI tool to access the Trino cluster. This link points to the latest Trino version. In this guide we keep Trino cluster and client versions in sync and download the CLI tool from the Stackable repository:
link:example$getting_started/code/getting_started.sh[role=include]
We need to make the CLI tool executable:
link:example$getting_started/code/getting_started.sh[role=include]
Now, run some queries against the coordinator. Show available catalogs:
link:example$getting_started/code/getting_started.sh[role=include]
which should output:
system
Check how many workers are connected to the coordinator:
link:example$getting_started/code/getting_started.sh[role=include]
which should output:
1
Congratulations, you set up your first Stackable Trino cluster successfully.
With the port-forward still active, you can connect to the Trino web interface. Enter https://localhost:8443/ui
in your browser and login with the username admin
. Since no authentication is enabled you do not need to enter a password.
Warning
|
Your browser will probably show a security risk warning because it does not trust the self generated TLS certificates. Just ignore that and continue. |
After logging in you should see the Trino web interface:
If you mark the Finished
button in the Query Details
section, you should see the two queries that were sent earlier via the CLI tool:
In order to remove the previously downloaded CLI tool, you can safely remove it from your system:
link:example$getting_started/code/getting_started.sh[role=include]
Have a look at the usage-guide/index.adoc to find out more about how to configure a Trino cluster.