Apache CouchDB, often shortened to just “CouchDB”, is an open-source NoSQL database that uses JSON to store data, JavaScript as its query language using MapReduce, and HTTP for its API. It’s known for its ease of use, scalability, and fault-tolerant replication capabilities, making it a popular choice for distributed applications.
Setting Up Your Environment
Before deploying CouchDB on Akash, ensure you have the following prerequisites:
-
Akash Network Account: You should have an account on the Akash Network with sufficient AKT tokens to deploy the service.
-
Akash CLI or Console Access: Set up and configured on your machine.
-
Docker Knowledge: Familiarity with Docker is helpful.
Creating the SDL File
Below is a sample SDL file to deploy CouchDB using the official Docker image:
-
services
: Defines the Docker image and port mapping. -
profiles
: Specifies the compute resources required (CPU, memory, and storage). -
deployment
: Sets the profile and instance count.
Save this file as deploy.yaml
.
Deploying CouchDB on Akash
Using the CLI
Step 1: Authenticate with Akash
First, authenticate your Akash account:
Replace <spender>
, <message-type>
, <your-account-name>
, and <node-url>
with your specific values.
Step 2: Create and Fund a Deployment
Upload your deploy.yaml
SDL file:
Fund your deployment with AKT:
Wait for the deployment to be accepted by a provider.
Step 3: Monitor and Access CouchDB
Once the deployment is active, retrieve the access details:
You’ll receive the public IP or domain for accessing CouchDB.
For a more detailed CLI deployment guide, refer to Akash CLI Deployment Guide on the Akash documentation site.
Using the Console
If you prefer a UI-based approach, you can deploy CouchDB using the Akash Console:
-
Visit the Akash Console.
-
Sign in with your Keplr wallet.
-
Upload your deploy.yaml SDL file in the “Create Deployment” section.
-
Configure the deployment settings (similar to the CLI method).
-
Submit the deployment and fund it with the required AKT.
-
Monitor the deployment status via the console interface.
For more detailed instructions, you can refer to the Akash Console Guide.
Post-Deployment: Setting Up CouchDB
After your CouchDB instance is up and running:
- Access the CouchDB Dashboard:
-
Use the IP or domain provided during the deployment.
-
The default port for CouchDB is
5984
.
- Secure CouchDB:
- CouchDB is insecure by default. Set up an admin user by running the following command:
- Replace
<your-ip>
with your actual IP andpassword
with your desired admin password.
- Verify Installation:
Access the CouchDB dashboard by navigating to http://<your-ip>:5984/_utils/
.