Skip to content

Commit

Permalink
Merge pull request #5193 from Lezek123/archive_script
Browse files Browse the repository at this point in the history
Colossus archive script
  • Loading branch information
mnaamani authored Dec 12, 2024
2 parents 2f6dfe5 + 53fbddf commit 9308382
Show file tree
Hide file tree
Showing 30 changed files with 3,871 additions and 301 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ runtime-inputs/
devops/infrastructure

joystream.tar.gz

.venv
3 changes: 3 additions & 0 deletions colossus.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ RUN yarn workspace storage-node build
RUN yarn cache clean

FROM node:18 as final

WORKDIR /joystream
# 7zip and zstd are required by the archive script
RUN apt-get update && apt-get install -y p7zip-full zstd
COPY --from=builder /joystream /joystream
RUN yarn --frozen-lockfile --production

Expand Down
4 changes: 2 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
# code build tools
sudo apt-get update -y
sudo apt-get install -y coreutils clang llvm jq curl gcc xz-utils sudo pkg-config \
unzip libc6-dev make libssl-dev python3 cmake protobuf-compiler libprotobuf-dev
unzip libc6-dev make libssl-dev python3 cmake protobuf-compiler libprotobuf-dev p7zip-full

# Docker: do not replace existing installation to avoid distrupting running containers
if ! command -v docker &> /dev/null
Expand All @@ -23,7 +23,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
fi
# install additional packages
brew update
brew install coreutils gnu-tar jq curl llvm gnu-sed cmake protobuf || :
brew install coreutils gnu-tar jq curl llvm gnu-sed cmake protobuf p7zip || :
echo "It is recommended to setup Docker desktop from: https://www.docker.com/products/docker-desktop"
echo "It is also recommended to install qemu emulators with following command:"
echo "docker run --privileged --rm tonistiigi/binfmt --install all"
Expand Down
4 changes: 4 additions & 0 deletions storage-node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 4.3.0

- 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.2.0

- Fix `util:cleanup` script (call `loadDataObjectIdCache` first)
Expand Down
585 changes: 385 additions & 200 deletions storage-node/README.md

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion storage-node/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"name": "storage-node",
"description": "Joystream storage subsystem.",
"version": "4.2.0",
"version": "4.3.0",
"author": "Joystream contributors",
"bin": {
"storage-node": "./bin/run"
},
"bugs": "https://github.com/Joystream/joystream/issues",
"dependencies": {
"@apollo/client": "^3.3.21",
"@aws-sdk/client-s3": "^3.675.0",
"@aws-sdk/s3-request-presigner": "^3.675.0",
"@elastic/ecs-winston-format": "^1.3.1",
"@joystream/metadata-protobuf": "^2.15.0",
"@joystream/opentelemetry": "1.0.0",
Expand Down Expand Up @@ -36,6 +38,7 @@
"await-lock": "^2.1.0",
"base64url": "^3.0.1",
"blake3-wasm": "^2.1.5",
"chokidar": "4.0.1",
"cors": "^2.8.5",
"cross-fetch": "^3.1.4",
"express": "4.17.1",
Expand All @@ -52,6 +55,7 @@
"node-cache": "^5.1.2",
"openapi-editor": "^0.3.0",
"promise-timeout": "^1.3.0",
"proper-lockfile": "^4.1.2",
"react": "^18.2.0",
"read-chunk": "^3.2.0",
"rimraf": "^3.0.2",
Expand Down Expand Up @@ -81,6 +85,7 @@
"@types/mocha": "^5",
"@types/node": "^18.6.0",
"@types/pg": "^8.6.1",
"@types/proper-lockfile": "^4.1.4",
"@types/swagger-ui-express": "^4.1.2",
"@types/ws": "^5.1.2",
"@typescript-eslint/eslint-plugin": "3.8.0",
Expand Down
Loading

0 comments on commit 9308382

Please sign in to comment.