Skip to content

Commit 839a88a

Browse files
committed
feat(stacks): add kafka kafka_exporter render-template stacks
1 parent 1161217 commit 839a88a

4 files changed

Lines changed: 77 additions & 0 deletions

File tree

scripts/checker.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@
3131
"owner": "prometheus-community",
3232
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
3333
},
34+
"kafka_exporter": {
35+
"name": "kafka_exporter",
36+
"type": "github",
37+
"owner": "danielqsj",
38+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
39+
},
40+
"kafka": {
41+
"name": "kafka",
42+
"type": "github",
43+
"owner": "apache",
44+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
45+
},
3446
"caddy": {
3547
"name": "caddy",
3648
"type": "github",
@@ -217,6 +229,12 @@
217229
"owner": "bitnami",
218230
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
219231
},
232+
"render-template": {
233+
"name": "render-template",
234+
"type": "github",
235+
"owner": "bitnami",
236+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
237+
},
220238
"wal-g": {
221239
"name": "wal-g",
222240
"type": "github",

stacks/kafka/build.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
# Load stack utils
4+
. /usr/bin/stack-utils
5+
6+
# Implement build function
7+
function build() {
8+
generate-stack-path
9+
BIN_DIR="${DATA_DIR}"/bin
10+
mkdir -p "${BIN_DIR}"
11+
curl -fsSL -o tmp.tar.gz https://github.com/apache/kafka/archive/refs/tags/${STACK_VERSION}.tar.gz
12+
tar -xzf tmp.tar.gz
13+
mv kafka-"${STACK_VERSION}"/* "${DATA_DIR}"
14+
rm kafka-"${STACK_VERSION}" tmp.tar.gz -rf
15+
16+
cat << EOF > ${PROFILE_DIR}/${STACK_NAME}.sh
17+
export PATH="/opt/drycc/kafka:/opt/drycc/kafka/bin:\$PATH"
18+
EOF
19+
}
20+
21+
# call build stack
22+
build-stack "${1}"

stacks/kafka_exporter/build.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# Load stack utils
4+
. /usr/bin/stack-utils
5+
6+
# Implement build function
7+
function build() {
8+
generate-stack-path
9+
BIN_DIR="${DATA_DIR}"/bin
10+
mkdir -p "${BIN_DIR}"
11+
curl -fsSL -o tmp.tar.gz https://github.com/danielqsj/kafka_exporter/releases/download/v${STACK_VERSION}/kafka_exporter-${STACK_VERSION}.linux-${OS_ARCH}.tar.gz
12+
tar -xzf tmp.tar.gz
13+
mv kafka_exporter-${STACK_VERSION}.linux-${OS_ARCH}/kafka_exporter "${BIN_DIR}"
14+
rm -rf kafka_exporter-${STACK_VERSION}.linux-${OS_ARCH} tmp.tar.gz
15+
}
16+
17+
# call build stack
18+
build-stack "${1}"

stacks/render-template/build.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Load stack utils
4+
. /usr/bin/stack-utils
5+
6+
# Implement build function
7+
function build() {
8+
generate-stack-path
9+
BIN_DIR="${DATA_DIR}"/bin
10+
mkdir -p "${BIN_DIR}"
11+
curl -fsSL -o tmp.tar.gz https://github.com/bitnami/render-template/releases/download/v${STACK_VERSION}/"${STACK_NAME}"-linux-"${OS_ARCH}".tar.gz
12+
tar -xzf tmp.tar.gz
13+
mv "${STACK_NAME}"-linux-"${OS_ARCH}" "${BIN_DIR}"/"${STACK_NAME}"
14+
chmod +x "${BIN_DIR}"/"${STACK_NAME}"
15+
rm -rf tmp.tar.gz
16+
}
17+
18+
# call build stack
19+
build-stack "${1}"

0 commit comments

Comments
 (0)