Code Monkey home page Code Monkey logo

cloudmos's Introduction

Cloudmos logo

Cloudmos

Cloudmos is an app that let's you deploy any docker container on the Akash Network in a few clicks... ๐Ÿ› 

version license Twitter URL https://discord.gg/akash

Services

Dataflow between services

Dataflow between services

Every services are nodejs applications written in typescript. They are deployed using docker. Both databases are PostgreSQL deployed on GCP.

Deploy Website

Website to deploy on Akash. It is using the Next.js framework. The data shown in the website comes from a combination of our API and akash nodes (REST).

Url: deploy.cloudmos.io
Directory: deploy-web

Provider Proxy

Used in the deploy website to proxy requests to providers. Needed since it's not possible to use the cert authentication system from the browser.

This is the equivalent of the Proxy used by the akash console.

Directory: provider-proxy

API

Provides data to the deploy website. The data is fetched from our Indexer database + coingecko for market data. This api also provide the endpoint for the Web3 Index integration.

Url: api.cloudmos.io
Directory: api

Indexer

Fetch the latest blocks from RPC nodes. Saves the blocks & stats to our Indexer Database. For details on how the indexer work see the Indexer README

Directory: indexer

Landing Page

Small landing page with button to "Launch App".

Url: cloudmos.io
Directory: landing

Config

Directory containing public config file that are fetch by the deploy tool. This is to allow modifying some configurations on the spot without the need to redeploy the web interface.

Directory: config

Monitoring

  • Sentry.io is integrated into all our services and allows us to catch js exceptions in the frontend as well as backend.
  • HealthChecks.io is used to monitor the execution of our Scheduled Tasks. If a task is failing we get an email + alert in discord.
  • Cronitor is used to monitor uptime. If our website or apis goes offline we get an email + alert in discord.
  • Grafana dashboards allows us to see usage stats and syncing status. We can monitor block syncing and scheduled task there.
  • Status Endpoints
    All our backend services have /status endpoints built into them allowing us to monitor health and view usage stats. Those endpoints are use by the other monitoring tools.

Example SQL Queries

See Example_Queries.md

Running the Application

This document provides instructions on how to set up and run the application, including steps for manual database restoration and using Docker Compose for ease of setup.

Manual Database Restoration

Due to the extensive time required to index Akash from block #1, it's recommended to initialize your database using an existing backup for efficiency. This approach is particularly beneficial for development purposes.

Available Backups

Restoration Steps

  1. Create a PostgreSQL database.
  2. Restore the database using psql. Ensure PostgreSQL tools are installed on your system.

For a .sql.gz file:

gunzip -c /path/to/cloudmos-akash-sandbox.sql.gz | psql --host "localhost" --port "5432" --username "postgres" --dbname "cloudmos-akash"

After restoring the database, you can proceed with the specific project's README instructions for further setup and running the application.

Using Docker Compose

For convenience, a Docker Compose configuration is provided to automate the database setup, download, and data import process.

Configuration

  1. Ensure environment variables are set in .postgres.local.env. This file configures PostgreSQL and import settings.
  2. The POSTGRES_DBS_FOR_IMPORT variable should be updated with the databases you wish to import. This is a comma-separated list with potential values including cloudmos-akash-sandbox (default) and cloudmos-akash-2 (mainnet). Leave this variable empty if no import is desired.

Running Docker Compose

docker-compose up

This command spins up the database service and automatically handles the downloading and importing of the specified data.

Database Structure

The database schemas is defined using sequelize-typescript in /shared/dbSchemas/. Models are separated into the following folders:

  • base - Tables which are cosmos generic and are used for every chains
  • akash - Tables which are akash specific (they are not created when initializing a database for another chain)
  • user - Tables which are user specific. Contains tables for user settings and templates

Block

Column Type Note
height integer
datetime timestamp
hash varchar
proposer varchar
dayId uuid See Day
txCount integer
isProcessed boolean false when inserted into the database and then set to true once the indexers have processed every messages in the block.
totalTxCount bigint Global tx count as of this height (for historical tx count graphs).
totalUAktSpent double Cummulative uakt spent on deployments as of this block.
activeLeaseCount integer Currently active lease count as of this block. Graph
totalLeaseCount integer Cummulative lease count as of this block. Graph
activeCPU integer Currently leased CPU as of this block. Graph
activeMemory bigint Currently leased Memory as of this block. Graph
activeEphemeralStorage bigint Currently leased Ephemeral Storage as of this block. Graph
activePersistentStorage bigint Currently leased Persistent Storage as of this block. Graph
activeProviderCount integer Provider count as of this block. This only consider on-chain data and does not include uptime checks.

Transaction

Column Type Note
id uuid
hash varchar
height integer
msgCount integer
multisigThreshold integer
gasUsed integer
gasWanted integer
fee bigint
memo text
isProcessed boolean false when inserted into the database and then set to true once the indexers have processed every messages in the transaction.
hasProcessingError boolean Indicates if the tx was a success or failed
log text Contains the error message if the tx failed

Message

Column Type Note
id uuid
txId uuid See Transaction
height integer
type varchar ex: /cosmos.bank.v1beta1.MsgSend
typeCategory varchar First part of the message part. ex: cosmos or akash
index integer
indexInBlock integer
isProcessed boolean false when inserted into the database and then set to true once the indexers have processed the message.
isNotificationProcessed boolean false when inserted into the database and then set to true once it has been checked for existing alerts. (BlockSpy specific)
amount bigint Amount of the transfer if token were transferred. ex: MsgSend or MsgDelegate
data bytes Protobuf encoded data of the message
relatedDeploymentId uuid If the message is deployment related (ex: MsgCloseLease) this will be set to the related deployment. See Deployment

AddressReference

Keeps track of which addresses are involved in which txs (even if they are not the signer).

Column Type Note
id number
transactionId uuid See Transaction
messageId uuid See Message
address varchar
type varchar Signer/Sender/Receiver

Day

Created for each days (UTC based), simplifies querying for daily stats.

Column Type Note
id uuid
date timestamp
aktPrice double See the "Sync Price History" task in Scheduled Tasks.
firstBlockHeight integer First block of the day.
lastBlockHeight integer Last block of the day. null if the day has not ended.
lastBlockHeightYet integer Last block of the day as of now.

Validator

Column Type Note
id uuid
operatorAddress varchar
accountAddress varchar
hexAddress varchar
createdMsgId uuid Message which created the validator (MsgCreateValidator). See Message
moniker varchar
identity varchar
website varchar
description text
securityContact varchar
rate double
double maxRate
maxChangeRate double
minSelfDelegation bigint
keybaseUsername varchar
keybaseAvatarUrl varchar

Deployment

Column Type Note
id uuid
owner varchar Address of the wallet that owns this deployment
dseq varchar
createdHeight integer Height of the MsgCreateDeployment message
balance double Remaining balance based on deposits and MsgWithdrawLease
deposit bigint Deposited amount based on MsgCreateDeployment and MsgDepositDeployment
lastWithdrawHeight integer Last height where an account settlement occured. This happens on create, withdraw and close.
withdrawnAmount double Withdrawn amount as of now. Updated on account settlement (create,withdraw,close).
closedHeight integer Height the deployment got closed on-chain. Can happen from MsgCloseDeployment or as a side-effect of having no active leases remaining.

