Git Product home page Git Product logo

ceph-example's Introduction

ceph-example

Small example how to setup a ceph cluster.

First you need a couple of machines, in my case I used the simple-cdd-example repository on my github in order to create 8 virtual machines to play around with. For a Ceph cluster you need atleast 1 machine that is really powerful and one that is not. But to make an optimal install you need 8 machines. Three Object Stores, two Monitors/Managers, one Metadata store and one client. I added a grafana client as well but that service could be running on one of the other machines as well as it doesn't use that much resources.

  • OSD - A object store require disks and a lot of memory, minimum 8 GB.
  • MON/MAN - Requires atleast 2 Gb of memory and some CPU
  • MDS - Require atleast 2 Gb and some CPU
  • Client - Could be any machine really.

First I installed ansible on my work machine in this case the client. Add the following line to /etc/apt/sources.list:

deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main

Then run these commands:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
sudo apt update
sudo apt install ansible

Next up I installed the repo.

git clone https://github.com/ceph/ceph-ansible.git
git checkout stable-5.0
pip install -r requirements.txt

Next up I went through all the servers and inventored them and created a host file with all the IP's of my cluster. Next up I added that host file to my client and also edited the ansible.cfg file to contain all my hosts.

ceph auth list
...
client.admin
        key: AQBkMYlf0PS6AxAAqq8VK0MVMAII0jcQZcE9pQ==
        caps: [mds] allow *
        caps: [mgr] allow *
        caps: [mon] allow *
        caps: [osd] allow *
...

/etc/ceph/ceph.keyring

[client.admin]
        key = AQBkMYlf0PS6AxAAqq8VK0MVMAII0jcQZcE9pQ==
mount -t ceph mon1:6789,mon2:6789:/ /mnt/mycephfs -o name=admin,secret=`ceph-authtool -p /etc/ceph/ceph.keyring`

ceph-example's People

Contributors

kalaspuffar 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.