-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
105 lines (77 loc) · 4.63 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
AKASH_NET := https://raw.githubusercontent.com/ovrclk/net/master/mainnet
AKASH_VERSION=$(shell curl -s "$(AKASH_NET)/version.txt")
AKASH_NODE=$(shell curl -s "$(AKASH_NET)/rpc-nodes.txt" | sort -R | head -1)
AKASH_CHAIN_ID=$(shell curl -s "$(AKASH_NET)/chain-id.txt")
# Local akash installation
#DEPLOY_ROOT := $(shell pwd)
DEPLOY_PATH := $(shell pwd)
#AKASH_BIN := akash
# Docker akash installation
DEPLOY_ROOT := $(HOME)/.akash/deploy
#AKASH_BIN := docker run -it -v $(shell pwd):$(DEPLOY_ROOT) --rm ghcr.io/ovrclk/akash:$(AKASH_VERSION) akash
AKASH_BIN := $(HOME)/bin/akash
KEY_NAME := deploy
KEYRING_OPT := --keyring-backend "file" --home "$(DEPLOY_ROOT)/akash"
FEES := 5000uakt
OSEQ := 1
GSEQ := 1
info:
$(AKASH_BIN) status --node "$(AKASH_NODE)"
address:
$(AKASH_BIN) keys show $(KEY_NAME) $(KEYRING_OPT) -a
events:
$(AKASH_BIN) events --node "$(AKASH_NODE)"
create_wallet_old:
$(AKASH_BIN) keys add "$(KEY_NAME)" ${KEYRING_OPT}
# Remove dependency on ledger for now
create_wallet:
$(AKASH_BIN) keys add "$(KEY_NAME)" ${KEYRING_OPT}
recover_wallet:
$(AKASH_BIN) keys add "$(KEY_NAME)" --recover ${KEYRING_OPT}
balance:
@test $${AKASH_ADDRESS?Please set environment variable AKASH_ADDRESS}
$(AKASH_BIN) query bank balances "$(AKASH_ADDRESS)" --node "$(AKASH_NODE)"
create_certificate:
$(AKASH_BIN) tx cert create client --chain-id=$(AKASH_CHAIN_ID) --from=$(KEY_NAME) --node=$(AKASH_NODE) --fees=$(FEES) ${KEYRING_OPT}
revoke_certificate:
$(AKASH_BIN) tx cert revoke --chain-id=$(AKASH_CHAIN_ID) --from=$(KEY_NAME) --node=$(AKASH_NODE) --fees=$(FEES) ${KEYRING_OPT}
create_deployment:
echo $(AKASH_BIN) tx deployment create $(DEPLOY_PATH)/deploy.yml --from $(KEY_NAME) --node $(AKASH_NODE) --chain-id $(AKASH_CHAIN_ID) --fees $(FEES) ${KEYRING_OPT}
$(AKASH_BIN) tx deployment create $(DEPLOY_PATH)/deploy.yml --from $(KEY_NAME) --node $(AKASH_NODE) --chain-id $(AKASH_CHAIN_ID) --fees $(FEES) ${KEYRING_OPT}
update_deployment:
echo $(AKASH_BIN) tx deployment update $(DEPLOY_PATH)/deploy.yml --from $(KEY_NAME) --node $(AKASH_NODE) --chain-id $(AKASH_CHAIN_ID) --fees $(FEES) ${KEYRING_OPT} --dseq ${DSEQ}
close_deployment:
$(AKASH_BIN) tx deployment close --from $(KEY_NAME) --node $(AKASH_NODE) --chain-id $(AKASH_CHAIN_ID) --fees $(FEES) ${KEYRING_OPT} --dseq ${DSEQ} --gas=auto
list_deployment:
@test $${AKASH_ADDRESS?Please set environment variable AKASH_ADDRESS}
$(AKASH_BIN) query deployment list --owner $(AKASH_ADDRESS) --chain-id $(AKASH_CHAIN_ID) --node $(AKASH_NODE)
list_bid:
@test $${AKASH_ADDRESS?Please set environment variable AKASH_ADDRESS}
$(AKASH_BIN) query market bid list --owner $(AKASH_ADDRESS) --chain-id $(AKASH_CHAIN_ID) --node $(AKASH_NODE)
create_lease:
@test $${AKASH_ADDRESS?Please set environment variable AKASH_ADDRESS}
$(AKASH_BIN) tx market lease create --from $(KEY_NAME) --owner $(AKASH_ADDRESS) --chain-id $(AKASH_CHAIN_ID) --node $(AKASH_NODE) --dseq $(DSEQ) --oseq $(OSEQ) --gseq $(GSEQ) --provider $(PROVIDER) --fees=$(FEES) $(KEYRING_OPT)
restart_lease:
@test $${AKASH_ADDRESS?Please set environment variable AKASH_ADDRESS}
$(AKASH_BIN) tx deployment group start list --owner $(AKASH_ADDRESS) --chain-id $(AKASH_CHAIN_ID) --node $(AKASH_NODE)
list_lease:
@test $${AKASH_ADDRESS?Please set environment variable AKASH_ADDRESS}
$(AKASH_BIN) query market lease list --owner $(AKASH_ADDRESS) --chain-id $(AKASH_CHAIN_ID) --node $(AKASH_NODE)
list_lease_all:
@test $${AKASH_ADDRESS?Please set environment variable AKASH_ADDRESS}
$(AKASH_BIN) query market lease list --chain-id $(AKASH_CHAIN_ID) --node $(AKASH_NODE)
list_lease_status_all:
@test $${AKASH_ADDRESS?Please set environment variable AKASH_ADDRESS}
$(AKASH_BIN) query market lease list --chain-id $(AKASH_CHAIN_ID) --node $(AKASH_NODE)
list_deployment_all:
@test $${AKASH_ADDRESS?Please set environment variable AKASH_ADDRESS}
$(AKASH_BIN) query deployment list --chain-id $(AKASH_CHAIN_ID) --node $(AKASH_NODE)
get_lease:
@test $${AKASH_ADDRESS?Please set environment variable AKASH_ADDRESS}
$(AKASH_BIN) query market lease get --owner $(AKASH_ADDRESS) --dseq $(DSEQ) --oseq $(OSEQ) --gseq $(GSEQ) --provider $(PROVIDER) --chain-id $(AKASH_CHAIN_ID) --node $(AKASH_NODE)
lease_status:
$(AKASH_BIN) provider lease-status --node $(AKASH_NODE) --from $(KEY_NAME) --dseq $(DSEQ) --oseq $(OSEQ) --gseq $(GSEQ) --provider $(PROVIDER) ${KEYRING_OPT}
lease_logs:
$(AKASH_BIN) provider lease-logs -f --trace --node $(AKASH_NODE) --from $(KEY_NAME) --dseq $(DSEQ) --oseq $(OSEQ) --gseq $(GSEQ) --provider $(PROVIDER) ${KEYRING_OPT}
send_manifest:
$(AKASH_BIN) provider send-manifest $(DEPLOY) --node $(AKASH_NODE) --dseq $(DSEQ) --from $(KEY_NAME) --provider $(PROVIDER) $(KEYRING_OPT)