Skip to content

Commit

Permalink
Reworked temporary deployment of cernbox web
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Dec 8, 2023
1 parent 5f5ea0b commit 02364b1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
Binary file removed examples/cernbox/cernbox-extensions-bundle.tgz
Binary file not shown.
Binary file added examples/cernbox/web-bundle.tgz
Binary file not shown.
45 changes: 22 additions & 23 deletions tests/sciencemesh/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ BRANCH_NEXTCLOUD_APP=nextcloud
REPO_OWNCLOUD_APP=https://github.com/sciencemesh/nc-sciencemesh
BRANCH_OWNCLOUD_APP=owncloud

# TODO will be dropped in favour of Reva directly serving the UI
CBOX_WEB=https://github.com/cernbox/web-release/releases/latest/download

REPO_WOPISERVER=https://github.com/cs3org/wopiserver
TAG_WOPISERVER=master

Expand Down Expand Up @@ -45,27 +42,29 @@ TAG_WOPISERVER=master
pondersource/dev-stock-owncloud-sciencemesh \
composer install

# CERNBox web and extensions sources: uid=101 is nginx in the nginx container.
# TODO the extensions are temporarily extracted from a tgz
[ ! -d "cernbox-web-sciencemesh" ] && \
mkdir -p temp/cernbox-1-conf temp/cernbox-2-conf && \
cp cernbox/nginx/* temp/cernbox-1-conf && \
cp cernbox/nginx/* temp/cernbox-2-conf && \
# CERNBox web bundle (temporary, to be served by Reva in the future):
# uid=101 is 'nginx' in the nginx container.
[ ! -d "cernbox-web-sciencemesh" ] &&
mkdir cernbox-web-sciencemesh && \
cd cernbox-web-sciencemesh &&
mkdir -p ./web && mkdir -p ./cernbox && \
wget ${CBOX_WEB}/web.tar.gz && \
tar xf web.tar.gz -C ./web --strip-components=1 && \
rm -rf web.tar.gz && \
tar xf ../cernbox/cernbox-extensions-bundle.tgz && \
cd cernbox-web-sciencemesh && \
tar xf ../cernbox/web-bundle.tgz && \
chmod -R 755 ./* && chown -R 101:101 ./* && \
cd -
cd ..

# wopiserver source code for the config.
[ ! -d "wopi-sciencemesh" ] && \
git clone --branch ${TAG_WOPISERVER} ${REPO_WOPISERVER} wopi-sciencemesh && \
mkdir -p temp/wopi-1-conf temp/wopi-2-conf && \
cp wopi-sciencemesh/wopiserver.conf temp/wopi-1-conf/wopiserver.defaults.conf && \
echo "shared-secret-2" > temp/wopi-1-conf/iopsecret && \
echo "wopisecret" > temp/wopi-1-conf/wopisecret && \
cp temp/wopi-1-conf/* temp/wopi-2-conf/
[ ! -d "wopi-sciencemesh" ] && \
git clone --branch ${TAG_WOPISERVER} ${REPO_WOPISERVER} wopi-sciencemesh \

# Runtime configurations for WOPI and CERNBox.
[ ! -d "temp" ] && \
mkdir -p temp/cernbox-1-conf temp/cernbox-2-conf && \
cp cernbox/nginx/* temp/cernbox-1-conf && \
cp cernbox/nginx/* temp/cernbox-2-conf && \
mkdir -p temp/wopi-1-conf temp/wopi-2-conf && \
cp wopi-sciencemesh/wopiserver.conf \
temp/wopi-1-conf/wopiserver.defaults.conf && \
echo "shared-secret-2" > temp/wopi-1-conf/iopsecret && \
echo "wopisecret" > temp/wopi-1-conf/wopisecret && \
cp temp/wopi-1-conf/* temp/wopi-2-conf/ && \
echo "temp folder for runtime configurations created"

3 changes: 2 additions & 1 deletion tests/sciencemesh/scripts/build-reva.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ set -e
git config --global --add safe.directory /reva
# go mod tidy
go mod vendor
make revad
make gaia
gaia build --with github.com/cernbox/reva-ocweb-plugin --with github.com/cs3org/reva=$(shell pwd) -o ./cmd/revad/revad
make reva

0 comments on commit 02364b1

Please sign in to comment.