Running YugabyteDB Cluster Locally using docker-compose

Vladimir Novick
InstructorVladimir Novick
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 4 years ago

YugabyteDB is an open source, high-performance distributed SQL database for powering global, internet-scale applications.YugabyteDB is also a cloud-native database, so it can be deployed across both public and private clouds, including Kubernetes environments. In regards to serving as a backend for microservices, YugabyteDB brings together three must-haves: a PostgreSQL-compatible SQL API, low-latency read performance, and globally distributed write scalability. YugabyteDB with its global data distribution brings data close to users for multi-region and multi-cloud deployments.

In this lesson we will see how you can run YugabyteDB Distributed SQL cluster using docker-compose.

Vladimir Novick: [0:00] In order to get started with YugabyteDB and docker-compose, we need to pull a docker image from a docker hub using a yugabytedb/yugabyte image.

[0:18] We see that our image is up to date, so right now we can create the docker-compose file. To create docker-compose, we can go to the docker-compose link in the docs and copy docker-compose content from here.

[0:38] Let's look at this file. We have the master-data and the tserver-data. We're creating a cluster with one node. I have the image and the container_name, and command that we need to run to start our cluster.

[0:52] We can see that admin UI will be exposed in port 7000 and tserver will have an admin UI exposed in port 9000.

[1:05] Let's run our docker-compose by specifying our yaml file. If we go to localhost:7000, we can see our cluster's running with one node.

[1:28] To connect to YSQL shell, we'll execute docker exec command and specify our Yugabyte tserver. We'll use ysqlsh of the end command and specify also again here.

[1:54] As you can see, we are connected to YSQL shell.