DEV Community

Franck Pachot for YugabyteDB

Posted on

(beta) yugabyted GUI

To get started with YugabyteDB (PostgreSQL-compatible distributed SQL database) you have two easy ways:

  • cloud.yugabyte.com for a managed service (free tier available)
  • yugabyted which starts quickly the required yb-master and yb-server (free and open source)

Currently (version 2.13), the GUI available with yugabyted is a read only web console from the yb-master and yb-server. In the managed cloud, you have a smarter console with settings, performance tabs and more.

This smart console is now coming into yugabyted for the best user experience in free and open source YugabyteDB:

Test it

I can't wait to test it. Here is my Dockerfile which can be used like the PostgreSQL Docker image (creating a database and user on startup) and including the first beta version of yugabyted-ui:

cat > Dockerfile <<'DOCKERFILE'
FROM docker.io/yugabytedb/yugabyte:latest
ENV POSTGRES_USER     demo
ENV POSTGRES_PASSWORD demo
ENV POSTGRES_DB       demo
CMD pip install --upgrade pip
CMD pip install sqlalchemy pandas psycopg2-yugabytedb
EXPOSE 5433
EXPOSE 7000
EXPOSE 7002
ADD https://github.com/yugabyte/yugabyte-db/releases/download/v1.0.0-beta-yugabyted-ui/yugabyted-ui-1.0.0-linux-x86_64.tar.gz yugabyted-ui-1.0.0-linux-x86_64.tar.gz
RUN tar -xvf yugabyted-ui-1.0.0-linux-x86_64.tar.gz
CMD  \
     until PGPASSWORD=yugabyte bin/ysqlsh -v ON_ERROR_STOP=1 \
      -h $(hostname) \
      -c "create database ${POSTGRES_DB} " \
      -c "create user ${POSTGRES_USER} password '${POSTGRES_PASSWORD}' " \
      2>/dev/null && ./yugabyted-ui ; do \
       echo 'Waiting for YugabyteDB to be up...' ; sleep 3 ; \
      done & \
     bin/yugabyted start --daemon=false \
     --tserver_flags='ysql_enable_auth=true' --listen 0.0.0.0
DOCKERFILE
Enter fullscreen mode Exit fullscreen mode

This builds the image and starts a first node:

docker build -t ybui .
docker network create -d bridge yb
docker run -d --network yb --name yb0 \
 -p 5433:5433 -p 7000:7000 -p 7002:7002 ybui

Enter fullscreen mode Exit fullscreen mode

You can already access the UI on http://localhost:7002

Here is how it looks like:

queries

metrics

Discussion (0)