-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathmulti-node-test-setup.sh
executable file
·46 lines (37 loc) · 2.43 KB
/
multi-node-test-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
set -eux
mvn clean install -DtrimStackTrace=false
cd build
find * -maxdepth 0 -type d -exec echo '{}' \; -exec rm -rI '{}' \;
tar xf opencast-dist-admin-*.tar.gz
tar xf opencast-dist-presentation-*.tar.gz
tar xf opencast-dist-worker-*.tar.gz
mkdir -p shared-storage
ln -s ../../shared-storage opencast-dist-admin/data/opencast
ln -s ../../shared-storage opencast-dist-presentation/data/opencast
ln -s ../../shared-storage opencast-dist-worker/data/opencast
sed -i 's_localhost:8080_localhost:8081_' opencast-dist-presentation/etc/custom.properties
sed -i 's_localhost:8080_localhost:8082_' opencast-dist-worker/etc/custom.properties
sed -i 's_port=8080_port=8081_' opencast-dist-presentation/etc/org.ops4j.pax.web.cfg
sed -i 's_port=8080_port=8082_' opencast-dist-worker/etc/org.ops4j.pax.web.cfg
for node in admin presentation worker; do
# configure database
sed -i 's_^.*db.jdbc.driver=.*$_org.opencastproject.db.jdbc.driver=org.postgresql.Driver_' \
"opencast-dist-${node}/etc/custom.properties"
sed -i 's_^.*db.jdbc.url=.*$_org.opencastproject.db.jdbc.url=jdbc:postgresql://127.0.0.1/opencast_' \
"opencast-dist-${node}/etc/custom.properties"
sed -i 's_^.*db.jdbc.user=.*$_org.opencastproject.db.jdbc.user=opencast_' \
"opencast-dist-${node}/etc/custom.properties"
sed -i 's_^.*db.jdbc.pass=.*$_org.opencastproject.db.jdbc.pass=dbpassword_' \
"opencast-dist-${node}/etc/custom.properties"
# configure organization
sed -i 's_^.*admin.ui.url=.*$_prop.org.opencastproject.admin.ui.url=http://localhost:8080_' \
"opencast-dist-${node}/etc/org.opencastproject.organization-mh_default_org.cfg"
sed -i 's_^.*engage.ui.url=.*$_prop.org.opencastproject.engage.ui.url=http://localhost:8081_' \
"opencast-dist-${node}/etc/org.opencastproject.organization-mh_default_org.cfg"
sed -i 's_^.*file.repo.url=.*$_prop.org.opencastproject.file.repo.url=${prop.org.opencastproject.admin.ui.url}_' \
"opencast-dist-${node}/etc/org.opencastproject.organization-mh_default_org.cfg"
done
sed -i 's_^.*dispatch.interval=.*$_dispatch.interval=2_' opencast-dist-admin/etc/org.opencastproject.serviceregistry.impl.ServiceRegistryJpaImpl.cfg
sed -i 's_^.*dispatch.interval=.*$_dispatch.interval=0_' opencast-dist-presentation/etc/org.opencastproject.serviceregistry.impl.ServiceRegistryJpaImpl.cfg
sed -i 's_^.*dispatch.interval=.*$_dispatch.interval=0_' opencast-dist-worker/etc/org.opencastproject.serviceregistry.impl.ServiceRegistryJpaImpl.cfg