Skip to content

Commit

Permalink
spdk: add vfio-user
Browse files Browse the repository at this point in the history
For some reason when adding --with-vfio-user
RPM build is not working any more
So changing this to regular build instead

Also note: --without-shared

Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Oct 21, 2022
1 parent 2e227ff commit 1c36530
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ services:
./rpc.py bdev_malloc_create -b Malloc0 64 512 && \
./rpc.py bdev_malloc_create -b Malloc1 64 512 && \
./rpc.py nvmf_create_transport -t TCP -u 8192 -m 4 -c 0 && \
./rpc.py nvmf_create_transport -t VFIOUSER && \
./rpc.py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -d SPDK_Controller1 && \
./rpc.py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t tcp -a `hostname -i` -f ipv4 -s 4444 && \
./rpc_http_proxy.py 0.0.0.0 9009 spdkuser spdkpass'
Expand Down
15 changes: 4 additions & 11 deletions spdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,18 @@ ARG TAG=v22.09
ARG ARCH=x86-64-v2

WORKDIR /root
RUN dnf install -y git rpm-build diffutils procps-ng pip && dnf clean all
RUN dnf install -y git rpm-build diffutils procps-ng pip hostname && dnf clean all

# hadolint ignore=DL3003
RUN git clone https://github.com/spdk/spdk --branch ${TAG} --depth 1 && \
cd spdk && git submodule update --init --depth 1 && scripts/pkgdep.sh --rdma

# hadolint ignore=DL3003
RUN cd spdk && ./rpmbuild/rpm.sh --target-arch=${ARCH} --without-uring --without-crypto \
RUN cd spdk && ./configure --target-arch=${ARCH} --without-uring --without-crypto \
--without-fio --with-raid5f --with-vhost --without-pmdk --without-rbd \
--with-rdma --with-shared --with-iscsi-initiator --without-vtune
--with-rdma --without-shared --with-iscsi-initiator --without-vtune --with-vfio-user \
&& make -j && make install && ln -sfn /root/spdk /usr/libexec/spdk

FROM docker.io/library/fedora:37

RUN dnf install -y hostname && dnf clean all

WORKDIR /root
RUN mkdir -p /root/rpmbuild
COPY --from=build /root/rpmbuild/ /root/rpmbuild/
RUN dnf install -y /root/rpmbuild/rpm/x86_64/*.rpm && dnf clean all
EXPOSE 9009
HEALTHCHECK CMD curl --fail --insecure --user spdkuser:spdkpass -X POST -H 'Content-Type: application/json' -d '{\"id\": 1, \"method\": \"bdev_get_bdevs\"}' http://localhost:9009 || exit 1
CMD ["/usr/libexec/spdk/scripts/rpc_http_proxy.py", "0.0.0.0", "9009", "spdkuser", "spdkpass"]

0 comments on commit 1c36530

Please sign in to comment.