Skip to content

Commit 2d54db5

Browse files
committed
feat(stacks): add opensearch opensearch-dashboards
1 parent 576f371 commit 2d54db5

3 files changed

Lines changed: 73 additions & 0 deletions

File tree

scripts/checker.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,18 @@
295295
"owner": "apache",
296296
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
297297
},
298+
"opensearch": {
299+
"name": "OpenSearch",
300+
"type": "github",
301+
"owner": "opensearch-project",
302+
"match": "^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
303+
},
304+
"opensearch-dashboards": {
305+
"name": "OpenSearch-Dashboards",
306+
"type": "github",
307+
"owner": "opensearch-project",
308+
"match": "^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
309+
},
298310
}
299311

300312

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: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
mv opensearch-${STACK_VERSION}/* "${DATA_DIR}"
21+
rm opensearch-${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+
export LD_LIBRARY_PATH="/opt/drycc/opensearch/jdk/lib:/opt/drycc/opensearch/jdk/lib/server:\$LD_LIBRARY_PATH"
26+
EOF
27+
}
28+
29+
# call build stack
30+
build-stack "${1}"
31+

0 commit comments

Comments
 (0)