How to install SingleStoreDB in a Virtual Machine
Abstract
In this article, we’ll see how to install SingleStoreDB in a Virtual Machine (VM) in a matter of minutes. Using a VM provides a no-risk, low-cost way to evaluate SingleStoreDB and gain immediate product knowledge and experience.
Introduction
SingleStoreDB can be deployed in various ways, such as on bare metal, in Virtual Machines or in cloud-based environments. Full details of the different deployment options are described in the documentation. This article will show how to install SingleStoreDB in a VM.
Before we begin, it is important to state the minimum recommended VM configuration for this article, as shown in Figure 1:
- 4 processor cores.
- 8 GB of memory.
In our example, we’ll be using VMware Fusion and a VM running Ubuntu 64-bit. We’ll install a single-host cluster for development and use a browser-based UI to complete an offline installation. Additional prerequisites and configuration options are described in the documentation. Please check these requirements before proceeding.
Access Free License Key
To access the free license key, we’ll need to log in to the portal. Creating an account on the portal is simple and requires a few steps.
Once logged in to the portal, we can access the license key by selecting Software Licenses (1) from the left navigation pane, as shown in Figure 2.
In Figure 2, the License Key (2) will be available in the area shown. We’ll copy the key and paste it into a safe place as we’ll need it later. Next, we’ll click Install SingleStore (3).
On the next page, as shown in Figure 3, we’ll select Full Installation (1), Linux (2) and then click Next (3).
As shown in Figure 4, the License Key (1) will be available again in the area shown on the next page. We can Copy License Key (2) if not done so and then click Next (3).
As shown in Figure 5, there are some links to resources on the next page, and we can Close the page.
Download Tarball Files
Figure 6 shows, on the UI Tarball Deployment Website, links to four tarball files that we need:
singlestoredb-toolbox
singlestoredb-studio
singlestore-client
singlestoredb-server
These four files need to be downloaded and transferred to the VM. The recommended directory for these files in the VM is:
/home/<user>/singlestore
or/opt/singlestore
Figure 7 shows these files in the VM.
Next, the singlestore-client
, singlestoredb-toolbox
and singlestoredb-studio
files should be unpacked, as shown in Figure 8.
Once these files have been unpacked, we’ll need to go to the singlestoredb-toolbox
directory and run:
./sdb-deploy ui
This is shown in Figure 9.
Continuing with the command, we’ll be provided with a hyperlink of the form:
http://localhost:8081#<authentication token>
as shown in Figure 10.
Entering the hyperlink into a web browser results in the output shown in Figure 11. Use the authentication token shown in your environment.
We’ll click Next.
Installation
On the next page, as shown in Figure 12, we’ll select Offline Installation (1), paste the License Key into the box (2), provide the path to the singlestoredb-server
file (3), choose Auto Optimize (4) and click Next (5).
On the next page, we’ll need to enter a Host Name. In Figure 13, this is entered as ubuntu (1) and marked as localhost. Use the Host Name for your environment. Next, we’ll Provision Hosts (2).
On the next page, we’ll need to set the password for the root user, as shown in Figure 14.
Scrolling down the page, we can see that the cluster will consist of a Master Aggregator and a Leaf, as shown in Figure 15.
We’ll click Next.
Deploy Cluster
As shown in Figure 16, we can review the configuration and then Deploy Cluster.
The cluster should be successfully created, as shown in Figure 17.
SingleStoreDB Studio
Next, we’ll navigate to the directory where we unpacked singlestoredb-studio
. From that directory, in a terminal window, we’ll run the following to keep Studio running even if the terminal window is closed:
nohup ./singlestoredb-studio > studio.stdout 2> studio.stderr < /dev/null &
In a new browser tab, we’ll navigate to:
http://localhost:8080
as shown in Figure 18, and click Add or Create Cluster.
On the next page, we’ll select Add an Existing Cluster (1) and then click Next (2), as shown in Figure 19.
We’ll use the hostname and port previously configured, as shown in Figure 20.
Scrolling down the web page, we’ll enter the Password for the root user that we previously configured (1), select Development for the Type, give the cluster a Name and Description (2) and then click Submit (3), as shown in Figure 21.
We’ll then be connected to the cluster, as shown in Figure 22.
We can now start using the SQL Editor, as shown in Figure 23.
Summary
SingleStoreDB is a very versatile database system that can be deployed and used in several ways to suit different needs and budgets. In this article, we have worked through one of these deployment options. In future articles, we’ll work through the other deployment options.