Code Monkey home page Code Monkey logo

Comments (5)

elemental-lf avatar elemental-lf commented on July 30, 2024

The Python packages with the bindings for Ceph's librados and librbd are Ceph version dependent and need to be installed separately as they're not available on PyPi. Installation instructions depend on your environment. For RHEL/CentOS 7 there are RPM packages directly available from Ceph (python36-rbd and python36-rados). See https://github.com/elemental-lf/benji/blob/master/images/benji/Dockerfile for more or less step by step instructions. ceph.com also has packages for Ubuntu, but stopped building Debian packages. There are unofficial Debian packages available here: https://mirror.croit.io/. Benji's RBD support has only been tested with Luminous and newer client libraries. (This all assumes that you actually want to use RBD. If not, just delete the section from the config and Benji won't try to load the missing module.)
And there is also the container image available on Docker Hub which contains both B2 and Ceph RBD support (based on Nautilus currently, but should work with older Ceph releases). You can run it with docker run -it elementalnet/benji:0.7.0 and bind-mount your configuration from your normal filesystem into the container at /etc/benji/benji.yaml. You would also need to bind-mount the Ceph configuration into the container. Redhat's podman instead of docker also works of course.

from benji.

elemental-lf avatar elemental-lf commented on July 30, 2024

I've updated the installation instructions with more information related to the RBD module. Please see https://benji-backup.me/installation.html#ceph-rbd-support.

from benji.

Gert-P avatar Gert-P commented on July 30, 2024

Thank you so far Lars, since I am trying to use this on Proxmox which is based on Debian, I have now setup a container with centos7 and installed installed everything successfully as per your instructions, I have also copied /etc/ceph/ceph.conf from my proxmox box to the container just to testing purposes (I hope thats ok), will bind mount it if i can get it to work.

I have to mention that i had to change this code now provided on the benji website from

name=Ceph packages for $basearch
baseurl=https://download.ceph.com/rpm-{ceph-release}/{distro}/$basearch

to

name=Ceph packages for \$basearch
baseurl=https://download.ceph.com/rpm-{ceph-release}/{distro}/\$basearch

otherwise $basearch is seen as an empty variable.

When doing database-init i now get a new error:

{'event': 'Uncaught exception', 'level': 'error', 'timestamp': 1566868103.3057816, 'file': '/usr/local/benji/lib64/python3.6/site-packages/benji/logging.py', 'line': 169, 'function': 'handle_exception', 'process': 22537, 'thread_name': 'MainThread', 'thread_id': 140326461175616, 'exception': 'Traceback (most recent call last):\n File "/usr/local/benji/lib64/python3.6/site-packages/benji/config.py", line 144, in __init__\n config = ruamel.yaml.load(f, Loader=ruamel.yaml.SafeLoader)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/main.py", line 935, in load\n return loader._constructor.get_single_data()\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/constructor.py", line 109, in get_single_data\n node = self.composer.get_single_node()\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 78, in get_single_node\n document = self.compose_document()\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 101, in compose_document\n node = self.compose_node(None, None)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 138, in compose_node\n node = self.compose_mapping_node(anchor)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 218, in compose_mapping_node\n item_value = self.compose_node(node, item_key)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 136, in compose_node\n node = self.compose_sequence_node(anchor)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 180, in compose_sequence_node\n node.value.append(self.compose_node(node, index))\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 138, in compose_node\n node = self.compose_mapping_node(anchor)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 218, in compose_mapping_node\n item_value = self.compose_node(node, item_key)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 138, in compose_node\n node = self.compose_mapping_node(anchor)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 211, in compose_mapping_node\n while not self.parser.check_event(MappingEndEvent):\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/parser.py", line 141, in check_event\n self.current_event = self.state()\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/parser.py", line 581, in parse_block_mapping_key\n token.start_mark,\nruamel.yaml.parser.ParserError: while parsing a block mapping\n in "/etc/benji.yaml", line 31, column 6\nexpected <block end>, but found \'<block mapping start>\'\n in "/etc/benji.yaml", line 37, column 7\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File "/usr/local/benji/bin/benji", line 11, in <module>\n load_entry_point(\'benji==0.7.0.dev11+g51b7886\', \'console_scripts\', \'benji\')()\n File "/usr/local/benji/lib64/python3.6/site-packages/benji/scripts/benji.py", line 290, in main\n config = Config()\n File "/usr/local/benji/lib64/python3.6/site-packages/benji/config.py", line 146, in __init__\n raise ConfigurationError(\'Configuration file {} is invalid.\'.format(source)) from exception\nbenji.exception.ConfigurationError: Configuration file /etc/benji.yaml is invalid.'}

from benji.

elemental-lf avatar elemental-lf commented on July 30, 2024

The company which makes Proxmox provides their own packages for Ceph on Debian. If you have their repositories configured the packages should be there somewhere I'd think and you could skip using a container. Even if you wanted to use a container you can use the ready-made container image elementalnet/benji:0.7.0, it's also based on CentOS 7 and has all you need.
Regarding your error message: Your configuration has some error.

ruamel.yaml.parser.ParserError: while parsing a block mapping\n in "/etc/benji.yaml", line 31, column 6\nexpected , but found ''\n in "/etc/benji.yaml", line 37, column 7

Try yamllint if you can't find the error.

from benji.

Gert-P avatar Gert-P commented on July 30, 2024

yamllint pointed out i had wrong indentation on 2 lines.

I have installed the packages from proxmox as per your suggestion, and its working as expected. No need for a container.

Thank you so much.

PS. Remember to fix the website :)

from benji.

Related Issues (20)

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.