Skip to content

Instantly share code, notes, and snippets.

Moved to https://docs.akash.network/providers/akash-provider-troubleshooting/close-leases-based-on-image on 19th April 2023.


Below is the suboptimal way of terminating the leases with the selected (unwanted) images (until Akash natively supports that).

Suboptimal because once the deployment gets closed the provider will have to be restarted to recover from the account sequence mismatch error. Providers already do it automatically through the K8s's liveness probe set to the akash-provider deployment.

The other core problem is that the image is unknown until the client transfers the SDL to the provider (tx send-manifest) which can only happen after provider bids, client accepts the bid.

@andy108369
andy108369 / celestia.yaml
Last active March 17, 2023 14:25
Akash deployment manifest (SDL) for Celestia
# HW reqs for light node https://docs.celestia.org/nodes/light-node/#hardware-requirements
# Testnets & RPC endpoints https://docs.celestia.org/nodes/participate
# Images:
# blockspacerace: 0.7.1
# mocha: 0.6.4 (no docker image tag -- https://github.com/celestiaorg/celestia-node/issues/1702) -- `ghcr.io/celestiaorg/celestia-node:sha-747c9e5`
# arabica: 0.7.1
---
version: '2.0'
services:
celestia:
import {
BroadcastMode,
coinsFromString,
SecretNetworkClient,
Wallet,
} from "secretjs";
import { BaseAccount } from "secretjs/dist/grpc_gateway/cosmos/auth/v1beta1/auth.pb";
import { AminoWallet } from "secretjs/dist/wallet_amino";
function sleep(ms: number) {
# For Sifchain
export SIFNODED_NODE=http://rpc.sifchain.finance:80
BIN=sifnoded
TOKEN=rowan
DP=18

# For Akash just uncomment these:
#export AKASH_NODE=https://rpc.akash.forbole.com:443
#BIN=akash
@andy108369
andy108369 / sifchain-validator-akash.yml
Last active March 19, 2023 10:07
SDL Deployment manifest to run Sifchain validator in Akash decentralized cloud
# based on https://github.com/ovrclk/cosmos-omnibus/blob/master/sifchain/deploy.yml
# https://gist.github.com/andy108369/a869d1d43cd8c67c0700c7acebc36838
# 19 March 2023
#
# - 1. upload GPG-encrypted (use `--symmetric` flag) node_key.json & priv_validator_key.json to your Storj or Filebase S3-compatible bucket
# - 2. update REDACTED fields
# - 3. deploy it in Akash Network https://docs.akash.network/guides
---
version: "2.0"
---
version: "2.0"
services:
txgen-app:
image: busybox
command:
- "sh"
- "-c"
args:

When the user has a certificate generated in the future he gets the following error:

Error while sending manifest to provider. request to https://provider.akash.pro:8443/deployment/7680977/manifest failed, reason: socket hang up

Or

Error while sending manifest to provider. request to https://d3akash.cloud:8443/deployment/7678683/manifest failed, reason: read ECONNRESET

His certificate is valid in the future

#!/usr/bin/env bash
# Filename: clean-stale-akash-resources.sh
# Author: [email protected]
# Version: 1.3 - 19 June 2023
# Source: https://gist.github.com/andy108369/f211bf6c06f2a6e3635b20bdfb9f0fca
# Ref. https://docs.akash.network/providers/build-a-cloud-provider/akash-provider-troubleshooting/dangling-deployments
# Make sure you have kubectl, akash and provider-services binaries.
#
# akash https://github.com/ovrclk/akash/releases/latest
@andy108369
andy108369 / upgrade-postgresql-13-to-14-container.md
Last active September 13, 2022 10:33
Upgrade PostgreSQL from 13 to 14 in a container

See the working PostgreSQL deployment SDL manifest for Akash Network in the comments section.

Upgrade PostgreSQL from 13 to 14 in a container

1. Start postgresql:14 container with sleep infinity entrypoint

with the data mounted over /var/lib/postgresql/data directory.

Make sure to either use PGDATA=/var/lib/postgresql/data/<some-other-dir> or rmdir /var/lib/postgresql/data/lost+found when having /var/lib/postgresql/data a mountpoint over a device (say Ceph's RBD), due to initdb not willing to work with the mountpoints (but can be tricked to by removing lost+found directory! :-)).
More here https://www.postgresql.org/message-id/flat/21269e094e35a1b32c426408cc0a4408%40nixaid.com#e4510c5b090c2737e68cfdcf8223020a

Final work is here and a working SDL manifest

What's below on this page is outdated:


asciicast

  1. Init the DB with postgres:adminpass creds