File tree 3 files changed +19
-2
lines changed
Filter options
3 files changed +19
-2
lines changed
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ sudo docker rm dblab_pg_initdb
36
36
# ## Step ?. Configure and launch the Database Lab server
37
37
mkdir -p ~ /.dblab
38
38
cp ./configs/config.example.physical_generic.yml ~ /.dblab/server_test.yml
39
+ sed -ri ' s/^(\s*)(host:.*$)/\1host: ""/' ~ /.dblab/server_test.yml
39
40
sed -ri ' s/^(\s*)(port: 2345$)/\1port: 12345/' ~ /.dblab/server_test.yml
40
41
sed -ri ' s/^(\s*)(debug:.*$)/\1debug: true/' ~ /.dblab/server_test.yml
41
42
sed -ri ' s/^(\s*)(pool:.*$)/\1pool: "test_pool"/' ~ /.dblab/server_test.yml
@@ -52,4 +53,15 @@ sudo docker run \
52
53
--volume ~ /.dblab/server_test.yml:/home/dblab/configs/config.yml \
53
54
" ${IMAGE2TEST} "
54
55
55
- # ## Step ?. Setup Database Lab client CLI
56
+ # ## Waiting fori dblab initialization
57
+ while true ; do
58
+ curl http://localhost:12345 && break
59
+ sleep 10
60
+ done
61
+
62
+ # ## Step ?. Setup Dnd init atabase Lab client CLI
63
+ curl https://gitlab.com/postgres-ai/database-lab/-/raw/master/scripts/cli_install.sh | bash
64
+ dblab --version
65
+ dblab init --url http://localhost:12345 --token secret_token --environment-id test
66
+ dblab instance status
67
+
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -euxo pipefail
3
3
4
+
4
5
ZFS_FILE=" $( pwd) /zfs_file"
5
6
6
7
# TODO: docker rm for all containers that are related to dblab
@@ -10,6 +11,9 @@ sudo docker ps -a --filter 'label=dblab_control' \
10
11
| sudo xargs --no-run-if-empty docker rm -f \
11
12
|| true
12
13
sudo zpool destroy test_pool || true
14
+ sudo rm -rf /var/lib/dblab/data/
13
15
sudo umount /var/lib/dblab/data || true
14
16
sudo rm -f " ${ZFS_FILE} "
15
17
rm -f ~ /.dblab/server_test.yml
18
+
19
+ dblab config remove test
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ curl --version || sudo apt-get update && sudo apt-get install -y \
6
6
ca-certificates \
7
7
curl \
8
8
gnupg-agent \
9
- software-properties-common
9
+ software-properties-common \
10
+ curl
10
11
11
12
# ZFS
12
13
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
You can’t perform that action at this time.
0 commit comments