Skip to content

Commit cd258c0

Browse files
committed
Merge chore(addons): add alertmanager
2 parents 0fa41e2 + 506d52c commit cd258c0

5 files changed

Lines changed: 128 additions & 0 deletions

File tree

scripts/checker.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@
247247
"owner": "sclevine",
248248
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
249249
},
250+
"yq": {
251+
"name": "yq",
252+
"type": "github",
253+
"owner": "mikefarah",
254+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
255+
},
250256
"juicefs": {
251257
"name": "juicefs",
252258
"type": "github",
@@ -295,6 +301,24 @@
295301
"owner": "apache",
296302
"match": "^release-[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
297303
},
304+
"spark": {
305+
"name": "spark",
306+
"type": "github",
307+
"owner": "apache",
308+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
309+
},
310+
"opensearch": {
311+
"name": "OpenSearch",
312+
"type": "github",
313+
"owner": "opensearch-project",
314+
"match": "^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
315+
},
316+
"opensearch-dashboards": {
317+
"name": "OpenSearch-Dashboards",
318+
"type": "github",
319+
"owner": "opensearch-project",
320+
"match": "^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
321+
},
298322
}
299323

300324

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
case "$OS_ARCH" in
10+
'amd64')
11+
downloadUrl="https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/${STACK_VERSION}/opensearch-dashboards-${STACK_VERSION}-linux-x64.tar.gz";
12+
;;
13+
'arm64')
14+
downloadUrl="https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/${STACK_VERSION}/opensearch-dashboards-${STACK_VERSION}-linux-arm64.tar.gz";
15+
;;
16+
*) echo >&2 "error: unsupported architecture: '$arch'"; exit 1 ;;
17+
esac;
18+
curl -fsSL -o tmp.tar.gz "${downloadUrl}"
19+
tar -xzf tmp.tar.gz
20+
mv opensearch-dashboards-${STACK_VERSION}/* "${DATA_DIR}"
21+
rm opensearch-dashboards-${STACK_VERSION} tmp.tar.gz -rf
22+
23+
cat << EOF > ${PROFILE_DIR}/${STACK_NAME}.sh
24+
export PATH="/opt/drycc/${STACK_NAME}/bin:\$PATH"
25+
EOF
26+
}
27+
28+
# call build stack
29+
build-stack "${1}"
30+

stacks/opensearch/build.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
case "$OS_ARCH" in
10+
'amd64')
11+
downloadUrl="https://artifacts.opensearch.org/releases/bundle/opensearch/${STACK_VERSION}/opensearch-${STACK_VERSION}-linux-x64.tar.gz";
12+
;;
13+
'arm64')
14+
downloadUrl="https://artifacts.opensearch.org/releases/bundle/opensearch/${STACK_VERSION}/opensearch-${STACK_VERSION}-linux-arm64.tar.gz";
15+
;;
16+
*) echo >&2 "error: unsupported architecture: '$arch'"; exit 1 ;;
17+
esac;
18+
curl -fsSL -o tmp.tar.gz "${downloadUrl}"
19+
tar -xzf tmp.tar.gz
20+
rm opensearch-${STACK_VERSION}/config/opensearch.yml opensearch-${STACK_VERSION}/jdk -rf
21+
mv opensearch-${STACK_VERSION}/* "${DATA_DIR}"
22+
rm opensearch-${STACK_VERSION} tmp.tar.gz -rf
23+
24+
cat << EOF > ${PROFILE_DIR}/${STACK_NAME}.sh
25+
export PATH="/opt/drycc/${STACK_NAME}/bin:\$PATH"
26+
export LD_LIBRARY_PATH="/opt/drycc/opensearch/jdk/lib:/opt/drycc/opensearch/jdk/lib/server:\$LD_LIBRARY_PATH"
27+
EOF
28+
}
29+
30+
# call build stack
31+
build-stack "${1}"
32+

stacks/spark/build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
curl -fsSL -o tmp.tgz https://dlcdn.apache.org/spark/spark-${STACK_VERSION}/spark-${STACK_VERSION}-bin-hadoop3.tgz
10+
tar -xzf tmp.tgz
11+
mv spark-${STACK_VERSION}-bin-hadoop3/* "${DATA_DIR}"
12+
rm spark-${STACK_VERSION}-bin-hadoop3 tmp.tgz -rf
13+
14+
mkdir -p "${DATA_DIR}"/env
15+
echo "/opt/drycc/spark" > "${DATA_DIR}"/env/SPARK_HOME
16+
cat << EOF > ${PROFILE_DIR}/${STACK_NAME}.sh
17+
export PATH="/opt/drycc/spark/bin:\$PATH"
18+
export PATH="/opt/drycc/${STACK_NAME}/sbin:\$PATH"
19+
EOF
20+
}
21+
22+
# call build stack
23+
build-stack "${1}"
24+

stacks/yq/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+
architecture=$(dpkg --print-architecture)
12+
curl -o "${BIN_DIR}"/yq \
13+
-L "https://github.com/mikefarah/yq/releases/download/v${STACK_VERSION}/yq_linux_$architecture"; \
14+
chmod +x "${BIN_DIR}"/yq
15+
}
16+
17+
# call build stack
18+
build-stack "${1}"

0 commit comments

Comments
 (0)