Refactoring damengdb stand
This commit is contained in:
parent
4c7516119b
commit
5d07a93187
|
@ -427,6 +427,7 @@ create_dameng_tbl() {
|
|||
(cd /opt/dmdbms/bin/ && ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT -e "create user "onlyoffice" identified by "onlyoffice" password_policy 0;")
|
||||
|
||||
# Create db on remote server
|
||||
echo "EXIT" | tee -a $APP_DIR/server/schema/dameng/createdb.sql
|
||||
(cd /opt/dmdbms/bin/ && ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT \`$APP_DIR/server/schema/dameng/createdb.sql)
|
||||
}
|
||||
|
||||
|
|
18
tests/damengdb/README.md
Normal file
18
tests/damengdb/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
## Stand Documentserver with damengdb
|
||||
|
||||
### How it works
|
||||
|
||||
#### Only on the first run:
|
||||
|
||||
The first deployment of the stand requires the execution of scripts to prepare the environment.
|
||||
|
||||
***First:*** It is necessary to obtain an image of the dameng db database. To do this, run the script:
|
||||
bash damengdb-get-image.sh
|
||||
|
||||
***Second:*** After the image is obtained, it is also necessary to obtain a binary DISQL files that is used for remote access to the database service. To do this, run the script:
|
||||
bash damengdb-get-disql.sh
|
||||
|
||||
### Deploy stand
|
||||
|
||||
After db image and disql binary is ready, you cant deploy stand with flexible build number with simple command:
|
||||
BUILD=<build-number-from-develop> docker compose up -d
|
8
tests/damengdb/damengdb-get-disql.sh
Executable file
8
tests/damengdb/damengdb-get-disql.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
# Get disql for remote access
|
||||
docker run -d -p 5236:5236 --restart=always --name dm8_01 --privileged=true -e PAGE_SIZE=16 -e LD_LIBRARY_PATH=/opt/dmdbms/bin -e INSTANCE_NAME=dm8_01
|
||||
echo "Disql bin will be copied from dm8 container. Please wait couple of minutes"
|
||||
sleep 60
|
||||
docker cp dm8_01:/opt/dmdbms/bin .
|
||||
docker stop dm8_01 ; docker rm dm8_01
|
||||
echo "OK: Disql bin files ready"
|
|
@ -2,7 +2,5 @@
|
|||
# Download dameng image
|
||||
wget -O dm8_docker.tar -c https://download.dameng.com/eco/dm8/dm8_20220822_rev166351_x86_rh6_64_ctm.tar
|
||||
docker load -i dm8_docker.tar
|
||||
echo "OK: Dameng image ready. Now you can run: docker compose up -d"
|
||||
# Extract disql bin files
|
||||
tar -xvf disql.tar
|
||||
echo "OK: disql files was extracted in ./bin folder"
|
||||
echo "OK: Dameng image already downloaded"
|
||||
rm -rf dm8_docker.tar
|
|
@ -25,6 +25,8 @@ services:
|
|||
restart: always
|
||||
stop_grace_period: 60s
|
||||
volumes:
|
||||
- ../../run-document-server.sh:/app/ds/run-document-server.sh
|
||||
- ./bin:/opt/dmdbms/bin/
|
||||
- /var/www/onlyoffice/Data
|
||||
- /var/log/onlyoffice
|
||||
- /var/lib/onlyoffice/documentserver/App_Data/cache/files
|
Loading…
Reference in a new issue