{"id":18800609,"url":"https://github.com/ceph/ceph-nvmeof","last_synced_at":"2026-06-02T01:00:57.220Z","repository":{"id":37042246,"uuid":"338088981","full_name":"ceph/ceph-nvmeof","owner":"ceph","description":"Service to provide Ceph storage over NVMe-oF/TCP protocol","archived":false,"fork":false,"pushed_at":"2026-05-27T10:46:38.000Z","size":4356,"stargazers_count":128,"open_issues_count":210,"forks_count":63,"subscribers_count":81,"default_branch":"devel","last_synced_at":"2026-05-27T12:06:38.706Z","etag":null,"topics":["block-storage","ceph","iscsi","nvme-over-fabrics","nvme-tcp","spdk","storage","vmware","vsphere"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ceph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2021-02-11T16:45:31.000Z","updated_at":"2026-05-27T10:05:26.000Z","dependencies_parsed_at":"2023-02-18T01:01:39.571Z","dependency_job_id":"c9c1b981-f17b-4527-b0b3-f2f55eedcae6","html_url":"https://github.com/ceph/ceph-nvmeof","commit_stats":{"total_commits":504,"total_committers":24,"mean_commits":21.0,"dds":0.628968253968254,"last_synced_commit":"53e945a95ac4851ba71f06811876359893c74a3f"},"previous_names":[],"tags_count":81,"template":false,"template_full_name":null,"purl":"pkg:github/ceph/ceph-nvmeof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceph%2Fceph-nvmeof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceph%2Fceph-nvmeof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceph%2Fceph-nvmeof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceph%2Fceph-nvmeof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceph","download_url":"https://codeload.github.com/ceph/ceph-nvmeof/tar.gz/refs/heads/devel","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceph%2Fceph-nvmeof/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33800676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["block-storage","ceph","iscsi","nvme-over-fabrics","nvme-tcp","spdk","storage","vmware","vsphere"],"created_at":"2024-11-07T22:19:21.230Z","updated_at":"2026-06-02T01:00:57.213Z","avatar_url":"https://github.com/ceph.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/ceph/ceph-nvmeof/actions/workflows/build-container.yml/badge.svg)](https://github.com/ceph/ceph-nvmeof/actions/workflows/build-container.yml)\n# Ceph NVMe over Fabrics (NVMe-oF) Gateway\n\nThis project provides block storage on top of Ceph for platforms (e.g.: VMWare) without\nnative Ceph support (RBD), replacing existing approaches (iSCSI) with a newer and [more\nversatile standard (NVMe-oF)](https://nvmexpress.org/specification/nvme-of-specification/).\n\nEssentially, it allows to export existing RBD images as NVMe-oF namespaces.\nThe [creation and management of RBD images](https://docs.ceph.com/en/latest/rbd/) is not within the scope of this component.\n\n## Installation\n\n### Requirements\n\n* Linux-based system with at least 16 GB of available RAM. [Fedora 37](https://fedoraproject.org/) is recommended.\n* SELinux in permissive mode:\n\n  ```bash\n  sed -i s/^SELINUX=.*$/SELINUX=permissive/ /etc/selinux/config\n  setenforce 0\n  ```\n\n### Dependencies\n\n* `moby-engine` (`docker-engine`) (v20.10) and `docker-compose` (v2.11.0+). These versions are just indicative\n*  `make` (only needed to launch `docker-compose` commands).\n\n##### To install these dependencies in Fedora:\n\n```bash\nsudo dnf install -y make moby-engine docker-compose-plugin\n```\n\n##### To install these dependencies in CentOS:\n Following [Install Docker Engine on CentOS](https://docs.docker.com/engine/install/centos/#install-using-the-repository).\n\nAfter installing the docker-engine, several [post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/) are required to use `docker` with regular users:\n\n```bash\nsudo groupadd docker\nsudo usermod -aG docker $USER\n```\n\nIn order to use the \"make verify\" option to validate the Python source files you need to have flake8 installed on the build machine:\n\n```bash\npip install flake8\n```\n\nIf you don't have pip installed you can [install pip](https://phoenixnap.com/kb/how-to-install-pip-centos-7): \n\n```\ncurl -O https://bootstrap.pypa.io/get-pip.py\nsudo python get-pip.py\n```\n\nNotice that you can disable a specific flake8 error by adding a comment of \"noqa:\" followed by the error code to the line.\nFor example:\n\n```\n    unused_variable = 5     # noqa: F841\n```\n\nif you want to ignore a specific error in all files, you can add the error code to the \"ignore\" field in `tox.ini`.\nFor example:\n```\nignore = E501,E251,E225\n```\n\nIf you dont have make installed and encounter the error \"make: command not found\", you can install it by running the following:\n\n```\nyum groupinstall \"Development Tools\"\n```\n\n### Steps\n\nTo launch a containerized environment with a Ceph cluster and a NVMe-oF gateway (this is not the [prescribed deployment for production purposes](https://docs.ceph.com/en/quincy/install/#recommended-methods), but for testing and development tasks alone):\n\n1. Get this repo:\n\n    ```bash\n    git clone https://github.com/ceph/ceph-nvmeof.git\n    cd ceph-nvmeof\n    git submodule update --init --recursive\n    ```\n\n1. Configure the environment (basically to allocate huge-pages, which requires entering the user password):\n\n    ```bash\n    make setup\n    ```\n\n1. Download the container images:\n\n    ```bash\n    make pull\n    ```\n\n1. Deploy the containers locally:\n\n    ```bash\n    make up\n    ```\n\n1. Check that the deployment is up and running:\n\n    ```bash\n    $ make ps\n\n        Name                    Command                  State                               Ports\n    -----------------------------------------------------------------------------------------------------------------------\n    ceph              sh -c ./vstart.sh --new $V ...   Up (healthy)   5000/tcp, 6789/tcp, 6800/tcp, 6801/tcp, 6802/tcp,\n                                                                      6803/tcp, 6804/tcp, 6805/tcp, 80/tcp\n    nvmeof_nvmeof_1   python3 -m control -c ceph ...   Up             0.0.0.0:4420-\u003e4420/tcp,:::4420-\u003e4420/tcp,\n                                                                      0.0.0.0:5500-\u003e5500/tcp,:::5500-\u003e5500/tcp,\n                                                                      0.0.0.0:8009-\u003e8009/tcp,:::8009-\u003e8009/tcp\n    ```\n\n1. The environment is ready to provide block storage on Ceph via NVMe-oF.\n\n## Usage Demo\n\n### Configuring the NVMe-oF Gateway\n\nThe following command executes all the steps required to set up the NVMe-oF environment:\n\n```bash\n$ make demo\nAttempt (1): Fetching URL for arch=x86_64, branch=main, sha=latest...\nSuccess: Retrieved URL for arch=x86_64, branch=main, sha=latest: https://4.chacra.ceph.com/r/ceph/main/97c8c56a3d2cc7a294b0d2931f856324b5330b7c/centos/9/flavors/default/\n/usr/bin/docker compose run --rm nvmeof-cli --server-address 192.168.13.3 --server-port 5500 subsystem add --subsystem \"nqn.2016-06.io.spdk:cnode1\" --no-group-append\nAdding subsystem nqn.2016-06.io.spdk:cnode1: Successful\n/usr/bin/docker compose run --rm nvmeof-cli --server-address 192.168.13.3 --server-port 5500 namespace add --subsystem \"nqn.2016-06.io.spdk:cnode1\" --rbd-pool rbd --rbd-image demo_image --size 10MB --rbd-create-image\nAdding namespace 1 to nqn.2016-06.io.spdk:cnode1: Successful\n/usr/bin/docker compose run --rm nvmeof-cli --server-address 192.168.13.3 --server-port 5500 namespace add --subsystem \"nqn.2016-06.io.spdk:cnode1\" --rbd-pool rbd --rbd-image demo_image2 --size 10MB --rbd-create-image --no-auto-visible\nAdding namespace 2 to nqn.2016-06.io.spdk:cnode1: Successful\n/usr/bin/docker compose run --rm nvmeof-cli --server-address 192.168.13.3 --server-port 5500 listener add --subsystem \"nqn.2016-06.io.spdk:cnode1\" --host-name ` /usr/bin/docker compose run --rm nvmeof-cli --server-address 192.168.13.3 --server-port 5500 --output stdio gw info | grep \"Gateway's host name:\" | cut -d: -f2 | sed 's/ //g'` --traddr 192.168.13.3 --trsvcid 4420 --verify-host-name\nAdding nqn.2016-06.io.spdk:cnode1 listener at 192.168.13.3:4420: Successful\n/usr/bin/docker compose run --rm nvmeof-cli --server-address 192.168.13.3 --server-port 5500 listener add --subsystem \"nqn.2016-06.io.spdk:cnode1\" --host-name ` /usr/bin/docker compose run --rm nvmeof-cli --server-address 192.168.13.3 --server-port 5500 --output stdio gw info | grep \"Gateway's host name:\" | cut -d: -f2 | sed 's/ //g'` --traddr 0.0.0.0 --trsvcid `expr 4420 + 1` --verify-host-name\nAdding nqn.2016-06.io.spdk:cnode1 listener at 0.0.0.0:4421: Successful\n/usr/bin/docker compose run --rm nvmeof-cli --server-address 2001:db8::3 --server-port 5500 listener add --subsystem \"nqn.2016-06.io.spdk:cnode1\" --host-name ` /usr/bin/docker compose run --rm nvmeof-cli --server-address 192.168.13.3 --server-port 5500 --output stdio gw info | grep \"Gateway's host name:\" | cut -d: -f2 | sed 's/ //g'` --traddr 2001:db8::3 --trsvcid 4420 --adrfam IPV6 --verify-host-name\nAdding nqn.2016-06.io.spdk:cnode1 listener at [2001:db8::3]:4420: Successful\n/usr/bin/docker compose run --rm nvmeof-cli --server-address 192.168.13.3 --server-port 5500 host add --subsystem \"nqn.2016-06.io.spdk:cnode1\" --host-nqn \"*\"\nAllowing open host access to nqn.2016-06.io.spdk:cnode1: Successful\n/usr/bin/docker compose run --rm nvmeof-cli --server-address 192.168.13.3 --server-port 5500 namespace add_host --subsystem \"nqn.2016-06.io.spdk:cnode1\" --nsid 2 --host-nqn `cat /etc/nvme/hostnqn`\nAdding host nqn.2014-08.org.nvmexpress:uuid:893a6752-fe9b-ca48-aa93-e4565f32881c to namespace 2 on nqn.2016-06.io.spdk:cnode1: Successful\n```\n\n#### Manual Steps\n\nThe same configuration can also be manually run:\n\n1. First of all, let's create the `cephnvmf` shortcut to interact with the NVMe-oF gateway:\n\n    ```bash\n    eval $(make alias)\n    ```\n\n1. Create a subsystem:\n\n    ```bash\n    cephnvmf subsystem add --subsystem nqn.2016-06.io.spdk:cnode1 --no-group-append\n    ```\n\n1. Add a namespace:\n\n    ```bash\n    cephnvmf namespace add --subsystem nqn.2016-06.io.spdk:cnode1 --rbd-pool rbd --rbd-image demo_image --size 10MB --rbd-create-image\n    ```\n\n1. Find the gateway's host name:\n\n    ```bash\n    cephnvmf --output stdio gw info | grep \"Gateway's host name:\"\n    ```\n\n1. Create a listener so that NVMe initiators can connect to:\n\n    ```bash\n    cephnvmf listener add --subsystem nqn.2016-06.io.spdk:cnode1 --host-name host_name_found_above -a gateway_addr -s 4420 --verify-host-name\n    ```\n\n1. Define which hosts can connect:\n\n    ```bash\n    cephnvmf host add --subsystem nqn.2016-06.io.spdk:cnode1 --host-nqn \"*\"\n    ```\n\nThese can also be run by setting environment variables `CEPH_NVMEOF_SERVER_ADDRESS` and `CEPH_NVMEOF_SERVER_PORT` before running nvmeof-cli commands, example:\n```\ncat \u003c\u003cEOF \u003e /etc/ceph/nvmeof-cli.env\nCEPH_NVMEOF_SERVER_ADDRESS=x.x.x.x \nCEPH_NVMEOF_SERVER_PORT=5500\nEOF\n\n\n// using containers\ndocker compose run --env-file /etc/ceph/nvmeof-cli.env -it \u003ccontainer_image\u003e subsystem add --subsystem nqn.2016-06.io.spdk:cnode1\n// using pypi package\nsource /etc/ceph/nvmeof-cli.env\nceph-nvmeof subsystem add --subsystem nqn.2016-06.io.spdk:cnode1 \n```\n\n### Mounting the NVMe-oF volume\n\nOnce the NVMe-oF target is\n\n1. Install requisite packages:\n\n    ```bash\n    sudo dnf install nvme-cli\n    sudo modprobe nvme-fabrics\n    ```\n\n1. Ensure that the listener is reachable from the NVMe-oF initiator:\n\n    ```bash\n    $ sudo nvme discover -t tcp -a gateway_addr -s 8009\n\n    Discovery Log Number of Records 1, Generation counter 2\n    =====Discovery Log Entry 0======\n    trtype:  tcp\n    adrfam:  ipv4\n    subtype: nvme subsystem\n    treq:    not required\n    portid:  0\n    trsvcid: 4420\n    subnqn:  nqn.2016-06.io.spdk:cnode1\n    traddr:  192.168.13.3\n    eflags:  not specified\n    sectype: none\n    ```\n\n1. Connect to desired subsystem:\n\n    ```bash\n    sudo nvme connect -t tcp --traddr gateway_addr -s 4420 -n nqn.2016-06.io.spdk:cnode1\n    ```\n\n1. List the available NVMe targets:\n\n    ```bash\n    $ sudo nvme list\n    Node                  Generic               SN                   Model                                    Namespace Usage                      Format           FW Rev\n    --------------------- --------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------\n    /dev/nvme1n1          /dev/ng1n1            Ceph00000000000001   Ceph bdev Controller                     1          10,49  MB /  10,49  MB      4 KiB +  0 B   23.01\n    ...\n    ```\n\n1. Create a filesystem on the desired target:\n\n    ```bash\n    $  sudo mkfs /dev/nvme1n1\n    mke2fs 1.46.5 (30-Dec-2021)\n    Discarding device blocks: done\n    Creating filesystem with 2560 4k blocks and 2560 inodes\n\n    Allocating group tables: done\n    Writing inode tables: done\n    Writing superblocks and filesystem accounting information: done\n    ```\n\n1. Mount and use the storage volume\n\n    ```bash\n    $ mkdir /mnt/nvmeof\n    $ sudo mount /dev/nvme1n1 /mnt/nvmeof\n\n    $ ls /mnt/nvmeof\n    lost+found\n\n    $ sudo bash -c \"echo Hello NVMe-oF \u003e /mnt/nvmeof/hello.txt\"\n\n    $ cat /mnt/nvmeof/hello.txt\n    Hello NVMe-oF\n    ```\n\n### Start Discovery Service(Optional)\n\nThe discovery service can provide all the targets that the current user can access, and these target information is sourced from ceph omap. These targets may be running or just a record.\n\n1. Start Discovery Service\n    ```bash\n    $ python3 -m control.discovery\n    ```\n\n2. To start discovery service container in docker-compose environment\n   ```bash\n   $ docker compose up --detach discovery\n   ```\n\n3. Discover targets from discovery service. The default port is 8009.\n   ```bash\n   $ nvme discover -t tcp -a 192.168.13.3 -s 8009\n   ```\n\n## Advanced\n\n### Configuration\n\nThis service comes with a pre-defined configuration that matches the most common use cases. For advanced configuration, please update the settings at the `.env` file. That file is automatically read by `docker-compose`. However, it's a perfectly valid bash source, so that it can also be used as:\n\n```bash\nsource .env\necho $NVMEOF_VERSION...\n```\n\n### mTLS Configuration for testing purposes\n\nFor testing purposes, self signed certificates and keys can be generated locally using OpenSSL.\n\nFor the server, generate credentials for the server named 'my.server' and save them in files called server.key and server.crt. Additionally, specify subject alternative names using the gateway group nodes' IPs in the openssl command.\n\n```bash\n$ openssl req -x509 -newkey rsa:4096 -nodes -keyout server.key -out server.crt -days 3650 -subj '/CN=my.server' -addext \"subjectAltName=IP:192.168.13.3,IP:192.168.13.4,IP:192.168.13.5,IP:192.168.13.6\"\n```\n\nFor client:\n\n```bash\n$ openssl req -x509 -newkey rsa:4096 -nodes -keyout client.key -out client.crt -days 3650 -subj '/CN=client1'\n```\n\nIndicate the location of the keys and certificates in the config file:\n\n```ini\n[mtls]\n\nserver_key = ./server.key\nclient_key = ./client.key\nserver_cert = ./server.crt\nclient_cert = ./client.crt\n```\n\n### Huge-Pages\n\n[DPDK uses by default hugepages](https://doc.dpdk.org/guides/linux_gsg/sys_reqs.html#linux-gsg-hugepages) to be set up:\n\n```bash\nsh -c 'echo 4096 \u003e /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages'\n```\n\nThis is automatically done in the `make setup` step. The amount of hugepages can be configured with `make setup HUGEPAGES=512`.\n\nℹ️ **Info:** To eliminate the dependency on huge pages, set [mem_size=4096](https://github.com/ceph/ceph-nvmeof/blob/bf83ae504e77358944c8a0150d390cf66086fa2b/tests/ceph-nvmeof.no-huge.conf#L68) (memory size in megabytes) in the spdk section of the ceph-nvmeof.conf file. See the [example](https://github.com/ceph/ceph-nvmeof/blob/devel/tests/ceph-nvmeof.no-huge.conf) configuration file for reference.\n\n```ini\n[spdk]\nmem_size=4096\n```\n\n### Mapping SPDK BDEVs into a CEPH RADOS Cluster Context\n\nNVMEoF namespaces utilize SPDK BDEVs which map into CEPH RADOS client cluster contexts, and the mapping strategy impacts both performance and resource allocation. Multiple BDEVs can be allocated to a single CEPH cluster context, influencing I/O efficiency, cluster scalability, and system overhead. The choice of mapping strategy affects:\n\n- _Cluster context allocation cost_: Creating and maintaining CEPH cluster contexts incurs resource overhead.\n- _I/O bottlenecks_: If too many BDEVs share the same context, contention may degrade performance.\n- _Scalability_: The approach must balance between efficient resource usage and avoiding excessive cluster context creation.\n\n#### Mapping Strategies\n\n##### 1. Legacy ANA Group-Based Mapping\n\nA CEPH cluster context is allocated per ANA group.\n\nThe number of BDEVs assigned to each cluster context is controlled by the bdevs_per_cluster configuration parameter. This strategy ensures alignment with ANA group allocation but may lead to uneven distribution across cluster contexts.\n\n```ini\n[spdk]\nbdevs_per_cluster = 32\n```\n\n##### 2. Flat BDEVs per Cluster Mapping\n\nIgnores ANA groups and directly assigns BDEVs to cluster contexts. The number of BDEVs per cluster context is determined by the flat_bdevs_per_cluster parameter. Offers a more uniform distribution but might not align well with underlying ANA group optimizations.\n\n```ini\n[spdk]\nflat_bdevs_per_cluster = 32\n```\n- [Example configuration](https://github.com/baum/ceph-nvmeof/blob/cluster-allocation/tests/ceph-nvmeof.flat_bdevs_per_cluster.conf)\n\n##### 3. Cluster Pool-Based Mapping\n\nThe maximum number of cluster contexts is pre-defined by the cluster_connections configuration parameter.\n\nWhen a new BDEV is created, it is assigned to the cluster context with the fewest BDEVs. This dynamic approach balances workload distribution but may introduce overhead in tracking and rebalancing BDEV allocations.\n\n```ini\n[spdk]\ncluster_connections = 32\n```\n- [Example configuration](https://github.com/baum/ceph-nvmeof/blob/cluster-allocation/tests/ceph-nvmeof.cluster_pool.conf)\n\nChoosing the appropriate strategy depends on workload characteristics, expected BDEV-to-cluster context ratios, and system performance goals.\n\n\n## Development\n\n### Set-up\nThe development environment relies on containers (specifically `docker-compose`) for building and running the components. This has the benefit that, besides `docker` and `docker-compose`, no more dependencies need to be installed in the host environment.\n\nOnce the GitHub repo has been cloned, remember to initialize its git submodules (`spdk`, which in turn depends on other submodules):\n\n```bash\ngit submodule update --init --recursive\n```\n\nFor building, SELinux might cause issues, so it's better to set it to permissive mode:\n\n```bash\n# Change it for the running session\nsudo setenforce 0\n\n# Persist the change across boots\nsudo sed -i -E 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config\n```\n\n### Building\n\n#### Containers\n\nTo avoid having to deal with `docker-compose` commands, this provides a `Makefile` that wraps those as regular `make` targets:\n\nTo build the container images from the local sources:\n\n```bash\nmake build\n```\n\n**NOTE:**\nFor Arm64 build, the default SPDK building SoC is `generic`. To build SPDK for other SoC you need to override the default values of `SPDK_TARGET_ARCH`, `SPDK_CONFIGURE_DSA` and `SPDK_MAKEFLAGS`. To know which values to set for all the supported Arm64 SoCs see [the socs and implementer_xxx parts](https://github.com/DPDK/dpdk/blob/main/config/arm/meson.build#L674).\nE.g. for kunpeng920 SoC:\n```bash\nmake build SPDK_TARGET_ARCH=\"armv8.2-a+crypto\" \\\n    SPDK_MAKEFLAGS=\"DPDKBUILD_FLAGS=-Dplatform=kunpeng920\" SPDK_CONFIGURE_DSA=\"\"\n```\n\nThe resulting images should be like these:\n\n```bash\n$ docker images\nREPOSITORY                    TAG       IMAGE ID       CREATED         SIZE\nquay.io/ceph/nvmeof-cli       0.0.1     8277cd0cce2d   7 minutes ago   995MB\nquay.io/ceph/nvmeof           0.0.1     34d7230dcce8   7 minutes ago   439MB\nquay.io/ceph/vstart-cluster   17.2.6    cb2560975055   8 minutes ago   1.27GB\nquay.io/ceph/spdk             23.01     929e22e22ffd   8 minutes ago   342MB\n```\n\n* `spdk` is an intermediate image that contains an RPM-based installation of spdk with `rbd` support enabled.\n* `nvmeof` is built from the `spdk` container by installing the Python package.\n* `nvmeof-cli` provides a containerized environment to run CLI commands that manage the `nvmeof` service via gRPC.\n* `ceph` is a sandboxed (vstart-based) Ceph cluster for testing purposes.\n\nFor building a specific service:\n\n```bash\nmake build SVC=nvmeof\n```\n\n#### Stand-alone Packages\n\nTo generate independent RPM and Python wheel packages:\n\n```bash\nmake export-rpms export-python\nRPMs exported to:\n/tmp/rpm/x86_64/spdk-libs-23.01-0.x86_64.rpm\n/tmp/rpm/x86_64/spdk-devel-23.01-0.x86_64.rpm\n/tmp/rpm/x86_64/spdk-23.01-0.x86_64.rpm\nPython wheel exported to:\n/tmp/ceph_nvmeof-0.0.1-py3-none-any.whl\n```\n\nTo install nvmeof-cli as a CLI tool from the above Python wheel package, (or alternatively only build the cli package):\n```\nmake export-python\npip install /tmp/ceph_nvmeof-0.0.1-py3-none-any.whl\nceph-nvmeof // use nvmeof-cli tool!\n```\n\nThis can also be installed from https://pypi.org/project/ceph-nvmeof/, by running `pip3 install ceph-nvmeof`.\n\n### Development containers\n\nTo avoid having to re-build container on every code change, developer friendly containers are provided:\n\n```bash\ndocker compose up nvmeof-devel\n```\n\nDevel containers provide the same base layer as the production containers but with the source code mounted at run-time.\n\n### Adding, removing or updating Python dependencies\n\nPython dependencies are specified in the file `pyproject.toml`\n([PEP-621](https://peps.python.org/pep-0621/)), specifically under the `dependencies` list.\n\nAfter modifying it, the dependency lockfile (`pdm.lock`) needs to be updated accordingly (otherwise container image builds will fail):\n\n```bash\nmake update-lockfile\nmake regenerate-lockfile   # manylinux_2_39 x86_64 + aarch64, Python 3.12.x (see Makefile)\ngit add pdm.lock\n```\n\n`make update-lockfile` refreshes pins from `pyproject.toml` via `pdm update`. `make regenerate-lockfile` then re-resolves locks for **both** `manylinux_2_39_x86_64` and `manylinux_2_39_aarch64` with **`requires_python` `\u003e=3.12,\u003c3.13`**, so local ARM/Apple builds and minor 3.12 patch bumps (e.g. UBI 3.12.13) match a lock target. Omit `regenerate-lockfile` only if you intentionally want a single-platform lock.\n\n## Help\n\nTo obtain a detailed list of `make` targets, run `make help`:\n\n```\nMakefile to build and deploy the Ceph NVMe-oF Gateway\n\nUsage:\n    make [target] [target] ... OPTION=value ...\n\nTargets:\n\n  Basic targets:\n      clean           Clean-up environment\n      export-python   Build Ceph NVMe-oF Gateway Python package and copy it to /tmp\n      export-rpms     Build SPDK RPMs and copy them to $(EXPORT_DIR)/rpm\n      setup           Configure huge-pages (requires sudo/root password)\n      up              Services\n      regenerate-lockfile Re-resolve pdm.lock for manylinux x86_64 + aarch64 (Python 3.12.x)\n      update-lockfile Update dependencies in lockfile (pdm.lock)\n\n    Options:\n      EXPORT_DIR      Directory to export packages (RPM and Python wheel) (Default: /tmp)\n      up: SVC         Services (Default: nvmeof)\n\n  Deployment commands (docker-compose):\n      build           Build SVC images\n      down            Shut down deployment\n      events          Receive real-time events from containers\n      exec            Run command inside an existing container\n      images          List images\n      logs            View SVC logs\n      pause           Pause running deployment\n      port            Print public port for a port binding\n      ps              Display status of SVC containers\n      pull            Download SVC images\n      push            Push nvmeof and nvmeof-cli containers images to quay.io registries\n      restart         Restart SVC\n      run             Run command CMD inside SVC containers\n      shell           Exec shell inside running SVC containers\n      stop            Stop SVC\n      top             Display running processes in SVC containers\n      unpause         Resume paused deployment\n      up              Launch services\n\n    Options:\n      CMD             Command to run with run/exec targets (Default: )\n      DOCKER_COMPOSE  Docker-compose command (Default: docker-compose)\n      OPTS            Docker-compose subcommand options (Default: )\n      SCALE           Number of instances (Default: 1)\n      SVC             Docker-compose services (Default: )\n\n  Demo:\n      demo            Expose RBD_IMAGE_NAME as NVMe-oF target\n\n  Miscellaneous:\n      alias           Print bash alias command for the nvmeof-cli. Usage: \"eval $(make alias)\"\n      verify          Run flake8 on the Python source files\n```\n\nTargets may accept options: `make run SVC=nvme OPTS=--entrypoint=bash`.\n\n## Monitoring and Observability\nEach gateway daemon implements a prometheus exporter endpoint, which can expose performance and relevant metadata over port 10008/tcp. The endpoint is enabled by default, but if you don't see port 10008 listening, check the `ceph-nvmeof.conf` file.\n```\nenable_prometheus_exporter = True\n```\n\nThe image below shows a sample Grafana dashboard that provides a good starting point for monitoring the performance and configuration of an NVMe-oF gateway group.\n![dashboard](monitoring/Ceph-NVMe-oF-Gateways-Dashboard.png)\n\nThe JSON for the dashboard can be found [here](monitoring/Ceph-NVMe-oF-Gateways-Dashboard.json), and can simply be imported into your Grafana instance. *Note: Although Grafana v11 was used to develop the dashboard, it should work in v10.x as well.*\n  \n\n## Troubleshooting\n\n## Contributing and Support\n\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md).\n\n## Code of Conduct\n\nSee [Ceph's Code of Conduct](https://ceph.io/en/code-of-conduct/).\n\n## License\n\nSee [`LICENSE`](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceph%2Fceph-nvmeof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceph%2Fceph-nvmeof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceph%2Fceph-nvmeof/lists"}