Introduction
MindsDB is a state-of-the-art AI layer that integrates with traditional databases and enhances their ability to draw meaningful inferences from the existing data.
With MindsDB, one can easily train models that predict results and forecast outcomes based on available data. It has also several integrations with a wide variety of data sources and LLM models that make it robust and accurate for various user applications.
In this tutorial, you will learn to deploy an instance of MindsDB on Linode which is currently a part of Akamai.
Creating a Linode
Linode provides scalable and cost-effective VMs to its users with high availability and reliability. You can follow the steps below to spin up a Linode instance.
Step 1: Sign up for a new Linode account to avail 100$ worth of free credits. Existing users can simply log in using their credentials.
Step 2: Once you're logged in, click on Create Linode
to proceed.
Step 3: In the Create
page, you need to define the configuration for the VM as per your requirement. For this tutorial, you can use the following configuration.
- Choose a Distribution: Ubuntu 22.04 LTS
- Region: Mumbai, IN (ap-west) (Choose the region closest to you.)
- Linode Plan: Shared CPU - Linode 4GB
- Linode Label: mindsdb-demo (You can give any name.)
- Add Tags: Leave it as it is.
- Root Password: Provide a password of your choice.
- SSH Keys: As you provided a password, you don't need an SSH Key.
- Assign Firewall: None
- Attach a VLAN: Leave it at default.
-
Add-Ons: You can choose to keep the options checked or unchecked based on your requirements.
- Backups: Keep it unchecked.
- Private IP: Keep it checked.
Now click on Create Linode
button to initiate the VM creation process. It should take a while to provision the instance.
Step 4: Once you see a Running
status on the instance dashboard, you can interact with the instance by clicking on the Launch LISH Console
button.
Use the username as root
along with the password you specified in the config to access the VM through the console.
You are now ready to deploy MindsDB on this instance.
Deploying MindsDB on the Linode VM
You can easily deploy an instance of MindsDB on this VM using Docker. To do so, follow the steps below.
Step 1: You need to first update the package lists available on the VM so that all the packages are up-to-date. Use the command given below to do so.
sudo apt update
Step 2: Docker is essential for this deployment. You can install it with the command given below.
sudo apt install docker.io
Type Y
and hit Enter
when prompted to accept the changes and proceed with the installation.
Step 3: Now you need to pull the latest stable release of MindsDB from Docker. You can use the command given below to do this.
sudo docker pull mindsdb/mindsdb
Wait until the image pull is complete to proceed.
Step 4: Now you can run MindsDB on your instance using Docker. You will also need to expose the respective ports for the MindsDB GUI and the MySQL API. Use the command given below to do so.
sudo docker run -p 47334:47334 -p 47335:47335 mindsdb/mindsdb
Wait until all the processes and APIs are up and running. You should see the confirmation in the console window.
Note:
sudo
is not necessary to execute commands in the console when you're logged in as theroot
user.
Testing the MindsDB Instance
You have now successfully started MindsDB on the VM using Docker. To visit the MindsDB interface, simply access the public IP of the VM on port 47334
.
http://Linode Public IP:47334
You can find the public IP of the VM on the instance details page.
Once you access the GUI, you can find the Query Editor
where you can write SQL-like queries and then view the results in the Result Viewer
below it.
To test whether the deployment is well and good, you can simply run a basic query given below and check its results.
SHOW tables;
This should list out all the basic tables available in your MindsDB instance by default.
This confirms that the instance is running properly and you easily access it using the internet.
Conclusion
In this tutorial, you successfully learned how to create a VM on Linode, deploy an instance of MindsDB on it, and then access and query it using the public IP of the VM.
Now that you've deployed the instance, you can go ahead and start working with AI Models or Chatbots and explore MindsDB to its full potential. In case you need any further details, feel free to check out their official documentation here.
Lastly, before you leave, don't forget to drop a like and share it with your peers if you got to learn something new today.
Top comments (0)