Name: ceph-ruby
Owner: Ceph
Description: Easy management of Ceph Distributed Storage System (rbd, images, rados objects) using ruby.
Created: 2015-07-23 13:33:02.0
Updated: 2018-03-15 18:46:36.0
Pushed: 2017-11-17 10:46:48.0
Homepage: null
Size: 132
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Easy management of Ceph Distributed Storage System (rbd, images, rados objects) using ruby.
Add this line to your application's Gemfile:
gem 'ceph-ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ceph-ruby
require "ceph-ruby"
# version information
puts CephRuby::Lib::Rados.version_string
puts CephRuby::Lib::Rbd.version_string
# connect to cluster and open a pool
cluster = CephRuby::Cluster.new
pool = cluster.pool("my-pool-xyz")
pool.open
# simple example for using rados objects
object = pool.rados_object("my-object-xyz")
object.write(0, "This is a Test!")
puts object.size
# simple example for using rbd images
image = pool.rados_block_device("my-image-xyz")
puts image.exists?
image.create(10.gigabytes)
puts image.exists?
puts image.size
image.write(0, "This is a Test!")
pp image.stat
image.close
# clean up
pool.close
cluster.shutdown
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Copyright (c) 2012 - 2013 Netskin GmbH. Released unter the MIT license.