Deploying InfluxDB on Akash

This guide will help you deploy InfluxDB on the Akash Network using the official InfluxDB Docker image.


Overview of InfluxDB

InfluxDB is a high-performance time-series database designed to handle large amounts of data generated by IoT devices, DevOps monitoring, and analytics applications. It is used for storing, querying, and visualizing metrics and events over time. Key features include:

  • Time-series data storage: Efficiently stores and retrieves time-stamped data.
  • Powerful query language: Supports InfluxQL or Flux for querying data.
  • Data visualization: Integrates with tools like Grafana or its native UI.
  • High availability: Scalable for production-level deployments.

Requirements

  1. Akash CLI: Installed and configured.
  2. Docker: Installed locally for creating/testing deployments (optional).
  3. An Akash Wallet: Funded with AKT tokens.
  4. SDL Template: For deploying the InfluxDB Docker container.

Steps to Deploy InfluxDB on Akash

1. Prepare the SDL File

The SDL (Service Definition Language) file specifies the configuration for deploying the InfluxDB Docker container. Below is an example SDL file for deploying InfluxDB:

---
version: "2.0"
services:
influxdb:
image: influxdb:latest
expose:
- port: 8086
as: 80
to:
- global: true
env:
- INFLUXDB_DB=my_database
- INFLUXDB_ADMIN_USER=admin
- INFLUXDB_ADMIN_PASSWORD=admin_password
- INFLUXDB_USER=my_user
- INFLUXDB_USER_PASSWORD=my_user_password
profiles:
compute:
influxdb:
resources:
cpu: 0.5
memory: 512Mi
storage: 1Gi
placement:
akash:
attributes:
region: us-west
pricing:
influxdb:
denom: uakt
amount: 100
deployment:
influxdb:
influxdb:
profile: influxdb
count: 1

Save it as deploy.yaml.

2. Customize Your Deployment

  • Database Configuration:
    • Update the environment variables (e.g., INFLUXDB_ADMIN_PASSWORD, INFLUXDB_USER_PASSWORD) with your preferred credentials.
  • Resource Allocation:
    • Adjust cpu, memory, and storage in the compute profile to match your application requirements.
  • Region and Pricing:
    • Set the region to your preferred Akash network location and pricing as needed.

3. Deploy on Akash

  1. Validate the SDL File: Run the following command to validate the SDL file:

    Terminal window
    akash tx deployment create deployment.yml --from <your-wallet> --chain-id <chain-id> --node <node-url>
  2. Wait for Bidding: After deploying the SDL file, Akash providers will bid on your deployment. Accept a suitable bid.

  3. Get the Lease: Once the bid is accepted, obtain the lease for your deployment:

    Terminal window
    akash query market lease list --owner <your-wallet-address>
  4. Access the Deployment: Retrieve the external IP or URL assigned to your service. The InfluxDB API/UI will be accessible on port 80 or the domain configured by the Akash provider.

4. Verify the Deployment

  1. Access InfluxDB: Open the assigned domain or IP in a web browser or use curl:

    Terminal window
    curl http://<your-deployment-url>:80/ping

    If InfluxDB is running, it will return a 204 No Content response.

  2. Login to the Admin UI: Navigate to http://<your-deployment-url>:80 in a browser. Use the credentials set in the environment variables (e.g., INFLUXDB_ADMIN_USER and INFLUXDB_ADMIN_PASSWORD).

5. Connect Your Applications

Use the InfluxDB URL to connect applications or tools like Grafana for visualizing your data. Example of connecting using InfluxQL:

Terminal window
curl -XPOST 'http://<your-deployment-url>:80/query' \
-d 'q=CREATE DATABASE my_database' \
--user admin:admin_password

Key Notes

  1. Persistent Storage:

    • Akash provides persistent storage with only during the lease. Review the documentation for a further explanation of the limitations.
  2. Scaling:

    • Modify the count parameter in the deployment section to scale horizontally.
  3. Security:

    • Always use strong passwords for your database and user accounts.
    • Use a firewall or restrict access to specific IPs for production environments.

By following these steps, you’ll have InfluxDB running on Akash, providing a scalable, decentralized solution for your time-series data needs.

footer-logo-dark

© Akash Network 2025 The Akash Network Authors Documentation Distributed under CC BY 4.0

Open-source Apache 2.0 Licensed.

GitHub v0.20.0

Privacy