From 120b7e55058639d4411e9c7d524f2bbb60cf39ba Mon Sep 17 00:00:00 2001 From: oiclid <1678413+oiclid@users.noreply.github.com> Date: Tue, 28 Jan 2025 11:33:36 +0100 Subject: [PATCH] updated cli commands in the guides --- .../akash-cli/installation/index.mdx | 2 +- .../Docs/guides/apps/invidious/index.md | 364 +++++++++++++++- .../Docs/guides/apps/qbittorent/index.md | 1 + .../guides/benchmarking/fast_com/index.md | 10 +- .../Docs/guides/blockchain/solar/index.md | 365 +++++++++++++++- .../Docs/guides/data-analysis/dash/index.md | 4 +- .../guides/data-analysis/dataiku/index.md | 6 +- .../Docs/guides/data-analysis/druid/index.md | 10 +- .../data-analysis/elasticsearch/index.md | 2 +- .../guides/data-analysis/grafana/index.md | 10 +- .../Docs/guides/data-analysis/jatos/index.md | 4 +- .../guides/data-analysis/jupyterhub/index.md | 6 +- .../Docs/guides/data-analysis/kibana/index.md | 4 +- .../Docs/guides/data-analysis/knime/index.md | 4 +- .../Docs/guides/data-analysis/matomo/index.md | 10 +- .../guides/data-analysis/opensearch/index.md | 6 +- .../guides/data-analysis/rstudio/index.md | 2 +- .../guides/data-analysis/superset/index.md | 10 +- .../Docs/guides/databases/anzograph/index.md | 377 ++++++++++++++++- .../Docs/guides/databases/arangodb/index.md | 388 ++++++++++++++++-- .../guides/databases/cockroachdb/index.md | 370 ++++++++++++++++- .../Docs/guides/databases/couchbase/index.md | 382 ++++++++++++++++- .../Docs/guides/databases/couchdb/index.md | 356 +++++++++++++++- .../Docs/guides/databases/dolt/index.md | 5 +- .../Docs/guides/databases/influxdb/index.md | 376 ++++++++++++++++- .../guides/databases/json-server/index.md | 5 +- .../Docs/guides/databases/mariadb/index.md | 378 ++++++++++++++++- .../Docs/guides/databases/mongodb/index.md | 2 +- .../Docs/guides/databases/neo4j/index.md | 386 +++++++++++++++-- .../Docs/guides/databases/orientdb/index.md | 378 ++++++++++++++++- .../Docs/guides/databases/postgresql/index.md | 384 ++++++++++++++++- .../guides/deployments/apache-http/index.md | 8 +- .../Docs/guides/deployments/caddy/index.md | 6 +- .../Docs/guides/deployments/nginx/index.md | 10 +- .../Docs/guides/frameworks/angular/index.md | 373 ++++++++++++++++- .../Docs/guides/frameworks/astro/index.md | 360 +++++++++++++++- .../Docs/guides/frameworks/django/index.md | 361 +++++++++++++++- .../Docs/guides/frameworks/flask/index.md | 365 +++++++++++++++- .../Docs/guides/frameworks/gatsby/index.md | 370 ++++++++++++++++- .../Docs/guides/frameworks/nestjs/index.md | 364 +++++++++++++++- .../Docs/guides/frameworks/nextjs/index.md | 359 +++++++++++++++- .../Docs/guides/frameworks/nuejs/index.md | 372 ++++++++++++++++- .../Docs/guides/frameworks/react/index.md | 361 +++++++++++++++- .../Docs/guides/frameworks/vuejs/index.md | 375 ++++++++++++++++- .../Docs/guides/games/minecraft/index.md | 8 +- .../Docs/guides/hosting/caddy/index.md | 363 +++++++++++++++- .../Docs/guides/hosting/cal_com/index.md | 387 +++++++++++++++-- .../Docs/guides/hosting/discourse/index.md | 377 ++++++++++++++++- .../Docs/guides/hosting/ghost/index.md | 4 +- .../Docs/guides/hosting/wordpress/index.md | 10 +- .../machine-learning/anythingllm/index.md | 10 +- .../guides/machine-learning/dl4j/index.md | 8 +- .../guides/machine-learning/flow/index.md | 10 +- .../machine-learning/flowiseai/index.md | 6 +- .../Docs/guides/machine-learning/h2o/index.md | 10 +- .../guides/machine-learning/h2ogpt/index.md | 8 +- .../machine-learning/h2ollmstudio/index.md | 10 +- .../guides/machine-learning/haystack/index.md | 8 +- .../guides/machine-learning/keras/index.md | 6 +- .../guides/machine-learning/localai/index.md | 6 +- .../machine-learning/mistral-7b/index.md | 6 +- .../guides/machine-learning/ml-envs/index.md | 6 +- .../guides/machine-learning/pytorch/index.md | 14 +- .../guides/machine-learning/skypilot/index.md | 4 +- .../machine-learning/tensorflow/index.md | 8 +- .../machine-learning/tensorlayer/index.md | 6 +- .../Docs/guides/science/geonetwork/index.md | 6 +- .../Docs/guides/science/matlab/index.md | 12 +- .../Docs/guides/science/octave/index.md | 6 +- .../Docs/guides/tooling/airflow/index.md | 6 +- src/content/Docs/guides/tooling/emqx/index.md | 10 +- .../Docs/guides/tooling/flink/index.md | 6 +- .../Docs/guides/tooling/jenkins/index.md | 10 +- .../guides/tooling/jetbrains_hub/index.md | 10 +- .../Docs/guides/tooling/kafka/index.md | 14 +- src/content/Docs/guides/tooling/kong/index.md | 12 +- .../guides/tooling/lightstreamer/index.md | 16 +- src/content/Docs/guides/tooling/nats/index.md | 12 +- .../Docs/guides/tooling/pulsar/index.md | 4 +- .../Docs/guides/tooling/rabbitmq/index.md | 8 +- .../Docs/guides/tooling/radicle/index.md | 6 +- .../Docs/guides/tooling/terraform/index.md | 20 +- .../Docs/guides/tooling/traefik/index.md | 6 +- 83 files changed, 9173 insertions(+), 557 deletions(-) diff --git a/src/content/Docs/deployments/akash-cli/installation/index.mdx b/src/content/Docs/deployments/akash-cli/installation/index.mdx index bce7f69c..2b30b906 100644 --- a/src/content/Docs/deployments/akash-cli/installation/index.mdx +++ b/src/content/Docs/deployments/akash-cli/installation/index.mdx @@ -541,7 +541,7 @@ You should see a response similar to: } ``` -### Find your Deployment \# +### Find your Deployment # Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. diff --git a/src/content/Docs/guides/apps/invidious/index.md b/src/content/Docs/guides/apps/invidious/index.md index 61aa5efb..8e897ed5 100644 --- a/src/content/Docs/guides/apps/invidious/index.md +++ b/src/content/Docs/guides/apps/invidious/index.md @@ -107,21 +107,369 @@ deployment: - Run the following command to initiate deployment: - ``` + - Create your Certificate - akash tx deployment create --file deployment.yaml --from your-wallet-name +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. - ``` +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** - - Monitor Deployment: - - Use the Akash CLI to check the status of your deployment: +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: - ``` +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` - akash query deployment status +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` - ``` 3. Using Akash Console: diff --git a/src/content/Docs/guides/apps/qbittorent/index.md b/src/content/Docs/guides/apps/qbittorent/index.md index 20690d24..3b14bc9d 100644 --- a/src/content/Docs/guides/apps/qbittorent/index.md +++ b/src/content/Docs/guides/apps/qbittorent/index.md @@ -1,3 +1,4 @@ + --- categories: ["Guides"] tags: ["Apps", "p2p", "file-sharing"] diff --git a/src/content/Docs/guides/benchmarking/fast_com/index.md b/src/content/Docs/guides/benchmarking/fast_com/index.md index 79c78e0c..fe90bcac 100644 --- a/src/content/Docs/guides/benchmarking/fast_com/index.md +++ b/src/content/Docs/guides/benchmarking/fast_com/index.md @@ -81,7 +81,7 @@ With the SDL file ready, you can deploy it using the Akash CLI. 1. Initialize the Deployment: Use the following command to initialize the deployment: ``` -akash tx deployment create deploy.yaml --from --node --chain-id +provider-services tx deployment create deploy.yaml --from --node --chain-id ``` Replace ``, ``, and `` with your specific configurations. @@ -89,7 +89,7 @@ Replace ``, ``, and `` with your specific c 2. Find a Provider: After initializing, find a provider that meets your requirements: ``` -akash provider lease-status --from +provider-services provider lease-status --from ``` This command will show the available providers and the status of your lease. @@ -97,13 +97,13 @@ This command will show the available providers and the status of your lease. 3. Approve the Lease: Approve the lease to start the deployment: ``` -akash tx market lease-create --from --node --chain-id +provider-services tx market lease-create --from --node --chain-id ``` 4. Monitor the Deployment: You can monitor the status of your deployment using: ``` -akash provider lease-status --from +provider-services provider lease-status --from ``` This will give you the necessary details to access your deployment. @@ -116,7 +116,7 @@ Once the deployment is live, you can access the Fast.com service via the public To terminate your deployment when it's no longer needed, use the following command: ``` -akash tx deployment close --from --node --chain-id +provider-services tx deployment close --from --node --chain-id ``` ### Using Akash Console diff --git a/src/content/Docs/guides/blockchain/solar/index.md b/src/content/Docs/guides/blockchain/solar/index.md index 852aafd4..3b00b837 100644 --- a/src/content/Docs/guides/blockchain/solar/index.md +++ b/src/content/Docs/guides/blockchain/solar/index.md @@ -76,31 +76,372 @@ deployment: count: 1 ``` -### 3. Validate the SDL File -Run the following command to ensure your SDL file is correctly formatted: +### 3. Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME ``` -akash validate deploy.yaml + +- Publish Cert to the Blockchain + ``` +provider-services tx cert publish client -from $AKASH_KEY_NAME + ### 4. Deploy the SDL to Akash -#### a. Create a Deployment -Submit the SDL file to Akash: +#### Create your Deployment +Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + ``` -akash tx deployment create deploy.yaml --from --node --chain-id +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME ``` -#### b. Query Deployment Status -Monitor the status of your deployment: +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + ``` -akash query deployment list --owner +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER ``` -#### c. Fund the Lease -Once the deployment is accepted, fund the lease with tokens: +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} ``` -akash tx deployment deposit uakt --from + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" ``` +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + + ### 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: ``` diff --git a/src/content/Docs/guides/data-analysis/dash/index.md b/src/content/Docs/guides/data-analysis/dash/index.md index 68f6eb64..4cdaec86 100644 --- a/src/content/Docs/guides/data-analysis/dash/index.md +++ b/src/content/Docs/guides/data-analysis/dash/index.md @@ -118,13 +118,13 @@ Before deploying your app on Akash, ensure you have the following prerequisites: 1. Deploy the App: ``` -akash tx deployment create deploy.yml --from your-wallet --chain-id your-chain-id +provider-services tx deployment create deploy.yml --from your-wallet --chain-id your-chain-id ``` 2. Monitor Deployment: ``` -akash query deployment list +provider-services query deployment list ``` 3. Get Service URL: After deployment, you can find your service URL and access your Dash app. diff --git a/src/content/Docs/guides/data-analysis/dataiku/index.md b/src/content/Docs/guides/data-analysis/dataiku/index.md index 5fb6aaf1..00a2ddc7 100644 --- a/src/content/Docs/guides/data-analysis/dataiku/index.md +++ b/src/content/Docs/guides/data-analysis/dataiku/index.md @@ -63,18 +63,18 @@ deployment: 1. **Initialize Deployment**: Use the Akash CLI to initialize the deployment: ``` -akash tx deployment create deploy.yaml --from $AKASH_KEY_NAME --chain-id $AKASH_CHAIN_ID --node $AKASH_NODE +provider-services tx deployment create deploy.yaml --from $AKASH_KEY_NAME --chain-id $AKASH_CHAIN_ID --node $AKASH_NODE ``` 2. **Check Lease Status**: After deploying, you need to monitor the lease and ensure it’s active. Run: ``` -akash query market lease list --owner $AKASH_ACCOUNT_ADDRESS --node $AKASH_NODE --chain-id $AKASH_CHAIN_ID +provider-services query market lease list --owner $AKASH_ACCOUNT_ADDRESS --node $AKASH_NODE --chain-id $AKASH_CHAIN_ID ``` 3. **Obtain Lease Information**: Once the lease is confirmed, fetch the details: ``` -akash query market lease status --owner $AKASH_ACCOUNT_ADDRESS --chain-id $AKASH_CHAIN_ID --node $AKASH_NODE --provider +provider-services query market lease status --owner $AKASH_ACCOUNT_ADDRESS --chain-id $AKASH_CHAIN_ID --node $AKASH_NODE --provider ``` Make sure to replace with the provider's actual address from the lease status. diff --git a/src/content/Docs/guides/data-analysis/druid/index.md b/src/content/Docs/guides/data-analysis/druid/index.md index a11989fe..b5da4da9 100644 --- a/src/content/Docs/guides/data-analysis/druid/index.md +++ b/src/content/Docs/guides/data-analysis/druid/index.md @@ -101,19 +101,19 @@ deployment: 2. **Validate the SDL File:** ```bash - akash tx deployment create deploy.yaml --from + provider-services tx deployment create deploy.yaml --from ``` 3. **Send Your Deployment to Akash:** After successful validation, use the following commands to interact with the Akash marketplace: ```bash - akash tx deployment create deploy.yaml --from + provider-services tx deployment create deploy.yaml --from ``` 4. **Approve Lease:** Once bids are received, select the appropriate provider and approve the lease: ```bash - akash tx market lease create --dseq --from + provider-services tx market lease create --dseq --from ``` --- @@ -126,7 +126,7 @@ deployment: 2. **Monitor Logs:** - Use the Akash CLI to check logs: ```bash - akash provider lease logs --dseq --from + provider-services provider lease logs --dseq --from ``` --- @@ -136,7 +136,7 @@ deployment: - To scale your deployment, update the `count` field in the SDL file for the `deployment` section. - Redeploy the updated SDL file with: ```bash - akash tx deployment update deploy.yaml --from + provider-services tx deployment update deploy.yaml --from ``` --- diff --git a/src/content/Docs/guides/data-analysis/elasticsearch/index.md b/src/content/Docs/guides/data-analysis/elasticsearch/index.md index fb573df2..0f94b522 100644 --- a/src/content/Docs/guides/data-analysis/elasticsearch/index.md +++ b/src/content/Docs/guides/data-analysis/elasticsearch/index.md @@ -62,7 +62,7 @@ Make sure you have the Akash CLI installed and configured. ``` - akash tx deployment create .yml --from --chain-id --node + provider-services tx deployment create .yml --from --chain-id --node ``` 2. **Wait for bid completion and accept the lease**: You’ll need to monitor for a bid and accept the lease using Akash CLI commands. diff --git a/src/content/Docs/guides/data-analysis/grafana/index.md b/src/content/Docs/guides/data-analysis/grafana/index.md index 3d66e140..dd3c7a29 100644 --- a/src/content/Docs/guides/data-analysis/grafana/index.md +++ b/src/content/Docs/guides/data-analysis/grafana/index.md @@ -74,7 +74,7 @@ deployment: Run the following command to ensure your SDL file is valid: ``` -akash validate deploy.yaml +provider-services validate deploy.yaml ``` --- @@ -83,20 +83,20 @@ akash validate deploy.yaml Submit the deployment to the Akash network: ``` -akash tx deployment create deploy.yaml --from --node +provider-services tx deployment create deploy.yaml --from --node ``` ### **Step 5: Bid Selection** Once your deployment is live, select a bid: ``` -akash query market lease list --owner --node +provider-services query market lease list --owner --node ``` Identify a suitable bid and accept it: ``` -akash tx market lease create --owner --dseq --oseq --gseq --provider --from +provider-services tx market lease create --owner --dseq --oseq --gseq --provider --from ``` --- @@ -105,7 +105,7 @@ akash tx market lease create --owner --dseq --gseq --oseq --provider --from + provider-services provider lease-status --dseq --gseq --oseq --provider --from ``` 2. Note the `Service URI` for the Grafana service (e.g., `http://:`). diff --git a/src/content/Docs/guides/data-analysis/jatos/index.md b/src/content/Docs/guides/data-analysis/jatos/index.md index 2cb6c608..47890485 100644 --- a/src/content/Docs/guides/data-analysis/jatos/index.md +++ b/src/content/Docs/guides/data-analysis/jatos/index.md @@ -100,11 +100,11 @@ Update the following variables in the SDL file if needed: ### 3. **Deploy to Akash** 1. **Validate SDL File**: Use the Akash CLI to validate your SDL file. ``` - akash tx deployment create deploy.yaml --from + provider-services tx deployment create deploy.yaml --from ``` 2. **Query Deployment**: Check the status of your deployment. ``` - akash query market lease list --owner + provider-services query market lease list --owner ``` 3. **Accept a Bid**: Once a provider submits a bid, accept it. diff --git a/src/content/Docs/guides/data-analysis/jupyterhub/index.md b/src/content/Docs/guides/data-analysis/jupyterhub/index.md index 154f3170..fa09ca25 100644 --- a/src/content/Docs/guides/data-analysis/jupyterhub/index.md +++ b/src/content/Docs/guides/data-analysis/jupyterhub/index.md @@ -85,21 +85,21 @@ deployment: Use the Akash CLI to deploy the SDL file. ``` -akash tx deployment create deploy.yaml --from +provider-services tx deployment create deploy.yaml --from ``` ### 4. **Accept a Bid** Once a provider bids on your deployment, accept the bid to launch the service: ``` -akash tx market lease create --dseq --from +provider-services tx market lease create --dseq --from ``` ### 5. **Access JupyterHub** After deployment, obtain the service endpoint by running: ``` -akash provider lease-status --dseq --from +provider-services provider lease-status --dseq --from ``` The endpoint will look something like `http://:`. Use this in your browser to access JupyterHub. diff --git a/src/content/Docs/guides/data-analysis/kibana/index.md b/src/content/Docs/guides/data-analysis/kibana/index.md index 197fc0dd..450ea5b2 100644 --- a/src/content/Docs/guides/data-analysis/kibana/index.md +++ b/src/content/Docs/guides/data-analysis/kibana/index.md @@ -65,11 +65,11 @@ curl https://raw.githubusercontent.com/ovrclk/akash/master/godownloader.sh | sh 2. **Authenticate with Akash using your wallet**: ``` -akash tx authz grant --from --keyring-backend +provider-services tx authz grant --from --keyring-backend ``` 3. **Submit the Deployment**: ``` -akash tx deployment create --owner --from --dseq --keyring-backend --node https://rpc-akash..org --chain-id akashnet-2 --file kibana_deployment.yaml +provider-services tx deployment create --owner --from --dseq --keyring-backend --node https://rpc-akash..org --chain-id akashnet-2 --file kibana_deployment.yaml ``` 4. **Approve the Bid and Lease**: Use Akash CLI or Akashlytics to view and accept bids for your deployment. Once you find a provider, you can finalize the lease. diff --git a/src/content/Docs/guides/data-analysis/knime/index.md b/src/content/Docs/guides/data-analysis/knime/index.md index afe5f277..b317b49c 100644 --- a/src/content/Docs/guides/data-analysis/knime/index.md +++ b/src/content/Docs/guides/data-analysis/knime/index.md @@ -89,14 +89,14 @@ deployment: - Use the Akash CLI to submit your deployment: ``` -akash tx deployment create deploy.yaml --from --node +provider-services tx deployment create deploy.yaml --from --node ``` 2. **Set Up Lease**: - Once deployed, create a lease with the provider to make your service accessible: ``` -akash tx deployment lease create --from --node +provider-services tx deployment lease create --from --node ``` 3. **Access KNIME**: diff --git a/src/content/Docs/guides/data-analysis/matomo/index.md b/src/content/Docs/guides/data-analysis/matomo/index.md index 0d663b06..de6a80e0 100644 --- a/src/content/Docs/guides/data-analysis/matomo/index.md +++ b/src/content/Docs/guides/data-analysis/matomo/index.md @@ -111,32 +111,32 @@ deployment: ### **2. Validate the SDL File** Run the following command to validate the SDL file: ``` -akash deployment sdl validate deploy.yaml +provider-services deployment sdl validate deploy.yaml ``` ### **3. Create the Deployment** Create the deployment using: ``` -akash tx deployment create deploy.yaml --from --chain-id --node +provider-services tx deployment create deploy.yaml --from --chain-id --node ``` ### **4. Bid for Deployment** Wait for providers to submit bids and select a provider: ``` -akash tx market lease create --dseq --oseq 1 --gseq 1 --from +provider-services tx market lease create --dseq --oseq 1 --gseq 1 --from ``` ### **5. Retrieve Lease Information** After the lease is created, get the lease information: ``` -akash query market lease list --owner +provider-services query market lease list --owner ``` ### **6. Access Matomo** Once deployed: 1. Retrieve the service URL or IP using: ``` - akash provider service-status --provider --dseq --from + provider-services provider service-status --provider --dseq --from ``` 2. Configure your domain (if applicable) to point to the service's external IP. diff --git a/src/content/Docs/guides/data-analysis/opensearch/index.md b/src/content/Docs/guides/data-analysis/opensearch/index.md index da27dffa..a4e1ac0a 100644 --- a/src/content/Docs/guides/data-analysis/opensearch/index.md +++ b/src/content/Docs/guides/data-analysis/opensearch/index.md @@ -72,7 +72,7 @@ deployment: 1. **Upload the SDL File:** Run the following command to validate and create a deployment from your SDL file: ``` - akash tx deployment create deploy.yaml --from --chain-id --node + provider-services tx deployment create deploy.yaml --from --chain-id --node ``` 2. **Wait for Deployment Approval:** @@ -81,13 +81,13 @@ deployment: 3. **Lease the Deployment:** Once a bid is accepted, lease the deployment by running: ``` - akash tx market lease create --dseq --oseq 1 --gseq 1 --from + provider-services tx market lease create --dseq --oseq 1 --gseq 1 --from ``` 4. **Query Lease Details:** Use the following command to get the deployment’s IP address: ``` - akash provider lease-status --dseq --oseq 1 --gseq 1 --provider + provider-services provider lease-status --dseq --oseq 1 --gseq 1 --provider ``` --- diff --git a/src/content/Docs/guides/data-analysis/rstudio/index.md b/src/content/Docs/guides/data-analysis/rstudio/index.md index 81b99a58..42786bae 100644 --- a/src/content/Docs/guides/data-analysis/rstudio/index.md +++ b/src/content/Docs/guides/data-analysis/rstudio/index.md @@ -74,7 +74,7 @@ Replace `` with a secure password of your choice. This wi - Run the following command to initialize the deployment: ``` -akash tx deployment create deploy-rstudio.yaml --from --chain-id --node +provider-services tx deployment create deploy-rstudio.yaml --from --chain-id --node ``` 3. **Monitor the Deployment** diff --git a/src/content/Docs/guides/data-analysis/superset/index.md b/src/content/Docs/guides/data-analysis/superset/index.md index b3c13130..3f7c20c1 100644 --- a/src/content/Docs/guides/data-analysis/superset/index.md +++ b/src/content/Docs/guides/data-analysis/superset/index.md @@ -78,27 +78,27 @@ Update the following placeholders in the `deploy.yaml` file: 1. Initialize the deployment by creating an Akash deployment with the deploy.yml file: ``` -akash tx deployment create deploy.yml --from --chain-id --node +provider-services tx deployment create deploy.yml --from --chain-id --node ``` 2. Verify the deployment status to check if it is live: ``` -akash query deployment list --owner +provider-services query deployment list --owner ``` 3. Find and accept a bid by checking available bids for your deployment and accepting one: ``` -akash query market bid list --owner +provider-services query market bid list --owner # Accept a bid -akash tx market lease create --from --dseq --oseq --gseq --provider +provider-services tx market lease create --from --dseq --oseq --gseq --provider ``` 4. Retrieve the lease endpoint to access your Apache Superset instance: ``` - akash query market lease status --owner --provider --dseq --gseq --oseq + provider-services query market lease status --owner --provider --dseq --gseq --oseq ``` The endpoint will provide the public IP or domain where you can access your Apache Superset instance. Navigate to this address in your web browser to start using Apache Superset. diff --git a/src/content/Docs/guides/databases/anzograph/index.md b/src/content/Docs/guides/databases/anzograph/index.md index 71b87d65..97c87da7 100644 --- a/src/content/Docs/guides/databases/anzograph/index.md +++ b/src/content/Docs/guides/databases/anzograph/index.md @@ -87,25 +87,372 @@ deployment: ### **3. Steps to Deploy** -1. **Validate SDL File**: - Ensure the syntax is correct by running: - ```bash - akash tx deployment create deploy.yaml --from - ``` +- Create your Certificate -2. **Upload the SDL File**: - Deploy the service using: - ```bash - akash deployment create deploy.yaml - ``` +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` -3. **Monitor Deployment**: - Track the deployment status: - ```bash - akash query deployment get --owner --dseq ``` -4. **Access AnzoGraph**: +### Access AnzoGraph: Once the deployment is successful, you will be provided with the service endpoint. Access AnzoGraph's admin interface or SPARQL endpoint via the exposed ports (default `80` and `9000`). --- diff --git a/src/content/Docs/guides/databases/arangodb/index.md b/src/content/Docs/guides/databases/arangodb/index.md index b3fc2eaa..31febe39 100644 --- a/src/content/Docs/guides/databases/arangodb/index.md +++ b/src/content/Docs/guides/databases/arangodb/index.md @@ -76,36 +76,374 @@ deployment: Ensure you have the Akash CLI installed and configured on your machine. Follow the [official Akash CLI installation guide](#) if you haven’t already. 2. **Create the SDL File** - Copy the above SDL into a file named `deploy.yml`. Customize the environment variables, such as `ARANGO_ROOT_PASSWORD`, and ensure the `placement` section reflects the regions and providers you wish to deploy to. + Copy the above SDL into a file named `deploy.yaml`. Customize the environment variables, such as `ARANGO_ROOT_PASSWORD`, and ensure the `placement` section reflects the regions and providers you wish to deploy to. -3. **Validate the SDL** - Run the following command to ensure your SDL file is valid: - ```bash - akash validate deploy.yml - ``` +- Create your Certificate -4. **Send the Deployment to Akash** - Deploy your application by creating a deployment: - ```bash - akash tx deployment create deploy.yml --from --chain-id --node - ``` - Replace ``, ``, and `` with your Akash account details. +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. -5. **Bid Acceptance** - Monitor bids for your deployment and accept a provider’s bid: - ```bash - akash query market bid list --owner - akash tx market lease create --owner --dseq --from - ``` +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** -6. **Access Your Deployment** - After accepting the bid and starting the deployment, retrieve the deployment's endpoint: - ```bash - akash query deployment get - ``` - Access ArangoDB via the public endpoint on port `80` (or the port you specified in the SDL). -7. **Secure Your Database** +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Access ArangoDB via the public endpoint on port `80` (or the port you specified in the SDL). + +- Secure Your Database** - Use a strong password for `ARANGO_ROOT_PASSWORD`. - Restrict access by deploying a reverse proxy or firewall configuration to limit exposure of the database. diff --git a/src/content/Docs/guides/databases/cockroachdb/index.md b/src/content/Docs/guides/databases/cockroachdb/index.md index 8857a8b0..c28ced8b 100644 --- a/src/content/Docs/guides/databases/cockroachdb/index.md +++ b/src/content/Docs/guides/databases/cockroachdb/index.md @@ -82,13 +82,369 @@ deployment: --- ### 3. Deploy the SDL File -1. Open a terminal and deploy the SDL file using the Akash CLI: - ``` - akash tx deployment create deploy.yaml --from --node https://rpc.akash.network --chain-id - ``` -2. Wait for the deployment to initialize. You can monitor the status with: - ``` - akash query deployment list --owner +- Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + ``` ### 4. Access CockroachDB diff --git a/src/content/Docs/guides/databases/couchbase/index.md b/src/content/Docs/guides/databases/couchbase/index.md index c32cfba9..14116e82 100644 --- a/src/content/Docs/guides/databases/couchbase/index.md +++ b/src/content/Docs/guides/databases/couchbase/index.md @@ -113,23 +113,371 @@ deployment: ### **3. Deploy the SDL File** -1. **Validate the SDL File:** - Run the following command to ensure your SDL file is correctly formatted: - ``` - akash tx deployment validate - ``` - -2. **Create the Deployment:** - Deploy the Couchbase service: - ``` - akash tx deployment create --from --chain-id --node - ``` - -3. **Bid and Lease Management:** - - Wait for providers to bid on your deployment. - - Select a provider and create a lease. - -4. **Access Your Couchbase Service:** +- Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + + + - Access Your Couchbase Service: Once the lease is created, you'll receive the endpoint information. Use it to access Couchbase's web UI on `http://:8091`. --- diff --git a/src/content/Docs/guides/databases/couchdb/index.md b/src/content/Docs/guides/databases/couchdb/index.md index c6856d44..e708ddf8 100644 --- a/src/content/Docs/guides/databases/couchdb/index.md +++ b/src/content/Docs/guides/databases/couchdb/index.md @@ -82,39 +82,369 @@ Save this file as `deploy.yaml`. **Step 1: Authenticate with Akash** -First, authenticate your Akash account: +- Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + ``` -akash tx authz grant --msg-type --from --node +provider-services tx cert generate client -from $AKASH_KEY_NAME ``` -Replace ``, ``,` `, and `` with your specific values. +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` -**Step 2: Create and Fund a Deployment** +- Create your Deployment -Upload your `deploy.yaml` SDL file: +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: ``` -akash tx deployment create deploy.yaml --from +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME ``` -Fund your deployment with AKT: +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 ``` -akash tx deployment deposit uakt --from + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ ``` -Wait for the deployment to be accepted by a provider. +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: -**Step 3: Monitor and Access CouchDB** +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` -Once the deployment is active, retrieve the access details: +- Send Updated Manifest to Provider ``` -akash query deployment get +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME ``` -You’ll receive the public IP or domain for accessing CouchDB. For a more detailed CLI deployment guide, refer to [Akash CLI Deployment Guide](/docs/getting-started/quickstart-guides/akash-cli/) on the Akash documentation site. diff --git a/src/content/Docs/guides/databases/dolt/index.md b/src/content/Docs/guides/databases/dolt/index.md index 630b43e6..d77771f6 100644 --- a/src/content/Docs/guides/databases/dolt/index.md +++ b/src/content/Docs/guides/databases/dolt/index.md @@ -101,15 +101,14 @@ You may deploy to Akash either via the CLI or the Console ### Deploying via Akash CLI 1. Initialize Your Akash Deployment: - ``` -akash tx deployment create deploy.yaml --from +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME ``` 2. Check the Deployment Status: ``` -akash query deployment get --owner --dseq +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER ``` Make sure your deployment is active and ready. diff --git a/src/content/Docs/guides/databases/influxdb/index.md b/src/content/Docs/guides/databases/influxdb/index.md index fbe1424c..00901c66 100644 --- a/src/content/Docs/guides/databases/influxdb/index.md +++ b/src/content/Docs/guides/databases/influxdb/index.md @@ -89,25 +89,373 @@ Save it as `deploy.yaml`. ### **3. Deploy on Akash** -1. **Validate the SDL File**: - Run the following command to validate the SDL file: - ```bash - akash tx deployment create deployment.yml --from --chain-id --node - ``` +- Create your Certificate -2. **Wait for Bidding**: - After deploying the SDL file, Akash providers will bid on your deployment. Accept a suitable bid. +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. -3. **Get the Lease**: - Once the bid is accepted, obtain the lease for your deployment: - ```bash - akash query market lease list --owner - ``` +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` -4. **Access the Deployment**: +### **4. Access the **Deployment**: Retrieve the external IP or URL assigned to your service. The InfluxDB API/UI will be accessible on port **80** or the domain configured by the Akash provider. -### **4. Verify the Deployment** +### Verify the Deployment** 1. **Access InfluxDB**: Open the assigned domain or IP in a web browser or use `curl`: diff --git a/src/content/Docs/guides/databases/json-server/index.md b/src/content/Docs/guides/databases/json-server/index.md index 26cf8ff5..d5d3fac6 100644 --- a/src/content/Docs/guides/databases/json-server/index.md +++ b/src/content/Docs/guides/databases/json-server/index.md @@ -27,7 +27,7 @@ Download and edit the YAML file [here](https://github.com/akash-network/awesome- ``` -akash tx deployment create deploy.yml --from --node https://rpc-akash.chain-1.com --chain-id akashnet-2 --fees 5000uakt +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME ``` @@ -36,8 +36,7 @@ akash tx deployment create deploy.yml --from --node https:/ ``` -akash query deployment get - +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER ``` diff --git a/src/content/Docs/guides/databases/mariadb/index.md b/src/content/Docs/guides/databases/mariadb/index.md index 3afc2792..4dd4d495 100644 --- a/src/content/Docs/guides/databases/mariadb/index.md +++ b/src/content/Docs/guides/databases/mariadb/index.md @@ -79,21 +79,369 @@ deployment: - Set `amount` in the `pricing` section according to your budget. ### **4. Deploy to Akash** -1. **Submit the SDL file to Akash**: - ```bash - akash tx deployment create deploy.yaml --from --node --chain-id - ``` -2. **Wait for deployment approval**. Once approved, note the lease ID. - -3. **Access the logs** to verify MariaDB is running: - ```bash - akash provider lease-logs --node --chain-id --dseq --gseq --oseq - ``` - -4. **Retrieve the public IP/endpoint** of the deployment for connecting to the database: - ```bash - akash provider lease-status --node --chain-id --dseq - ``` +- Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + ### **5. Connect to MariaDB** Use a MariaDB client or your application to connect to the database instance. The connection string will look like: diff --git a/src/content/Docs/guides/databases/mongodb/index.md b/src/content/Docs/guides/databases/mongodb/index.md index 17b09cef..110b124e 100644 --- a/src/content/Docs/guides/databases/mongodb/index.md +++ b/src/content/Docs/guides/databases/mongodb/index.md @@ -87,7 +87,7 @@ deployment: 1. Retrieve the service endpoint using: ```bash - akash query deployment get + provider-services lease-status --dseq $AKASH_DSEQ --from $AKASH_KEY_NAME --provider $AKASH_PROVIDER ``` 2. Connect to MongoDB using a MongoDB client or CLI: ```bash diff --git a/src/content/Docs/guides/databases/neo4j/index.md b/src/content/Docs/guides/databases/neo4j/index.md index 47305d15..4e8416a9 100644 --- a/src/content/Docs/guides/databases/neo4j/index.md +++ b/src/content/Docs/guides/databases/neo4j/index.md @@ -83,29 +83,369 @@ deployment: ## **Step 2: Deploy on Akash** -1. **Create the deployment:** - Run the following command to create a deployment from the `deploy.yaml` file: - ``` - akash tx deployment create deploy.yaml --from --node --chain-id - ``` - -2. **Monitor the deployment:** - After the deployment is created, query its status: - ``` - akash query deployment list --owner - ``` - -3. **Bid on the deployment:** - Wait for providers to bid on your deployment. Accept a bid with: - ``` - akash tx market lease create --owner --dseq --from - ``` - -4. **Get the service endpoint:** - Once the lease is created, retrieve the service endpoint using: - ``` - akash query market lease-status --owner --dseq --node - ``` +- Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + --- diff --git a/src/content/Docs/guides/databases/orientdb/index.md b/src/content/Docs/guides/databases/orientdb/index.md index 1a8b328c..1f7f2163 100644 --- a/src/content/Docs/guides/databases/orientdb/index.md +++ b/src/content/Docs/guides/databases/orientdb/index.md @@ -89,34 +89,370 @@ deployment: ### **2. Steps to Deploy OrientDB** #### **Step 1: Deploy the SDL File** -1. Save the `deploy.yaml` file in your local directory. -2. Deploy it using the Akash CLI: +- Save the `deploy.yaml` file in your local directory. +- Create your Certificate - ```bash - akash tx deployment create deploy.yaml --from --node - ``` +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. -#### **Step 2: Wait for the Deployment** -- After submitting, wait for the deployment to propagate across the network. -- Confirm the deployment status with: +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** - ```bash - akash query deployment list --owner - ``` -#### **Step 3: Accept a Bid** -- Once providers offer their bids, accept a bid to proceed: +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: - ```bash - akash tx market lease create --dseq --gseq --oseq --from - ``` +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` -#### **Step 4: Access the Application** -- After the deployment is active, retrieve the lease details: +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` - ```bash - akash query market lease list --owner - ``` - Access OrientDB using its exposed endpoints: - Binary Protocol: `tcp://:2424` diff --git a/src/content/Docs/guides/databases/postgresql/index.md b/src/content/Docs/guides/databases/postgresql/index.md index b1a0d10a..7747a2fd 100644 --- a/src/content/Docs/guides/databases/postgresql/index.md +++ b/src/content/Docs/guides/databases/postgresql/index.md @@ -94,28 +94,368 @@ deployment: #### **Steps to Deploy** -1. **Validate the SDL File**: - - Run the following command to ensure your SDL file is valid: - ```bash - akash deploy validate .yaml - ``` - -2. **Create the Deployment**: - - Deploy the PostgreSQL service using: - ```bash - akash tx deployment create .yaml --from - ``` - -3. **Bid on the Deployment**: - - After creating the deployment, Akash providers will bid on your job. - - Accept a bid to finalize the deployment. - -4. **Access the PostgreSQL Service**: - - Use the lease details to retrieve the service’s public endpoint. - - Connect to the PostgreSQL instance using a client or application: - ```bash - psql -h -U -d - ``` +- Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` --- diff --git a/src/content/Docs/guides/deployments/apache-http/index.md b/src/content/Docs/guides/deployments/apache-http/index.md index 409b4b91..5c09dd85 100644 --- a/src/content/Docs/guides/deployments/apache-http/index.md +++ b/src/content/Docs/guides/deployments/apache-http/index.md @@ -69,23 +69,23 @@ deployment: - Run the following command to create the deployment: ``` - akash tx deployment create deploy.yaml --from --node --chain-id --fees + provider-services tx deployment create deploy.yaml --from --node --chain-id --fees ``` 2. Bid Selection: - Monitor the bids for your deployment using: ``` -akash query market bid list --owner +provider-services query market bid list --owner ``` 3. Accept a bid with: ``` - akash tx market lease create --bid-id --from --fees + provider-services tx market lease create --bid-id --from --fees ``` 4. Verify Lease: - Confirm the lease creation with: ``` - akash query market lease list --owner + provider-services query market lease list --owner ``` 5. Access Deployment: diff --git a/src/content/Docs/guides/deployments/caddy/index.md b/src/content/Docs/guides/deployments/caddy/index.md index 0e1ff497..349d6c8f 100644 --- a/src/content/Docs/guides/deployments/caddy/index.md +++ b/src/content/Docs/guides/deployments/caddy/index.md @@ -72,16 +72,16 @@ deployment: 1. Validate the SDL File: ``` -akash deployment validate deploy.yaml +provider-services deployment validate deploy.yaml ``` 2. Create Deployment: ``` -akash tx deployment create deploy.yaml --from --chain-id --node --fees uakt +provider-services tx deployment create deploy.yaml --from --chain-id --node --fees uakt ``` 3. Query Lease: After creating the deployment, query the lease to ensure it’s active: ``` - akash query market lease list --owner --node + provider-services query market lease list --owner --node ``` 4. Access the Deployment: Note the endpoint provided in the lease logs. Use this URL to access your Caddy instance. diff --git a/src/content/Docs/guides/deployments/nginx/index.md b/src/content/Docs/guides/deployments/nginx/index.md index e4a80613..d87b1bcd 100644 --- a/src/content/Docs/guides/deployments/nginx/index.md +++ b/src/content/Docs/guides/deployments/nginx/index.md @@ -70,25 +70,25 @@ deployment: 1. **Authenticate and prepare your environment**: ``` -akash tx authz grant --from +provider-services tx authz grant --from ``` Replace `` and `` with your provider's address and your wallet name. 2. **Submit the SDL file for deployment**: ``` -akash tx deployment create deploy.yaml --from +provider-services tx deployment create deploy.yaml --from ``` 3. **Bid on a provider: Run this command to find available bids**: ``` -akash query market bid list --owner +provider-services query market bid list --owner ``` 4. **Accept a bid and deploy**: ``` -akash tx market lease create --bid-id --from +provider-services tx market lease create --bid-id --from ``` 5. **Check deployment status**: ``` - akash query market lease status --owner --dseq + provider-services query market lease status --owner --dseq ``` 6. **Access your Nginx server**: Use the provided endpoint to access your running Nginx server. diff --git a/src/content/Docs/guides/frameworks/angular/index.md b/src/content/Docs/guides/frameworks/angular/index.md index 1c7677df..643d928b 100644 --- a/src/content/Docs/guides/frameworks/angular/index.md +++ b/src/content/Docs/guides/frameworks/angular/index.md @@ -106,18 +106,369 @@ deployment: 3. **Deploy the App**: - - **Upload the SDL file**: + - Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` - ``` - akash tx deployment create deployment.yaml --from - ``` - - **Check the Status**: Monitor the status of your deployment with: - ``` - akash query deployment get - ``` - - **Get the Lease**: Once the deployment is created, obtain a lease for it: - ``` - akash tx market lease create --owner --dseq --gseq 1 --oseq 1 --provider ``` 4. **Access the Application**: Once your deployment is live, you can access your Angular application through the public URL provided by the Akash provider. diff --git a/src/content/Docs/guides/frameworks/astro/index.md b/src/content/Docs/guides/frameworks/astro/index.md index d8066a9c..37b4782f 100644 --- a/src/content/Docs/guides/frameworks/astro/index.md +++ b/src/content/Docs/guides/frameworks/astro/index.md @@ -88,40 +88,370 @@ You can deploy your app either using the Akash CLI or the Akash Console. ### Option 1: Deploy Using Akash CLI -1. **Install Akash CLI**: +- Create your Certificate -If you haven’t installed the Akash CLI yet, you can find the installation instructions [here](/docs/getting-started/quickstart-guides/akash-cli/). +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. -2. **Create a Deployment**: +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** -First, ensure you have the SDL file saved as `deploy.yaml` in your project directory. Then, run the following commands: ``` -akash tx deployment create deployment.yaml --from --node --chain-id +provider-services tx cert generate client -from $AKASH_KEY_NAME ``` -Replace ``, ``, and `` with your actual wallet name, the Akash node URL, and chain ID, respectively. +- Publish Cert to the Blockchain -3. **Create a Lease**: +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support -After the deployment is created, create a lease for it: +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: ``` -akash tx market lease create --dseq --from --node --chain-id +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME ``` -You can find your `dseq` (deployment sequence) from the output of the previous command. -4. **Upload Your App Files**: +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` -Now, upload the built Astro app files (`dist` directory) to the deployment: +- Find your Deployment \- +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS ``` -akash provider send-manifest --dseq --from + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 ``` -5. **Access Your Application**: +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` -Once the deployment is successful, you can access your application via the Akash URL provided in the lease response. +- **Access Your Application**: Once the deployment is successful, you can access your application via the Akash URL provided in the lease response. ### Option 2: Deploy Using Akash Console diff --git a/src/content/Docs/guides/frameworks/django/index.md b/src/content/Docs/guides/frameworks/django/index.md index d60fbeb8..20c932ec 100644 --- a/src/content/Docs/guides/frameworks/django/index.md +++ b/src/content/Docs/guides/frameworks/django/index.md @@ -103,16 +103,369 @@ deployment: ## Step 4: Deploy to Akash Using the CLI -1. **Initialize Deployment**: +- Create your Certificate +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal ``` -akash tx deployment create deploy.yaml --from --node --chain-id --fees 5000uakt + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER ``` -2. **Wait for the Deployment to Match with a Provider**: Check for available providers using: +- Create a Lease +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME ``` -akash query market lease list --owner + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + ``` diff --git a/src/content/Docs/guides/frameworks/flask/index.md b/src/content/Docs/guides/frameworks/flask/index.md index 5efd7e08..f17183a2 100644 --- a/src/content/Docs/guides/frameworks/flask/index.md +++ b/src/content/Docs/guides/frameworks/flask/index.md @@ -122,26 +122,369 @@ docker push your-dockerhub-username/my-flask-app:latest ## Step 5: Deploy on Akash -1. **Create Deployment** Use the Akash CLI to create the deployment: +- Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + ``` -akash tx deployment create deploy.yaml --from --node --chain-id --fees 5000uakt +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME ``` -2. **Approve Lease** After creating the deployment, view bids: + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} ``` -akash query market bid list --owner + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS ``` -Select a provider and approve the lease: + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 ``` -akash tx market lease create --dseq --from --provider --node --chain-id --fees 5000uakt + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + ``` -3. **Access Your App** Once the lease is approved, Akash will provide an external URL or IP for accessing the deployed Flask app. +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider -## Step 6: Verify Deployment -1. **Check Logs** To debug any issues: ``` -akash logs --dseq --gseq --oseq +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME ``` -2. **Test Application** Visit the external URL or IP in a browser to ensure the Flask app is running. +- **Test Application** Visit the external URL or IP in a browser to ensure the Flask app is running. ## Optional Enhancements diff --git a/src/content/Docs/guides/frameworks/gatsby/index.md b/src/content/Docs/guides/frameworks/gatsby/index.md index 5ca8ad42..f026fef9 100644 --- a/src/content/Docs/guides/frameworks/gatsby/index.md +++ b/src/content/Docs/guides/frameworks/gatsby/index.md @@ -104,17 +104,373 @@ Before deployment, host the public/ files on your image. For example: ## Option B: Akash CLI -1. Install the Akash CLI by following the [CLI Installation Guide](docs/getting-started/quickstart-guides/akash-cli/). -2. Fund your wallet to pay for deployment fees. -3. Deploy your app: +- Install the Akash CLI by following the [CLI Installation Guide](docs/getting-started/quickstart-guides/akash-cli/). +- Fund your wallet to pay for deployment fees. +- Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + ``` -akash tx deployment create deploy.yaml --from YOUR_WALLET --chain-id akashnet-2 +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME ``` -4. Monitor the status: + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} ``` -akash query deployment list --owner YOUR_WALLET + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + ``` -5. Once the lease is active, access your app via the provider’s endpoint. +- Once the lease is active, access your app via the provider’s endpoint. ## 4. Test Your Deployment diff --git a/src/content/Docs/guides/frameworks/nestjs/index.md b/src/content/Docs/guides/frameworks/nestjs/index.md index c4ce0e6c..6d9397f7 100644 --- a/src/content/Docs/guides/frameworks/nestjs/index.md +++ b/src/content/Docs/guides/frameworks/nestjs/index.md @@ -125,11 +125,369 @@ Replace `my-nestjs-app` with the name of your image in a public Docker registry ### Step 3.2: Deploy Using Akash CLI 1. Install Akash CLI by following Akash CLI Installation Guideenticate your wallet by following Wallet Authentication . -2. Deploy `deploy.yaml` using the commands below: +2. - Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + ``` -akash tx deployment create deploy.yaml --from --node +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + ``` -Detailed CLI deployment instructions are available [here](docs/getting-started/quickstart-guides/akash-cli/). +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + ### Step 3.3: Deploy Using Akash Web Console diff --git a/src/content/Docs/guides/frameworks/nextjs/index.md b/src/content/Docs/guides/frameworks/nextjs/index.md index 2e550235..b4b4ec3d 100644 --- a/src/content/Docs/guides/frameworks/nextjs/index.md +++ b/src/content/Docs/guides/frameworks/nextjs/index.md @@ -179,31 +179,370 @@ deployment: Replace `your-dockerhub-username/my-nextjs-app` with your actual Docker Hub username and image name. -3. Deploy Your Application: +- Create your Certificate -Run the following commands to deploy your application: +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS ``` -akash tx deployment create deploy.yaml --from -akash tx deployment send-manifest deploy.yaml --from +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt ``` -Follow the instructions in the CLI to complete the deployment process. +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: -4. Monitor Your Deployment: +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` -Use the Akash CLI to monitor the status of your deployment: +Verify we have the right value populated by running: ``` -akash query deployment get +echo $AKASH_PROVIDER ``` -You can also check the logs of your service: + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: ``` -akash query provider log --provider +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ ``` +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + + ### Option 2: Deploy Using Akash Console 1. Access the Akash Console: diff --git a/src/content/Docs/guides/frameworks/nuejs/index.md b/src/content/Docs/guides/frameworks/nuejs/index.md index ac66cd7b..d88a10e2 100644 --- a/src/content/Docs/guides/frameworks/nuejs/index.md +++ b/src/content/Docs/guides/frameworks/nuejs/index.md @@ -103,14 +103,370 @@ deployment: 2. **Create and deploy your app**: - Fund your wallet: Follow the guide to fund your wallet. - - Deploy the SDL: - ``` - akash tx deployment create deploy.yaml --from --node https://rpc.akash.network:443 --chain-id akashnet-2 - ``` - - Monitor deployment logs and get the lease ID: - ``` - akash query deployment list --owner --node https://rpc.akash.network:443 - ``` + - Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + + ### Option 2: Using the Akash Console diff --git a/src/content/Docs/guides/frameworks/react/index.md b/src/content/Docs/guides/frameworks/react/index.md index cdbd73e6..671f062a 100644 --- a/src/content/Docs/guides/frameworks/react/index.md +++ b/src/content/Docs/guides/frameworks/react/index.md @@ -129,32 +129,369 @@ deployment: ## Step 4: Deploying Using Akash CLI -### 1. Authenticate with your Akash wallet: +- Create your Certificate +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open ``` -akash keys add my-key -akash wallet send --from --to --amount 500000uakt + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + ``` -### 2. Create and Fund a Deployment: +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: ``` -akash tx deployment create deploy.yml --from my-key -akash tx deployment deposit 500000uakt --from my-key +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal ``` -### 3. Check Lease Status: +Verify we have the right value populated by running: ``` -akash query market lease list --owner +echo $AKASH_PROVIDER ``` -### 4. Get the Service URI: +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: ``` -akash provider send-manifest --from my-key -akash query provider service-logs --from --service web --deployment --lease +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ ``` -### 5. Access Your Deployed App: The service URI will be displayed. You can access your React app using this URI. + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + ## Step 5: Deploying Using Akash Console diff --git a/src/content/Docs/guides/frameworks/vuejs/index.md b/src/content/Docs/guides/frameworks/vuejs/index.md index 9fd3ac8a..f90da9d1 100644 --- a/src/content/Docs/guides/frameworks/vuejs/index.md +++ b/src/content/Docs/guides/frameworks/vuejs/index.md @@ -98,27 +98,374 @@ Save this file as `deploy.yaml`. Option 1: Using Akash CLI -1. Install Akash CLI: Follow the guide [here](docs/getting-started/quickstart-guides/akash-cli/) to set up the CLI. +- Install Akash CLI: Follow the guide [here](docs/getting-started/quickstart-guides/akash-cli/) to set up the CLI. -2. Fund Your Account: Fund your Akash wallet to cover deployment costs. Instructions can be found [here](http://localhost:4321/docs/getting-started/token-and-wallets/). +- Fund Your Account: Fund your Akash wallet to cover deployment costs. Instructions can be found [here](http://localhost:4321/docs/getting-started/token-and-wallets/). -3. Deploy: - - Create a deployment: +- Create your Certificate - ``` - akash tx deployment create deploy.yaml --from --chain-id +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: - ``` - - Review bids and accept: - ``` - akash query market lease list --owner - akash tx market lease create --from --chain-id --provider --dseq --gseq 1 --oseq 1 - ``` -4. Monitor Deployment: Use akash logs to verify the deployment: ``` -akash provider lease-logs --from --provider --dseq +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME ``` +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + + ## Option 2: Using Akash Console 1. **Access the Console**: Visit the [Akash Console](https://console.akash.network/). diff --git a/src/content/Docs/guides/games/minecraft/index.md b/src/content/Docs/guides/games/minecraft/index.md index 2481b5dd..70536381 100644 --- a/src/content/Docs/guides/games/minecraft/index.md +++ b/src/content/Docs/guides/games/minecraft/index.md @@ -92,19 +92,19 @@ Use the Akash CLI to deploy your server. 1. **Create the Deployment:** ```bash - akash tx deployment create --from --chain-id + provider-services tx deployment create --from --chain-id ``` 2. **Bid for Resources:** Wait for providers to respond with bids. Accept a bid using the CLI: ```bash - akash tx market lease create --dseq --from --chain-id + provider-services tx market lease create --dseq --from --chain-id ``` 3. **Monitor the Deployment:** Use the following command to check the status of your deployment: ```bash - akash query market lease list --owner + provider-services query market lease list --owner ``` --- @@ -122,7 +122,7 @@ To manage or update your Minecraft server: - Redeploy the updated SDL using the Akash CLI. - Use the Akash logs to monitor server activity: ```bash - akash logs --dseq --from + provider-services logs --dseq --from ``` --- diff --git a/src/content/Docs/guides/hosting/caddy/index.md b/src/content/Docs/guides/hosting/caddy/index.md index dcb65dd4..fa4a4062 100644 --- a/src/content/Docs/guides/hosting/caddy/index.md +++ b/src/content/Docs/guides/hosting/caddy/index.md @@ -70,20 +70,369 @@ deployment: ## Step 2: Deploy Using Akash CLI -1. Validate the SDL File: +- Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER ``` -akash deployment validate deploy.yaml + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" ``` -2. Create Deployment: +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + ``` -akash tx deployment create deploy.yaml --from --chain-id --node --fees uakt +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME ``` -3. Query Lease: After creating the deployment, query the lease to ensure it’s active: + +- Send Updated Manifest to Provider + ``` - akash query market lease list --owner --node +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME ``` -4. Access the Deployment: Note the endpoint provided in the lease logs. Use this URL to access your Caddy instance. + For detailed steps on using the CLI, refer to the Akash CLI Deployment Guide. diff --git a/src/content/Docs/guides/hosting/cal_com/index.md b/src/content/Docs/guides/hosting/cal_com/index.md index ecfff988..7b47b509 100644 --- a/src/content/Docs/guides/hosting/cal_com/index.md +++ b/src/content/Docs/guides/hosting/cal_com/index.md @@ -119,28 +119,369 @@ Replace the following placeholders: ### **Step 3: Deploy to Akash** -1. **Validate the SDL file**: - ```bash - akash deployment validate .yaml - ``` +1- Create your Certificate -2. **Create the deployment**: - ```bash - akash tx deployment create .yaml --from --chain-id - ``` +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. -3. **Bid on providers**: - Once the deployment is submitted, providers will bid on it. Accept a bid using: - ```bash - akash tx market lease create --dseq --from - ``` +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** -4. **Check Deployment Status**: - ```bash - akash deployment status --dseq - ``` ---- +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + ### **Step 4: Access the Application** @@ -156,15 +497,5 @@ To run Cal.com, you need a database. You can deploy PostgreSQL on Akash or use a --- -## **Troubleshooting** - -- **Logs**: Use the Akash CLI to fetch logs for debugging: - ```bash - akash deployment logs --dseq - ``` - -- **Configuration Issues**: Verify the environment variables and database connectivity. - ---- By following this guide, you can deploy and manage your own instance of Cal.com on Akash Network, combining the benefits of decentralized hosting and open-source scheduling. \ No newline at end of file diff --git a/src/content/Docs/guides/hosting/discourse/index.md b/src/content/Docs/guides/hosting/discourse/index.md index 0b44ca2a..b2543ee6 100644 --- a/src/content/Docs/guides/hosting/discourse/index.md +++ b/src/content/Docs/guides/hosting/discourse/index.md @@ -110,21 +110,368 @@ deployment: ``` ### **3. Deploy on Akash** -1. **Create a Deployment:** - - Run the command to create your deployment: - ```bash - akash tx deployment create deployment.yaml --from --chain-id --node - ``` - - Confirm the transaction and note the deployment ID. - -2. **Bid on Resources:** - - Wait for providers to bid on your deployment and accept a bid: - ```bash - akash tx market lease create --dseq --from --chain-id --node - ``` - -3. **Access Your Deployment:** - - Get the external IP address assigned to your Discourse instance. Update your DNS records to point to this IP. +- Create your Certificate + +Akash requires an account to have a valid certificate associated with it to start participating in the deployment process. In this section of the guide, we will create a certificate locally, and then proceed to store this certificate on the Akash blockchain. To do this, ensure you have followed all the steps outlined in this guide up to this point. Additionally, these transactions must be executed from an Akash account in possession of some $AKT tokens. + +Once an account has a certificate associated with it, it can begin deploying services on the Akash blockchain. **A certificate needs to be created only once per account. After creation, it can be used across any number of deployments for as long as it remains valid.** + + +``` +provider-services tx cert generate client -from $AKASH_KEY_NAME +``` + +- Publish Cert to the Blockchain + +``` +provider-services tx cert publish client -from $AKASH_KEY_NAME +``` + +- Create your Deployment + +- CPU Support + +Only x86_64 processors are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and documented. + +- Akash Deployment + +> _**NOTE**_ - if your current terminal session has been used to create prior deployments, issue the command `unset AKASH_DSEQ` to prevent receipt of error message `Deployment Exists` + +To deploy on Akash, run: + +``` +provider-services tx deployment create deploy.yaml -from $AKASH_KEY_NAME +``` + +You should see a response similar to: + +```javascript +{ + "height":"140325", + "txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA", + "codespace":"", + "code":0, + "data":"0A130A116372656174652D6465706C6F796D656E74", + "raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]", + "logs":[ + { + "msg_index":0, + "log":"", + "events":[ + { + "type":"akash.v1", + "attributes":[ + { + "key":"module", + "value":"deployment" + }, + { + "key":"action", + "value":"deployment-created" + }, + { + "key":"version", + "value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"module", + "value":"market" + }, + { + "key":"action", + "value":"order-created" + }, + { + "key":"owner", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"dseq", + "value":"140324" + }, + { + "key":"gseq", + "value":"1" + }, + { + "key":"oseq", + "value":"1" + } + ] + }, + { + "type":"message", + "attributes":[ + { + "key":"action", + "value":"create-deployment" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + } + ] + }, + { + "type":"transfer", + "attributes":[ + { + "key":"recipient", + "value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000uakt" + }, + { + "key":"recipient", + "value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u" + }, + { + "key":"sender", + "value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj" + }, + { + "key":"amount", + "value":"5000000uakt" + } + ] + } + ] + } + ], + "info":"", + "gas_wanted":"100000", + "gas_used":"94653", + "tx":null, + "timestamp":"" +} +``` + +- Find your Deployment \- + +Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable. + +```bash +export AKASH_DSEQ=CHANGETHIS +``` + +Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1. + +```bash +AKASH_OSEQ=1 +AKASH_GSEQ=1 +``` + +Verify we have the right values populated by running: + +```bash +echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ +``` + +- View your Bids + +After a short time, you should see bids from providers for this deployment with the following command: + +```bash +provider-services query market bid list -owner=$AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ -state=open +``` + +- Choose a Provider + +Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of _1 uAKT_. This means that the lease can be created using _1 uAKT_ or _0.000001 AKT_ per block to execute the container. You should see a response similar to: + +``` +bids: +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +- bid: + bid_id: + dseq: "140324" + gseq: 1 + oseq: 1 + owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj + provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + created_at: "140326" + price: + amount: "1" + denom: uakt + state: open + escrow_account: + balance: + amount: "50000000" + denom: uakt + id: + scope: bid + xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 + settled_at: "140326" + state: open + transferred: + amount: "0" + denom: uakt +``` + +For this example, we will choose `akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal` Run this command to set the provider shell variable: + +``` +AKASH_PROVIDER=akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal +``` + +Verify we have the right value populated by running: + +``` +echo $AKASH_PROVIDER +``` + +- Create a Lease + +Create a lease for the bid from the chosen provider above by running this command: + +``` +provider-services tx market lease create -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the Lease + +You can check the status of your lease by running: + +``` +provider-services query market lease list -owner $AKASH_ACCOUNT_ADDRESS -node $AKASH_NODE -dseq $AKASH_DSEQ +``` + +Note the bids will close automatically after 5 minutes, and you may get the response: + +``` +bid not open +``` + +If this happens, close your deployment and open a new deployment again. To close your deployment run this command: + +``` +provider-services tx deployment close -dseq $AKASH_DSEQ -owner $AKASH_ACCOUNT_ADDRESS -from $AKASH_KEY_NAME +``` + +If your lease was successful you should see a response that ends with: + +``` + state: active +``` + +{/* {% hint style="info" %} */} +Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step. +{/* {% endhint %} */} + +- Send the Manifest + +Upload the manifest using the values from above step: + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` + +- Confirm the URL + +Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below: + +``` +provider-services lease-status -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME -provider $AKASH_PROVIDER +``` + +You should see a response similar to: + +```javascript +{ + "services": { + "web": { + "name": "web", + "available": 1, + "total": 1, + "uris": [ + "rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io" + ], + "observed_generation": 1, + "replicas": 1, + "updated_replicas": 1, + "ready_replicas": 1, + "available_replicas": 1 + } + }, + "forwarded_ports": {} +} +``` + +You can access the application by visiting the hostnames mapped to your deployment. Look for a URL/URI and copy it to your web browser. + +- View your logs + +You can view your application logs to debug issues or watch progress like so: + +```bash +provider-services lease-logs \ + -dseq "$AKASH_DSEQ" \ + -provider "$AKASH_PROVIDER" \ + -from "$AKASH_KEY_NAME" +``` + +- Update the Deployment + +- Update the Manifest + +Update the deploy.yaml manifest file with the desired change. + +_**NOTE:**_\*\* Not all attributes of the manifest file are eligible for deployment update. If the hardware specs of the manifest are updated (I.e. CPU count), a re-deployment of the workload is necessary. Other attributes, such as deployment image and funding, are eligible for updates. + +- Issue Transaction for On Chain Update + +``` +provider-services tx deployment update deploy.yaml -dseq $AKASH_DSEQ -from $AKASH_KEY_NAME +``` + +- Send Updated Manifest to Provider + +``` +provider-services send-manifest deploy.yaml -dseq $AKASH_DSEQ -provider $AKASH_PROVIDER -from $AKASH_KEY_NAME +``` ### **4. Set Up SSL** Use a tool like **Certbot** to generate SSL certificates or integrate Let's Encrypt to secure your Discourse instance. Update your Nginx or Traefik configuration for SSL termination. diff --git a/src/content/Docs/guides/hosting/ghost/index.md b/src/content/Docs/guides/hosting/ghost/index.md index 93100497..e13ec12c 100644 --- a/src/content/Docs/guides/hosting/ghost/index.md +++ b/src/content/Docs/guides/hosting/ghost/index.md @@ -169,11 +169,11 @@ deployment: #### Deploy to Akash 1. Deploy the application: ```bash - akash tx deployment create deploy.yaml --from your-wallet + provider-services tx deployment create deploy.yaml --from your-wallet ``` 2. Check the status of your deployment: ```bash - akash query deployment list --owner your-wallet-address + provider-services query deployment list --owner your-wallet-address ``` #### Point a Domain to Your Akash Deployment diff --git a/src/content/Docs/guides/hosting/wordpress/index.md b/src/content/Docs/guides/hosting/wordpress/index.md index 62e61752..4218a318 100644 --- a/src/content/Docs/guides/hosting/wordpress/index.md +++ b/src/content/Docs/guides/hosting/wordpress/index.md @@ -121,26 +121,26 @@ deployment: 1. **Initialize Deployment**: ```bash - akash tx deployment create --from --node --chain-id + provider-services tx deployment create --from --node --chain-id ``` 2. **Query Lease**: Find available providers and create a lease: ```bash - akash query market lease list --owner - akash tx market lease create --dseq --oseq --gseq --from + provider-services query market lease list --owner + provider-services tx market lease create --dseq --oseq --gseq --from ``` 3. **Verify Deployment**: Ensure the deployment is active and the services are running: ```bash - akash query deployment get --owner --dseq + provider-services vquery deployment get --owner --dseq ``` 4. **Access the Website**: - Obtain the deployment's public IP or domain: ```bash - akash query provider lease-status --owner --dseq --provider + provider-services query provider lease-status --owner --dseq --provider ``` - Configure DNS to map your domain to the provided IP or access via the generated IP. diff --git a/src/content/Docs/guides/machine-learning/anythingllm/index.md b/src/content/Docs/guides/machine-learning/anythingllm/index.md index 8b906649..b4d9778b 100644 --- a/src/content/Docs/guides/machine-learning/anythingllm/index.md +++ b/src/content/Docs/guides/machine-learning/anythingllm/index.md @@ -83,20 +83,20 @@ deployment: 2. **Validate the SDL**: Run the following command to validate your SDL file: ```bash - akash tx deployment validate anythingllm.yaml + provider-services tx deployment validate deploy.yaml ``` 3. **Create the Deployment**: Submit the SDL file to the Akash network to create a deployment: ```bash - akash tx deployment create anythingllm.yaml --from + provider-services tx deployment create anythingllm.yaml --from ``` 4. **Bid on a Provider**: After creating the deployment, providers will bid to host it. Accept a suitable bid: ```bash - akash query market lease list --owner - akash tx market lease create --owner --dseq --gseq --oseq --from + provider-services query market lease list --owner + provider-services tx market lease create --owner --dseq --gseq --oseq --from ``` 5. **Access the Application**: @@ -106,7 +106,7 @@ deployment: 6. **Monitor Logs**: View logs to ensure the service is running correctly: ```bash - akash provider lease logs --dseq --gseq --oseq + provider-services provider lease logs --dseq --gseq --oseq ``` --- diff --git a/src/content/Docs/guides/machine-learning/dl4j/index.md b/src/content/Docs/guides/machine-learning/dl4j/index.md index 152703b6..6165f3d6 100644 --- a/src/content/Docs/guides/machine-learning/dl4j/index.md +++ b/src/content/Docs/guides/machine-learning/dl4j/index.md @@ -129,21 +129,21 @@ deployment: Use the Akash CLI to submit the SDL file and create a deployment. ```bash - akash tx deployment create deploy.yml --from + provider-services tx deployment create deploy.yml --from ``` 2. **Bid Selection**: Choose a provider from the bids and accept their offer. ```bash - akash query market bid list --owner + provider-services query market bid list --owner ``` 3. **Lease Creation**: After selecting the bid, create a lease: ```bash - akash tx market lease create --dseq --oseq --gseq --from + provider-services tx market lease create --dseq --oseq --gseq --from ``` 4. **Access Your Application**: @@ -155,7 +155,7 @@ deployment: - **Logs**: Use the Akash CLI to retrieve service logs. ```bash - akash provider lease-logs --dseq --gseq --oseq --provider + provider-services provider lease-logs --dseq --gseq --oseq --provider ``` - **Scale Resources**: Modify the SDL file and re-submit for scaling up/down CPU, memory, or storage. diff --git a/src/content/Docs/guides/machine-learning/flow/index.md b/src/content/Docs/guides/machine-learning/flow/index.md index 81d21307..39fab776 100644 --- a/src/content/Docs/guides/machine-learning/flow/index.md +++ b/src/content/Docs/guides/machine-learning/flow/index.md @@ -70,7 +70,7 @@ If you haven’t already installed the Akash CLI, install it by following these 1. **Create a Wallet** if you don’t already have one: ``` -akash keys add +provider-services keys add ``` 2. **Fund Your Wallet**: Get some Akash tokens (AKT) by either purchasing them or using the [faucet](https://faucet.sandbox-01.aksh.pw/) if available. @@ -78,7 +78,7 @@ akash keys add 3. **Check Your Balance**: ``` -akash query bank balances +provider-services query bank balances ``` ## Step 4: Deploy on Akash @@ -86,19 +86,19 @@ akash query bank balances 1. **Create a Certificate**: ``` -akash tx cert create client --from --chain-id akashnet-2 --fees 5000uakt +provider-services tx cert create client --from --chain-id akashnet-2 --fees 5000uakt ``` 2. **Create a Deployment**: Run the following command to start the deployment with your deploy.yaml file: ``` -akash tx deployment create deploy.yaml --from --chain-id akashnet-2 --fees 5000uakt +provider-services tx deployment create deploy.yaml --from --chain-id akashnet-2 --fees 5000uakt ``` 3. **View the Deployment Status**: Once deployed, you can check the status by running: ``` -akash query deployment list --owner +provider-services query deployment list --owner ``` 4. **Get the Service Endpoint**: Once the deployment is live, you will get an external IP or domain through which you can access H2O Flow. Use this to connect to the H2O Flow service. diff --git a/src/content/Docs/guides/machine-learning/flowiseai/index.md b/src/content/Docs/guides/machine-learning/flowiseai/index.md index c1a17493..f88d5701 100644 --- a/src/content/Docs/guides/machine-learning/flowiseai/index.md +++ b/src/content/Docs/guides/machine-learning/flowiseai/index.md @@ -85,19 +85,19 @@ deployment: 1. **Validate the SDL File**: Run the following command to validate the SDL file: ```bash - akash tx deployment create --from --chain-id + provider-services tx deployment create --from --chain-id ``` 2. **Check Deployment Status**: Use the command below to verify your deployment: ```bash - akash query deployment list --owner + provider-services query deployment list --owner ``` 3. **Bid Selection**: Select a provider from the available bids list and accept the bid to finalize your deployment: ```bash - akash tx market lease create --from --chain-id --bid-id + provider-services tx market lease create --from --chain-id --bid-id ``` --- diff --git a/src/content/Docs/guides/machine-learning/h2o/index.md b/src/content/Docs/guides/machine-learning/h2o/index.md index 5cbb67af..64d8a091 100644 --- a/src/content/Docs/guides/machine-learning/h2o/index.md +++ b/src/content/Docs/guides/machine-learning/h2o/index.md @@ -78,7 +78,7 @@ deployment: Save the above SDL template as `deploy.yaml`. Run the following commands to deploy via the CLI: ``` -akash tx deployment create deploy.yml --from --chain-id --node --gas-prices --gas-adjustment +provider-services tx deployment create deploy.yaml --from --chain-id --node --gas-prices --gas-adjustment ``` 2. **Bid on the Deployment** @@ -86,13 +86,13 @@ akash tx deployment create deploy.yml --from --chain-id --dseq +provider-services query market lease list --owner --dseq ``` Look for active bids and create a lease with: ``` -akash tx market lease create --owner --dseq --gseq --oseq --from --chain-id --node --gas-prices --gas-adjustment +provider-services tx market lease create --owner --dseq --gseq --oseq --from --chain-id --node --gas-prices --gas-adjustment ``` 3. **Access Your Deployment** @@ -100,7 +100,7 @@ akash tx market lease create --owner --dseq --dseq --gseq --oseq --provider +provider-services query market lease status --owner --dseq --gseq --oseq --provider ``` Visit <`assigned_IP`>:80 for the H2O API and <`assigned_IP`>:443 for the web UI. @@ -138,7 +138,7 @@ Visit <`assigned_IP`>:80 for the H2O API and <`assigned_IP`>:443 for the web UI. - **Monitor Logs**: Use the Akash CLI to view logs for the deployment: ``` - akash logs --dseq --gseq --oseq --provider --from + provider-services logs --dseq --gseq --oseq --provider --from ``` ## Additional Notes diff --git a/src/content/Docs/guides/machine-learning/h2ogpt/index.md b/src/content/Docs/guides/machine-learning/h2ogpt/index.md index 421da79d..a309773e 100644 --- a/src/content/Docs/guides/machine-learning/h2ogpt/index.md +++ b/src/content/Docs/guides/machine-learning/h2ogpt/index.md @@ -99,20 +99,20 @@ deployment: - Save the SDL file as deploy.yaml. - Create the deployment: ``` - akash tx deployment create h2ogpt-deployment.yaml --from --node https://rpc.akashnet.io:443 --chain-id akashnet-2 + provider-services tx deployment create h2ogpt-deployment.yaml --from --node https://rpc.akashnet.io:443 --chain-id akashnet-2 ``` - Query for bids: ``` - akash query market bid list --owner --node https://rpc.akashnet.io:443 + provider-services query market bid list --owner --node https://rpc.akashnet.io:443 ``` - Accept a bid: ``` - akash tx market lease create --owner --dseq --gseq --oseq --provider --from + provider-services tx market lease create --owner --dseq --gseq --oseq --provider --from ``` 4. Retrieve Deployment Logs: Use the following command to check the logs: ``` -akash provider lease-logs --provider --dseq --gseq --oseq +provider-services provider lease-logs --provider --dseq --gseq --oseq ``` 5. Access h2oGPT: Find the deployment's external IP or domain in the logs, then navigate to it in your browser. diff --git a/src/content/Docs/guides/machine-learning/h2ollmstudio/index.md b/src/content/Docs/guides/machine-learning/h2ollmstudio/index.md index c33e4146..18efc963 100644 --- a/src/content/Docs/guides/machine-learning/h2ollmstudio/index.md +++ b/src/content/Docs/guides/machine-learning/h2ollmstudio/index.md @@ -84,7 +84,7 @@ Save the SDL file as `deploy.yaml` in your project directory. Run the following command to validate the SDL file: ``` -akash tx deployment create h2o-llm.yml --from --node --chain-id --keyring-backend +provider-services tx deployment create h2o-llm.yml --from --node --chain-id --keyring-backend ``` ### Step 3: Submit Deployment @@ -92,13 +92,13 @@ akash tx deployment create h2o-llm.yml --from --node --gas auto --gas-prices 0.025uakt --gas-adjustment 1.2 +provider-services tx deployment create ./h2o-llm.yml --from --gas auto --gas-prices 0.025uakt --gas-adjustment 1.2 ``` ### Step 4: Wait for Providers ``` -akash query market bid list --owner +provider-services query market bid list --owner ``` ### Step 5: Accept a Bid @@ -106,7 +106,7 @@ akash query market bid list --owner Choose a provider and accept the bid: ``` -akash tx market lease create \ +provider-services tx market lease create \ --bid-id \ --from \ --gas auto \ @@ -118,7 +118,7 @@ akash tx market lease create \ Retrieve the lease status to get the external IP: ``` -akash provider lease-status \ +provider-services provider lease-status \ --dseq \ --from \ --provider diff --git a/src/content/Docs/guides/machine-learning/haystack/index.md b/src/content/Docs/guides/machine-learning/haystack/index.md index 8d2c3aae..aa0b5131 100644 --- a/src/content/Docs/guides/machine-learning/haystack/index.md +++ b/src/content/Docs/guides/machine-learning/haystack/index.md @@ -116,24 +116,24 @@ deployment: 1. **Validate the SDL**: Save the SDL as `deploy.yaml` and validate it using the Akash CLI: ```bash - akash tx deployment create deploy.yaml --from + provider-services tx deployment create deploy.yaml --from ``` 2. **Bid and Lease**: Once your deployment is created, monitor and accept a bid for your deployment: ```bash - akash query market lease list --state open + provider-services query market lease list --state open ``` After finding a suitable bid, create a lease: ```bash - akash tx market lease create --dseq --oseq --gseq --from + provider-services tx market lease create --dseq --oseq --gseq --from ``` 3. **Access Haystack**: After successful deployment, retrieve the service’s IP and port: ```bash - akash provider service-status + provider-services provider service-status ``` Access the Haystack REST API at the provided IP/port, typically accessible via `http://:80`. diff --git a/src/content/Docs/guides/machine-learning/keras/index.md b/src/content/Docs/guides/machine-learning/keras/index.md index fb0c9845..e50f6cc3 100644 --- a/src/content/Docs/guides/machine-learning/keras/index.md +++ b/src/content/Docs/guides/machine-learning/keras/index.md @@ -115,17 +115,17 @@ deployment: 3. **Upload Your SDL File**: - Deploy using the Akash CLI: ```bash - akash tx deployment create deployment.yaml --from + provider-services tx deployment create deployment.yaml --from ``` - Monitor your deployment status with: ```bash - akash query deployment list --owner + provider-services query deployment list --owner ``` ### **Step 5: Access Your Keras Application** - Once the deployment is active, obtain the endpoint for your service using: ```bash - akash query provider lease-status --id + provider-services query provider lease-status --id ``` - Access your application via the provided public endpoint. diff --git a/src/content/Docs/guides/machine-learning/localai/index.md b/src/content/Docs/guides/machine-learning/localai/index.md index 78fd743c..512bf0f7 100644 --- a/src/content/Docs/guides/machine-learning/localai/index.md +++ b/src/content/Docs/guides/machine-learning/localai/index.md @@ -108,19 +108,19 @@ deployment: ### 3. **Validate the SDL File** Run the following command to validate your SDL file: ```bash -akash tx deployment create deploy.yaml --from --chain-id --node +provider-services tx deployment create deploy.yaml --from --chain-id --node ``` ### 4. **Create the Deployment** Submit your deployment request: ```bash -akash tx deployment create deploy.yaml --from +provider-services tx deployment create deploy.yaml --from ``` ### 5. **Monitor the Deployment** Check the status of your deployment using: ```bash -akash query deployment list --owner +provider-services query deployment list --owner ``` ### 6. **Access the Application** diff --git a/src/content/Docs/guides/machine-learning/mistral-7b/index.md b/src/content/Docs/guides/machine-learning/mistral-7b/index.md index a08fe3f9..de07eedd 100644 --- a/src/content/Docs/guides/machine-learning/mistral-7b/index.md +++ b/src/content/Docs/guides/machine-learning/mistral-7b/index.md @@ -69,13 +69,13 @@ deployment: ### 1. Akash CLI Guide **Prerequisites**: -- Make sure you have the [Akash CLI](/docs/getting-started/quickstart-guides/akash-cli/) (akash) installed and configured. +- Make sure you have the [Akash CLI](/docs/getting-started/quickstart-guides/akash-cli/) installed and configured. **Steps**: 1. **Initialize the SDL file**: Save the mistral_7b_akash_deployment.yaml file in your working directory. 2. **Submit the Deployment**: Use the Akash CLI to deploy the file to Akash. ``` -akash tx deployment create --from --node --dseq --sdl mistral_7b_akash_deployment.yaml --fees +provider-services tx deployment create --from --node --dseq --sdl mistral_7b_akash_deployment.yaml --fees ``` Replace , , , and with your specific values. @@ -84,7 +84,7 @@ Replace , , , and --from +provider-services provider lease-status --dseq --from ``` 5. **Access the Service**: You should be able to access the Mistral 7B model at http://:80. diff --git a/src/content/Docs/guides/machine-learning/ml-envs/index.md b/src/content/Docs/guides/machine-learning/ml-envs/index.md index 06bed407..bb2a80ae 100644 --- a/src/content/Docs/guides/machine-learning/ml-envs/index.md +++ b/src/content/Docs/guides/machine-learning/ml-envs/index.md @@ -15,7 +15,7 @@ The **nielsborie/machine-learning-environments** Docker image provides a preconf ## **Steps to Deploy on Akash** ### 1. **Set Up Akash Environment** - - Install the Akash CLI (`akash`). + - Install the Akash CLI. - Fund your wallet with $AKT tokens to cover deployment costs. ### 2. **Write the SDL File** @@ -66,11 +66,11 @@ The **nielsborie/machine-learning-environments** Docker image provides a preconf ### 4. **Submit Deployment** - Deploy the environment using the Akash CLI: ```bash - akash tx deployment create .yaml --from + provider-services tx deployment create .yaml --from ``` - Verify your deployment: ```bash - akash query deployment list --owner + provider-services query deployment list --owner ``` ### 5. **Access the Environment** diff --git a/src/content/Docs/guides/machine-learning/pytorch/index.md b/src/content/Docs/guides/machine-learning/pytorch/index.md index 3f5d9c83..4cc26449 100644 --- a/src/content/Docs/guides/machine-learning/pytorch/index.md +++ b/src/content/Docs/guides/machine-learning/pytorch/index.md @@ -83,26 +83,26 @@ deployment: 1. **Initialize Deployment**: ``` - akash tx deployment create deploy.yaml --from --node --chain-id + provider-services tx deployment create deploy.yaml --from --node --chain-id ``` Replace ``, ``, and `` with your Akash configuration. 2. **Bid for Resources**: Once the deployment is created, providers will bid to host it. Run the following command to view the bids: ``` - akash query market bid list --owner + provider-services query market bid list --owner ``` 3. **Lease Selection**: Accept a bid to create a lease: ``` - akash tx market lease create --dseq --gseq 1 --oseq 1 --from + provider-services tx market lease create --dseq --gseq 1 --oseq 1 --from ``` 4. **Check Deployment Status**: After creating the lease, check the status of your deployment: ``` - akash query deployment get --owner --dseq + provider-services query deployment get --owner --dseq ``` --- @@ -112,7 +112,7 @@ deployment: 1. **Retrieve Deployment Details**: Obtain the external IP and port assigned to your deployment: ``` - akash provider lease-status --dseq --from + provider-services provider lease-status --dseq --from ``` 2. **Connect to the Service**: @@ -165,12 +165,12 @@ If you need additional libraries or custom configurations: 1. **Update Deployment**: Modify the `deploy.yaml` file and run: ``` - akash tx deployment update deploy.yaml --from + provider-services tx deployment update deploy.yaml --from ``` 2. **Stop Deployment**: ``` - akash tx deployment close --owner --dseq + provider-services tx deployment close --owner --dseq ``` --- diff --git a/src/content/Docs/guides/machine-learning/skypilot/index.md b/src/content/Docs/guides/machine-learning/skypilot/index.md index 48c6e17f..e448ba3e 100644 --- a/src/content/Docs/guides/machine-learning/skypilot/index.md +++ b/src/content/Docs/guides/machine-learning/skypilot/index.md @@ -152,11 +152,11 @@ curl https://raw.githubusercontent.com/ovrclk/akash/master/godownloader.sh | sh 3. Create a deployment using the SDL file: ``` -akash tx deployment create --from --node --fees +provider-services tx deployment create --from --node --fees ``` 4. Monitor the status of the deployment: ``` -akash query deployment list --owner +provider-services query deployment list --owner ``` 5. Access the application using the assigned endpoint once the deployment is active. diff --git a/src/content/Docs/guides/machine-learning/tensorflow/index.md b/src/content/Docs/guides/machine-learning/tensorflow/index.md index 2f2c08c9..c5c4794c 100644 --- a/src/content/Docs/guides/machine-learning/tensorflow/index.md +++ b/src/content/Docs/guides/machine-learning/tensorflow/index.md @@ -80,20 +80,20 @@ deployment: ### **2. Deploy to Akash** 1. **Initialize Deployment:** ``` - akash tx deployment create deploy.yaml --from --chain-id --node + provider-services tx deployment create deploy.yaml --from --chain-id --node ``` 2. **Bid and Accept Lease:** After submitting the deployment, monitor the bid and accept the lease once a provider is found: ``` - akash query market bid list - akash tx market lease create --dseq --gseq --oseq --provider --from + provider-services query market bid list + provider-services tx market lease create --dseq --gseq --oseq --provider --from ``` 3. **Verify Deployment:** Check the status of your deployment: ``` - akash query deployment get --dseq + provider-services query deployment get --dseq ``` --- diff --git a/src/content/Docs/guides/machine-learning/tensorlayer/index.md b/src/content/Docs/guides/machine-learning/tensorlayer/index.md index f48bd7de..7ccee2af 100644 --- a/src/content/Docs/guides/machine-learning/tensorlayer/index.md +++ b/src/content/Docs/guides/machine-learning/tensorlayer/index.md @@ -93,17 +93,17 @@ Run the following commands to deploy the SDL file to Akash: ``` # Create a deployment -akash tx deployment create deploy.yaml --from --node https://rpc.akash.network:26657 --chain-id akashnet-2 +provider-services tx deployment create deploy.yaml --from --node https://rpc.akash.network:26657 --chain-id akashnet-2 # Confirm deployment -akash query deployment list --owner --node https://rpc.akash.network:26657 +provider-servicesquery deployment list --owner --node https://rpc.akash.network:26657 ``` ### **3. Check the Deployment Status** Use the following command to check the status of your deployment: ``` -akash query deployment get --node https://rpc.akash.network:26657 +provider-services query deployment get --node https://rpc.akash.network:26657 ``` ### **4. Access the TensorLayer Service** diff --git a/src/content/Docs/guides/science/geonetwork/index.md b/src/content/Docs/guides/science/geonetwork/index.md index 1c47bdf5..47045fc6 100644 --- a/src/content/Docs/guides/science/geonetwork/index.md +++ b/src/content/Docs/guides/science/geonetwork/index.md @@ -86,19 +86,19 @@ deployment: 1. **Initialize Deployment:** Use the Akash CLI to create and deploy the configuration: ``` - akash tx deployment create deploy.yaml --from + provider-services tx deployment create deploy.yaml --from ``` 2. **View Deployment Status:** Check the status of your deployment: ``` - akash query deployment list --owner + provider-services query deployment list --owner ``` 3. **Accept a Lease:** Once your deployment is created, accept a provider's lease: ``` - akash tx market lease create --dseq --from + provider-services tx market lease create --dseq --from ``` --- diff --git a/src/content/Docs/guides/science/matlab/index.md b/src/content/Docs/guides/science/matlab/index.md index 64388d71..448589fb 100644 --- a/src/content/Docs/guides/science/matlab/index.md +++ b/src/content/Docs/guides/science/matlab/index.md @@ -98,25 +98,25 @@ The Akash Network provides a decentralized cloud platform where you can deploy c 1. **Create a Deployment**: - Submit your SDL file to Akash: ``` - akash tx deployment create deploy.yml --from + provider-services tx deployment create deploy.yml --from ``` 2. **Find a Provider**: - Query for providers willing to host your deployment: ``` - akash query market bid list --owner + provider-services query market bid list --owner ``` 3. **Accept a Lease**: - Accept a lease from a provider: ``` - akash tx market lease create --from --dseq + provider-services tx market lease create --from --dseq ``` 4. **Access Your Deployment**: - Get the public endpoint of your deployment: ``` - akash query market lease get --dseq + provider-services query market lease get --dseq ``` - Use the endpoint to access your MATLAB application. @@ -134,12 +134,12 @@ The Akash Network provides a decentralized cloud platform where you can deploy c - Use the Akash CLI to check logs and manage your deployment: ``` - akash logs --dseq --from + provider-services logs --dseq --from ``` - If you need to update or terminate the deployment: ``` - akash tx deployment close --dseq --from + provider-services tx deployment close --dseq --from ``` --- diff --git a/src/content/Docs/guides/science/octave/index.md b/src/content/Docs/guides/science/octave/index.md index ef997600..620d2546 100644 --- a/src/content/Docs/guides/science/octave/index.md +++ b/src/content/Docs/guides/science/octave/index.md @@ -83,7 +83,7 @@ deployment: 2. Run the following commands in your terminal: ```bash -akash tx deployment create deploy.yaml --from --chain-id +provider-services tx deployment create deploy.yaml --from --chain-id ``` Replace `` and `` with your Akash wallet name and chain ID. @@ -91,13 +91,13 @@ Replace `` and `` with your Akash wallet name 3. After the deployment is submitted, check the status: ```bash -akash query market lease list --owner +provider-services query market lease list --owner ``` 4. Once the lease is established, retrieve the access URL for your deployment: ```bash -akash provider lease-status --dseq --owner +provider-services provider lease-status --dseq --owner ``` ### 3. **Access GNU Octave** diff --git a/src/content/Docs/guides/tooling/airflow/index.md b/src/content/Docs/guides/tooling/airflow/index.md index 540a5170..801c13f2 100644 --- a/src/content/Docs/guides/tooling/airflow/index.md +++ b/src/content/Docs/guides/tooling/airflow/index.md @@ -91,18 +91,18 @@ Run the following commands to deploy Airflow on Akash: 1. **Validate Your SDL File**: ``` - akash deployment validate deploy.yaml + provider-services deployment validate deploy.yaml ``` 2. **Send the Deployment**: ``` - akash deployment create deploy.yaml + provider-services deployment create deploy.yaml ``` 3. **Query the Lease**: Find the lease created for your deployment: ``` - akash deployment lease-status --dseq + provider-services deployment lease-status --dseq ``` 4. **Access Airflow**: diff --git a/src/content/Docs/guides/tooling/emqx/index.md b/src/content/Docs/guides/tooling/emqx/index.md index 8187c2e6..52c16695 100644 --- a/src/content/Docs/guides/tooling/emqx/index.md +++ b/src/content/Docs/guides/tooling/emqx/index.md @@ -88,23 +88,23 @@ deployment: 1. **Create the Deployment**: Run the following command to create a deployment using your `deploy.yaml` file: ``` - akash tx deployment create deploy.yaml --from --node --chain-id + provider-services tx deployment create deploy.yaml --from --node --chain-id ``` 2. **Bid Selection**: Once the deployment is created, choose a provider: ``` - akash query market bid list --owner + provider-services query market bid list --owner ``` Accept a bid: ``` - akash tx market lease create --owner --dseq --oseq --gseq --from + provider-services tx market lease create --owner --dseq --oseq --gseq --from ``` 3. **Submit Manifest**: Submit the deployment manifest: ``` - akash tx deployment send-manifest deploy.yaml --from + provider-services tx deployment send-manifest deploy.yaml --from ``` --- @@ -113,7 +113,7 @@ deployment: 1. **Get Lease Info**: ``` - akash query market lease list --owner + provider-services query market lease list --owner ``` 2. **Access Your Service**: - Use the `EMQX` broker’s exposed ports (`1883` for MQTT, `8883` for MQTT with SSL). diff --git a/src/content/Docs/guides/tooling/flink/index.md b/src/content/Docs/guides/tooling/flink/index.md index 9a797675..07f94c63 100644 --- a/src/content/Docs/guides/tooling/flink/index.md +++ b/src/content/Docs/guides/tooling/flink/index.md @@ -102,19 +102,19 @@ deployment: 1. **Validate the SDL File:** Run the following command to ensure the SDL file is valid: ```bash - akash validate flink-deployment.yml + provider-services validate flink-deployment.yml ``` 2. **Create a Deployment:** Deploy the application to Akash: ```bash - akash tx deployment create flink-deployment.yml --from + provider-services tx deployment create flink-deployment.yml --from ``` 3. **Wait for the Deployment to Be Approved:** After submitting your deployment, wait for a provider to accept it. You can view the status with: ```bash - akash query deployment list --owner + provider-services query deployment list --owner ``` 4. **Access the Flink Dashboard:** diff --git a/src/content/Docs/guides/tooling/jenkins/index.md b/src/content/Docs/guides/tooling/jenkins/index.md index 911a628a..d8543f42 100644 --- a/src/content/Docs/guides/tooling/jenkins/index.md +++ b/src/content/Docs/guides/tooling/jenkins/index.md @@ -77,7 +77,7 @@ deployment: Before deploying, validate the SDL file to ensure correctness. ```bash -akash tx deployment create deploy.yaml --from --chain-id --node --fees +provider-services tx deployment create deploy.yaml --from --chain-id --node --fees ``` --- @@ -87,21 +87,21 @@ akash tx deployment create deploy.yaml --from --chain-id --chain-id --node --fees + provider-services tx deployment create deploy.yaml --from --chain-id --node --fees ``` 2. **Check Deployment Status**: After deploying, monitor the status to ensure it’s active. ```bash - akash query deployment list --owner + provider-services query deployment list --owner ``` 3. **Bid Matching**: Accept a bid for your deployment if necessary. ```bash - akash tx market lease create --owner --dseq --oseq --gseq --from --fees + provider-services tx market lease create --owner --dseq --oseq --gseq --from --fees ``` --- @@ -111,7 +111,7 @@ akash tx deployment create deploy.yaml --from --chain-id + provider-services query market lease list --owner ``` 2. **Login to Jenkins**: diff --git a/src/content/Docs/guides/tooling/jetbrains_hub/index.md b/src/content/Docs/guides/tooling/jetbrains_hub/index.md index 8e607155..3245d05b 100644 --- a/src/content/Docs/guides/tooling/jetbrains_hub/index.md +++ b/src/content/Docs/guides/tooling/jetbrains_hub/index.md @@ -91,19 +91,19 @@ deployment: 1. **Validate the SDL File** Run the following command to ensure your SDL file is correctly formatted: ``` - akash validate deploy.yaml + provider-services validate deploy.yaml ``` 2. **Create a Deployment** Use the Akash CLI to create a deployment: ``` - akash tx deployment create deploy.yaml --from --node https://rpc.akash.forbole.com:443 --chain-id akashnet-2 + provider-services tx deployment create deploy.yaml --from --node https://rpc.akash.forbole.com:443 --chain-id akashnet-2 ``` 3. **Wait for Bidding** Monitor the status of your deployment using: ``` - akash query market lease list --owner + provider-services query market lease list --owner ``` Once a bid is matched, you'll need to approve it. @@ -111,13 +111,13 @@ deployment: 4. **Approve the Lease** Approve the lease using: ``` - akash tx market lease create --from + provider-services tx market lease create --from ``` 5. **Retrieve Access Details** After deployment, find the public IP of your service: ``` - akash query market lease status --dseq + provider-services query market lease status --dseq ``` Look for the service URI under the `services` section. diff --git a/src/content/Docs/guides/tooling/kafka/index.md b/src/content/Docs/guides/tooling/kafka/index.md index 4fca1e08..e6184b39 100644 --- a/src/content/Docs/guides/tooling/kafka/index.md +++ b/src/content/Docs/guides/tooling/kafka/index.md @@ -98,19 +98,19 @@ deployment: 2. **Authenticate to Akash:** ``` - akash wallet import + provider-services wallet import ``` 3. **Submit the Deployment:** ``` - akash tx deployment create kafka-deployment.yml --from + provider-services tx deployment create kafka-deployment.yml --from ``` 4. **Bid on the Deployment:** Use the Akash CLI to review provider bids and accept a bid: ``` - akash query market lease list --owner - akash tx market lease create --dseq --from + provider-services query market lease list --owner + provider-services tx market lease create --dseq --from ``` --- @@ -120,13 +120,13 @@ deployment: 1. **Check Logs:** Use the Akash CLI to view the logs and ensure the services are running: ``` - akash provider lease-logs --dseq --from + provider-services provider lease-logs --dseq --from ``` 2. **Access Kafka:** Once deployed, Akash will assign an external hostname or IP for your Kafka service. You can retrieve it using: ``` - akash provider lease-status --dseq --from + provider-services provider lease-status --dseq --from ``` Use the `KAFKA_ADVERTISED_LISTENERS` address to interact with Kafka clients. @@ -159,7 +159,7 @@ Install Kafka's CLI tools on your local machine and configure them to interact w - **Monitor Resource Usage:** Regularly monitor the usage of your deployment to ensure sufficient resources are allocated. ``` - akash provider lease-status --dseq + provider-services provider lease-status --dseq ``` - **Scale the Deployment:** diff --git a/src/content/Docs/guides/tooling/kong/index.md b/src/content/Docs/guides/tooling/kong/index.md index 80fba90d..e8ba1aae 100644 --- a/src/content/Docs/guides/tooling/kong/index.md +++ b/src/content/Docs/guides/tooling/kong/index.md @@ -89,7 +89,7 @@ Before you can deploy, make sure your SDL file is valid: 1. Save the SDL file as `deploy.yaml`. 2. Validate the SDL file using the Akash CLI: ```bash - akash tx deployment validate deploy.yaml + provider-services tx deployment validate deploy.yaml ``` --- @@ -99,25 +99,25 @@ Before you can deploy, make sure your SDL file is valid: 1. **Submit the Deployment** Deploy the SDL file with the Akash CLI: ```bash - akash tx deployment create deploy.yaml --from + provider-services tx deployment create deploy.yaml --from ``` 2. **Monitor Deployment Status** To check the status of your deployment: ```bash - akash query deployment list --owner + provider-services query deployment list --owner ``` 3. **Accept a Bid** When a provider bids on your deployment, accept that bid: ```bash - akash tx deployment lease create --from --dseq --oseq --gseq --provider + provider-services tx deployment lease create --from --dseq --oseq --gseq --provider ``` 4. **Access Kong** After the deployment has been activated, retrieve the access details (IP and port) for your Kong API Gateway by querying the lease: ```bash - akash query lease status --owner --provider --dseq + provider-services query lease status --owner --provider --dseq ``` --- @@ -137,7 +137,7 @@ To ensure Kong is operational: - **Update Deployment:** Adjust your `deploy.yaml` file and redeploy using the same commands. - **Stop Deployment:** To cancel your lease and stop the deployment: ```bash - akash tx deployment close --from --dseq + provider-services tx deployment close --from --dseq ``` --- diff --git a/src/content/Docs/guides/tooling/lightstreamer/index.md b/src/content/Docs/guides/tooling/lightstreamer/index.md index 5a2fd042..2e17b6fe 100644 --- a/src/content/Docs/guides/tooling/lightstreamer/index.md +++ b/src/content/Docs/guides/tooling/lightstreamer/index.md @@ -90,28 +90,28 @@ deployment: ### Step 3: Deploy to Akash 1. **Create the Deployment**: - Use the `akash tx deployment create` command to submit your deployment. + Use the `provider-services tx deployment create` command to submit your deployment. ``` - akash tx deployment create deploy.yaml --from --chain-id --node + provider-services tx deployment create deploy.yaml --from --chain-id --node ``` 2. **Check Deployment Status**: Verify the status of your deployment to ensure it was accepted: ``` - akash query deployment list --owner + provider-services query deployment list --owner ``` 3. **Accept a Bid**: Once your deployment is active, accept a provider’s bid: ``` - akash tx deployment lease create --from --chain-id --node + provider-services tx deployment lease create --from --chain-id --node ``` 4. **Query Lease Status**: Confirm the lease has been established: ``` - akash query market lease list --owner + provider-services query market lease list --owner ``` --- @@ -119,7 +119,7 @@ deployment: ### Step 4: Access the Lightstreamer Service Once the lease is active, find the external IP and port assigned to your deployment: ``` -akash query provider service-logs --provider --dseq +provider-services query provider service-logs --provider --dseq ``` Visit the Lightstreamer service in your browser using the assigned URL: @@ -151,11 +151,11 @@ http://:8080 ### **Useful Commands** - **Stop a Deployment**: ``` - akash tx deployment close --dseq --from + provider-services tx deployment close --dseq --from ``` - **Fetch Logs**: ``` - akash query provider service-logs --provider --dseq + provider-services query provider service-logs --provider --dseq ``` --- diff --git a/src/content/Docs/guides/tooling/nats/index.md b/src/content/Docs/guides/tooling/nats/index.md index 4f330e2e..acf6fb68 100644 --- a/src/content/Docs/guides/tooling/nats/index.md +++ b/src/content/Docs/guides/tooling/nats/index.md @@ -94,7 +94,7 @@ deployment: Run the following command to create a deployment on Akash: ```bash -akash tx deployment create deploy.yaml --from --chain-id --node --fees 5000uakt -y +provider-services tx deployment create deploy.yaml --from --chain-id --node --fees 5000uakt -y ``` Replace: @@ -106,7 +106,7 @@ Replace: Use this command to check the status of your deployment: ```bash -akash query deployment list --owner +provider-services query deployment list --owner ``` Once approved, you’ll get the `lease_id`. @@ -118,7 +118,7 @@ Once approved, you’ll get the `lease_id`. After the provider accepts the deployment, create a lease using: ```bash -akash tx market lease create --dseq --from --chain-id --node --fees 5000uakt -y +provider-services tx market lease create --dseq --from --chain-id --node --fees 5000uakt -y ``` --- @@ -129,7 +129,7 @@ akash tx market lease create --dseq --from - Run the following command to retrieve the endpoint of your deployment: ```bash -akash query market lease get --owner --dseq --gseq 1 --oseq 1 --provider +aprovider-services query market lease get --owner --dseq --gseq 1 --oseq 1 --provider ``` ### 2. **Connect to NATS** @@ -161,13 +161,13 @@ http://:8222 ### **To Update Deployment**: Modify the SDL file and use: ```bash -akash tx deployment update deploy.yaml --from --chain-id --node --fees 5000uakt -y + provider-services tx deployment update deploy.yaml --from --chain-id --node --fees 5000uakt -y ``` ### **To Close Deployment**: Terminate the deployment when it’s no longer needed: ```bash -akash tx deployment close --dseq --from --chain-id --node --fees 5000uakt -y +provider-services tx deployment close --dseq --from --chain-id --node --fees 5000uakt -y ``` --- diff --git a/src/content/Docs/guides/tooling/pulsar/index.md b/src/content/Docs/guides/tooling/pulsar/index.md index ba68d6d0..b1abcf49 100644 --- a/src/content/Docs/guides/tooling/pulsar/index.md +++ b/src/content/Docs/guides/tooling/pulsar/index.md @@ -90,11 +90,11 @@ deployment: 1. Save the YAML file as `deploy.yaml`. 2. Deploy it using the Akash CLI: ``` - akash tx deployment create deploy.yaml --from --chain-id --node + provider-services tx deployment create deploy.yaml --from --chain-id --node ``` 3. Monitor the deployment: ``` - akash query deployment list --owner + provider-services query deployment list --owner ``` ## Verifying the Deployment diff --git a/src/content/Docs/guides/tooling/rabbitmq/index.md b/src/content/Docs/guides/tooling/rabbitmq/index.md index 263603ed..bd7ecec2 100644 --- a/src/content/Docs/guides/tooling/rabbitmq/index.md +++ b/src/content/Docs/guides/tooling/rabbitmq/index.md @@ -98,7 +98,7 @@ deployment: Run the following command to validate the SDL file syntax: ```bash -akash validate --manifest rocketmq-deployment.yml +provider-services validate --manifest rocketmq-deployment.yml ``` If there are errors, correct them before proceeding. @@ -112,7 +112,7 @@ If there are errors, correct them before proceeding. Submit the deployment to Akash: ```bash - akash tx deployment create rocketmq-deployment.yml --from --gas auto --gas-prices 0.025uakt + provider-services tx deployment create rocketmq-deployment.yml --from --gas auto --gas-prices 0.025uakt ``` 2. **Check for Bids:** @@ -120,7 +120,7 @@ If there are errors, correct them before proceeding. Monitor bids from providers using: ```bash - akash query market bid list --owner + provider-services query market bid list --owner ``` 3. **Accept a Bid:** @@ -128,7 +128,7 @@ If there are errors, correct them before proceeding. Once you find a suitable bid, accept it: ```bash - akash tx market lease create --owner --provider --dseq --from + provider-services tx market lease create --owner --provider --dseq --from ``` --- diff --git a/src/content/Docs/guides/tooling/radicle/index.md b/src/content/Docs/guides/tooling/radicle/index.md index 26ab0a9d..3f013149 100644 --- a/src/content/Docs/guides/tooling/radicle/index.md +++ b/src/content/Docs/guides/tooling/radicle/index.md @@ -36,14 +36,14 @@ Prepare a deployment manifest that includes the following parameters: ``` -akash tx deployment create --file deployment.yaml +provider-services tx deployment create --file deployment.yaml ``` 2. Find the Random Port: Akash Network assigns a random port to your service. Retrieve this port by running: ``` -akash query deployment info --id +provider-services query deployment info --id ``` 3. Update External Address: After finding the random port, update the `RAD_EXTERNAL_ADDR` environment variable with the format provider.url:. @@ -54,7 +54,7 @@ export RAD_EXTERNAL_ADDR=provider.url: 4. Deploy the Container: Deploy the container using the updated configuration. ``` -akash tx deployment deploy --file deployment.yaml +provider-services tx deployment deploy --file deployment.yaml ``` diff --git a/src/content/Docs/guides/tooling/terraform/index.md b/src/content/Docs/guides/tooling/terraform/index.md index 78306759..a9d9cac1 100644 --- a/src/content/Docs/guides/tooling/terraform/index.md +++ b/src/content/Docs/guides/tooling/terraform/index.md @@ -68,31 +68,31 @@ This SDL file: 1. **Validate the SDL file**: Run the following command to ensure the SDL file is valid: ``` - akash deployment validate .yaml + provider-services deployment validate .yaml ``` 2. **Create the Deployment**: Use the Akash CLI to create the deployment: ``` - akash tx deployment create .yaml --from --node + provider-services tx deployment create .yaml --from --node ``` 3. **View the Deployment Status**: Check the deployment status: ``` - akash query deployment list --owner + provider-services query deployment list --owner ``` 4. **Accept a Bid**: Once a provider makes a bid, accept it: ``` - akash tx market lease create --dseq --from + provider-services tx market lease create --dseq --from ``` 5. **Get the Lease Information**: After accepting the bid, retrieve the lease details: ``` - akash query market lease list --owner + provider-services query market lease list --owner ``` --- @@ -103,14 +103,14 @@ Once the deployment is live, you can access the `terraform` service. 1. **Retrieve Service Endpoint**: Get the service's public IP/endpoint: ``` - akash query market lease status --dseq + provider-services query market lease status --dseq ``` 2. **SSH or Use Akash Logs**: - If the container is running, you can connect using `kubectl exec` if you have a setup to manage pods. - Alternatively, tail logs: ``` - akash query deployment logs --dseq --from + provider-services query deployment logs --dseq --from ``` --- @@ -119,7 +119,7 @@ Once the deployment is live, you can access the `terraform` service. To run Terraform commands inside the container: 1. **Use Akash's interactive shell** (if supported): ``` - akash exec run + provider-services exec run ``` 2. Inside the container, initialize Terraform: ``` @@ -134,7 +134,7 @@ To run Terraform commands inside the container: --- ## **6. Monitoring and Managing the Deployment** -- Use `akash query deployment` commands to monitor deployment health and logs. +- Use `provider-services query deployment` commands to monitor deployment health and logs. - Scale or update resources by modifying and re-deploying the SDL. --- @@ -142,7 +142,7 @@ To run Terraform commands inside the container: ## **7. Terminate the Deployment** When the deployment is no longer needed, close it to stop incurring costs: ``` -akash tx deployment close --dseq --from +provider-services tx deployment close --dseq --from ``` --- diff --git a/src/content/Docs/guides/tooling/traefik/index.md b/src/content/Docs/guides/tooling/traefik/index.md index 9918c9f6..424a8574 100644 --- a/src/content/Docs/guides/tooling/traefik/index.md +++ b/src/content/Docs/guides/tooling/traefik/index.md @@ -88,19 +88,19 @@ deployment: 1. **Initialize Deployment**: Run the following command to create a deployment: ``` - akash tx deployment create deploy.yaml --from --node https://rpc.akashnet.io --chain-id akashnet-2 + provider-services tx deployment create deploy.yaml --from --node https://rpc.akashnet.io --chain-id akashnet-2 ``` 2. **View Lease Information**: After successful deployment, query the lease to get the deployment's details: ``` - akash query deployment list --owner --state active + provider-services query deployment list --owner --state active ``` 3. **Expose Traefik's Public Endpoint**: Use the lease information to query the provider and fetch the public endpoint (IP or domain): ``` - akash provider lease-status --node --chain-id akashnet-2 + provider-services provider lease-status --node --chain-id akashnet-2 ``` ---