Administrator Guide
This guide will cover how to perform common DoltLab administrator configuration and tasks for versions <= v2.0.8
which do not use the installer
binary.
Backup and restore volumes
DoltLab persists all data to local disk using Docker volumes. To backup or restore DoltLab's data, we recommend the following steps which follow Docker's official volume backup and restore documentation, with the exception of DoltLab's PostgreSQL server.
DoltLab <= v0.8.4
uses PostgreSQL as its database and DoltLab v1.0.0
+ uses Dolt. To backup the PostgreSQL server we recommend dumping the database with pg_dump
and restoring the database from the dump using psql
. To backup the Dolt server we recommend using Docker's volume backup and restore process, or Dolt's built-in backup and restore features.
Backing up and restoring remote data, user uploaded data, and Dolt server data with Docker
To backup DoltLab's remote data, the database data for all database on a given DoltLab instance, leave DoltLab's services up and run:
This will create a tar file called remote-data.tar
in your working directory.
To backup user uploaded files, run:
This will create a tar file called user-uploaded-data.tar
in your working directory.
To backup Dolt server data, run:
Before restoring DoltLab's volumes from a backup, first, stop the running DoltLab services, prune
the Docker containers, and remove the old volume(s):
Next, start DoltLab's services using the start-doltlab.sh
script. After the script completes, stop DoltLab once more with docker-compose stop
. Doing this will recreate the required containers so that their volumes can be updated with the commands below.
Once the services are stopped, cd
into the directory containing the remote-data.tar
backup file and run:
To restore user uploaded data, cd
into the directory containing user-uploaded-data.tar
and run:
To restore Dolt server root data, cd
into the directory containing doltlabdb-root.tar
and run:
To restore Dolt server config data, cd
into the directory containing doltlabdb-configs.tar
and run:
To restore Dolt server data, cd
into the directory containing doltlabdb-data.tar
and run:
To restore Dolt server local backup data, cd
into the directory containing doltlabdb-backups.tar
and run:
You can now restart DoltLab, and should see all data restored from the tar
files.
Backing up and restoring PostgreSQL data
For DoltLab versions <= v0.8.4
, to backup data from DoltLab's postgres server, we recommend executing a data dump with pg_dump
. To do so, keep DoltLab's services up and run:
For DoltLab
v0.7.0
and later, use--network doltlab
below.
The value of PGPASSWORD
should be the POSTGRES_PASSWORD
set when DoltLab was first deployed.
To restore a postgres server from postgres-dump.sql
, first stop the running DoltLab services, remove the stopped containers, and remove the old postgres server volume:
Next, edit the postgres-dump.sql
file by adding the line SET session_replication_role = replica;
near the top of the file:
Start DoltLab's services again using the start-doltlab.sh
script. After the script completes, cd
into the directory containing the postgres-dump.sql
file and run:
For DoltLab
v0.7.0
and later, use--network doltlab
below.
Backing up and restoring the Dolt server with dolt backup
dolt backup
DoltLab v1.0.0
+ uses Dolt as its database. To back up the Dolt server of DoltLab using Dolt's built-in backup and restore features, keep DoltLab's services up and open a connection to the database. The quickest way to do this is with the ./shell-db.sh
script included with DoltLab:
Next, add a local backup using the DOLT_BACKUP()
stored procedure. By default, DoltLab uses a Docker volume backed by the host's disk that allows you to create backups of the Dolt server. These backups will be located at /backups
from within the Dolt server container. To create persistent backups, simply use /backups
as the path prefix to the backup names:
The above snippet will create a new backup stored at /backups/dolthubapi/2023/06/01
within the Dolt server container, and persisted to the host using the Docker volume doltlab_doltlabdb-dolt-backups
.
You can sync the backup with the sync
command:
The local backup is now synced, and you can now disconnect the shell.
At the time of this writing, Dolt only supports restoring backups using the CLI. To restore the Dolt server from a local backup, stop DoltLab's services using docker-compose stop
. Then, use the ./dolt_db_cli.sh
included with DoltLab to open a container shell with access to the Dolt server volumes.
Delete the existing ./dolthubapi
directory located at /var/lib/dolt
from within this container:
Doing this removes the existing Dolt server database. Now, use dolt backup restore to restore the database from the backup located at /backups/dolthubapi/2023/06/01
:
The database has now been successfully restored, and you can now restart DoltLab.
Authenticate a Dolt client to use a DoltLab account
As of Dolt v0.39.0
, the dolt login command can be used to authenticate against DoltLab instances.
To authenticate a client against DoltLab with this command, use the --auth-endpoint
, --login-url
, and --insecure
arguments to point your Dolt client at the DoltLab instance you want to authenticate against.
--auth-endpoint
should point at the DoltLab RemoteAPI Server running on port 50051
. --login-url
should point at the DoltLab instance's credentials page. --insecure
a boolean flag, should be used since DoltLab does not currently support TLS gRPC
connections.
Running the command will open your browser window to the --login-url
with credentials populated in the "Public Key" field. Simply add a "Description" and click "Create", then return to your terminal to see your Dolt client successfully authenticated.
For Dolt clients < v0.39.0
, or to authenticate without using the dolt login
command, first run the dolt creds new command, which will output a new public key:
Copy the generated public key and run the dolt creds use command:
Next, login to your DoltLab account, click your profile image, then click "Settings" and then "Credentials".
Paste the public key into the "Public Key" field, write a description in the "Description" field, then click "Create".
Your Dolt client is now authenticated for this DoltLab account.
Monitor DoltLab with cAdvisor and Prometheus
As of DoltLab v0.3.0
, Prometheus gRPC service metrics for DoltLab's Remote API Server, doltlabremoteapi
, and DoltLab's Main API server, doltlabapi
, are published on port 7770
.
The metrics endpoints for these services are available at endpoints corresponding to their container name. For DoltLab's Remote API, thats :7770/doltlabremoteapi
, and for DoltLab's Main API that's :7770/doltlabapi
.
You can view the doltlabremoteapi
service metrics for our DoltLab demo instance here, http://doltlab.dolthub.com:7770/doltlabremoteapi and you can view the doltlabapi
service metrics here http://doltlab.dolthub.com:7770/doltlabapi.
To make these endpoints available to Prometheus, open port 7770
on your DoltLab host.
We recommend monitoring DoltLab with cAdvisor, which will expose container resource and performance metrics to Prometheus. Before running cAdvisor
, open port 8080
on your DoltLab host as well. cAdvisor
will display DoltLab's running containers via a web UI on :8080/docker
and will publish Prometheus metrics for DoltLab's container at :8080/metrics
by default.
Run cAdvisor
as a Docker container in daemon mode with:
To run a Prometheus server on your DoltLab host machine, first open port 9090
on the DoltLab host. Then, write the following prometheus.yml
file on the host:
Then, start the Prometheus server as a Docker container running in daemon mode:
--add-host host.docker.internal:host-gateway
is only required if running the Prometheus server on the DoltLab host. If running it elsewhere, this argument may be omitted, and the host.docker.internal
hostname in prometheus.yml
can be changed to the hostname of your DoltLab host.
Connect to an SMTP server with implicit TLS
For DoltLab >= v0.4.2
and < v2.1.0
, connections to existing SMTP servers using implicit TLS (on port 465
, for example) are supported. To connect using implicit TLS, edit the docker-compose.yaml
included in the DoltLab zip. Under the doltlabapi
section, in the command
block, add the following argument:
After adding the argument, restart DoltLab for it to take effect. Additionally, TLS verification can be skipped by adding the additional argument -emailInsecureTLS
.
Troubleshoot SMTP server connection problems
DoltLab requires a connection to an existing SMTP server in order for users to create accounts, verify email addresses, reset forgotten passwords, and collaborate on databases.
Starting with DoltLab v0.4.1
, the default user admin
is created when DoltLab starts up, which allows admins to sign-in to their DoltLab instance even if they are experiencing SMTP server connection issues.
To help troubleshoot and resolve SMTP server connection issues, we've published the following go tool to help diagnose the SMTP connection issues on the host running DoltLab.
Starting with DoltLab v0.4.2
, this tool is now included as an executable binary in DoltLab's zip, called smtp_connection_helper
.
For usage run ./smtp_connection_helper --help
which will output:
To send a test email using plain
authentication, run:
To send a test email using plain
authentication with implicit TLS, run:
To quickly get up and running with an existing SMTP server, we recommend using Gmail's. Once you've created a Gmail account, navigate to your account page and click the Security tab. Under the section "How you sign in to Google", click 2-Step Verification
. If you have not yet setup 2-Step Verification, follow the prompts on this page to enable it.
After 2-Step Verification is set up, at the bottom of the page click "App passwords". Select app Mail
and select a device, then click "Generate" to generate a password. This generated password can be supplied along with your Gmail email address to send emails with smtp_connection_helper
and DoltLab.
Prevent unauthorized user account creation
DoltLab for non-enterprise use currently supports explicit email whitelisting to prevent account creation by unauthorized users.
In DoltLab < v2.1.0
, to enable DoltLab's email whitelisting feature, edit the docker-compose.yaml
file included in DoltLab's zip.
Under the doltlabapi
section, in the command
block, remove the argument -dolthubWhitelistAllowAll
. Restart your DoltLab instance for this to take effect.
Once DoltLab is restarted, your DoltLab instance will now check a PostgreSQL table called email_whitelist_elements
before permitting account creation. Only user's with email addresses present in this table will be able to create accounts on your DoltLab instance.
To whitelist an email for account creation in your instance, you will need to insert their email address into the email_whitelist_elements
table.
As of DoltLab v0.4.2
, a script to easily connect to your DoltLab instance's running PostgreSQL server is included in the zip, called shell-db.sh
.
Use this script by supplying the POSTGRES_PASSWORD
you used to start your DoltLab instance, as PGPASSWORD
here. Run:
You will see a dolthubapi=#
PostgresSQL prompt connected to your DoltLab instance.
You can now execute the following INSERT
to allow a specific user with example@address.com
to create an account on your DolLab instance:
For DoltLab >= v1.0.0
the same script can be used to update the email_whitelist_elements
table, but expects DOLT_PASSWORD
in place of PGPASSWORD
. It will also open a mysql>
prompt.
Use an external database server with DoltLab
For DoltLab v0.8.4
and earlier, you can connect a DoltLab instance to an external PostgreSQL server version 13
or later. To connect, in DoltLab's docker-compose.yaml
, supply the host and port for the external server to doltlabapi
's -pghost
and -pgport
arguments.
You can also remove the doltlabdb
section and all references to it and doltlabdb-data
in the docker-compose.yaml
file.
Before (re)starting DoltLab with this change, you will also need to execute the following statements in your external PostgreSQL server:
For DoltLab v1.0.0
or later, you can connect a DoltLab instance to an external Dolt server version v1.0.0
or later. To connect, in DoltLab's docker-compose.yaml
, supply the host and port for the external server to doltlabapi
's -doltHost
and -doltPort
arguments.
Like with the external PostgreSQL changes described above, you can remove the doltlabdb
section and all references to it and doltlabdb-dolt-data
, doltlabdb-dolt-root
, doltlabdb-dolt-configs
, and doltlabdb-dolt-backups
in the docker-compose.yaml
file.
Finally, before (re)starting DoltLab with this change, you will also need to execute the following statements in your external Dolt server:
Expose a DoltLab instance with ngrok
As of DoltLab v0.5.5
, DoltLab instances can be exposed with ngrok. "How to expose DoltLab with ngrok" contains the instructions for this process, however, we do not recommend doing this for production DoltLab instances. This process requires one of DoltLab's services to be run without authentication, which may expose sensitive data. Do this at your own risk.
DoltLab Jobs
Jobs were introduced on DoltHub and are now available on DoltLab ^v0.7.0
. DoltLab Jobs are stand-alone, long-running Docker containers that perform specific tasks for DoltLab users behind the scenes.
As a result of the Jobs infrastructure, DoltLab now requires more memory and disk. The amount of each of these depends on how users will use your instance.
We recommend running DoltLab on a host with at least 64 GB of memory, and 20 TBs of disk. These recommended amounts will decrease as we continue to improve Dolt's resource efficiency and utilization.
Disable usage metrics
By default, DoltLab collects first-party metrics for deployed instances. We use DoltLab's metrics to determine how many resources to allocate toward its development and improvement.
As of v0.7.0
, DoltLab does not collect third-party metrics, and additionally, DoltLab's first-party metrics can be disabled. To disable metrics, edit the start-doltlab.sh
script and remove run_with_metrics
from the _main
function.
Migrate old format DoltLab databases
Unlike DoltHub, DoltLab does not support automatic database migration for old format Dolt databases. Instead, old format database hosted on DoltLab need to be migrated manually. To migrate a DoltLab database:
Create a new database on DoltLab.
Clone the database you want to migrate.
Run
dolt migrate
in the cloned database.Add the remote of the new DoltLab database to the cloned database with
dolt remote add <remote name> http://<host ip>:50051/<owner>/<new db name>
.Push the migrated clone to the new database with
dolt push <remote name> <branch name>
.
Use a domain name with DoltLab
It's common practice to provision a domain name to use for a DoltLab instance. To do so, secure a domain name and map it to the stable, public IP address of the DoltLab host. Then, supply the domain name as the value to the HOST_IP
environment variable when starting DoltLab. Let's look at an example using services offered by AWS.
Let's say we've have set up and run an EC2 instance with the latest version of DoltLab and have successfully configured its Security Group to allow ingress traffic on 80
, 100
, 4321
, and 50051
. By default, this host will have a public IP address assigned to it, but this IP is unstable and will change whenever the host is restarted.
First, we should attach a stable IP to this host. To do this in AWS, we can provision an Elastic IP Address (EIP).
Next, we should associate the EIP with our DoltLab host by following these steps. Once this is done, the DoltLab host should be reachable by the EIP.
Finally, we can provision a domain name for the DoltLab host through AWS Route 53. After registering the new domain name, we need to create an A
record that's attached to the EIP of the DoltLab host. To do so, follow the steps for creating records outlined here.
Your DoltLab host should now be accessible via your new domain name. You can now stop your DoltLab server and replace the value of the environment variable HOST_IP
with the domain name, then restart DoltLab.
In the event you are configuring your domain name with an Elastic Load Balancer, ensure that it specifies Target Groups for each of the ports required to operate DoltLab, 80
, 100
, 4321
, and 50051
.
Run DoltLab on Hosted Dolt
Starting with DoltLab v1.0.0
, DoltLab can be configured to use a Hosted Dolt instance as its application database. This allows DoltLab administrators to use the feature-rich SQL workbench Hosted Dolt provides to interact with their DoltLab database.
To configure a DoltLab to use a Hosted Dolt, follow the steps below as we create a sample DoltLab Hosted Dolt instance called my-doltlab-db-1
.
Create a Hosted Dolt deployment
To begin, you'll need to create a Hosted Dolt deployment that your DoltLab instance will connect to. We've created a video tutorial for how to create your first Hosted Dolt deployment, but briefly, you'll need to create an account on hosted.doltdb.com and then click the "Create Deployment" button.
You will then see a form where you can specify details about the host you need for your DoltLab instance:
In the image above you can see that we defined our Hosted Dolt deployment name as my-doltlab-db-1
, selected an AWS EC2 host with 2 CPU and 8 GB of RAM in region us-west-2
. We've also requested 200 GB of disk. For DoltLab, these settings should be more than sufficient.
We have also requested a replica instance by checking the "Enable Replication" box, and specifying 1
replica, although replication is not required for DoltLab.
If you want the ability to clone this Hosted Dolt instance, check the box "Enable Dolt Credentials". And finally, if you want to use the SQL workbench feature for this hosted instance (which we recommend) you should also check the box "Create database users for the SQL Workbench".
You will see the hourly cost of running the Hosted Dolt instance displayed above the "Create Deployment" button. Click it, and wait for the deployment to reach the "Started" state.
Once the deployment has come up, the deployment page will display the connection information for both the primary host and the replica, and each will be ready to use. Before connecting a DoltLab instance to the primary host, though, there are a few remaining steps to take to ensure the host has the proper state before connecting DoltLab.
First, click the "Configuration" tab and uncheck the box "behavior_disable_multistatements". DoltLab will need to execute multiple statements against this database when it starts up. You can also, optionally, change the log_level to "debug". This log level setting will make sure executed queries appear in the database logs, which is helpful for debugging.
Click "Save Changes".
Next, navigate to the "Workbench" tab and check the box "Enable Writes". This will allow you to execute writes against this instance from the SQL workbench. Click "Update".
Then, with writes enabled, on this same page, click "Create database" to create the database that DoltLab expects, called dolthubapi
.
Finally, create the required users and grants that DoltLab requires by connecting to this deployment and running the following statements:
You can do this by running these statements from the Hosted workbench SQL console, or by connecting to the database using the mysql client connection command on the "Connectivity" tab, and executing these statements from the SQL shell.
This instance is now ready for a DoltLab connection.
Edit DoltLab's Docker Compose file
To connect DoltLab to my-doltlab-db-1
, ensure that your DoltLab instance is stopped, and remove references to doltlabdb
in DoltLab's docker-compose.yaml
file.
You can also remove references to doltlabdb-dolt-data
, doltlabdb-dolt-root
, doltlabdb-dolt-configs
, and doltlabdb-dolt-backups
from the volumes
section, as these were only necessary for DoltLab's default Dolt server.
There's one additional edit to the docker-compose.yaml
file to make before we can start DoltLab. Edit the value of the -doltHost
argument in the doltlabapi.command
section to match the host of the primary my-doltlab-db-1
host. In our example, this would be dolthub-my-doltlab-db-1.dbs.hosted.doltdb.com
.
You will also need to add the argument -tlsSkipVerify
to the doltlabapi.command
section. Save these changes to the file, and you can now start DoltLab using the start-doltlab.sh
script.
Make sure that the DOLT_PASSWORD
environment variable matches the password you used when creating user dolthubadmin
, and DOLTHUBAPI_PASSWORD
matches the password you used when creating user dolthubapi
.
Once DoltLab is running successfully against my-doltlab-db-1
, you can create a database on DoltLab, for example called test-db
, and you will see live changes to the database reflected in the Hosted Dolt workbench:
Serve DoltLab over HTTPS with a TLS reverse proxy
Starting with DoltLab v1.0.5
, it is possible to serve a DoltLab instance behind a TLS reverse proxy. You may want to do this if you want to serve your DoltLab instance over HTTPS
instead of HTTP
. Let's walkthrough an example of how to run a DoltLab instance behind an nginx TLS proxy, running on the same host. We will use doltlab.dolthub.com as our example.
Before you begin you will need to create valid TLS certificates on the DoltLab host. You can provision these from a Certificate Authority or do so with a free tool like certbot. For this example we have created valid certs with certbot
, /etc/letsencrypt/live/doltlab.dolthub.com/fullchain.pem
and /etc/letsencrypt/live/doltlab.dolthub.com/privkey.pem
.
For DoltLab < v2.1.0
, shut down your DoltLab instance if it is currently running, then open four new ports on your DoltLab host. These ports will be used to forward requests to DoltLab's existing HTTP
ports.
In our example we will using the following new ports: 443
, 143
, 5443
, and 50043
. 443
will route requests to port 80
where DoltLab's UI is served. 143
will forward requests to port 100
where DoltLab serves database data from. 5443
will forward requests to 4321
, which DoltLab uses to enable user file uploads. And, finally, 50043
will map to 50051
, the port used by clients for cloning, pushing, pulling, and fetching data.
At this time you can also close ports 80
, 100
, 4321
, and 50051
on the DoltLab host, as these no longer need to be reachable on the public internet.
Next, edit DoltLab's docker-compose.yaml
and amend the arguments under doltlabremoteapi.command
:
There are 2 arguments that need to change, and one new argument to add. As you can see from the above snippet, -http-host
needs to be updated with the HOST_IP
value followed by a colon and the new TLS database data serving port. Since we use HOST_IP=doltlab.dolthub.com
, and we are mapping TLS port 143
to HTTP
port 100
, our new value is doltlab.dolthub.com:143
.
We also need to change the port in the value of -backingStoreHostNameOverrideKey
to reflect this same TLS port, so our value here is :143
.
Lastly, we need to add the argument -http-scheme https
to this command
block.
Next, edit the doltlabapi.command
section:
Here we change the value of -websiteURL
to have an https
scheme. We also change the value of -userImportUploadsFileServiceBrowserHost
so that the url scheme is https
and the port after the colon is 5443
, the new TLS port we are using to forward requests to DoltLab's user file upload service running on HTTP
port 4321
.
Save the changes to this file.
Next, install nginx v1.13.10 or higher on the DoltLab host. For this example, the open source version can be installed on Ubuntu with:
Ensure nginx
is running with:
Then, edit the nginx
configuration file located at /etc/nginx/nginx.conf
to be the following:
The above configuration file includes server
blocks that route the new TLS ports to the proper HTTP
ports of DoltLab and use the TLS certificates we created earlier with certbot
. Importantly, the server
block for 50043
used by clients for cloning, pushing, pulling, and fetching must be configured with http2
and as a grpc_pass
.
Save the changes to the configuration file and reload nginx
with: nginx -s reload
. This will make the configuration changes take effect.
Finally, restart DoltLab using the ./start-doltlab.sh
script with two additional environment variables:
Once your DoltLab instance comes up, it will be served on HTTPS
via the nginx
TLS proxy.
Serve DoltLab over HTTPS natively
Starting with DoltLab v1.0.6
, it is possible to run DoltLab over HTTPS
with TLS natively. To do so, make sure that port 443
is open on the host running DoltLab (as well as the other required ports 100
, 4321
, and 50051
) and that you have a valid TLS certificate that uses the HOST_IP
of the DoltLab host. We recommend creating a TLS certificate using certbot.
For DoltLab < v2.1.0
, to start DoltLab with TLS, you will run the ./start-doltlab.sh
script with the argument https
, and will need to supply two additional environment variables:
Once the services are spun up, DoltLab will be available at https://${HOST_IP}
.
Improve DoltLab Performance
Starting with DoltLab v1.1.0
, it is possible to limit the number of concurrent Jobs running on a DoltLab host by adding optional arguments to the doltlabapi
block of the docker-compose.yaml
or docker-compose-tls.yaml
files.
When user's upload files on a DoltLab instance, or merge a pull request, DoltLab creates a Job corresponding to this work. These Jobs spawn new Docker containers that performs the required work.
By default, DoltLab imposes no limit to the number of concurrent Jobs that can be spawned. As a result, a DoltLab host might experience resources exhaustion as the Docker engine uses all available host resources for managing it's containers.
For DoltLab < v2.1.0
and >= v1.1.0
, to prevent resource exhaustion, the following can be added to limit the number of concurrent Jobs, ensuring DoltLab will not run more jobs than the configured limit, at any one time:
-jobConcurrencyLimit
limits number of concurrent Jobs a DoltLab instance will run at any given time. A value of 0
indicates no limit.
-jobConcurrencyLoopSeconds
is the number of seconds Job Scheduler will wait before looking for more Jobs to schedule. Default is 10
seconds.
jobMaxRetries
is the number of times the Job Scheduler will retry scheduling a Job before permanently giving up, requiring the Job to be recreated.
Serve DoltLab behind an AWS Network Load Balancer
The following section describes how to setup an AWS Network Load Balancer (NLB) for a DoltLab instance. This guide will be using DoltLab v2.0.8
.
First, setup DoltLab v2.0.8
on an AWS EC2 host in the same Virtual Private Cloud (VPC) where your NLB will run.
If this instance should only be accessible by the NLB, ensure that the DoltLab host is created in a private subnet and does not have public IP address.
After setting up your DoltLab host, edit the host's inbound security group rules to allow all traffic on ports: 80/443
, 100
, 4321
, 50051
, and 2001
.
Because the host is in a private subnet with no public IP though, only the NLB will be able to connect to the host on these ports.
Next, edit the envoy.tmpl
file included with DoltLab so that it includes the following listener for port 2001
:
This listener will allow AWS to perform health checks against port 2001
during the NLB creation process.
Similarly, edit the docker-compose.yaml
file to expose port 2001
in the doltlabenvoy
block:
Next, in AWS, create target groups for each DoltLab port that the NLB will forward requests to. These ports are: 80/443
, 100
, 4321
, and 50051
.
When creating the target groups, select Instances
as the target type. Then, select TCP
as the port protocol, followed by the port to use for the target group. In this example we will map all target group ports to their corresponding DoltLab port, ie 80:80
, 100:100
, 4321:4321
and 50051:50051
. Select the same VPC used by your DoltLab host as well.
During target group creation, in the Health Checks
section, click Advanced health check settings
and select Override
to specify the port to perform health checks on. Here, enter 2001
, the port we added to DoltLab's envoy configuration file. We will use this same port for all target group health checks.
After clicking Next
, you will register targets for your new target group. Here you should see your DoltLab host. Select it and specify the port the target group will forward to.
Click Include as pending below
, then click Create target group
.
Once you've created your target groups you can create the NLB.
Be sure to select the Network Load balancer as the other types of load balancers may require different configurations.
Then, create an NLB in the same VPC and subnet as your DoltLab host that uses Scheme: Internet-facing
and Ip address type: IPV4
.
Additionally, select the the same availability zone that your DoltLab host uses. You can use the default
security group for your NLB, however the ingress rules for this group will need to be updated before inbound traffic will be able to reach your NLB.
In the Listeners section, add listeners for each target group you created, specifying the NLB port to use for each one. But again, in this example we will forward on the same port. Click Create load balancer
.
It make take a few minutes for the NLB to become ready. After it does, check each target group you created and ensure they are all healthy.
Next, edit the inbound rules for the security group attached to the NLB you created so that it allows connections on the listening ports.
On the NLB page you should now see the DNS name of your NLB which can be used to connect to your DoltLab instance.
Restart your DoltLab instance supplying this DNS name as the HOST_IP
, and your DoltLab instance will now be running exclusively through the NLB.
Last updated