How to install SingleStoreDB in a Virtual Machine

Akmal Chaudhri
6 min readNov 8, 2021

--

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:

  1. 4 processor cores.
  2. 8 GB of memory.
Figure 1. VM Configuration.

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.

Figure 2. License Key.

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).

Figure 3. Installation Guide.

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).

Figure 4. Install on Linux.

As shown in Figure 5, there are some links to resources on the next page, and we can Close the page.

Figure 5. Next Steps.

Download Tarball Files

Figure 6 shows, on the UI Tarball Deployment Website, links to four tarball files that we need:

  1. singlestoredb-toolbox
  2. singlestoredb-studio
  3. singlestore-client
  4. singlestoredb-server
Figure 6. Tarball Files.

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.

Figure 7. Tarball Files.

Next, the singlestore-client, singlestoredb-toolbox and singlestoredb-studio files should be unpacked, as shown in Figure 8.

Figure 8. Unpack Tarball Files.

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.

Figure 9. Run sdb-deploy ui.

Continuing with the command, we’ll be provided with a hyperlink of the form:

http://localhost:8081#<authentication token>

as shown in Figure 10.

Figure 10. Run sdb-deploy ui.

Entering the hyperlink into a web browser results in the output shown in Figure 11. Use the authentication token shown in your environment.

Figure 11. Web UI.

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).

Figure 12. Installation Configuration.

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).

Figure 13. Add and Provision Hosts.

On the next page, we’ll need to set the password for the root user, as shown in Figure 14.

Figure 14. Root Password.

Scrolling down the page, we can see that the cluster will consist of a Master Aggregator and a Leaf, as shown in Figure 15.

Figure 15. Cluster Configuration.

We’ll click Next.

Deploy Cluster

As shown in Figure 16, we can review the configuration and then Deploy Cluster.

Figure 16. Deploy Cluster.

The cluster should be successfully created, as shown in Figure 17.

Figure 17. Cluster Created Successfully.

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.

Figure 18. SingleStoreDB Studio.

On the next page, we’ll select Add an Existing Cluster (1) and then click Next (2), as shown in Figure 19.

Figure 19. Add Cluster.

We’ll use the hostname and port previously configured, as shown in Figure 20.

Figure 20. Hostname and Port.

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.

Figure 21. Credentials and Profile.

We’ll then be connected to the cluster, as shown in Figure 22.

Figure 22. Successfully Connected.

We can now start using the SQL Editor, as shown in Figure 23.

Figure 23. SQL Editor.

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.

--

--

Akmal Chaudhri

I help build global developer communities and raise awareness of technology through presentations and technical writing.