KairosDB is a distributed time-series database that uses Apache Cassandra as its back-end data store. In this tutorial, we will guide you through the process of installing KairosDB on the latest version of Fedora CoreOS.
Before we begin, you need to have the following:
KairosDB uses Apache Cassandra as its data store. As such, we need to install and configure it before installing KairosDB.
Install the Cassandra package:
sudo dnf install cassandra
Start the Cassandra service and enable it to start automatically at boot:
sudo systemctl start cassandra
sudo systemctl enable cassandra
Verify that Cassandra is running:
nodetool status
This command should output information about your Cassandra cluster.
You are now ready to install KairosDB.
Download KairosDB from the official GitHub repository:
wget https://github.com/kairosdb/kairosdb/releases/download/v1.2.1/kairosdb-1.2.1-1.tar.gz
Extract the downloaded archive:
tar xvzf kairosdb-1.2.1-1.tar.gz
Move the extracted folder to the /opt directory:
sudo mv kairosdb /opt
Create a symbolic link to the KairosDB installation directory:
sudo ln -s /opt/kairosdb/bin/kairosdb.sh /usr/bin/kairosdb
This will enable you to execute KairosDB using the kairosdb
command.
Grant execute permission to the KairosDB startup script:
sudo chmod +x /opt/kairosdb/bin/kairosdb.sh
Create a system service file to run KairosDB as a service using systemd:
sudo nano /etc/systemd/system/kairosdb.service
Paste the following lines in the file:
[Unit]
Description=KairosDB Time Series Database
After=syslog.target network.target cassandra.service
[Service]
Type=forking
ExecStart=/usr/bin/kairosdb start
ExecStop=/usr/bin/kairosdb stop
Restart=always
[Install]
WantedBy=multi-user.target
Reload the systemd daemon:
sudo systemctl daemon-reload
Start the KairosDB service and enable it to start automatically at boot:
sudo systemctl start kairosdb
sudo systemctl enable kairosdb
Verify that KairosDB is running:
curl -X GET http://localhost:8080/api/v1/health/check
If successful, the above command should return a JSON response indicating that KairosDB is up and running.
Congratulations! You have successfully installed and configured KairosDB on Fedora CoreOS Latest. You can now start using KairosDB to store and retrieve time-series data.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!