DeploymentGroup

Column Type Note
id uuid
deploymentId uuid See Deployment
owner varchar Address of the wallet that owns this deployment group.
dseq varchar
gseq integer

DeploymentGroupResource

Column Type Note
id integer
deploymentGroupId uuid See DeploymentGroup
cpuUnits integer Thousandth of CPU
memoryQuantity bigint Memory in bytes
ephemeralStorageQuantity bigint Ephemeral Storage in bytes
persistentStorageQuantity bigint Persistent Storage in bytes
count integer
price double

Lease

Column Type Note
id uuid
deploymentId uuid See Deployment
deploymentGroupId uuid See DeploymentGroup
owner varchar Address of the wallet that owns this deployment group.
dseq varchar
oseq integer
gseq integer
providerAddress varchar
createdHeight integer Height of the lease creation. Happens when a bid is accepted with MsgCreateLease.
closedHeight integer Height at which the lease is closed on-chain. Happens from MsgCloseLease, MsgCloseHeight or if the deployment become overdrawn during an account settlement.
predictedClosedHeight bigint Height at which the lease should theoritically expire. This is calculated based on the balance and price. It will usually not match the closedHeight since leases can be closed early (MsgCloseLease & MsgCloseBid) or closed late since the closing wont happen until the provider does a MsgWithdrawLease
price double Lease price as uakt/block
withdrawnAmount double Withdrawn amount as of now for this lease. Updated on account settlement (create,withdraw,close).
cpuUnits integer Thousandth of CPU
memoryQuantity bigint Memory in bytes
ephemeralStorageQuantity bigint Ephemeral Storage in bytes
persistentStorageQuantity bigint Persistent Storage in bytes

Bid

Column Type Note
id integer
owner varchar Deployment's wallet address
dseq varchar
gseq integer
oseq integer
provider varchar Provider's wallet address
price double Price in uakt/block
createdHeight integer Height of the MsgCreateBid

Provider

Column Type Note
owner varchar Address of the wallet that owns this provider
hostUri varchar ex: https://provider.europlots.com:8443
createdHeight integer Height at which the provider is created on-chain. (MsgCreateProvider)
updatedHeight integer Height at which the provider was last updated. (MsgUpdateProvider)
deletedHeight integer Height at which the provider is deleted on-chain. (MsgDeleteProvider)
email varchar
website varchar
isOnline boolean Indicates if the latest uptime check was successful
lastCheckDate timestamp Date & Time of the latest uptime check
lastSnapshotId uuid ID of the last snapshot taken
nextCheckDate timestamp Planned Date & Time of the next uptime check
failedCheckCount integer Amount of consecutive failed checks, NULL if currently online.
lastSuccessfulSnapshotId uuid Snapshot ID of the last successful check
downtimeFirstSnapshotId uuid Snapshot ID of the first failed check of the current downtime period. NULL if currently online.
error text NULL if the latest uptime check was successful, otherwise this wil contain the error message.
deploymentCount integer
leaseCount integer
activeCPU bigint Thousandth of CPU
activeMemory bigint Memory in bytes
activeStorage bigint Storage in bytes
pendingCPU bigint Thousandth of CPU
pendingMemory bigint Memory in bytes
pendingStorage bigint Storage in bytes
availableCPU bigint Thousandth of CPU
availableMemory bigint Memory in bytes
availableStorage bigint Storage in bytes
akashVersion varchar
cosmosSdkVersion varchar
ip varchar IP obtained by resolving DNS for the hostUri
ipRegion varchar
ipCountry varchar
ipLat varchar
ipLon varchar
ipRegionCode varchar
ipCountryCode varchar

ProviderAttribute

Column Type Note
id integer
provider varchar Provider's wallet address
key varchar
value varchar

ProviderAttributeSignature

Store audited attributes based on MsgSignProviderAttributes & MsgDeleteProviderAttributes.

Column Type Note
id integer
provider varchar Provider's wallet address
auditor varchar Auditor's wallet address
key varchar
value varchar

ProviderSnapshot

Similar to stats on the Provider, but a new row is inserted for every uptime checks. This allows to graph the changes in resources over time as well as calculate an uptime percentage over a period.

Column Type Note
id uuid
owner varchar Address of the wallet that owns this provider
isOnline boolean Indicates if this uptime check was successful
isLastOfDay boolean Indicates if this is the last snapshot of the day for this provider
checkDate timestamp Date & Time of this uptime check
error text null if the uptime check was successful, otherwise this wil contain the error message.
deploymentCount integer
leaseCount integer
activeCPU bigint Thousandth of CPU
activeMemory bigint Memory in bytes
activeStorage bigint Storage in bytes
pendingCPU bigint Thousandth of CPU
pendingMemory bigint Memory in bytes
pendingStorage bigint Storage in bytes
availableCPU bigint Thousandth of CPU
availableMemory bigint Memory in bytes
availableStorage bigint Storage in bytes

ProviderSnapshotNodes

Keep track of ressources of individual provider nodes obtained through feature discovery.

Column Type Note
id uuid
snapshotId uuid Snapshot ID
name varchar Name of the node
cpuAllocatable bigint Thousandth of CPU
cpuAllocated bigint Thousandth of CPU
memoryAllocatable bigint Memory in bytes
memoryAllocated bigint Memory in bytes
ephemeralStorageAllocatable bigint Storage in bytes
ephemeralStorageAllocated bigint Storage in bytes
capabilitiesStorageHDD boolean Indicates if the node supports HDD storage
capabilitiesStorageSSD boolean Indicates if the node supports SSD storage
capabilitiesStorageNVME boolean Indicates if the node supports NVME storage
gpuAllocatable bigint
gpuAllocated bigint

ProviderSnapshotNodeCPU

Store CPU informations for each Provider Nodes

Column Type Note
id uuid
snapshotNodeId uuid Snapshot node ID
vendor varchar ex: GenuineIntel
model varchar ex: Intel(R) Xeon(R) CPU @ 2.30GHz
vcores smallint

ProviderSnapshotNodeGPU

Store GPU informations for each Provider Nodes

Column Type Note
id uuid
snapshotNodeId uuid Snapshot node ID
vendor varchar ex: nvidia
name varchar Model name (ex: rtx4090)
modelId varchar On the provider, this gets mapped to vendor, name, interface and memorySize based on this file.
interface varchar ex: PCIe
memorySize varchar ex: 24Gi

Template

Column Type Note
id uuid
userId uuid See User
copiedFromId uuid If the template was created by using the copy feature, this will contain the id of the original template.
title varchar
description text
isPublic boolean
cpu bigint
ram bigint
storage bigint
sdl text
createdOn timestamp

TemplateFavorite

Created when a user "favorite" a template

Column Type Note
id uuid
userId uuid See User
templateId uuid See Template
addedDate datetime

UserSetting

Column Type Note
id uuid
userId varchar User ID given by Auth0 this is the field other tables reference to.
username varchar
email varchar
emailVerified boolean
stripeCustomerId varchar Created once the user visits the checkout page
bio text
subscribedToNewsletter boolean
youtubeUsername varchar
twitterUsername varchar
githubUsername varchar

