Skip to content

Instantly share code, notes, and snippets.

@arno01
Last active May 24, 2022 15:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arno01/51643519e2a3a3a016bc5d83784bfbbc to your computer and use it in GitHub Desktop.
Save arno01/51643519e2a3a3a016bc5d83784bfbbc to your computer and use it in GitHub Desktop.

List all regions

$ akash query provider list --limit 1000 -o json | jq -r '.providers[] | (.attributes[] | select(.key == "region") | .value)' | sort | uniq -c | sort -n
      1 ap-northeast-1
      1 ap-southeast
      1 australia-east-akash-provider
      1 Chicago
      1 cz-prague
      1 cz-prague2
      1 donotuse
      1 eu
      1 eu-ch
      1 eu-east
      1 eu-north
      1 eu-switzerland
      1 eu-west-france-romain
      1 fareast
      1 germany
      1 na
      1 na-east
      1 singapore
      1 threadrippers
      1 US
      1 us-eat
      1 us-west-demo-caleb
      1 us-west-demo-daniel
      1 us-west-demo-mr5610
      1 zurich
      2 ca-central
      2 dcloud
      2 earth-lab0
      2 WestCoast
      3 ap-east-hk
      3 none
      5 us-central
      5 westcoast
      6 eu-west
      7 europe
     17 us-east
     31 us-west

List providers for certain region

Region: eu-west

$ akash query provider list --limit 1000 -o json | jq -r '.providers[] | select(.attributes[].key == "region" and .attributes[].value == "eu-west") | [ .host_uri, .owner, (.attributes[] | select(.key == "region") | .value) ] | @csv'
"https://cloud.hiveservers.com:8443","akash1xe4vzkdle4zsulueng4zpgat9yz6flq2nq522j","eu-west"
"https://provider.xch.computer:8443","akash1g8m36ge6yekgkfktl08x8vrp0nq9v0l73jzy32","eu-west"
"https://akash-provider.simply-vc.com.mt:8443","akash12avtc0l3epla82s3ah2sm0r2cxrpawx09mfdcz","eu-west"
"https://provider.akash.world:8443","akash10fl5f6ukr8kc03mtmf8vckm6kqqwqpc04eruqa","eu-west"
"https://provider.apps.workersno.lab01.openshift.eu:8443","akash1nasszfxnglxrp3rul28gqm2nh0sj560fr65p9v","eu-west"
"https://provider.dcloud.ginimed.com:8443","akash16hdxku6vgar7mwypg39pcqfsvnlunmjgjy93un","eu-west"

Make sure deployment gets bids only for specific region

You can use the attributes.region parameter in your deployment SDL file to make sure you will only get the bids from providers who set certain region:

  placement:
    <placement name>:
      attributes:
        region: eu-west
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment