Installation
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:
- Native binaries (recommended): 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
- Using a Debian package (recommended): 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.
- A 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!
Note: You might experience slightly degraded performance from the storage engine due to Docker engine's abstractions.
Native binaries
To use native binaries you need to download a bundle which is simply a ZIP file with all the necessary binaries that you'll ever need to develop on and deploy Skytable.
-
First download the latest bundle for your platform. You can find download links on the releases page.
-
Unzip the ZIP file. You'll find the following binaries in the extracted archive:
skyd: This is the database server binary which when started runs as a daemon, serving requestsskysh: This is the Skytable shell and it provides a very helpful interactive REPL database clientsky-bench: This is the benchmarking tool that you can use to load test Skytable
-
Start up the server. You need to choose a
rootpassword for therootaccount which will have complete control over the database../skyd --auth-root-password=<your root password>Replace with your own secure password!
Explanation:
--auth-root-password: sets the root password
The server starts up at localhost:2003 and is ready to run queries.
Your operating system might sometimes not let you run binaries directly. On Unix based systems, you'll need to run: chmod +x skyd skysh sky-bench.
And on Windows systems you might need to right-click on the binaries and click on "unblock"
Debian package
Find the correct *.deb file from the releases page. Now simply run:
sudo dpkg -i <file name>.deb
The package will:
- Generate a root password: Watch the terminal output!
- Create a
systemdunit: So you can start and stop the process usingsystemdlikesystemd start skyd - Generate a configuration: Your configuration is stored in
/var/lib/skytable/config.yaml. Go ahead and modify it if you need to!
Docker image
- Use this great guide from Docker to install and get started
- To be able to run
docker runand related commands, you may need administrative privileges
Simple setup
-
Download the bundle: To be able to run queries you need to download the bundle as described above
-
Start the container:
docker run -d --name skydb -p 2003:2003 skytable/skytable:latest
The password for the Skytable instance on the Docker container is auto-generated. Run docker logs -f skydb and you'll see a log
message with the generated password.
With persistence
-
Download the bundle: To be able to run queries you need to download the bundle as described above
-
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.
Note: Create a folder called
skytablein a convenient location. We recommend having a directory in$HOME/docker-containerswhere 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. -
Create your configuration: Download this template file and place it into the directory you created. Update the password with your
rootpassword of choice. -
Start the container:
docker run -d --name skydb \
-v $HOME/docker-containers/skytable:/var/lib/skytable \
-p 2003:2003 \
skytable/skytable:latestExplanation:
- This starts a container with name
skydb - It maps the folder (as discussed earlier)
$HOME/docker-containers/skytablefrom your local file system to/var/skytable(in the container's file system) - Maps port
2003on the host to the containers port2003so that you can use the command-line clientskyshwithout having to inspect the container's IP address
- This starts a container with name