cloudmos's People

Contributors

baktun14 avatar corysturtevant avatar hsnice16 avatar redm4x avatar sgc41 avatar shimpa1 avatar ygrishajev avatar zblocker64 avatar zross5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudmos's Issues

Update min deposit from on chain

We currently hardcode the min deposit for the new deployments.
image

  • Create an API endpoint that queries the min deposit from on chain data
  • Query that API endpoint and display the correct data

Create DeploymentDetails API for Praetor to use in Dashboard

We need an API that takes the owner address and dseq and returns the JSON below.

{
    "owner": "akash18ttl3praclcd87dhsy6mczcwvnxrqltdakjn07",
    "dseq": "14228985",
    "denom": "uakt",
    "createdHeight": 14228987,
    "createdDate": "2023-12-22T16:15:09.865Z",
    "closedHeight": 14229553,
    "closedDate": "2023-12-22T17:11:31.053Z",
    "status": "closed",
    "balance": 4999783.2351,
    "transferred": 216.7649,
    "settledAt": 14229553,
    "resources": {
        "cpu": 100,
        "memory": 268435456,
        "gpu": 0,
        "ephemeralStorage": 268435456,
        "persistentStorage": 0
    },
    "leases": [
        {
            "provider": "akash1e02tys4hawc2wjexadjxztvrkxnkl9r7ym0k7v",
            "gseq": 1,
            "oseq": 1,
            "price": 0.394118,
            "createdHeight": 14229003,
            "createdDate": "2023-12-22T16:16:46.983Z",
            "closedHeight": 14229553,
            "closedDate": "2023-12-22T17:11:31.053Z",
            "status": "closed",
            "resources": {
                "cpu": 100,
                "memory": 268435456,
                "gpu": 0,
                "ephemeralStorage": 268435456,
                "persistentStorage": 0
            }
        }
    ]
}

Refactor and improve Cloudmos API

Refactor the Cloudmos API to enhance usability and maintainability. More and more projects in the akash ecosystem would benefit from using the cloudmos API in their project and this is the ground work for making it more accessible and developer-friendly.

  • Improve naming convention (consistent, lowercase, no verbs)
  • Refactor endpoint implementations to be more consistent (controller > service) Renamed providers to services for clarity
  • Add versioning for backward compatibility (ex: /v1/deployments)
  • Add authorization system (allow other projects to use our hosted api, enable CORS?)
  • Add api documentation (probably swagger)
  • Update cloudmos UI to call the new API
  • Monitoring + analytics
  • Add documentation to the readme

SDL Builder: mount point discarded if volume name != "data"

Reproductions

  1. Go do SDL builder
  2. paste yaml
  3. go to builder tab

Works:

---
version: "2.0"
services:
  foo:
    image: ""
    expose:
      - port: 80
        as: 80
        to:
          - global: true
    params:
      storage:
        data:
          mount: /test
          readOnly: false
profiles:
  compute:
    foo:
      resources:
        cpu:
          units: 0.1
        memory:
          size: 512Mi
        storage:
          - size: 1Gi
          - name: data
            size: 10Gi
            attributes:
              persistent: true
              class: beta1
  placement:
    dcloud:
      pricing:
        foo:
          denom: uakt
          amount: 1000
deployment:
  foo:
    dcloud:
      profile: foo
      count: 1

Broken:

---
version: "2.0"
services:
  foo:
    image: ""
    expose:
      - port: 80
        as: 80
        to:
          - global: true
    params:
      storage:
        dato:
          mount: /test
          readOnly: false
profiles:
  compute:
    foo:
      resources:
        cpu:
          units: 0.1
        memory:
          size: 512Mi
        storage:
          - size: 1Gi
          - name: dato
            size: 10Gi
            attributes:
              persistent: true
              class: beta1
  placement:
    dcloud:
      pricing:
        foo:
          denom: uakt
          amount: 1000
deployment:
  foo:
    dcloud:
      profile: foo
      count: 1

image

Optimize Workflow for USDC based deployment

Problem Statement: We have a lot of deployments happening on cloudmos but few that use USDC. One thing to note is that it isn't obvious in the main deployment workflow that we support USDC based deploys. This issue recommends two changes to improve that UX

  • For people using the SDL builder, switching from uAKT to uUSDC does not update the SDL (not sure if this is a bug?). There also isn't an explicit "save" on that "placement" modal (should there be?).
    Screenshot 2024-02-05 at 1 15 31 PM

  • The UI to switch from uAKT to USDC is buried one level deep. Let's surface that up to the main page so that changing it automatically sets the ibc channel to ibc/170C677610AC31DF0904FFE09CD3B5C657492170E7E52372E48756B71E56F2F1
    This would be similar to the UI implemented in the "Rent GPU" page as shown below.
    Screenshot 2024-02-05 at 1 15 18 PM

stats.akash.network fails to render a wallet's deployments

When trying to view the deployments for a given wallet address, the https://stats.akash.network page fails to properly render the list items.

Below i've linked to a quick screen grab by showing what's going on. it's worth pointing out that the fetch is actually succeeding, and it's within the the rendering process that this issue comes to life.

akash stats - deployments rendering error

And here is the actual error being printed to the console:

