Running YugabyteDB Cluster Locally using docker-compose

Vladimir Novick
InstructorVladimir Novick
Share this video with your friends

Social Share Links

Send Tweet
Published 4 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.

egghead
egghead
~ an hour ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today