Skip to content

Commit ec0dd93

Browse files
committed
chore: add initial recipes for cosmos and kyve
1 parent 7f9106f commit ec0dd93

2 files changed

Lines changed: 357 additions & 0 deletions

File tree

recipes/cosmos-gaiad.toml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# ============================================================================
2+
# Dockermint Recipe - Cosmos Hub (Gaiad)
3+
# ============================================================================
4+
# Dockermint is a CD pipeline for building standardized Docker images
5+
# of Cosmos SDK blockchain nodes.
6+
#
7+
# Variables syntax:
8+
# {{UPPERCASE}} # Defined by Dockermint from the host
9+
# {{lowercase}} # Defined dynamically during compilation
10+
# shell = "" # Shell execution with output capture
11+
# ============================================================================
12+
13+
[meta]
14+
schema_version = 1
15+
min_dockermint_version = "0.1.0"
16+
17+
[header]
18+
name = "Cosmos"
19+
repo = "https://github.com/cosmos/gaia"
20+
type = "golang"
21+
binary_name = "gaiad"
22+
include_patterns = ""
23+
exclude_patterns = ""
24+
25+
# ============================================================================
26+
# Available and default flavours
27+
# ============================================================================
28+
29+
[flavours.available]
30+
architecture = ["x86_64", "aarch64"]
31+
db_backend = ["goleveldb", "pebbledb"]
32+
binary_type = ["dynamic", "static"]
33+
running_env = ["alpine3.23", "bookworm", "distroless"]
34+
running_user = ["root", "custom", "dockermint"]
35+
build_tags = ["netgo", "ledger", "muslc"]
36+
37+
[flavours.default]
38+
architecture = "{{HOST_ARCH}}"
39+
db_backend = "goleveldb"
40+
binary_type = "static"
41+
running_env = "alpine3.23"
42+
running_user = "root"
43+
build_tags = ["netgo", "muslc"]
44+
45+
# ============================================================================
46+
# Scrapper
47+
# ============================================================================
48+
49+
[scrapper]
50+
image = "golang:1.23-alpine3.21"
51+
install = "apk add --no-cache git"
52+
env = ["{{GH_USER}}", "{{GH_PAT}}"]
53+
method = "try-authenticated-clone"
54+
directory = "{{repository_path}}"
55+
56+
# ============================================================================
57+
# Build variables
58+
# ============================================================================
59+
60+
[variables]
61+
repo_commit = { shell = "git log -1 --format='%H'" }
62+
repo_version = { shell = "git describe --exact-match 2>/dev/null || echo \"$(git rev-parse --abbrev-ref HEAD)-$(git log -1 --format='%H')\"" }
63+
golang_version = { shell = "grep -E '^(toolchain|go) ' go.mod | head -1 | sed 's/^toolchain go//;s/^go //'" }
64+
wasmvm_version = { shell = "go list -m github.com/CosmWasm/wasmvm/v2 2>/dev/null | sed 's:.* ::'" }
65+
cometbft_version = { shell = "go list -m github.com/cometbft/cometbft | sed 's:.* ::'" }
66+
cometbft_db_version = { shell = "go list -m github.com/cometbft/cometbft-db 2>/dev/null | sed 's:.* ::'" }
67+
cosmos_db_version = { shell = "go list -m github.com/cosmos/cosmos-db 2>/dev/null | sed 's:.* ::'" }
68+
69+
# ============================================================================
70+
# Builder
71+
# ============================================================================
72+
73+
[builder.install]
74+
alpine = "apk add --no-cache alpine-sdk linux-headers"
75+
ubuntu = "apt-get update && apt-get install -y --no-install-recommends make gcc build-essential linux-headers-generic"
76+
77+
# ============================================================================
78+
# Conditional pre-build steps
79+
# ============================================================================
80+
81+
[[pre_build]]
82+
condition = "static"
83+
instruction = "ADD"
84+
source = "https://github.com/CosmWasm/wasmvm/releases/download/{{wasmvm_version}}/libwasmvm_muslc.{{HOST_ARCH}}.a"
85+
dest = "/lib/libwasmvm_muslc.{{HOST_ARCH}}.a"
86+
87+
# ============================================================================
88+
# Build environment variables
89+
# ============================================================================
90+
91+
[build.env]
92+
CGO_ENABLED = "1"
93+
94+
# ============================================================================
95+
# Go linker configuration
96+
# ============================================================================
97+
98+
[build.linker.flags]
99+
dynamic = "-w -s -extldflags '-z noexecstack'"
100+
static = "-linkmode=external -w -s -extldflags '-Wl,-z,muldefs -static -z noexecstack'"
101+
102+
[build.linker.variables]
103+
"github.com/cosmos/cosmos-sdk/version.Name" = "gaia"
104+
"github.com/cosmos/cosmos-sdk/version.AppName" = "{{binary_name}}"
105+
"github.com/cosmos/cosmos-sdk/version.Version" = "{{repo_version}}"
106+
"github.com/cosmos/cosmos-sdk/version.Commit" = "{{repo_commit}}"
107+
"github.com/cosmos/cosmos-sdk/version.BuildTags" = "{{BUILD_TAGS_COMMA_SEP}}"
108+
"github.com/cometbft/cometbft/version.TMCoreSemVer" = "{{cometbft_version}}"
109+
"github.com/cosmos/cosmos-sdk/types.DBBackend" = "{{db_backend}}"
110+
111+
# ============================================================================
112+
# Builder other parameters
113+
# ============================================================================
114+
115+
[build.path]
116+
path = "{{repository_path}}/cmd/gaiad"
117+
118+
# ============================================================================
119+
# Dockermint user configuration (when running_user == "dockermint")
120+
# ============================================================================
121+
122+
[user.dockermint]
123+
username = "dockermint"
124+
uid = 10000
125+
gid = 10000
126+
127+
# ============================================================================
128+
# Files to copy from builder to runner
129+
# ============================================================================
130+
131+
[copy]
132+
"/go/bin/gaiad" = { dest = "/usr/bin/{{binary_name}}", type = "entrypoint" }
133+
134+
[copy.dynamic]
135+
"/go/pkg/mod/github.com/!cosm!wasm/wasmvm/v2@{{wasmvm_version}}/internal/api/libwasmvm.{{HOST_ARCH}}.so" = { dest = "/lib/libwasmvm.{{HOST_ARCH}}.so", type = "dyn-library" }
136+
137+
# ============================================================================
138+
# Default exposed ports
139+
# ============================================================================
140+
141+
[expose]
142+
ports = [
143+
{ port = 26656, description = "P2P" },
144+
{ port = 26657, description = "RPC" },
145+
{ port = 26660, description = "Prometheus metrics" },
146+
{ port = 1317, description = "REST API" },
147+
{ port = 9090, description = "gRPC" },
148+
{ port = 9091, description = "gRPC-Web" },
149+
]
150+
151+
# ============================================================================
152+
# OCI Labels
153+
# ============================================================================
154+
155+
[labels]
156+
"org.opencontainers.image.created" = "{{CREATION_TIMESTAMP}}"
157+
"org.opencontainers.image.authors" = "Dockermint CD"
158+
"org.opencontainers.image.url" = "https://github.com/cosmos/gaia"
159+
"org.opencontainers.image.documentation" = "https://docs.cosmos.network/hub"
160+
"org.opencontainers.image.source" = "https://github.com/cosmos/gaia"
161+
"org.opencontainers.image.version" = "{{repo_version}}"
162+
"org.opencontainers.image.revision" = "{{repo_commit}}"
163+
"org.opencontainers.image.vendor" = "the Gaia authors"
164+
"org.opencontainers.image.licenses" = "Apache-2.0"
165+
"org.opencontainers.image.title" = "Gaiad"
166+
"org.opencontainers.image.description" = "Cosmos Hub Node"
167+
168+
# ============================================================================
169+
# Docker image tag
170+
# ============================================================================
171+
172+
[image]
173+
tag = "cosmos-gaiad-{{db_backend}}:{{SEMVER_TAG}}-{{running_env}}"

