create bases

This commit is contained in:
Dmitry Belyaev 2022-11-03 00:35:43 +03:00
parent 068b6137b1
commit 56ca8cc70f
1 changed files with 15 additions and 0 deletions

View File

@ -300,6 +300,21 @@ autoinstall:
# apt-get install -y wsdd
# systemctl enable wsdd.service --now
# --- create bases ---
- |
set -x
export PATH="$PATH:/opt/1cv8/x86_64/current"
export DB_ADDR=localhost
export CLUSTER_ADDR=localhost
export CLUSTER_ID=$(rac cluster list $CLUSTER_ADDR | rg -e "^cluster\s*:" -m 1 | rg -e "[[:xdigit:]-]{36}" -o)
rac infobase --cluster=$CLUSTER_ID create --create-database --name=test1 --dbms=PostgreSQL --db-server=$DB_ADDR --db-name=test1 --locale=ru --db-user=postgres --db-pwd=postgres --license-distribution=allow $CLUSTER_ADDR
rac infobase --cluster=$CLUSTER_ID create --create-database --name=test2 --dbms=PostgreSQL --db-server=$DB_ADDR --db-name=test2 --locale=ru --db-user=postgres --db-pwd=postgres --license-distribution=allow $CLUSTER_ADDR
rac infobase --cluster=$CLUSTER_ID create --create-database --name=test3 --dbms=PostgreSQL --db-server=$DB_ADDR --db-name=test3 --locale=ru --db-user=postgres --db-pwd=postgres --license-distribution=allow $CLUSTER_ADDR
sudo -u admin1c sh -exc "cd /home/admin1c/webpub1c && . venv/bin/activate && python webpub1c.py add_module && python webpub1c.py add test1 && python webpub1c.py add test2 && python webpub1c.py add test3"
systemctl restart apache2
# --- final ---
- |
set -x