Skip to content

Commit 9b06336

Browse files
committed
feat(stacks): add seaweedfs tikv pd
1 parent f4d628a commit 9b06336

3 files changed

Lines changed: 50 additions & 0 deletions

File tree

scripts/checker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,12 @@
259259
"owner": "sclevine",
260260
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
261261
},
262+
"tikv": {
263+
"name": "tikv",
264+
"type": "github",
265+
"owner": "tikv",
266+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
267+
},
262268
}
263269

264270

stacks/tikv/build.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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 tikv.tar.gz https://tiup-mirrors.pingcap.com/tikv-v${STACK_VERSION}-linux-${OS_ARCH}.tar.gz
12+
tar -xzf tikv.tar.gz
13+
mv tikv-server "${BIN_DIR}"
14+
curl -fsSL -o pd.tar.gz https://tiup-mirrors.pingcap.com/pd-v${STACK_VERSION}-linux-${OS_ARCH}.tar.gz
15+
tar -xzf pd.tar.gz
16+
mv pd-server "${BIN_DIR}"
17+
rm tikv.tar.gz pd.tar.gz
18+
}
19+
20+
# call build stack
21+
build-stack "${1}"

stacks/weed/build.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
install-stack go 1.18.3 && . init-stack
10+
11+
curl -sSL "https://github.com/chrislusf/seaweedfs/archive/refs/tags/${STACK_VERSION}.tar.gz" | tar -xz \
12+
&& mv seaweedfs-${STACK_VERSION} $GOPATH/src/seaweedfs/ \
13+
&& cd $GOPATH/src/seaweedfs/weed \
14+
&& go install -tags "tikv"
15+
16+
BIN_DIR="${DATA_DIR}"/bin
17+
mkdir -p "${BIN_DIR}"
18+
mv $GOPATH/bin/weed "${BIN_DIR}"
19+
}
20+
21+
# call build stack
22+
build-stack "${1}"
23+

0 commit comments

Comments
 (0)