[WTD 2021] Quickstart for Trino with Docker#7744
[WTD 2021] Quickstart for Trino with Docker#7744erikhopf wants to merge 4 commits intotrinodb:masterfrom erikhopf:try-it-wtd2021
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Erik Hopf.
|
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Erik Hopf.
|
|
If you get a chance to hop on for Writing Day again, we should chat there.. otherwise I will review/chime directly here after writing day. Excellent start in either case! |
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Erik Hopf.
|
|
@cla-bot check |
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Erik Hopf.
|
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@martint - Do I need to close/open to get the automated checks to pass? |
| Prerequisites | ||
| ------------- | ||
|
|
||
| Trino runs best on Linux. Our Docker container is built on |
There was a problem hiding this comment.
Hmmm. This page's title promises me a Quickstart for Trino with Docker, so I want to know what Docker runs best on. What Trino runs on in the container is assumed to be ready to run, or it wouldn't be offered as a runnable container. It's true but out of place to say that Trino runs best on Linux. The important point for this page is that you can get it running from any OS starting point.
Rework this paragraph to convey:
- Our Docker container encapsulates Trino on Linux for 64-bit Intel platforms
- For evaluation, testing, and quick start purposes, you can run the Trino container on macOS or Windows hosts
- Run the Trino container only on a Linux host for a production environment
There was a problem hiding this comment.
Should we call out the distro here? I think it might be a good idea if we can say that the container runs on Ubuntu X.X LTS or Redhat X.X.
There was a problem hiding this comment.
I took a shot at fixing this, but not sure I love it.
|
|
||
| .. code-block:: shell | ||
|
|
||
| docker run -p 8080:8080 --name trino trinodb/trino |
There was a problem hiding this comment.
Let's please change the handle of the server instance to something other than "trino" to avoid newbie confusion about whether they're addressing the container instance or the CLI or the server:
docker run -p 8080:8080 --name trindock trinodb/trino
There was a problem hiding this comment.
I called it trino-container but if you have strong opinions trindock is fine.
| .. code-block:: shell | ||
|
|
||
| docker run -p 8080:8080 --name trino trinodb/trino | ||
|
|
There was a problem hiding this comment.
A successful docker run just reports a GUID. To see the SERVER STARTED command, you must run docker logs:
"Review the Docker log output continuously to confirm that the server has started:
.. code-block:: text
docker trindock logs
...
docker trindock logs
There was a problem hiding this comment.
I got the success message with the command listed.
There was a problem hiding this comment.
Ah, I see what's wrong. Fairly standard practice is to have the docker run command have a -d option to run in the background, which returns that terminal for use. Also, the point of the --name argument is to be a handle for the container that is quick to type instead of typing its entire GUID. Using a very long name for this handle defeats the purpose. My "trindock" is a fast 8 chars to type. Thus, line 53 should be:
docker run -d -p 8080:8080 --name trindock trinodb/trino
With this change, you now must use docker logs trindock to see the success message. Try your steps out with these changes, please.
| To use these scripts, download the book’s samples from their `GitHub | ||
| location <https://github.com/trinodb/presto-the-definitive-guide>`__ | ||
| either as a zip file or a git clone. | ||
|
|
There was a problem hiding this comment.
There are several steps left out here.
- Once the zip is downloaded, it must be unzipped locally.
- If the reader copies the Git URL of the book sample's project, s/he must use a
git clonecommand to get a local copy - cd into the
tpchdirectory of the local unzipped or cloned set - Replace
filename.sqlwithnations.sql
Only then can the book's sample script work. Otherwise, we might as well just post a short sample.sql on this page for readers to download and run.
There was a problem hiding this comment.
@Ordinant - For simplicity sake, can we pass in a URI to a SQL script?
Ordinant
left a comment
There was a problem hiding this comment.
Thank you immensely for getting this going. You definitely have an eye for how to get newbies up to speed quickly.
I know this looks like I slashed and burned, red pen red sword in hand, but most of the edits are just to align your excellent draft with the Google Style Guide we follow (present tense, no future tense; no "you should") or with our standard word usage.
Thanks!
|
@Ordinant - Appreciate the comprehensive review. This is what I was looking for after a writing day exercise. Sometimes you don't want to slow down and get stuck on words. Power to the editor haha. |
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Erik Hopf.
|
|
Let me know if/when I should jump in here to help @Ordinant |
|
👋 @erikhopf - this PR has become inactive. If you're still interested in working on it, please let us know, and we can try to get reviewers to help with that. We're working on closing out old and inactive PRs, so if you're too busy or this has too many merge conflicts to be worth picking back up, we'll be making another pass to close it out in a few weeks. |
|
The documentation for docker was added in #13193. Please feel free to send a new PR if the page needs improvement. |
[Part of WTD Writing Day]
Issue/Work Item: #7743
Thoughts:
Open items:
https://....