ZodError: [
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "undefined",
    "path": [
      0,
      "hash"
    ],
    "message": "Required"
  },
  {
    "code": "invalid_type",
    "expected": "array",
    "received": "undefined",
    "path": [
      0,
      "messages"
    ],
    "message": "Required"
  },
  {
    "code": "invalid_type",
    "expected": "number",
    "received": "undefined",
    "path": [
      0,
      "height"
    ],
    "message": "Required"
  },
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "undefined",
    "path": [
      0,
      "datetime"
    ],
    "message": "Required"
  },
  {
    "code": "invalid_type",
    "expected": "boolean",
    "received": "undefined",
    "path": [
      0,
      "isSuccess"
    ],
    "message": "Required"
  },
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "undefined",
    "path": [
      0,
      "error"
    ],
    "message": "Required"
  },
  {
    "code": โ€ฆ
    NextJS 11
        a
        get error
        parse
        m
        _
        fetchFn
        c
        l
        promise callback*93476/l/<
        promise callback*c
        l
69-1727f102e3946f37.js:1:3791
    error NextJS
    overrideMethod https://stats.akash.network/addresses/akash16sxmnrphfp0393mw6dw2tdugmyeftchxl0tyyl/deployments:13024
    NextJS 8

Add authentication system to the public API

Implement authentication system to recognize clients and better track usage. Separated from issue #54 for better tracking.

  • Implement authentication system for known clients (jwt? api token?)
  • Implement usage tracking for authenticated requests
  • Implement rate limiting to prevent abuse
    • Lower limits for unauthenticated requests (based on ip? origin?)
    • Higher limits for authenticated requests

Remove dependency on local storage

Cloudmos currently stores some data locally (in the browser local storage) - this causes inconsistencies when using different browsers/ machines or deploying to a new instance. We should discuss an alternate approach to this. Things stored locally include:

  1. Certificates
  2. Favorites
  3. SDLs (when deployments are closed)

Potential Options:

  1. Allow user to export data from one browser/ machine and import back to another. This is a relatively easy solution but is really bad UX in general. That said some people may find it useful (if they are absolutely stuck with a bunch of SDLs sitting on another machine/ browser.
  2. The real solution is to implement cloud storage for these things.

Will need to probe and see if users will use option 1 at all and if they will then consider implementing it

Deployment Summary: wrap provider names and link to "my leases"

  1. When viewing a large number of deployments, the provider list scrolls off the page
  2. When clicking on the provider in that list, the natural intuitive expectation is to be able to see the (filtered) list of my own leases running on that provider - so linking to the "My Leases" tab may be beneficial

image

Cosmos-kit wallet disconnects

Cosmos kit wallet disconnects after a certain period of time andif we reconnect and go on a deployment detail page, the local certificates are not loaded properly.

Improve templates API

  • The templates API are getting heavy as more templates are added to the awesome akash repo. Also, the endpoint is called many times throughout the UX.
    image

TODO

  • Modifiy the templates list api endpoint to only return the info needed to display in a list (without the readme, etc)
  • Add a new api endpoint for a template detail with all the info
  • Modifiy the app to query and display with the new endpoints

Cloudmos SDL builder is completely and utterly broken on Brave, Debian.

Hi,

I'm Mr. Tetroid, a very friendly guy.

Cloudmos SDL builder is completely and utterly broken in Brave browser running on Debian 11.

  1. If you try to save, usually it just says "error fetching template". Then it DELETES all the SDL template info so you have to start from scratch.
  2. If you leave the SDL builder page and come back, nothing has been saved, even if you have occasionally been able to save.

This is nuts. It takes a little while to put an SDL file together and then it just gets wiped most of the time. No way to preview before wiping either. Come on make SDL building a nice experience. As of now it is extremely buggy and also the saving capability does not seem to be persistent anyway. Worst kind of SDL builder.

GPU model display in deployment detail (Lease)

  • With the indexer, we need to track the bid that was selected for the lease and extract from the bid resource the gpu model and attributes
  • Implement a new api endpoint to retrieve the data
  • Display the GPU model in the deployment detail

SDL Builder - template from URL

Would love to have a Button in Readme:

Deploy on Akash

But would need a URL handler like:

https://deploy.cloudmos.io/new-deployment?template_url=https://raw.gitlab.com/...

I checked the code and so far doesn't seem to exist ๐Ÿง

Error saving template

when trying to import and save this sdl to my templates on my cloudmos profile.
i get this error.

---
version: "2.0"

services:
  geekbench:
    image: davidsarkany/geekbench:6.0.2
    expose:
      - port: 80
        to:
          - global: true
    env:
      - GEEKBENCH_VERSION=6.0.2 #Supports any version of 5.0
      - UPLOAD #Replace with NO_UPLOAD to disable uploading results to the Geekbench Browser
      #- EMAIL= #Unlock Geekbench using EMAIL and KEY
      #- KEY= #Required if email is present
profiles:
  compute:
    geekbench:
      resources:
        cpu:
          units: 250
        memory:
          size: 100Gi #2Gi required
        storage:
          size: 100Gi
  placement:
    akash:
      pricing:
        geekbench:
          denom: uakt
          amount: 10000
deployment:
  geekbench:
    akash:
      profile: geekbench
      count: 1

image

Improve GPU deployment experience

After almost 2 months since the GPU mainnet launch, we've gathered many feedbacks from the community, both from the crypto and non-crypto native users. What comes out the most is the ease of use to deploy, a "point and click solution".

Hence, I created this topic to track the advancement on a new type of form similar to the SDL builder, but verticaly aligned for GPUs.

The form will support:

  • Fully abstracted SDL
  • Simplified options
  • Template selection for GPU related deployments
  • Easy token selection
  • Easy region selection with provider attributes

Cloudmos Rebrand (To Akash Console)

  • Use the ShadeCN UI Components from Tailwind (Cloudmos currently uses Material UI)
  • Update Colors and Logo to match Akash Console branding
  • Break out into different products:
    • console.akash.network: Will include: Home, Deployments, Templates, SDL Builder, Providers, FAQ, Settings
    • stats.akash.network: Will display Akashlytics page from deploy.cloudmos.io
    • Price Compare page: will move to website (akash.network
    • Add contextual help (icons next to buttons and such)
    • Search Bar Up top: Since we won't have akashlytics in cloudmos anymore, we should either adapt this to allow searching of deployments and templates or remove it (and work on search in a separate issue)

Other Notes:
Logo branding - similar to console.akash.network
Light/ Dark mode: Cloudmos already has this so it'll be great to keep supporting it.
Templates - leave as-is for the scope of this ticket - we will work on a new design as part of #42

Improve developer experience

Context

  • Currently to run cloudmos locally, you need to have a backup of a recent snapshot of the live/production database because to run the indexer locally, to compute some of the indexed data we rely on old blocks that need to be present for the computation. Also, most of the nodes in the list are pruned nodes which don't contain a long history of blocks, so if you start syncing from an old snapshot, none of the nodes might be able to return the block results.

Improvements

  • Improve the setup instructions
  • Implement an automatic database snapshot system with a public download link. Ideally the docs should have a link to the latest snapshot.
  • (Extra) Potentially find a way for the indexer to run without the full database, just start indexing from a recent block..

Unable to target a100 in generated yaml

The below yaml was generated with the generator returns no bids, even though the network has a100 80GB

I suspect there is an issue with using proper tag for - model: a100

---
version: "2.0"

services:
  obtaingpu:
    image: ubuntu:22.04
    command:
      - "sh"
      - "-c"
    args:
      - 'uptime;
        nvidia-smi;
        sleep infinity'
    expose:
      - port: 8080
        as: 80
        to:
          - global: true

profiles:
  compute:
    obtaingpu:
      resources:
        cpu:
          units: 1.0
        memory:
          size: 1Gi
        gpu:
          units: 1
          attributes:
            vendor:
              nvidia:
                - model: a100
        storage:
          size: 1Gi
  placement:
    akash:
      pricing:
        obtaingpu: 
          denom: uakt
          amount: 100000

deployment:
  obtaingpu:
    akash:
      profile: obtaingpu
      count: 1

Improve UX for when a bid selection is ignored

selecting a provider and then canceling the transaction (to choose another provider) requires a refresh of the page for the "accept bid" button to become active again. It may be better to cancel the keplr transaction if the bid selection popup is closed, so that the bid selection UI is active again (and the user can select a different provider)

Module not found error in cloudmos/api

Getting error when running cloudmos/api (https://github.com/akash-network/cloudmos/tree/main/api) from Dockerfile as well as from npm directly.

The error is something like Module not found: Error: Can't resolve '@shared/xxx'

is it related to https://github.com/akash-network/cloudmos/tree/main/shared repo?

The full error log from docker is below.

[+] Building 18.7s (12/12) FINISHED                                                                                                                                                                                           docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                                    0.0s
 => => transferring dockerfile: 273B                                                                                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                                                                                         0.0s
 => [internal] load metadata for docker.io/library/node:18-alpine                                                                                                                                                                       1.7s
 => [1/8] FROM docker.io/library/node:18-alpine@sha256:b1a0356f7d6b86c958a06949d3db3f7fb27f95f627aa6157cb98bc65c801efa2                                                                                                                 0.0s
 => [internal] load build context                                                                                                                                                                                                       0.0s
 => => transferring context: 3.07kB                                                                                                                                                                                                     0.0s
 => CACHED [2/8] WORKDIR /app                                                                                                                                                                                                           0.0s
 => CACHED [3/8] COPY . .                                                                                                                                                                                                               0.0s
 => CACHED [4/8] WORKDIR /app/shared                                                                                                                                                                                                    0.0s
 => CACHED [5/8] RUN npm ci                                                                                                                                                                                                             0.0s
 => CACHED [6/8] WORKDIR /app/api                                                                                                                                                                                                       0.0s
 => CACHED [7/8] RUN npm ci                                                                                                                                                                                                             0.0s
 => ERROR [8/8] RUN npm run build                                                                                                                                                                                                      16.8s
------                                                                                                                                                                                                                                       
 > [8/8] RUN npm run build:                                                                                                                                                                                                                  
0.783                                                                                                                                                                                                                                        
0.783 > [email protected] build                                                                                                                                                                                                            
0.783 > webpack --config webpack.prod.js                                                                                                                                                                                                     
0.783                                                                                                                                                                                                                                        
16.68 assets by status 113 KiB [cached] 1 asset
16.68 cacheable modules 208 KiB 42 modules
16.68 modules by path external "@akashnetwork/akashjs/build/protobuf/akash/ 1010 bytes
16.68   modules by path external "@akashnetwork/akashjs/build/protobuf/akash/market/ 336 bytes 8 modules
16.68   modules by path external "@akashnetwork/akashjs/build/protobuf/akash/deployment/ 252 bytes 6 modules
16.68   modules by path external "@akashnetwork/akashjs/build/protobuf/akash/audit/ 126 bytes 3 modules
16.68   modules by path external "@akashnetwork/akashjs/build/protobuf/akash/cert/ 126 bytes 3 modules
16.68   modules by path external "@akashnetwork/akashjs/build/protobuf/akash/provider/ 126 bytes 3 modules
16.68   external "@akashnetwork/akashjs/build/protobuf/akash/base/v1beta3/storage" 42 bytes [built] [code generated]
16.68 modules by path external "@cosmjs/ 168 bytes
16.68   external "@cosmjs/crypto" 42 bytes [built] [code generated]
16.68   external "@cosmjs/encoding" 42 bytes [built] [code generated]
16.68   external "@cosmjs/proto-signing" 42 bytes [built] [code generated]
16.68   external "@cosmjs/stargate" 42 bytes [built] [code generated]
16.68 + 24 modules
16.68 
16.68 ERROR in ./src/db/blocksProvider.ts 13:16-50
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db'
16.68  @ ./src/routers/apiRouter.ts 17:25-58
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/db/blocksProvider.ts 14:15-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/db'
16.68  @ ./src/routers/apiRouter.ts 17:25-58
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/db/dbConnection.ts 17:20-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas' in '/app/src/db'
16.68  @ ./src/index.ts 46:23-51
16.68 
16.68 ERROR in ./src/db/dbConnection.ts 18:15-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/user' in '/app/src/db'
16.68  @ ./src/index.ts 46:23-51
16.68 
16.68 ERROR in ./src/db/dbConnection.ts 19:27-62
16.68 Module not found: Error: Can't resolve '@shared/chainDefinitions' in '/app/src/db'
16.68  @ ./src/index.ts 46:23-51
16.68 
16.68 ERROR in ./src/db/deploymentProvider.ts 14:15-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/db'
16.68  @ ./src/routers/apiRouter.ts 32:29-66
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/db/deploymentProvider.ts 15:16-50
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db'
16.68  @ ./src/routers/apiRouter.ts 32:29-66
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/db/deploymentProvider.ts 17:20-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas' in '/app/src/db'
16.68  @ ./src/routers/apiRouter.ts 32:29-66
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/db/networkRevenueProvider.ts 25:15-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/db'
16.68  @ ./src/routers/web3indexRouter.ts 17:33-74
16.68  @ ./src/index.ts 43:26-62
16.68 
16.68 ERROR in ./src/db/networkRevenueProvider.ts 26:16-50
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db'
16.68  @ ./src/routers/web3indexRouter.ts 17:33-74
16.68  @ ./src/index.ts 43:26-62
16.68 
16.68 ERROR in ./src/db/providerDataProvider.ts 13:16-50
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db'
16.68  @ ./src/routers/apiRouter.ts 31:31-70
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/db/statsProvider.ts 13:15-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/db'
16.68  @ ./src/routers/apiRouter.ts 22:24-56
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/db/statsProvider.ts 14:16-50
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db'
16.68  @ ./src/routers/apiRouter.ts 22:24-56
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/db/templateProvider.ts 32:15-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/user' in '/app/src/db'
16.68  @ ./src/routers/userRouter.ts 40:27-62
16.68  @ ./src/index.ts 42:21-52
16.68 
16.68 ERROR in ./src/db/transactionsProvider.ts 13:15-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/db'
16.68  @ ./src/routers/apiRouter.ts 19:31-70
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/db/transactionsProvider.ts 14:16-50
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db'
16.68  @ ./src/routers/apiRouter.ts 19:31-70
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/providers/apiNodeProvider.ts 23:15-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/providers'
16.68  @ ./src/routers/apiRouter.ts 20:26-67
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/providers/apiNodeProvider.ts 25:16-50
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/providers'
16.68  @ ./src/routers/apiRouter.ts 20:26-67
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/providers/providerStatusProvider.ts 13:16-50
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/providers'
16.68  @ ./src/routers/apiRouter.ts 21:33-81
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/providers/providerStatusProvider.ts 14:27-78
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash/providerSnapshot' in '/app/src/providers'
16.68  @ ./src/routers/apiRouter.ts 21:33-81
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in ./src/providers/stripeProvider.ts 16:15-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/user' in '/app/src/providers'
16.68  @ ./src/routers/userRouter.ts 41:25-65
16.68  @ ./src/index.ts 42:21-52
16.68 
16.68 ERROR in ./src/providers/userDataProvider.ts 13:15-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/user' in '/app/src/providers'
16.68  @ ./src/routers/userRouter.ts 37:27-69
16.68  @ ./src/index.ts 42:21-52
16.68 
16.68 ERROR in ./src/routers/dashboardRouter.ts 16:15-48
16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/user' in '/app/src/routers'
16.68  @ ./src/index.ts 47:26-62
16.68 
16.68 ERROR in /app/src/db/blocksProvider.ts
16.68 ./src/db/blocksProvider.ts 1:61-86
16.68 [tsl] ERROR in /app/src/db/blocksProvider.ts(1,62)
16.68       TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 17:25-58
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/db/blocksProvider.ts
16.68 ./src/db/blocksProvider.ts 2:39-63
16.68 [tsl] ERROR in /app/src/db/blocksProvider.ts(2,40)
16.68       TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 17:25-58
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/db/dbConnection.ts
16.68 ./src/db/dbConnection.ts 5:56-75
16.68 [tsl] ERROR in /app/src/db/dbConnection.ts(5,57)
16.68       TS2307: Cannot find module '@shared/dbSchemas' or its corresponding type declarations.
16.68  @ ./src/index.ts 46:23-51
16.68 
16.68 ERROR in /app/src/db/dbConnection.ts
16.68 ./src/db/dbConnection.ts 6:73-97
16.68 [tsl] ERROR in /app/src/db/dbConnection.ts(6,74)
16.68       TS2307: Cannot find module '@shared/dbSchemas/user' or its corresponding type declarations.
16.68  @ ./src/index.ts 46:23-51
16.68 
16.68 ERROR in /app/src/db/dbConnection.ts
16.68 ./src/db/dbConnection.ts 7:33-59
16.68 [tsl] ERROR in /app/src/db/dbConnection.ts(7,34)
16.68       TS2307: Cannot find module '@shared/chainDefinitions' or its corresponding type declarations.
16.68  @ ./src/index.ts 46:23-51
16.68 
16.68 ERROR in /app/src/db/deploymentProvider.ts
16.68 ./src/db/deploymentProvider.ts 4:28-52
16.68 [tsl] ERROR in /app/src/db/deploymentProvider.ts(4,29)
16.68       TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 32:29-66
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/db/deploymentProvider.ts
16.68 ./src/db/deploymentProvider.ts 5:34-59
16.68 [tsl] ERROR in /app/src/db/deploymentProvider.ts(5,35)
16.68       TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 32:29-66
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/db/deploymentProvider.ts
16.68 ./src/db/deploymentProvider.ts 7:31-50
16.68 [tsl] ERROR in /app/src/db/deploymentProvider.ts(7,32)
16.68       TS2307: Cannot find module '@shared/dbSchemas' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 32:29-66
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/db/networkRevenueProvider.ts
16.68 ./src/db/networkRevenueProvider.ts 2:20-44
16.68 [tsl] ERROR in /app/src/db/networkRevenueProvider.ts(2,21)
16.68       TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations.
16.68  @ ./src/routers/web3indexRouter.ts 17:33-74
16.68  @ ./src/index.ts 43:26-62
16.68 
16.68 ERROR in /app/src/db/networkRevenueProvider.ts
16.68 ./src/db/networkRevenueProvider.ts 3:36-61
16.68 [tsl] ERROR in /app/src/db/networkRevenueProvider.ts(3,37)
16.68       TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations.
16.68  @ ./src/routers/web3indexRouter.ts 17:33-74
16.68  @ ./src/index.ts 43:26-62
16.68 
16.68 ERROR in /app/src/db/providerDataProvider.ts
16.68 ./src/db/providerDataProvider.ts 1:44-69
16.68 [tsl] ERROR in /app/src/db/providerDataProvider.ts(1,45)
16.68       TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 31:31-70
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/db/statsProvider.ts
16.68 ./src/db/statsProvider.ts 1:20-44
16.68 [tsl] ERROR in /app/src/db/statsProvider.ts(1,21)
16.68       TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 22:24-56
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/db/statsProvider.ts
16.68 ./src/db/statsProvider.ts 2:36-61
16.68 [tsl] ERROR in /app/src/db/statsProvider.ts(2,37)
16.68       TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 22:24-56
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/db/templateProvider.ts
16.68 ./src/db/templateProvider.ts 1:56-80
16.68 [tsl] ERROR in /app/src/db/templateProvider.ts(1,57)
16.68       TS2307: Cannot find module '@shared/dbSchemas/user' or its corresponding type declarations.
16.68  @ ./src/routers/userRouter.ts 40:27-62
16.68  @ ./src/index.ts 42:21-52
16.68 
16.68 ERROR in /app/src/db/transactionsProvider.ts
16.68 ./src/db/transactionsProvider.ts 1:46-70
16.68 [tsl] ERROR in /app/src/db/transactionsProvider.ts(1,47)
16.68       TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 19:31-70
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/db/transactionsProvider.ts
16.68 ./src/db/transactionsProvider.ts 2:61-86
16.68 [tsl] ERROR in /app/src/db/transactionsProvider.ts(2,62)
16.68       TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 19:31-70
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/providers/apiNodeProvider.ts
16.68 ./src/providers/apiNodeProvider.ts 7:26-50
16.68 [tsl] ERROR in /app/src/providers/apiNodeProvider.ts(7,27)
16.68       TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 20:26-67
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/providers/apiNodeProvider.ts
16.68 ./src/providers/apiNodeProvider.ts 9:44-69
16.68 [tsl] ERROR in /app/src/providers/apiNodeProvider.ts(9,45)
16.68       TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 20:26-67
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/providers/providerStatusProvider.ts
16.68 ./src/providers/providerStatusProvider.ts 1:72-97
16.68 [tsl] ERROR in /app/src/providers/providerStatusProvider.ts(1,73)
16.68       TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 21:33-81
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/providers/providerStatusProvider.ts
16.68 ./src/providers/providerStatusProvider.ts 2:33-75
16.68 [tsl] ERROR in /app/src/providers/providerStatusProvider.ts(2,34)
16.68       TS2307: Cannot find module '@shared/dbSchemas/akash/providerSnapshot' or its corresponding type declarations.
16.68  @ ./src/routers/apiRouter.ts 21:33-81
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 ERROR in /app/src/providers/stripeProvider.ts
16.68 ./src/providers/stripeProvider.ts 1:28-52
16.68 [tsl] ERROR in /app/src/providers/stripeProvider.ts(1,29)
16.68       TS2307: Cannot find module '@shared/dbSchemas/user' or its corresponding type declarations.
16.68  @ ./src/routers/userRouter.ts 41:25-65
16.68  @ ./src/index.ts 42:21-52
16.68 
16.68 ERROR in /app/src/providers/stripeProvider.ts
16.68 ./src/providers/stripeProvider.ts 2:25-40
16.68 [tsl] ERROR in /app/src/providers/stripeProvider.ts(2,26)
16.68       TS2307: Cannot find module '@shared/plans' or its corresponding type declarations.
16.68  @ ./src/routers/userRouter.ts 41:25-65
16.68  @ ./src/index.ts 42:21-52
16.68 
16.68 ERROR in /app/src/providers/userDataProvider.ts
16.68 ./src/providers/userDataProvider.ts 1:45-69
16.68 [tsl] ERROR in /app/src/providers/userDataProvider.ts(1,46)
16.68       TS2307: Cannot find module '@shared/dbSchemas/user' or its corresponding type declarations.
16.68  @ ./src/routers/userRouter.ts 37:27-69
16.68  @ ./src/index.ts 42:21-52
16.68 
16.68 ERROR in /app/src/routers/dashboardRouter.ts
16.68 ./src/routers/dashboardRouter.ts 1:38-62
16.68 [tsl] ERROR in /app/src/routers/dashboardRouter.ts(1,39)
16.68       TS2307: Cannot find module '@shared/dbSchemas/user' or its corresponding type declarations.
16.68  @ ./src/index.ts 47:26-62
16.68 
16.68 ERROR in /app/src/utils/map/provider.ts
16.68 ./src/utils/map/provider.ts 1:25-50
16.68 [tsl] ERROR in /app/src/utils/map/provider.ts(1,26)
16.68       TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations.
16.68  @ ./src/providers/providerStatusProvider.ts 18:19-53
16.68  @ ./src/routers/apiRouter.ts 21:33-81
16.68  @ ./src/index.ts 41:20-50
16.68 
16.68 48 errors have detailed information that is not shown.
16.68 Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
16.68 
16.68 webpack 5.78.0 compiled with 48 errors in 14783 ms
------
Dockerfile:16
--------------------
  14 |     WORKDIR /app/api
  15 |     RUN npm ci
  16 | >>> RUN npm run build
  17 |     
  18 |     EXPOSE 80
--------------------
ERROR: failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1

Templates Section Improvements

The current "Templates" section could benefit from improvements.

I've prepared a draft of a possible improvement here:
Screenshot 2024-02-21 at 14 01 23

At the top of the page we could recommend templates. This would allow us to feature certain templates that we would like to highlight at a specific point of time. For example if a new LLM comes around, or not long ago we had Zephyr mining on Akash - which could be highlighted at that time.

Next to that we could provide another option where users could view "most popular templates". For all the users who like to explore templates based on popularity.

The filtering option could be added to the section of "All templates" as well.

Improve SDL Builder UX

The SDL builder UX can use a couple of improvements:

  • 1. When users come into cloudmos the first time (or really any time) the natural inclination is to click on "Deploy" and get going. The challenge is that this workflow requires that the user either already have an SDL or be able to create one on the fly or use a pre-defined template. It doesn't account for the user who just wants to deploy a custom SDL but doesn't know how to write the file. While this is supported in the SDL builder, the user needs to first go and create the SDL there and then copy it into the SDL editor in the deploy workflow. It would be great to just have the SDL builder UI show up in the deploy workflow. Ideally, even for the preset templates, it will be great if the first thing the user sees when they click them is the SDL builder (pre-configured to match the templated SDL) that they can change if they want. Optionally the more advanced users should always have the option to edit SDL. This is much like the workflow in Console.
  • 2. A user has reported issues with using the SDL editor that may be specific to Brave browsers: #26

Add Cosmokit Integration

Switch custom wallet logic to use CosmosKit instead. This will allow us to add support for new wallet very quickly.

  • Change custom wallet logic to use CosmosKit
  • Add support for old and new wallets
    • Keplr
    • Leap
    • Keplr Mobile (NEW)
    • Cosmostation (NEW)
    • Cosmostation Mobile (NEW)
  • Sandbox Support
  • USDC Support

Provider indexing duplicate when changing wallet

  • When creating a provider with a specific host uri and then changing the wallet associated with the provider, it creates a duplicate in the Cloudmos database since we use the host uri as an identifier.
  • It creates weird behavior with the active status, need some investigation.

Deployment and Leases API from indexer for providers

Add API to return leases when passing provider address - active and inactive.

API 1 - Get all the deployments for provider

input - providerAddress, pagination.limit, pagination.offset, state

example return -

{ 
  "deployment": {
    "deployment_id": {
      "owner": "akash18ttl3praclcd87dhsy6mczcwvnxrqltdakjn07",
      "dseq": "13713996"
    },
    "state": "closed",
    "version": "sRo1rTeBjw7MYgpP0JmiRWyiF6ZnKNZug6RrNuiOo2Q=",
    "created_at": "13714019"
  },
  "groups": [
    {
      "group_id": {
        "owner": "akash18ttl3praclcd87dhsy6mczcwvnxrqltdakjn07",
        "dseq": "13713996",
        "gseq": 1
      },
      "state": "closed",
      "group_spec": {
        "name": "akash",
        "requirements": {
          "signed_by": {
            "all_of": [
            ],
            "any_of": [
            ]
          },
          "attributes": [
          ]
        },
        "resources": [
          {
            "resource": {
              "id": 1,
              "cpu": {
                "units": {
                  "val": "500"
                },
                "attributes": [
                ]
              },
              "memory": {
                "quantity": {
                  "val": "536870912"
                },
                "attributes": [
                ]
              },
              "storage": [
                {
                  "name": "default",
                  "quantity": {
                    "val": "536870912"
                  },
                  "attributes": [
                  ]
                }
              ],
              "gpu": {
                "units": {
                  "val": "0"
                },
                "attributes": [
                ]
              },
              "endpoints": [
                {
                  "kind": "SHARED_HTTP",
                  "sequence_number": 0
                }
              ]
            },
            "count": 1,
            "price": {
              "denom": "uakt",
              "amount": "10000.000000000000000000"
            }
          }
        ]
      },
      "created_at": "13714019"
    }
  ],
  "escrow_account": {
    "id": {
      "scope": "deployment",
      "xid": "akash18ttl3praclcd87dhsy6mczcwvnxrqltdakjn07/13713996"
    },
    "owner": "akash18ttl3praclcd87dhsy6mczcwvnxrqltdakjn07",
    "state": "closed",
    "balance": {
      "denom": "uakt",
      "amount": "0.437134000000000000"
    },
    "transferred": {
      "denom": "uakt",
      "amount": "255.562866000000000000"
    },
    "settled_at": "13714260",
    "depositor": "akash18ttl3praclcd87dhsy6mczcwvnxrqltdakjn07",
    "funds": {
      "denom": "uakt",
      "amount": "0.000000000000000000"
    }
  }
}

API 2 - Get all leases for provider address

input - providerAddress, pagination.limit, pagination.offset, state

example return

{
  "leases": [
    {
      "lease": {
        "lease_id": {
          "owner": "akash18ttl3praclcd87dhsy6mczcwvnxrqltdakjn07",
          "dseq": "13713996",
          "gseq": 1,
          "oseq": 1,
          "provider": "akash1jrt5gj4njygdyfjksdpjerdgwpk8pzj8cg3el9"
        },
        "state": "closed",
        "price": {
          "denom": "uakt",
          "amount": "1.092149000000000000"
        },
        "created_at": "13714026",
        "closed_on": "13714260"
      },
      "escrow_payment": {
        "account_id": {
          "scope": "deployment",
          "xid": "akash18ttl3praclcd87dhsy6mczcwvnxrqltdakjn07/13713996"
        },
        "payment_id": "1/1/akash1jrt5gj4njygdyfjksdpjerdgwpk8pzj8cg3el9",
        "owner": "akash1jrt5gj4njygdyfjksdpjerdgwpk8pzj8cg3el9",
        "state": "closed",
        "rate": {
          "denom": "uakt",
          "amount": "1.092149000000000000"
        },
        "balance": {
          "denom": "uakt",
          "amount": "0.562866000000000000"
        },
        "withdrawn": {
          "denom": "uakt",
          "amount": "255"
        }
      }
    }
  ],
  "pagination": {
    "next_key": null,
    "total": "1"
  }
}

Cosmos-kit keplr mobile Twitter(X) error

How to reproduce:
Problem 1: Twitter webview

  • When you have Keplr mobile connected on your mobile device, open any link from Twitter that opens up Cloudmos Deploy. You should be automatically prompted Keplr Mobile to connect your wallet. If you go back from Keplr to Cloudmos, the webview closes entirely and you are back to Twitter, unable to go on Cloudmos Deploy.

Problem 2:

  • Keplr mobile doesn't work.
  • When connecting to Keplr mobile, it requests multiple times to approve the connection to the site

Stats akash API Update

  • With the release of the new API, we need to update the api utils/routes in the new stats app.

error when importing SDL with GPUs into SDL Builder

I uploaded an SDL with GPUs and the builder threw an error.
Screenshot 2023-10-10 at 7 40 28โ€ฏPM

SDL for ref:

---
version: "2.0"
services:
  app:
    image: zjuuu/comfyui:0.5
    expose:
      - port: 8080
        as: 8080
        to:
          - global: true
    env:
      - "VAEURLS="
      - "MODELURLS="
      - "UPSCALEURLS="
      - "COMMANDLINE_ARGS=--listen --port 8080 --gpu-only"
profiles:
  compute:
    app:
      resources:
        cpu:
          units: 6.0
        memory:
          size: 35Gi
        gpu:
          units: 1
          attributes:
            vendor:
              nvidia:
        storage:
          size: 50Gi
  placement:
    akash:
      pricing:
        app:
          denom: uakt
          amount: 10000
deployment:
  app:
    akash:
      profile: app
      count: 1

UX improvement: Deployments List

Noticed two things:

  1. One of the deployments (the first one in the screenshot below) shows an "alert" like icon but I can't figure out a way to know what it is trying to alert me about (tried hovering and clicking and nothing happens)
  2. The alignment on the "balance" column for the second deployment is off (likely because the "time left" column is empty
Screenshot 2023-10-11 at 11 57 29 AM

This is deployment #1 in the list:
Screenshot 2023-10-11 at 12 01 53 PM

Refactor Cloudmos Deploy into Akash Console

  • Refactor all the components from material ui into tailwindcss + shadcn
  • Refactor nextjs pages into app folder
  • Rebrand the app into the Akash Console with Akash colors
  • Remove Cloudmos landing page

Enhancement: Dynamic Visual Representation of Providers in Cities

Context:
The current visualization of network capacity on the global map displays single dots for each city with active providers. This representation does not differentiate between cities with multiple providers, potentially obscuring the actual distribution and density of providers.

Problem:
Cities with multiple providers, such as Singapore, which has sg.lnlm.akash.pub and sg.lneq.akash.pub, are currently represented with a single dot. This makes it challenging to recognize areas with a higher concentration of providers at a glance.

Proposed Solution:
Implement a dynamic visual representation for cities with multiple providers. Suggestions for this are:

  1. Dot Size Variation: Increase the size of the dot proportionally to the number of providers in that city. This would make cities with a higher number of providers more prominent.
  2. Color Gradients: Use color gradients to indicate the density of providers. A more saturated or darker color could signify a greater number of providers.
  3. Interactive Tooltips: When hovering over a city dot, display a tooltip that lists all the providers in that city. This would provide immediate and clear information about provider distribution within the city.

Benefit:
This enhancement would improve the user interface by providing a more accurate visual representation of the network's distribution, allowing users to easily identify hubs of activity and make more informed decisions based on provider density.

Additional Notes:

  • Consider the scalability of the visual representation for cities that may have a large number of providers.
  • Ensure that the UI remains uncluttered and that the information is presented in a user-friendly manner.

I believe this feature would significantly improve the user experience and provide valuable insights at a glance. Looking forward to the team's thoughts on this.

image

Akashlytics rebrand to Akash Stats

  • Create a new app to extract the akashlytics app under stats.akash.network
  • Rebrand to Akash brand
  • Refactor components from material ui to tailwindcss and nextjs14

Audited button leads to Error page

The providers' audited icon is clickable and it leads to an error page. This happens on several providers that I checked and it most likely happens on every provider.

Guessing this should lead to info about the provider's auditing or maybe the icon should not be clickable until it leads correctly to provider's audited info.

Adding screenshots
cloudmos1
cloudmos2

Support AMD GPUs

  • Adapt GPU code to support any GPU vendor, there is some hardcoded vendor code to nvidia
  • Adapt the provider attributes schema?

Refactor API route mapping code

  • In Cloudmos Deploy, we set the api url for the mainnet/testnet/sandbox in the constants.ts file and the code is messy.
  • Refactor to make it clearer what url is output based on the many scenarios. (local, production, multi networks)

Problem Indexing akash from block #1

So as we spoke in our Client meeting today, I tried running my own database last year, as I was trying to fetch some data from Cloudmos API,but was also having some trouble with CORS (which I got it working now)

My issue when trying to run the database, was downloading the database backup that is in Mega https://github.com/akash-network/cloudmos#how-to-run - cloudmos-akash-20230611.sql

I am not very familiar with Mega CLI and although I created a Mega account, for some reason I was not able to download the database backup and thus was not able to continue to the next steps.

I recall trying with this https://github.com/MaxFork/MegaTools and having issues with either my account access or the database requesting some sort of permission or password. (Although now I see that we have this available https://mega.io/cmd which I have not tried)

Either way, if it would be possible to have the database backup uploaded somewhere else and that it can just be downloaded with "wget" or something similar it might be easier for some of us.

Maybe something like what Polkachu has here https://polkachu.com/tendermint_snapshots/akash

Or maybe just some instructions for people not that familiar with Mega.

Thank you

SDL Builder user account

  • When a user creates an SDL using the SDL Builder and then click on save, it redirects to create a new users and when being redirected to the app, the user loses the SDL.

TODO:

  • Save the SDL in localStorage and reload when coming back to the page to prevent losing the SDL the user built.

Akash Template Marketplace (or SDL Registry)

The idea is to build upon the existing Templates + the SDL builder to create a Template Marketplace or SDL Registry if sorts. Inspired from Terraform Registry https://registry.terraform.io/browse/providers or equivalent template marketplaces.

This will allow for the following objectives:

  1. Allow community developers to create, save and optionally share (publicly) their SDLs
  2. Allow users (deployers) to browse select and deploy a specific template.
  3. Allow users (deployers) to clearly know which ones have gone through a formal review (from the core team or community experts) as PRs in awesome-akash and which have not. Similar to "Official/ Partner" vs "Community" providers in the Terraform Registry: https://registry.terraform.io/browse/providers
  4. Allow users to clone a given template (official or community) and modify and share them.
  5. Allow users to "market" their App by "listing it on the Akash Template Marketplace" - unauthenticated pages that showcase the app (like https://registry.terraform.io/providers/alkiranet/alkira/latest)

Stretch: Allowing saved templates to generate PRs into github under akash-network/awesome-akash

UX Improvement: Downloading/ Uploading files

One bug and 2 improvement suggestions:
Bug: When downloading from the shell (and likely the log tab too but did not test that specifically) - the formatting is messed up:
image

Improvement suggestion:
It wasn't immediately clear to me that the "Download File" button (on the SHELL tab) downloads CLI output from the provider and allows saving it locally - I tended to think that the button let's me download files on to the provider (since I am SSH'ed into the provider at the time) - in other words I thought this was an "upload function" - could be just me though :) -- this brought up two things in my mind:

  1. Should we rename the buttons to "Save CLI Output Locally" or something?
  2. Should we offer an easy upload function? - in my case, I was experimenting with ComfyUI and needed to upload checkpoint files, VAE files and Upscaler files to 3 different sub directories on the provider. The process was to cd into each and use wget. Having a way to hit a button, enter the destination (or better still have a navigable UI) and select the file(s) to upload from the local file system, might be helpful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.