diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-01-15 13:59:04 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-01-16 17:39:28 +0530 |
commit | c5bcaaaf25e781c21d29dfb0f39b0aeb7edb8283 (patch) | |
tree | 3754ef31816e856b34007170afba07778df0cf76 /Makefile | |
parent | 0a1c338a4814f91cd49b7747442d413c6b8f0dfa (diff) |
gluster-blockd: daemonize the utility
this patch,
deprecate ssh way of communicating between server nodes/pods
Reason: ssh way is hard to be accepted in container world (Kube).
An another option kubeExec way seems to be a bit weird,
to have uniform way of communication in container and
non container worlds, we prefer RPC.
From now we communicate via RPC, using a static port 24009
Hence, we have two components,
server component -> gluster-blockd (daemon)
client component -> gluster-block (cli)
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 28 |
1 files changed, 17 insertions, 11 deletions
@@ -12,11 +12,14 @@ CC = gcc -BIN = gluster-block -OBJS = glfs-operations.o ssh-common.o utils.o gluster-block.o +CLIENT = gluster-block +CDEP = glfs-operations.o utils.o rpc/block_clnt.c rpc/block_xdr.c gluster-block.o -CFLAGS = -g -Wall -LIBS := $(shell pkg-config --libs uuid glusterfs-api libssh) +SERVER = gluster-blockd +SDEP = rpc/block_svc.o rpc/block_xdr.o gluster-blockd.o utils.o + +CFLAGS = -g -ggdb -Wall +LIBS := $(shell pkg-config --libs uuid glusterfs-api) DEPS_LIST = gcc tcmu-runner targetcli @@ -25,12 +28,15 @@ MKDIR_P = mkdir -p LOGDIR = /var/log/ -all: $(BIN) +all: $(CLIENT) $(SERVER) -$(BIN): $(OBJS) +$(CLIENT): $(CDEP) @$(MKDIR_P) $(LOGDIR)$@ $(CC) $(CFLAGS) $(LIBS) $^ -o $@ +$(SERVER): $(SDEP) + $(CC) $(CFLAGS) $^ -o $@ + glfs-operations.o: glfs-operations.c glfs-operations.h $(foreach x, $(DEPS_LIST),\ $(if $(shell which $x), \ @@ -39,15 +45,15 @@ glfs-operations.o: glfs-operations.c glfs-operations.h $(error "No $x in PATH, install '$x' and continue ...")))) $(CC) $(CFLAGS) -c $< -o $@ -$(BIN).o: $(BIN).c +$(CLIENT).o: $(CLIENT).c $(CC) $(CFLAGS) -c $< -o $@ -install: $(BIN) - cp $< $(PREFIX)/ +install: $(CLIENT) $(SERVER) + cp $^ $(PREFIX)/ .PHONY: clean distclean clean distclean: - rm -f ./*.o $(BIN) + rm -f ./*.o ./rpc/*.o $(CLIENT) $(SERVER) uninstall: - rm -f $(PREFIX)/$(BIN) + rm -f $(PREFIX)/$(CLIENT) $(PREFIX)/$(SERVER) |