Skip to main content

a command line tool that implements a development workflow for Ceph

Project description

ceph-workbench

ceph-workbench is a command line tool that implements a development workflow for Ceph

Documentation : http://ceph-workbench.readthedocs.org/ Home page : https://pypi.python.org/pypi/ceph-workbench

Installation

  • Install Docker http://docs.docker.com/engine/installation/

  • Copy the following shell function to ~/.bashrc:

    function ceph-workbench() {
       mkdir -p $HOME/.ceph-workbench
       docker run --rm --interactive --tty \
           --volume=$HOME/.ceph-workbench:/home/ubuntu/.ceph-workbench \
           --env USER_ID=$(id -u) \
           dachary/ceph-workbench \
           ceph-workbench "$@"
    }
  • Verify that it works:

    ceph-workbench --help
  • Optionally copy the OpenStack openrc.sh file in ~/.ceph-workbench/openrc.sh: the ceph-qa-suite subcommand will use it

Hacking

  • Get the code : git clone –recursive http://ceph-workbench.dachary.org/root/ceph-workbench.git

  • Set up the development environment:

    deactivate || true ; source bootstrap
  • Run the tests (requires OpenStack credentials to get 100% coverage):

    deactivate || true ; bash run-tests.sh
  • Run a single test:

    tox -e py27 -- -s -k test_run tests/test_ceph_qa_suite.py
  • Run ceph-workbench using the dev environment of the current working directory in the docker container instead of the installed version:

    function cw() { docker run --rm --volume=$HOME:/home/ubuntu -v $(pwd):$(pwd) -w $(pwd) --env USER_ID=$(id -u) dachary/ceph-workbench env PYTHONPATH=$(pwd)/teuthology:$(pwd) virtualenv/bin/ceph-workbench "$@"; }
  • Get a shell in the dev environment of the current working directory in the docker container:

    function cw-sh() { docker run --rm --volume=$HOME:/home/ubuntu -v $(pwd):$(pwd) -w $(pwd) --env USER_ID=$(id -u) -t -i dachary/ceph-workbench env PYTHONPATH=$(pwd)/teuthology:$(pwd) bash "$@"; }
  • Check the documentation : rst2html < README.rst > /tmp/a.html

Release management

  • Prepare a new version

  • version=1.3.0 ; perl -pi -e “s/^version.*/version = $version/” setup.cfg ; for i in 1 2 ; do python setup.py sdist ; amend=$(git log -1 –oneline | grep –quiet “version $version” && echo –amend) ; git commit $amend -m “version $version” ChangeLog setup.cfg ; git tag -a -f -m “version $version” $version ; done

  • Publish a new version

  • python setup.py sdist upload –sign

  • git push ; git push –tags

  • docker rmi dachary/ceph-workbench

  • docker build –no-cache –tag dachary/ceph-workbench docker

  • docker login

  • docker push dachary/ceph-workbench:1.5.7

  • pypi maintenance

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ceph-workbench-1.5.8.tar.gz (81.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page