This guide walks you through deploying EMQX (Erlang MQTT Broker) on Akash Network using the official Docker image (emqx
) and an SDL file for deployment.
Step 1: Prerequisites
- Akash CLI Setup: Ensure you have the Akash CLI installed and configured.
- Follow the Akash CLI guide to set up your wallet and environment.
- Docker Hub Account: Ensure access to the official
emqx
Docker image. - Akash Provider: Ensure your Akash provider is active for accepting deployments.
Step 2: Create the SDL File
Here’s a sample SDL file (deploy.yaml
) for deploying EMQX:
Step 3: Deploy the SDL File
-
Create the Deployment: Run the following command to create a deployment using your
deploy.yaml
file: -
Bid Selection: Once the deployment is created, choose a provider:
Accept a bid:
-
Submit Manifest: Submit the deployment manifest:
Step 4: Verify Deployment
- Get Lease Info:
- Access Your Service:
- Use the
EMQX
broker’s exposed ports (1883
for MQTT,8883
for MQTT with SSL). - Obtain the service’s external IP address from the provider.
- Use the
Step 5: Test the EMQX Deployment
-
MQTT Client: Use any MQTT client to connect to your EMQX deployment:
- Broker URL:
tcp://<external-ip>:1883
- SSL Broker URL:
ssl://<external-ip>:8883
- Broker URL:
-
Admin Dashboard: Access the EMQX dashboard using the IP and appropriate port (default is
18083
):Login using:
- Username:
admin
- Password:
<password-set-in-env>
- Username:
Step 6: Manage and Scale
-
Update Deployment: Modify the
deploy.yaml
file and submit updates as needed. -
Scaling: Increase the
count
in the deployment section to add more EMQX nodes.
This setup provides a fully functioning EMQX broker on Akash Network, leveraging the flexibility and decentralized hosting capabilities of Akash. For further customization, refer to the EMQX documentation and Akash’s deployment guides.