Developer Guide (Quick)

    The script will install Ceph dependencies,compile everything in debug mode and run a number of tests to verifythe result behaves as expected.

    Optionally if you want to work on a specific component of Ceph,install the dependencies and build Ceph in debug mode with required cmake flags.

    Example:

    1. $ ./install-deps.sh
    2. $ ./do_cmake.sh -DWITH_MANPAGE=OFF -DWITH_BABELTRACE=OFF -DWITH_MGR_DASHBOARD_FRONTEND=OFF

    Ceph contains a script called (see also Deploying a development cluster) which allows developers to quickly test their code usinga simple deployment on your development system. Once the build finishes successfully, start the cephdeployment using the following command:

    1. $ make vstart
    2. $ ../src/vstart.sh -d -n -x
    1. $ MON=1 MDS=1 ../src/vstart.sh -d -n -x

    The system creates two pools on startup: cephfs_data_a and cephfs_metadata_a. Let’s get some stats onthe current pools:

    Make a pool and run some benchmarks against it:

    1. $ bin/ceph osd pool create mypool
    2. $ bin/rados -p mypool bench 10 write -b 123

    Place a file into the new pool:

    1. $ bin/rados -p mypool put objectone <somefile>
    2. $ bin/rados -p mypool put objecttwo <anotherfile>

    List the objects in the pool:

      The vstart script creates out/ and dev/ directories which containthe cluster’s state. If you want to quickly reset your environment,you might do something like this:

      1. [build]$ ../src/stop.sh
      2. [build]$ rm -rf out dev
      3. [build]$ MDS=1 MON=1 OSD=3 ../src/vstart.sh -n -d

      Set the environment variable when running vstart.sh to enable the RadosGW.

      1. $ cd build
      2. $ RGW=1 ../src/vstart.sh -d -n -x

      You can now use the swift python client to communicate with the RadosGW.

      1. $ swift -A http://localhost:8000/auth -U test:tester -K testing list
      2. $ swift -A http://localhost:8000/auth -U test:tester -K testing upload mycontainer ceph

      The tests are located in src/tests. To run them type: