Solar is a blockchain explorer and dashboard built for monitoring, querying, and analyzing data from blockchain networks. Its primary purpose is to provide a user-friendly interface for developers, validators, and other stakeholders to interact with and extract insights from blockchain data. The Solar platform can be deployed on decentralized infrastructure like Akash, ensuring cost-effective, scalable, and censorship-resistant hosting.
This guide outlines how to deploy Solar on Akash using the upstage/solar
Docker image and a sample SDL (Service Definition Language) template.
Prerequisites
- Akash CLI: Install the Akash CLI on your system by following the official guide.
- Akash Wallet: Set up an Akash wallet with sufficient funds to pay for your deployment.
- Docker Knowledge: Basic familiarity with Docker images.
- Solar Docker Image: The prebuilt Docker image
upstage/solar
.
Steps to Deploy Solar on Akash
1. Create a Deployment Folder
Start by creating a folder for your deployment files:
2. Write the SDL File
The SDL file defines the specifications of your deployment, such as the container image, ports, and resources. Use the following example for deploying Solar:
deploy.yaml
3. Validate the SDL File
Run the following command to ensure your SDL file is correctly formatted:
4. Deploy the SDL to Akash
a. Create a Deployment
Submit the SDL file to Akash:
b. Query Deployment Status
Monitor the status of your deployment:
c. Fund the Lease
Once the deployment is accepted, fund the lease with tokens:
5. Access the Solar Dashboard
Once the deployment is live, Akash will provide an external IP address or hostname. Access the Solar dashboard in your browser at:
Overview of the SDL File
- Services Section: Defines the
solar
service using the Docker imageupstage/solar:latest
and exposes port80
to the global network. - Profiles Section: Configures compute resources, including CPU, memory, and storage. It specifies a pricing model for deployment in Akash tokens (
uakt
). - Deployment Section: Links the service to the compute profile and sets the number of instances to
1
.
Customizing the Deployment
- Environment Variables: Update
NODE_ENV
or add additional environment variables in theenv
section of the SDL file. - Ports: Modify the
port
andas
fields underexpose
to match your desired setup. - Resources: Adjust
cpu
,memory
, andstorage
based on your performance requirements.
By following this guide, you can successfully deploy and host Solar on Akash, leveraging its decentralized infrastructure to power your blockchain explorer.