Deploy an nginx container to Akash in five API calls.
Prerequisites: an API key from Console via your profile menu -> API Keys.
# 1. Create a deploymentDSEQ=$(curl -s -X POST https://console-api.akash.network/v1/deployments \ -H "x-api-key: $AKASH_API_KEY" \ -H "Content-Type: application/json" \ -d @deployment.json | jq -r .dseq)
# 2. Wait 30 seconds for bids, then pick the firstsleep 30BID_ID=$(curl -s "https://console-api.akash.network/v1/bids?dseq=$DSEQ" \ -H "x-api-key: $AKASH_API_KEY" | jq -r '.[0].id')
# 3. Create leasecurl -s -X POST https://console-api.akash.network/v1/leases \ -H "x-api-key: $AKASH_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"dseq\": \"$DSEQ\", \"bidId\": \"$BID_ID\"}"
# 4. Check statuscurl -s "https://console-api.akash.network/v1/deployments/$DSEQ" \ -H "x-api-key: $AKASH_API_KEY"
# 5. Close when donecurl -s -X DELETE "https://console-api.akash.network/v1/deployments/$DSEQ" \ -H "x-api-key: $AKASH_API_KEY"