recipes/kyve-kyved.toml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# ============================================================================
2+
# Dockermint Recipe - Kyve (Kyved)
3+
# ============================================================================
4+
# Dockermint is a CD pipeline for building standardized Docker images
5+
# of Cosmos SDK blockchain nodes.
6+
#
7+
# Variables syntax:
8+
# {{UPPERCASE}} # Defined by Dockermint from the host
9+
# {{lowercase}} # Defined dynamically during compilation
10+
# shell = "" # Shell execution with output capture
11+
# ============================================================================
12+
13+
[meta]
14+
schema_version = 1
15+
min_dockermint_version = "0.1.0"
16+
17+
[header]
18+
name = "Kyve"
19+
repo = "https://github.com/KYVENetwork/chain"
20+
type = "golang"
21+
binary_name = "kyved"
22+
include_patterns = ""
23+
exclude_patterns = ""
24+
25+
# ============================================================================
26+
# Available and default flavours
27+
# ============================================================================
28+
29+
[flavours.available]
30+
architecture = ["x86_64", "aarch64"]
31+
db_backend = ["goleveldb", "pebbledb"]
32+
binary_type = ["dynamic", "static"]
33+
running_env = ["alpine3.23", "bookworm", "distroless"]
34+
running_user = ["root", "custom", "dockermint"]
35+
build_tags = ["netgo", "ledger", "muslc"]
36+
network = ["mainnet", "kaon"]
37+
38+
[flavours.default]
39+
architecture = "{{HOST_ARCH}}"
40+
db_backend = "goleveldb"
41+
binary_type = "static"
42+
running_env = "alpine3.23"
43+
running_user = "root"
44+
build_tags = ["netgo", "muslc"]
45+
network = "mainnet"
46+
47+
# ============================================================================
48+
# Scrapper
49+
# ============================================================================
50+
51+
[scrapper]
52+
image = "golang:1.23-alpine3.21"
53+
install = "apk add --no-cache git"
54+
env = ["{{GH_USER}}", "{{GH_PAT}}"]
55+
method = "try-authenticated-clone"
56+
directory = "{{repository_path}}"
57+
58+
# ============================================================================
59+
# Build variables
60+
# ============================================================================
61+
62+
[variables]
63+
repo_commit = { shell = "git log -1 --format='%H'" }
64+
repo_version = { shell = "git describe --exact-match 2>/dev/null || echo \"$(git rev-parse --abbrev-ref HEAD)-$(git log -1 --format='%H')\"" }
65+
golang_version = { shell = "grep -E '^(toolchain|go) ' go.mod | head -1 | sed 's/^toolchain go//;s/^go //'" }
66+
cometbft_version = { shell = "go list -m github.com/cometbft/cometbft | sed 's:.* ::'" }
67+
cometbft_db_version = { shell = "go list -m github.com/cometbft/cometbft-db 2>/dev/null | sed 's:.* ::'" }
68+
cosmos_db_version = { shell = "go list -m github.com/cosmos/cosmos-db 2>/dev/null | sed 's:.* ::'" }
69+
70+
# ============================================================================
71+
# Profiles
72+
# ============================================================================
73+
74+
[profiles.network.mainnet]
75+
denom = "ukyve"
76+
team_tge = "2023-03-14T14:03:14"
77+
team_foundation_address = "kyve1xjpl57p7f49y5gueu7rlfytaw9ramcn5zhjy2g"
78+
team_bcp_address = "kyve1fnh4kghr25tppskap50zk5j385pt65tyyjaraa"
79+
team_allocation = "165000000000000"
80+
81+
[profiles.network.kaon]
82+
denom = "tkyve"
83+
team_tge = "2023-02-07T14:00:00"
84+
team_foundation_address = "kyve1vut528et85755xsncjwl6dx8xakuv26hxgyv0n"
85+
team_bcp_address = "kyve1vut528et85755xsncjwl6dx8xakuv26hxgyv0n"
86+
team_allocation = "165000000000000"
87+
88+
# ============================================================================
89+
# Builder
90+
# ============================================================================
91+
92+
[builder.install]
93+
alpine = "apk add --no-cache alpine-sdk linux-headers"
94+
ubuntu = "apt-get update && apt-get install -y --no-install-recommends make gcc build-essential linux-headers-generic"
95+
96+
# ============================================================================
97+
# Build environment
98+
# ============================================================================
99+
100+
[build.env]
101+
CGO_ENABLED = "1"
102+
103+
# ============================================================================
104+
# Go linker configuration
105+
# ============================================================================
106+
107+
[build.linker.flags]
108+
dynamic = "-w -s -extldflags '-z noexecstack'"
109+
static = "-linkmode=external -w -s -extldflags '-Wl,-z,muldefs -static -z noexecstack'"
110+
111+
[build.linker.variables]
112+
"github.com/cosmos/cosmos-sdk/version.Name" = "kyve"
113+
"github.com/cosmos/cosmos-sdk/version.AppName" = "{{binary_name}}"
114+
"github.com/cosmos/cosmos-sdk/version.Version" = "{{repo_version}}"
115+
"github.com/cosmos/cosmos-sdk/version.Commit" = "{{repo_commit}}"
116+
"github.com/cosmos/cosmos-sdk/version.BuildTags" = "{{BUILD_TAGS_COMMA_SEP}}"
117+
"github.com/cometbft/cometbft/version.TMCoreSemVer" = "{{cometbft_version}}"
118+
"github.com/cosmos/cosmos-sdk/types.DBBackend" = "{{db_backend}}"
119+
"github.com/KYVENetwork/chain/x/global/types.Denom" = "{{denom}}"
120+
"github.com/KYVENetwork/chain/x/team/types.TEAM_FOUNDATION_STRING" = "{{team_foundation_address}}"
121+
"github.com/KYVENetwork/chain/x/team/types.TEAM_BCP_STRING" = "{{team_bcp_address}}"
122+
"github.com/KYVENetwork/chain/x/team/types.TEAM_ALLOCATION_STRING" = "{{team_allocation}}"
123+
"github.com/KYVENetwork/chain/x/team/types.TGE_STRING" = "{{team_tge}}"
124+
125+
# ============================================================================
126+
# Builder other parameters
127+
# ============================================================================
128+
129+
[build.path]
130+
path = "{{repository_path}}/cmd/kyved"
131+
132+
# ============================================================================
133+
# Dockermint user configuration (when running_user == "dockermint")
134+
# ============================================================================
135+
136+
[user.dockermint]
137+
username = "dockermint"
138+
uid = 10000
139+
gid = 10000
140+
141+
# ============================================================================
142+
# Files to copy from builder to runner
143+
# ============================================================================
144+
145+
[copy]
146+
"/go/bin/kyved" = { dest = "/usr/bin/{{binary_name}}", type = "entrypoint" }
147+
148+
# ============================================================================
149+
# Default exposed ports
150+
# ============================================================================
151+
152+
[expose]
153+
ports = [
154+
{ port = 26656, description = "P2P" },
155+
{ port = 26657, description = "RPC" },
156+
{ port = 26660, description = "Prometheus metrics" },
157+
{ port = 1317, description = "REST API" },
158+
{ port = 9090, description = "gRPC" },
159+
{ port = 9091, description = "gRPC-Web" },
160+
]
161+
162+
# ============================================================================
163+
# OCI Labels
164+
# ============================================================================
165+
166+
[labels]
167+
"org.opencontainers.image.created" = "{{CREATION_TIMESTAMP}}"
168+
"org.opencontainers.image.authors" = "Dockermint CD"
169+
"org.opencontainers.image.url" = "https://github.com/kyve-network/kyve"
170+
"org.opencontainers.image.documentation" = "https://docs.kyve.network"
171+
"org.opencontainers.image.source" = "https://github.com/kyve-network/kyve"
172+
"org.opencontainers.image.version" = "{{repo_version}}"
173+
"org.opencontainers.image.revision" = "{{repo_commit}}"
174+
"org.opencontainers.image.vendor" = "KYVE Foundation"
175+
"org.opencontainers.image.licenses" = "MIT"
176+
"org.opencontainers.image.title" = "Kyved"
177+
"org.opencontainers.image.description" = "Kyve Chain Node"
178+
179+
# ============================================================================
180+
# Docker image tag
181+
# ============================================================================
182+
183+
[image]
184+
tag = "kyve-kyved-{{network}}-{{db_backend}}:{{SEMVER_TAG}}-{{running_env}}"

0 commit comments

Comments
 (0)