Announcing DoltLab v1.0.0, now backed by Dolt
In early May we announced Dolt v1.0.0, the first stable release of Dolt, signaling that Dolt is ready for production use. Shortly thereafter we revealed that DoltHub.com now runs on Dolt. In my previous blog post I explain how we transitioned DoltHub from PostgreSQL to a Hosted Dolt instance with minimal downtime and interruptions to our users.
Today, we're excited to announce the release of DoltLab v1.0.0 which is also now backed by Dolt!
If you haven't tried DoltLab yet, now is the perfect time to do so. DoltLab is the self-hosted version of DoltHub, which means you get the sleek UI and features of DoltHub, like pull-request workflows and online database viewing and editing tools, in a service suite you operate and manage yourself.
For first-time DoltLab users, v1.0.0
is a great place to start. You can follow our installation guide to get your own instance up and running, and consult the administration guide when you're ready to do more advanced instance management.
For existing DoltLab users, I'll cover the changes between DoltLab v1.0.0
and its previous version v0.8.4
, and go over how to successfully migrate your DoltLab v0.8.4
data onto your v1.0.0
instance.
From v0.8.4 to v1.0.0
The main difference between DoltLab v0.8.4
and v1.0.0
is its database change from PostgreSQL to Dolt. DoltLab v0.8.4
runs a PostgreSQL server as part of its deployment that persists data in a Docker volume named doltlab_doltlabdb-data
. On the other hand, DoltLab v1.0.0
runs a Dolt server as part of its deployment and it persists data in a few different Docker volumes.
The most crucial of these volumes is named doltlab_doltlabdb-dolt-data
. This volume stores the data of the Dolt server. A volume named doltlab_doltlabdb-dolt-root
stores the files in the Dolt server's DOLT_ROOT_PATH
, useful for global configuration and authentication. doltlab_doltlabdb-dolt-configs
stores the the Dolt server's configuration files, and finally, doltlab_doltlabdb-dolt-backups
is a convenience volume useful for easily creating local backups of the Dolt server.
These volumes are automatically created when the .start-doltlab.sh
script of DoltLab v1.0.0
is executed, and will remain unless manually deleted.
When you first download and run DoltLab v1.0.0
, if you've had an existing v0.8.4
deployment before, when DoltLab comes up, you should see that your instance is empty. There will be no databases and no users (except for admin
). This is expected.
The reason for this is because the old DoltLab version is referencing the PostgreSQL server and volume and the new DoltLab version is referencing the (currently empty) Dolt server and corresponding volume. But, rest assured, copying your existing data from PostgreSQL to Dolt is very easy. DoltLab v1.0.0
ships with a script called migrate-postgres-dolt.sh
which will do this very thing for you.
Migrating from PostgreSQL to Dolt
Please note, if the previous version of DoltLab you were running is lower than version v0.8.4
, upgrade to DoltLab v0.8.4
before attempting to run DoltLab v1.0.0
and migrate the data. Older versions of DoltLab may not have the schema that DoltLab and the migration script require, which could cause problems during the migration step.
Before using the migration script, if you have not done so already, stop running the old version of DoltLab with the docker-compose stop
command. Next, download and unzip DoltLab v1.0.0
to the same location as your previous version of DoltLab, typically a path like ./doltlab
.
cd
into ./doltlab
and run the included ./start-doltlab.sh
for DoltLab v1.0.0
for the first time. You only need to run the new version of DoltLab briefly so that the script creates the new volumes required for DoltLab v1.0.0
, which are listed in the section above.
export HOST_IP=<Host IP>
export DOLT_PASSWORD=<Password> # used to be POSTGRES_PASSWORD
export DOLTHUBAPI_PASSWORD=<Password>
export EMAIL_USERNAME=<SMTP Email Username>
export EMAIL_PASSWORD=<SMTP Email Password>
export EMAIL_PORT=<STMP Email Port>
export EMAIL_HOST=<SMTP Email Host>
export NO_REPLY_EMAIL=<An Email Address to Receive No Reply Messages>
./start-doltlab.sh
The latest version of ./start-doltlab.sh
included with DoltLab v1.0.0
requires a different environment variable than the previous version of the script. The environment variable POSTGRES_PASSWORD
has been replaced with DOLT_PASSWORD
. Supply this environment variable when you run the script and once DoltLab v1.0.0
comes up, after a few moments, you can stop it using the docker-compose stop
command once again.
Next, verify that the new volumes we expect to see have been created. You can do this with the docker volume ls
command:
docker volume ls
DRIVER VOLUME NAME
...
local doltlab_doltlab-remote-storage # remote data volume, used in both DoltLab versions
local doltlab_doltlab-user-uploads # user uploaded data volume, used in both DoltLab versions
local doltlab_doltlabdb-data # postgres data volume, used only in DoltLab v0.8.4
local doltlab_doltlabdb-dolt-backups # dolt server local backups volume, used only in DoltLab v1.0.0+
local doltlab_doltlabdb-dolt-configs # dolt server configs volume, used only in DoltLab v1.0.0+
local doltlab_doltlabdb-dolt-data # dolt server data volume, used only in DoltLab v1.0.0+
local doltlab_doltlabdb-dolt-root # dolt server DOLT_ROOT_PATH volume, used only in DoltLab v1.0.0+
...
Once the volumes have been created and you've stopped DoltLab v1.0.0
, you can run the migrate-postgres-dolt.sh
script. This script spins up a new Docker container connected to the PostgresSQL volume doltlab_doltlabdb-data
, creates a snapshot of the data in this volume, then connects to the Dolt server volume doltlab_doltlabdb-dolt-data
, and imports the data.
export POSTGRES_PASSWORD=<POSTGRES_PASSWORD>
export DOLT_PASSWORD=<DOLT_PASSWORD>
export DOLTHUBAPI_PASSWORD=<DOLTHUBAPI_PASSWORD>
./migrate_postgres_dolt.sh
The script completes successfully by printing "Successfully migrated DoltLab postgres data to dolt". If for some reason an error occurs during the execution of the migration script, you will need to delete the temporary Docker containers created by this script before attempting to run it again.
You can do so by running:
docker container stop doltlab-postgres-server && \
docker container rm doltlab-postgres-server && \
docker container stop doltlab-dolt-sql-server && \
docker container rm doltlab-dolt-sql-server
Then, you can safely remove the doltlab_doltlabdb-dolt-data
volume since the migration failed, but be sure to keep the doltlab_doltlabdb-data
, the PostgreSQL volume, until the migration succeeds.
Try starting and stopping DoltLab v1.0.0
once more using the ./start-doltlab.sh
script to recreate the doltlab_doltlabdb-dolt-data
volume, then try running the migrate-postgres-dolt.sh
script once more.
If the script succeeded you can now restart DoltLab v1.0.0
and all of your existing instance's data will be present on the deployment.
Conclusion
We hope you give DoltLab a try, and let us know about how you're using it to improve your data workflows. We love getting feedback, questions, and feature requests from our community so if there's anything you'd like to see added in DoltHub, DoltLab or one of our other products, please don't hesitate to reach out.
You can check out each of our different product offerings below, to find which ones are right for you:
- Dolt—it's Git for data.
- DoltHub—it's GitHub for data.
- DoltLab—it's GitLab for data.
- Hosted Dolt—it's RDS for Dolt databases.