Skip to content

Commit 9308382

Browse files
authored
Merge pull request #5193 from Lezek123/archive_script
Colossus archive script
2 parents 2f6dfe5 + 53fbddf commit 9308382

30 files changed

+3871
-301
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ runtime-inputs/
4848
devops/infrastructure
4949

5050
joystream.tar.gz
51+
52+
.venv

colossus.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ RUN yarn workspace storage-node build
3030
RUN yarn cache clean
3131

3232
FROM node:18 as final
33+
3334
WORKDIR /joystream
35+
# 7zip and zstd are required by the archive script
36+
RUN apt-get update && apt-get install -y p7zip-full zstd
3437
COPY --from=builder /joystream /joystream
3538
RUN yarn --frozen-lockfile --production
3639

setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
88
# code build tools
99
sudo apt-get update -y
1010
sudo apt-get install -y coreutils clang llvm jq curl gcc xz-utils sudo pkg-config \
11-
unzip libc6-dev make libssl-dev python3 cmake protobuf-compiler libprotobuf-dev
11+
unzip libc6-dev make libssl-dev python3 cmake protobuf-compiler libprotobuf-dev p7zip-full
1212

1313
# Docker: do not replace existing installation to avoid distrupting running containers
1414
if ! command -v docker &> /dev/null
@@ -23,7 +23,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
2323
fi
2424
# install additional packages
2525
brew update
26-
brew install coreutils gnu-tar jq curl llvm gnu-sed cmake protobuf || :
26+
brew install coreutils gnu-tar jq curl llvm gnu-sed cmake protobuf p7zip || :
2727
echo "It is recommended to setup Docker desktop from: https://www.docker.com/products/docker-desktop"
2828
echo "It is also recommended to install qemu emulators with following command:"
2929
echo "docker run --privileged --rm tonistiigi/binfmt --install all"

storage-node/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 4.3.0
2+
3+
- Adds `archive` mode / command, which allows downloading, compressing and uploading all data objects to an external S3 bucket that can be used as a backup.
4+
15
### 4.2.0
26

37
- Fix `util:cleanup` script (call `loadDataObjectIdCache` first)

storage-node/README.md

Lines changed: 385 additions & 200 deletions
Large diffs are not rendered by default.

storage-node/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
22
"name": "storage-node",
33
"description": "Joystream storage subsystem.",
4-
"version": "4.2.0",
4+
"version": "4.3.0",
55
"author": "Joystream contributors",
66
"bin": {
77
"storage-node": "./bin/run"
88
},
99
"bugs": "https://github.com/Joystream/joystream/issues",
1010
"dependencies": {
1111
"@apollo/client": "^3.3.21",
12+
"@aws-sdk/client-s3": "^3.675.0",
13+
"@aws-sdk/s3-request-presigner": "^3.675.0",
1214
"@elastic/ecs-winston-format": "^1.3.1",
1315
"@joystream/metadata-protobuf": "^2.15.0",
1416
"@joystream/opentelemetry": "1.0.0",
@@ -36,6 +38,7 @@
3638
"await-lock": "^2.1.0",
3739
"base64url": "^3.0.1",
3840
"blake3-wasm": "^2.1.5",
41+
"chokidar": "4.0.1",
3942
"cors": "^2.8.5",
4043
"cross-fetch": "^3.1.4",
4144
"express": "4.17.1",
@@ -52,6 +55,7 @@
5255
"node-cache": "^5.1.2",
5356
"openapi-editor": "^0.3.0",
5457
"promise-timeout": "^1.3.0",
58+
"proper-lockfile": "^4.1.2",
5559
"react": "^18.2.0",
5660
"read-chunk": "^3.2.0",
5761
"rimraf": "^3.0.2",
@@ -81,6 +85,7 @@
8185
"@types/mocha": "^5",
8286
"@types/node": "^18.6.0",
8387
"@types/pg": "^8.6.1",
88+
"@types/proper-lockfile": "^4.1.4",
8489
"@types/swagger-ui-express": "^4.1.2",
8590
"@types/ws": "^5.1.2",
8691
"@typescript-eslint/eslint-plugin": "3.8.0",

0 commit comments

Comments
 (0)