You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/2.installation.md
+28-9Lines changed: 28 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ title: Installation
6
6
Getting started with Skytable involves choosing a mode of installation, downloading any required files and then starting up the database. You can choose to either use:
7
7
8
8
-[**Native binaries (recommended)**](#native-binaries): This is what is generally recommended for the best performance. You will need to download a bundle and then start the server binary; no expert knowledge required
9
-
-[**Using a Debian package (recommended)**](#debian-package): If you're deploying on Ubuntu or any other Debian based Linux distribution, then consider using this method. Configuration files, users and passwords are autogenerated.
9
+
-[**Using a Debian package (recommended)**](#debian-package): If you're deploying on Ubuntu or any other Debian based Linux distribution, then consider using this method. Configuration files, users and passwords are autogenerated.
10
10
-[**A Docker image**](#docker-image): We generally recommend using a Docker image for experimenting with Skytable on your local system during development and you want to keep your local system *clean*. If you want to use a Docker image for deployment, you're always free to do so!
11
11
> **Note:** You might experience slightly degraded performance from the storage engine due to Docker engine's abstractions.
12
12
@@ -26,9 +26,11 @@ To use native binaries you need to download a bundle which is simply a ZIP file
26
26
-`skysh`: This is the Skytable shell and it provides a very helpful interactive REPL database client
27
27
-`sky-bench`: This is the benchmarking tool that you can use to load test Skytable
28
28
3.**Start up the server**. You need to choose a `root` password for the `root` account which will have complete control over the database.
@@ -40,38 +42,55 @@ The server starts up at `localhost:2003` and is ready to run queries.
40
42
## Debian package
41
43
42
44
Find the correct `*.deb` file [from the releases page](https://github.com/skytable/skytable/releases). Now simply run:
45
+
43
46
```sh
44
47
sudo dpkg -i <file name>.deb
45
48
```
49
+
46
50
The package will:
51
+
47
52
- **Generate a root password:** Watch the terminal output!
48
53
- **Create a `systemd` unit**: So you can start and stop the process using `systemd` like `systemd start skyd`
49
54
- **Generate a configuration**: Your configuration is stored in`/var/lib/skytable/config.yaml`. Go ahead and modify it if you need to!
50
55
51
56
## Docker image
52
57
53
58
:::info You must have docker set up!
59
+
54
60
- Use [this great guide from Docker](https://docs.docker.com/engine/install/) to install and get started
55
61
- To be able to run `docker run` and related commands, you may need administrative privileges
56
62
:::
57
63
64
+
### Simple setup
65
+
66
+
1. **Download the bundle**: To be able to run queries you need to download the bundle as described above
67
+
2. **Start the container**:
68
+
69
+
```shell
70
+
docker run -d --name skydb -p 2003:2003 skytable/skytable:latest
71
+
```
72
+
73
+
:::tip
74
+
The password for the Skytable instance on the Docker container is auto-generated Run `docker logs -f skydb` and you'll see a log
75
+
message with the generated password.
76
+
:::
77
+
78
+
### With persistence
79
+
58
80
1. **Download the bundle**: To be able to run queries you need to download the bundle as described above
59
81
2. **Create the data directory**: To ensure that our database is persistent and all our data doesn't vanish as soon as the container is terminated, we'll map the data directory to an actual directory on our local system.
60
82
> **Note:** Create a folder called `skytable` in a convenient location. We recommend having a directory in `$HOME/docker-containers` where you can store the Skytable container's data and any other containers that you might use. It's a great way to keep things organized.
61
-
3. **Start the container**:
83
+
3. **Create your configuration**: [Download this template file](https://raw.githubusercontent.com/skytable/skytable/next/examples/config-files/template.yaml) and place it into the directory you created. Update the password with your `root` password of choice.
- It maps the folder (as discussed earlier) `/home/docker-containers/skytable` from your local file system to `/var/skytable` (in the container's file system)
95
+
- It maps the folder (as discussed earlier) `$HOME/docker-containers/skytable` from your local file system to `/var/skytable` (in the container's file system)
73
96
- Maps port `2003` on the host to the containers port `2003` so that you can use the command-line client `skysh` without having to inspect the container's IP address
74
-
:::tip
75
-
The password for the Skytable instance on the Docker container is auto-generated Run `docker logs -f skydb` and you'll see a log
Copy file name to clipboardExpand all lines: docs/3.using-repl.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ You can read more in the [configuration](system/configuration) page.
25
25
## Using the REPL
26
26
27
27
You will now see a welcome message and the REPL will prompt you to run something. Now is a good time to run `sysctl report status` which should just print out `(Okay)` in a cyan shade:
28
+
28
29
```sh
29
30
> sysctl report status
30
31
(Okay)
@@ -33,6 +34,7 @@ You will now see a welcome message and the REPL will prompt you to run something
33
34
You can also run queries like: `inspect global` to see available global system information.
34
35
35
36
:::info Quick notes
37
+
36
38
- The REPL currently stores history in the `.sky_history` file. If you want to remove history, you can simply delete the file
37
39
- The REPL will automatically parameterize queries. Don't worry about what this means; you'll learn about it ahead.
38
40
- The REPL applies custom formatting to `DDL` queries. For example, even though `inspect global` returns a JSON as a string,
@@ -42,7 +44,7 @@ the REPL formats it and outputs it without quotes, to improve readability
42
44
43
45
## First steps
44
46
45
-
Skytable's data model is discussed in depth on [this page](architecture#data-model), but let us understand some basics. If you've used a SQL
47
+
Skytable's data model is discussed in depth on [this page](architecture#data-model), but let us understand some basics. If you've used a SQL
46
48
database, you would be used to the idea of a `database`— just like this, Skytable has `space`s. A `space` is a collection
47
49
of `models` (which are like SQL's `table`s with slightly different functionality) and other containers.
48
50
@@ -76,6 +78,6 @@ CREATE MODEL myspace.mymodel(username: string, password: string, notes: list { t
0 commit comments