How to create a foundation db

(Qin Ma) #1

I downloaded source code from git and tried to compile from the source.
After “make”, i saw all the cli commands are installed under bin.
While I am trying to do ./fdbcli, first it complains there is no fdb.cluster file. I just created one with:

Then I started a server: ./fdbserver -p
While I do the cli again, it complains no database:
Using cluster file fdb.cluster'. The database is unavailable; typestatus’ for more information.
Welcome to the fdbcli. For help, type help'. fdb> status Using cluster filefdb.cluster’.
Could not communicate with a quorum of coordination servers: (unreachable)

Do I miss something?

(Alex Miller) #2

The easiest way to do this is actually to just go install one of the packages from the downloads page, that will automatically set up a one-process FDB cluster running as a service in the background and will go through the initial configuration steps to set up a database.

To do this manually, you’ll need to write a cluster file:


and save it as local.cluster.

You’ll then start fdbserver: ./bin/fdbserver -p -C local.cluster
and then in another window run fdbcli: ./bin/fdbcli -C local.cluster

You’ll then need to initialize the database from fdbcli:

fdbcli> configure new single ssd

and then you should be able to have a working single process cluster locally from custom-built source. If you want to connect more fdbserver instances, then you’ll need to change the port in -p, but keep using the same -C local.cluster. If you wish to connect to this cluster from an application, you’ll need to configure it to use the local.cluster clusterfile as well.