Giter Site home page Giter Site logo

docker-ceph's Introduction

docker-ceph

Example Setup

Create fake volumes on the host

dd if=/dev/zero of=/tmp/ceph0 bs=1024000 count=3000
mkfs.ext4 /tmp/ceph0
mkdir /tmp/ceph0d
sudo mount -o loop /tmp/ceph0 /tmp/ceph0d
dd if=/dev/zero of=/tmp/ceph1 bs=1024000 count=3000
mkfs.ext4 /tmp/ceph1
mkdir /tmp/ceph1d
sudo mount -o loop /tmp/ceph1 /tmp/ceph1d

Build the docker image

sudo docker build -t ceph .

Create and run a new container instance

sudo docker run -h cephbox -i -v /tmp/ceph0d:/var/lib/ceph/osd/ceph-0 -v /tmp/ceph1d:/var/lib/ceph/osd/ceph-1 -p 6789:6789 -t ceph /bin/bash
./bootstrap.sh

This will give you a shell inside the container.

Validation

From the given shell inside the container, check the network information:

ifconfig
...
inet addr:172.17.0.15  Bcast:172.17.255.255  Mask:255.255.0.0
...

and the client.admin key you'll need to configure the client:

ceph auth list
...
client.admin
	key: AQDeKstSIC6GMBAAAmE0rOLITNzDXd8XcH+yaw==
...

Do not exit this shell (that would stop the container).

From another shell, configure your client:

sudo vim /etc/ceph/ceph.conf
[global]
mon_initial_members = cephbox
mon_host = 172.17.0.15
sudo vim /etc/ceph/keyring
[client.admin]
	key = AQDeKstSIC6GMBAAAmE0rOLITNzDXd8XcH+yaw==

Finally, check the health of the cluster, running the following from the host:

ceph health
HEALTH_OK

docker-ceph's People

Contributors

rochaporto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.