Skip to content

Commit 8eaae05

Browse files
anatolystanslerNikolayS
authored andcommitted
fix: improve README and fix links
1 parent d36872a commit 8eaae05

File tree

1 file changed

+33
-139
lines changed

1 file changed

+33
-139
lines changed

README.md

Lines changed: 33 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,32 @@
1-
# Database Lab - Thin database clones for faster development
1+
# Database Lab - thin database clones for faster development
22

33
<img src="./assets/db-lab.png" align="right" border="0" />
4-
Database Lab allows superfast cloning of large databases to solve the following problems:
4+
Database Lab Engine is an opens-source technology that allows blazing-fast cloning of Postgres databases of any size in seconds. This helps solve many problems such as:
5+
- help build dev/QA/staging environments involving full-size production-like databases,
6+
- provide temporary full-size database clones for SQL query analysis optimization (see
7+
[Joe bot](https://gitlab.com/postgres-ai/joe)),
8+
- automatically verify database migrations (DB schema changes) and massive data operations to avoid downtime and performance bottlenecks.
59

6-
- help build development and testing environments involving full-size database,
7-
- provide temporary full-size database clones for SQL query optimization (see also:
8-
[Joe bot](https://gitlab.com/postgres-ai/joe), which works on top of Database Lab),
9-
- help verify database migrations (DB schema changes) and massive data operations.
10+
As an example, cloning of 10 TiB PostgreSQL database takes less than 2 seconds.
1011

11-
As an example, the cloning of 10 TiB PostgreSQL database takes less than 2 seconds.
12+
Read more at [Postgres.ai](https://postgres.ai) and in [the Docs](https://postgres.ai/docs).
1213

13-
In rapidly developing businesses, excellent production health requires powerful non-production environments.
14-
With Database Lab, provisioning of multi-terabyte database clones doesn't imply much
15-
waiting time or extra budgets spent anymore. Therefore, Database Lab gives necessary power to developers, DBAs,
16-
and QA engineers, boosting development and testing processes.
14+
## Why on GitLab.com?
15+
Database Lab Engine is hosted and developed on GitLab.com.
1716

17+
GitLab Inc. is our (Postgres.ai) long-term client and early adopter (see [GitLab Development Docs](https://docs.gitlab.com/ee/development/understanding_explain_plans.html#database-lab)). GitLab is open-source. Last but not least: GitLab uses PostgreSQL.
1818

19-
## Status
20-
21-
The project is in its early stage. However, it is already being extensively used
22-
in some teams in their daily work. Since production is not involved, it is
23-
quite easy to try and start using it.
24-
25-
Please support the project giving a GitLab star (it's on [the main page](https://gitlab.com/postgres-ai/database-lab),
26-
at the upper right corner):
19+
However, nowadays, not many open-source projects are hosted at GitLab.com unfortunately. Please support the project giving a GitLab star! It's on [the main page](https://gitlab.com/postgres-ai/database-lab), at the upper right corner:
2720

2821
![Add a star](./assets/star.gif)
2922

30-
To discuss Database Lab, try a demo, or ask any questions,
31-
[join our community Slack](https://database-lab-team-slack-invite.herokuapp.com/).
32-
33-
34-
## Usage examples
35-
- Perform SQL optimization in a convenient way (see [postgres-ai/joe](https://gitlab.com/postgres-ai/joe))
36-
- Check database schema changes (database migrations) on full-sized database clones using Database Lab in CI (see [postgres-ai/ci-example](https://gitlab.com/postgres-ai/ci-example))
37-
38-
39-
## Workflow overview and requirements
40-
41-
**TL;DR:** you need:
42-
- any machine with a separate disk that is big enough to store a single copy of your database,
43-
- Linux with Docker,
44-
- ZFS to enable thin cloning (the default option; also, LVM is supported as an alternative),
45-
- initial copy of your Postgres database.
46-
47-
Details:
48-
- for each Database Lab instance, a separate machine (either physical or virtual) is needed,
49-
- both on-premise and cloud setups are possible,
50-
- for each Postgres cluster (a single Postgres server with databases), a separate Database Lab instance is required,
51-
- the machine needs to have a separate disk partition with size enough to store the target Postgres directory (PGDATA),
52-
- any modern Linux is supported,
53-
- Docker needs to be installed on the machine,
54-
- currently, you need to take care yourself of the initial copying of the database to this disk ("thick cloning" stage),
55-
use pg_basebackup, restoration from an archive (such as WAL-G, Barman, pgBackRest or any), or dump/restore (the only way
56-
supported for RDS, until AWS guys decide to allow replication connections),
57-
- upon request, Database Lab will do "thin cloning" of PGDATA, providing fully independent writable
58-
Postgres clones to users;
59-
- currently, two technologies are supported for thin cloning:
60-
- ZFS: [ZFS on Linux](https://zfsonlinux.org/) needs to be installed on the machine,
61-
- LVM: with [LVM](https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)), all thin clones will be based on the latest version of the database (with ZFS, you can have multiple snapshots prepared and choose which one to use when requesting a new thin clone).
62-
- it is easy to extend and add, Ceph - please contact us if you need it;
63-
- comments, bug reports, and contributions are highly welcome.
64-
65-
66-
## Server installation and setup
67-
See [detailed tutorial](https://postgres.ai/docs/database-lab/1_tutorial)
68-
in our documentation.
23+
## Engine setup
24+
See Database Lab tutorials:
25+
- [Database Lab tutorial for Amazon RDS](https://postgres.ai/docs/tutorials/database-lab-tutorial-amazon-rds),
26+
- [Database Lab tutorial for any PostgreSQL database](https://postgres.ai/docs/tutorials/database-lab-tutorial).
6927

7028
For stable Docker images see [postgresai/dblab-server](https://hub.docker.com/repository/docker/postgresai/dblab-server) repository on DockerHub.
7129

72-
7330
## Client CLI
7431
### Installation
7532
Install Database Lab client CLI on a Linux architecture (e.g., Ubuntu):
@@ -79,99 +36,36 @@ curl https://gitlab.com/postgres-ai/database-lab/-/raw/master/scripts/cli_instal
7936

8037
Also, binaries available for download: [Alpine](https://gitlab.com/postgres-ai/database-lab/-/jobs/artifacts/master/browse?job=build-binary-alpine), [other](https://gitlab.com/postgres-ai/database-lab/-/jobs/artifacts/master/browse?job=build-binary-generic).
8138

82-
83-
### Usage
84-
See the full client CLI reference [here](https://postgres.ai/docs/database-lab/6_cli_reference).
85-
86-
Once you have Database Lab server(s) intalled, and client CLI installed on your machine,
87-
initialize CLI and start communicating with the Database Lab server(s).
88-
89-
### Initialize CLI tool
90-
```bash
91-
dblab init \
92-
--environment-id=tutorial \
93-
--url=http://$IP_OR_HOSTNAME:2345 \
94-
--token=secret_token
95-
```
96-
97-
### Check connection availability
98-
Access your Database Lab instance and check its status.
99-
```bash
100-
dblab instance status
101-
```
102-
103-
### Request clone creation
104-
When your Database Lab instance is up and running you can use it to create thin
105-
clones, work with them, delete the existing clones, and see the list of
106-
existing clones. To create a thin clone, you need to execute a `dblab clone create`
107-
and fill all the required options, as illustrated below:
108-
109-
```bash
110-
dblab clone create \
111-
--username dblab_user_1 \
112-
--password secret_password \
113-
--id my_first_clone
114-
```
115-
116-
After a few seconds, if everything is configured correctly, you will see
117-
that the clone is ready to be used:
118-
```json
119-
{
120-
"id": "botcmi54uvgmo17htcl0",
121-
"snapshot": {
122-
"id": "dblab_pool@initdb",
123-
...
124-
},
125-
"status": {
126-
"code": "OK",
127-
"message": "Clone is ready to accept Postgres connections."
128-
},
129-
"db": {
130-
"connStr": "host=localhost port=6000 user=dblab_user_1",
131-
"host": "localhost",
132-
"port": "6000",
133-
"username": "dblab_user_1",
134-
"password": ""
135-
},
136-
...
137-
}
138-
```
139-
140-
141-
### Connect
142-
Now you can work with this clone using any PostgreSQL client, for example `psql`:
143-
```bash
144-
PGPASSWORD=secret_password \
145-
psql "host=${IP_OR_HOSTNAME} port=6000 user=dblab_user_1 dbname=test" \
146-
-c '\l+'
147-
```
148-
39+
### How to use CLI
40+
- [How to install and initialize Database Lab CLI](https://postgres.ai/docs/guides/cli/cli-install-init)
41+
- [Database Lab Client CLI reference (dblab)](https://postgres.ai/docs/database-lab/cli-reference)
14942

15043
## Docker Hub
15144
- [Server](https://hub.docker.com/repository/docker/postgresai/dblab-server)
15245
- [CLI client](https://hub.docker.com/repository/docker/postgresai/dblab)
15346
- [Custom Postgres images](https://hub.docker.com/repository/docker/postgresai/extended-postgres)
15447

155-
15648
## References
49+
- [Database Lab Engine configuration reference](https://postgres.ai/docs/database-lab/config-reference)
15750
- [API reference](https://postgres.ai/swagger-ui/dblab/)
158-
- [CLI reference](https://postgres.ai/docs/database-lab/6_cli_reference)
51+
- [CLI reference](https://postgres.ai/docs/database-lab/cli-reference)
52+
53+
## Development
54+
Open [an Issue](https://gitlab.com/postgres-ai/database-lab/-/issues) to discuss ideas, open [a Merge Request](https://gitlab.com/postgres-ai/database-lab/-/merge_requests) to propose a change.
15955

56+
See our [GitLab Container Registry](https://gitlab.com/postgres-ai/database-lab/container_registry) for develop Docker images.
57+
<!-- TODO: SDK docs -->
58+
<!-- TODO: Contribution guideline -->
16059

161-
## Have questions?
162-
- Check our [Q&A](https://postgres.ai/docs/get-started#qa)
163-
- or join our community (links below)
60+
### Development requirements
61+
1. Install `golangci-lint`: https://github.com/golangci/golangci-lint#install
16462

63+
## Have a question?
64+
- Check our [Q&A](https://postgres.ai/docs/questions-and-answers)
65+
- or join our Community (links below)
16566

16667
## Community
16768
- [Community Slack (English)](https://database-lab-team-slack-invite.herokuapp.com/)
16869
- [Telegram (Russian)](https://t.me/databaselabru)
70+
- [Twitter](https://twitter.com/Database_Lab)
16971

170-
171-
## Development
172-
See our [GitLab Container Registry](https://gitlab.com/postgres-ai/database-lab/container_registry) for develop Docker images.
173-
174-
### Requirements
175-
1. Install `golangci-lint`: https://github.com/golangci/golangci-lint#install
176-
<!-- TODO: SDK docs -->
177-
<!-- TODO: Contribution guideline -->

0 commit comments

Comments
 (0)