|
| 1 | +--- |
| 2 | +id: getting-started |
| 3 | +title: Getting Started |
| 4 | +--- |
| 5 | +:::warning |
| 6 | +This is for release v0.5.0 |
| 7 | +::: |
| 8 | +Getting started with Skybase is easy 😊 (and fun!). You can get started with [native binaries (recommended)](#get-started-with-bundles) or by using the [docker image](#get-started-with-docker). |
| 9 | + |
| 10 | +## Get started with bundles |
| 11 | + |
| 12 | +### Step 1: Download a bundle |
| 13 | + |
| 14 | +Head over to the [releases page](https://github.com/terrabasedb/terrabase/releases) and download the latest version for your platform. |
| 15 | + |
| 16 | +### Step 2: Make the files runnable |
| 17 | + |
| 18 | +Unzip the `zip` file that you just downloaded. If you're on a *nix system, run `chmod +x tdb skysh` to make the files executable. If you're on Windows, right-click the files and then check the `UNBLOCK` checkbox and click on the `APPLY` button. |
| 19 | + |
| 20 | +### Step 3: Start the database server |
| 21 | + |
| 22 | +In the directory where you extracted the files, run `./tdb` on *nix systems or simply `tdb` on Windows systems. That's all there is to starting the database server! |
| 23 | + |
| 24 | +### Step 4: Run the shell `skysh` |
| 25 | + |
| 26 | +`skysh` is the shell that is shipped with the bundle. Run it, just like you did with the database server. Now enter commands in the shell, and have fun! First run `HEYA` to check if everything is fine - the server should reply with _HEY!_. |
| 27 | +See all the available actions [here](actions/overview) |
| 28 | + |
| 29 | +You're done with setting up `tdb` 🎉! |
| 30 | + |
| 31 | +## Get started with Docker |
| 32 | + |
| 33 | +First of all, you need to have Docker installed and available on your `PATH` ; you can read the official guide [here](https://docs.docker.com/get-docker/). Once you've got Docker up and running, follow the steps! |
| 34 | + |
| 35 | +### Step 0: Create a container |
| 36 | + |
| 37 | +Open up a terminal and run: |
| 38 | + |
| 39 | +``` |
| 40 | +docker create terrabasedb/tdb --name tdbvm |
| 41 | +``` |
| 42 | + |
| 43 | +:::note |
| 44 | +You may need superuser privileges |
| 45 | +::: |
| 46 | +At the same time, you'll need to set up the bundle by following [Step 1](#step-1-download-a-bundle) and [Step 2](#step-2-make-the-files-runnable) from the previous section. |
| 47 | + |
| 48 | +### Step 1: Start the container |
| 49 | + |
| 50 | +Now run: |
| 51 | + |
| 52 | +``` |
| 53 | +docker start tdbvm |
| 54 | +``` |
| 55 | + |
| 56 | +:::note |
| 57 | +You may need superuser privileges |
| 58 | +::: |
| 59 | +### Step 2: Find the IP address of the container |
| 60 | + |
| 61 | +In order to connect to the container (which, to `skysh` is nothing but a remote server), you'll have to run: |
| 62 | + |
| 63 | +``` shell |
| 64 | +docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' tdbvm |
| 65 | +``` |
| 66 | + |
| 67 | +:::note |
| 68 | +You may need superuser privileges |
| 69 | +::: |
| 70 | +And you'll get a result like: |
| 71 | + |
| 72 | +``` text |
| 73 | +172.17.0.1 |
| 74 | +``` |
| 75 | + |
| 76 | +### Step 3: Start the command line client |
| 77 | + |
| 78 | +Open up a terminal in the directory where you downloaded the command line client and run: |
| 79 | + |
| 80 | +``` shell |
| 81 | +skysh -h 172.17.0.1 |
| 82 | +``` |
| 83 | + |
| 84 | +And you're done! |
0 commit comments