working commit

This commit is contained in:
2026-02-14 21:17:15 +02:00
parent 29524e725b
commit 3b6be8033e
24 changed files with 514 additions and 39 deletions
+1
View File
@@ -15,3 +15,4 @@ cmd/mstorectl/mstorectl
tmp
mstored
mstorectl
DIST
+23
View File
@@ -0,0 +1,23 @@
FROM alpine:3.20 as builder
RUN apk --no-cache add make binutils gcc libc-dev automake autoconf curl
RUN curl -o /usr/local/lib/go.tar.gz https://dl.google.com/go/go1.25.5.linux-amd64.tar.gz
RUN cd /usr/local/lib && tar xzf go.tar.gz
RUN cd /usr/local/bin && ln -sf ../lib/go/bin/* .
WORKDIR /app/src/
COPY go.mod go.sum .
COPY . .
RUN ./configure --prefix=/app
RUN make all install
RUN make clean
RUN rm -rf /app/src
FROM alpine:3.20
COPY --from=builder /app /app
RUN chmod 1777 /var
WORKDIR /app
#USER daemon:daemon
ENTRYPOINT ["/app/sbin/mstored"]
+39 -8
View File
@@ -33,16 +33,36 @@ format:
done
.PHONY: test
test:
cd pkg/client && $(GO) test -v .
cd test && $(GO) test -v .
DIST_DIR= $(shell pwd)/DIST
IMAGE_REPO = localhost
IMAGE_NAME = $(PACKAGE_NAME):$(PACKAGE_VERSION)
IMAGE_TARNAME = $(PACKAGE_NAME)-$(PACKAGE_VERSION).img
IMAGE_CONTAINERFILE = Containerfile
image:: build-image
build-image: clean
$(GO) mod vendor
mkdir -p $(DIST_DIR)
$(SUDO) $(PODMAN) build -t $(IMAGE_REPO)/$(IMAGE_NAME) -f $(IMAGE_CONTAINERFILE) .
rm -f $(DIST_DIR)/$(IMAGE_TARNAME)
$(SUDO) $(PODMAN) image save $(IMAGE_REPO)/$(IMAGE_NAME) --format oci-archive \
-o $(DIST_DIR)/$(IMAGE_TARNAME)
username=$$(whoami); \
$(SUDO) chown $$username $(DIST_DIR)/$(IMAGE_TARNAME)
rm -rf vendor
CHART_NAME = $(PACKAGE_NAME)-$(PACKAGE_VERSION).tgz
chart:: build-chart
build-chart:
mkdir -p $(DIST_DIR)
$(HELM) package --destination $(DIST_DIR) chart/
clean-local:
$(FIND) $(CWD) -name '*~' | $(XARGS) rm -f
rm -rf autom4te.cache
rm -f cmd/mstored/istored
rm -f cmd/mstorectl/mstorectl
rm -rf tmp/
FREEBSD_LOCALBASE = /usr/local
FREEBSD_RCDIR = $(FREEBSD_LOCALBASE)/etc/rc.d
@@ -64,3 +84,14 @@ if SYSTEMD
$(INSTALL_DATA) initrc/mstored.service $(DESTDIR)$(LINUX_SYSTEMDDIR)
endif
endif
clean-local:
$(FIND) $(CWD) -name '*~' | $(XARGS) rm -f
rm -rf autom4te.cache
rm -f cmd/mstored/istored
rm -f cmd/mstorectl/mstorectl
rm -rf tmp/
distclean-local:
rm -rf autom4te.cache
rm -rf $(DIST_DIR)
+55 -19
View File
@@ -101,7 +101,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = app/config/variant.go initrc/mstored.service \
initrc/mstored
initrc/mstored chart/Chart.yaml chart/values.yaml
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"
PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
@@ -165,6 +165,8 @@ am__define_uniq_tagged_files = \
AM_RECURSIVE_TARGETS = cscope
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/app/config/variant.go.in \
$(top_srcdir)/chart/Chart.yaml.in \
$(top_srcdir)/chart/values.yaml.in \
$(top_srcdir)/initrc/mstored.in \
$(top_srcdir)/initrc/mstored.service.in README.md config.guess \
config.sub install-sh missing
@@ -194,7 +196,9 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASENAME = @BASENAME@
CP = @CP@
CPIO = @CPIO@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
@@ -206,6 +210,7 @@ ETAGS = @ETAGS@
FIND = @FIND@
GO = @GO@
HAVE_GO = @HAVE_GO@
HELM = @HELM@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -229,6 +234,7 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SORT = @SORT@
STRIP = @STRIP@
SUDO = @SUDO@
UNIQ = @UNIQ@
VERSION = @VERSION@
XARGS = @XARGS@
@@ -300,6 +306,12 @@ mstored_SOURCES = \
cmd/mstored/main.go
CWD = $(shell pwd)
DIST_DIR = $(shell pwd)/DIST
IMAGE_REPO = localhost
IMAGE_NAME = $(PACKAGE_NAME):$(PACKAGE_VERSION)
IMAGE_TARNAME = $(PACKAGE_NAME)-$(PACKAGE_VERSION).img
IMAGE_CONTAINERFILE = Containerfile
CHART_NAME = $(PACKAGE_NAME)-$(PACKAGE_VERSION).tgz
FREEBSD_LOCALBASE = /usr/local
FREEBSD_RCDIR = $(FREEBSD_LOCALBASE)/etc/rc.d
LINUX_SYSTEMDDIR = /lib/systemd/system
@@ -345,6 +357,10 @@ initrc/mstored.service: $(top_builddir)/config.status $(top_srcdir)/initrc/mstor
cd $(top_builddir) && $(SHELL) ./config.status $@
initrc/mstored: $(top_builddir)/config.status $(top_srcdir)/initrc/mstored.in
cd $(top_builddir) && $(SHELL) ./config.status $@
chart/Chart.yaml: $(top_builddir)/config.status $(top_srcdir)/chart/Chart.yaml.in
cd $(top_builddir) && $(SHELL) ./config.status $@
chart/values.yaml: $(top_builddir)/config.status $(top_srcdir)/chart/values.yaml.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
@@ -712,7 +728,7 @@ distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
distclean-local distclean-tags
dvi: dvi-am
@@ -781,15 +797,15 @@ uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS
clean-sbinPROGRAMS cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
dist-xz dist-zip dist-zstd distcheck distclean \
distclean-compile distclean-generic distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
install-data install-data-am install-data-local install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
distclean-compile distclean-generic distclean-local \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am \
install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-sbinPROGRAMS install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-binPROGRAMS uninstall-sbinPROGRAMS
@@ -813,16 +829,25 @@ format:
done
.PHONY: test
test:
cd pkg/client && $(GO) test -v .
cd test && $(GO) test -v .
clean-local:
$(FIND) $(CWD) -name '*~' | $(XARGS) rm -f
rm -rf autom4te.cache
rm -f cmd/mstored/istored
rm -f cmd/mstorectl/mstorectl
rm -rf tmp/
image:: build-image
build-image: clean
$(GO) mod vendor
mkdir -p $(DIST_DIR)
$(SUDO) $(PODMAN) build -t $(IMAGE_REPO)/$(IMAGE_NAME) -f $(IMAGE_CONTAINERFILE) .
rm -f $(DIST_DIR)/$(IMAGE_TARNAME)
$(SUDO) $(PODMAN) image save $(IMAGE_REPO)/$(IMAGE_NAME) --format oci-archive \
-o $(DIST_DIR)/$(IMAGE_TARNAME)
username=$$(whoami); \
$(SUDO) chown $$username $(DIST_DIR)/$(IMAGE_TARNAME)
rm -rf vendor
chart:: build-chart
build-chart:
mkdir -p $(DIST_DIR)
$(HELM) package --destination $(DIST_DIR) chart/
install-data-local:
test -z $(DESTDIR)$(srv_confdir) || $(MKDIR_P) $(DESTDIR)$(srv_confdir)
@@ -835,6 +860,17 @@ install-data-local:
@LINUX_OS_TRUE@@SYSTEMD_TRUE@ test -z $(DESTDIR)$(LINUX_SYSTEMDDIR) || $(MKDIR_P) $(DESTDIR)$(LINUX_SYSTEMDDIR)
@LINUX_OS_TRUE@@SYSTEMD_TRUE@ $(INSTALL_DATA) initrc/mstored.service $(DESTDIR)$(LINUX_SYSTEMDDIR)
clean-local:
$(FIND) $(CWD) -name '*~' | $(XARGS) rm -f
rm -rf autom4te.cache
rm -f cmd/mstored/istored
rm -f cmd/mstorectl/mstorectl
rm -rf tmp/
distclean-local:
rm -rf autom4te.cache
rm -rf $(DIST_DIR)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+4 -4
View File
@@ -1,10 +1,10 @@
package config
const (
confdir = "/usr/local/etc/mstore"
rundir = "/var/run/mstore"
logdir = "/var/log/mstore"
datadir = "/var/data/mstore"
confdir = "/home/ziggi/Projects/mstore/etc/mstore"
rundir = "/home/ziggi/Projects/mstore/tmp/run"
logdir = "/home/ziggi/Projects/mstore/tmp/log"
datadir = "/home/ziggi/Projects/mstore/tmp/data"
version = "0.1.0"
srvname = "mstored"
)
+3
View File
@@ -0,0 +1,3 @@
*~
Chart.yaml
values.yaml
+2
View File
@@ -0,0 +1,2 @@
*.in
*~
+7
View File
@@ -0,0 +1,7 @@
apiVersion: v1
name: @PACKAGE_NAME@
description: mStore service
type: application
version: "@PACKAGE_VERSION@"
appVersion: "@PACKAGE_VERSION@"
+9
View File
@@ -0,0 +1,9 @@
{{- define "mstore.imagePath" -}}
{{- if .Values.global -}}
{{- if .Values.global.imagePath -}}
{{- .Values.global.imagePath -}}
{{- end -}}
{{- else -}}
{{- .Values.main.image.path -}}
{{- end -}}
{{- end -}}
+10
View File
@@ -0,0 +1,10 @@
{{- define "mstore.servicePort" -}}
{{- if .Values.global -}}
{{- if .Values.global.mstorePort -}}
{{- .Values.global.mstorePort -}}
{{- end -}}
{{- else -}}
{{- .Values.main.service.port -}}
{{- end -}}
{{- end -}}
+10
View File
@@ -0,0 +1,10 @@
{{- define "mstore.storageClass" -}}
{{- if .Values.global -}}
{{- if .Values.global.storageClass -}}
{{- .Values.global.storageClass -}}
{{- end -}}
{{- else -}}
{{- .Values.main.storageClass -}}
{{- end -}}
{{- end -}}
+10
View File
@@ -0,0 +1,10 @@
{{- define "mstore.storageSize" -}}
{{- if .Values.global -}}
{{- if .Values.global.mstoreStorageSize -}}
{{- .Values.global.mstoreStorageSize -}}
{{- end -}}
{{- else -}}
{{- .Values.main.storageSize -}}
{{- end -}}
{{- end -}}
+31
View File
@@ -0,0 +1,31 @@
{{- define "mstore.username" -}}
{{- if .Values.global -}}
{{- if .Values.global.mstoreUsername -}}
{{- .Values.global.mstoreUsername -}}
{{- else -}}
{{- fail "Istore username is empty, fill it in global values.yaml !" -}}
{{- end -}}
{{- else -}}
{{- if .Values.main.auth.username -}}
{{- .Values.main.auth.username -}}
{{- else -}}
{{- fail "Istore username is empty, fill it in values.yaml !" -}}
{{- end }}
{{- end -}}
{{- end -}}
{{- define "mstore.password" -}}
{{- if .Values.global -}}
{{- if .Values.global.mstoreUserpass -}}
{{- .Values.global.mstoreUserpass -}}
{{- else -}}
{{- fail "Istore password is empty, fill it in global values.yaml !"}}
{{- end -}}
{{- else -}}
{{- if .Values.main.auth.password -}}
{{- .Values.main.auth.password -}}
{{- else -}}
{{- fail "Istore password is empty, fill it in values.yaml !"}}
{{- end -}}
{{- end -}}
{{- end -}}
+11
View File
@@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ .Release.Namespace }}
name: mstored-config
data:
mstored.yaml: |-
service:
address: 0.0.0.0
port: {{ include "mstore.servicePort" . }}
asDaemon: false
+37
View File
@@ -0,0 +1,37 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mstore
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: mstore
template:
metadata:
labels:
app: mstore
spec:
restartPolicy: Always
containers:
- securityContext:
privileged: true
image: {{ include "mstore.imagePath" . }}/{{ .Values.main.image.name }}:{{ .Values.main.image.tag }}
imagePullPolicy: {{ .Values.main.image.imagePullPolicy }}
name: mstore
ports:
- containerPort: {{ include "mstore.servicePort" . }}
protocol: TCP
volumeMounts:
- name: config-volume
mountPath: /app/etc/mstore
- name: db-volume
mountPath: /var/data
volumes:
- name: config-volume
configMap:
name: mstored-config
- name: db-volume
persistentVolumeClaim:
claimName: mstore-data
+14
View File
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: mstore
namespace: {{ .Release.Namespace }}
spec:
selector:
app: mstore
ports:
- port: {{ include "mstore.servicePort" . }}
protocol: TCP
targetPort: {{ include "mstore.servicePort" . }}
name: api
type: {{ .Values.main.service.type }}
+12
View File
@@ -0,0 +1,12 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: mstore-data
spec:
storageClassName: {{ include "mstore.storageClass" . }}
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: {{ include "mstore.storageSize" . }}
+16
View File
@@ -0,0 +1,16 @@
main:
image:
path: hub.unix7.org/mstore
name: "@PACKAGE_NAME@"
tag: "@PACKAGE_VERSION@"
imagePullPolicy: Always
service:
type: LoadBalancer
port: 1025
# x509Cert: xxx
# x509Key: xxx
hostname: "localhost"
daemon: false
storageClass: local-path
storageSize: 10Gi
Vendored
+209 -1
View File
@@ -638,6 +638,10 @@ build_vendor
build_cpu
build
CP
HELM
BASENAME
CPIO
SUDO
UNIQ
SORT
XARGS
@@ -2888,6 +2892,208 @@ printf "%s\n" "no" >&6; }
fi
for ac_prog in sudo false
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_SUDO+y}
then :
printf %s "(cached) " >&6
else $as_nop
case $SUDO in
[\\/]* | ?:[\\/]*)
ac_cv_path_SUDO="$SUDO" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_path_SUDO="$as_dir$ac_word$ac_exec_ext"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
SUDO=$ac_cv_path_SUDO
if test -n "$SUDO"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SUDO" >&5
printf "%s\n" "$SUDO" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
test -n "$SUDO" && break
done
for ac_prog in cpio false
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_CPIO+y}
then :
printf %s "(cached) " >&6
else $as_nop
case $CPIO in
[\\/]* | ?:[\\/]*)
ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_path_CPIO="$as_dir$ac_word$ac_exec_ext"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
CPIO=$ac_cv_path_CPIO
if test -n "$CPIO"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
printf "%s\n" "$CPIO" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
test -n "$CPIO" && break
done
for ac_prog in basename
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_BASENAME+y}
then :
printf %s "(cached) " >&6
else $as_nop
case $BASENAME in
[\\/]* | ?:[\\/]*)
ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_path_BASENAME="$as_dir$ac_word$ac_exec_ext"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
BASENAME=$ac_cv_path_BASENAME
if test -n "$BASENAME"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
printf "%s\n" "$BASENAME" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
test -n "$BASENAME" && break
done
for ac_prog in helm true
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_HELM+y}
then :
printf %s "(cached) " >&6
else $as_nop
case $HELM in
[\\/]* | ?:[\\/]*)
ac_cv_path_HELM="$HELM" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_path_HELM="$as_dir$ac_word$ac_exec_ext"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
HELM=$ac_cv_path_HELM
if test -n "$HELM"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HELM" >&5
printf "%s\n" "$HELM" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
test -n "$HELM" && break
done
for ac_prog in gcp cp
@@ -3344,7 +3550,7 @@ printf "%s\n" "$as_me: srv_datadir set as ${SRV_DATADIR}" >&6;}
ac_config_files="$ac_config_files Makefile app/config/variant.go initrc/mstored.service initrc/mstored"
ac_config_files="$ac_config_files Makefile app/config/variant.go initrc/mstored.service initrc/mstored chart/Chart.yaml chart/values.yaml"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -4086,6 +4292,8 @@ do
"app/config/variant.go") CONFIG_FILES="$CONFIG_FILES app/config/variant.go" ;;
"initrc/mstored.service") CONFIG_FILES="$CONFIG_FILES initrc/mstored.service" ;;
"initrc/mstored") CONFIG_FILES="$CONFIG_FILES initrc/mstored" ;;
"chart/Chart.yaml") CONFIG_FILES="$CONFIG_FILES chart/Chart.yaml" ;;
"chart/values.yaml") CONFIG_FILES="$CONFIG_FILES chart/values.yaml" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
+8
View File
@@ -14,6 +14,12 @@ AC_PATH_PROG([FIND],[find])
AC_PATH_PROG([XARGS],[xargs])
AC_PATH_PROG([SORT],[sort])
AC_PATH_PROG([UNIQ],[uniq])
AC_PATH_PROGS([SUDO],[sudo false])
AC_PATH_PROGS([CPIO],[cpio false])
AC_PATH_PROGS([BASENAME],[basename])
AC_PATH_PROGS([HELM],[helm true])
AC_PATH_PROGS([CP],[gcp cp])
@@ -238,5 +244,7 @@ Makefile
app/config/variant.go
initrc/mstored.service
initrc/mstored
chart/Chart.yaml
chart/values.yaml
])
AC_OUTPUT
+1 -1
View File
@@ -3,7 +3,7 @@ Description=mstored
[Service]
Type=forking
PIDFile=/var/run/mstore/mstored.pid
PIDFile=/home/ziggi/Projects/mstore/tmp/run/mstored.pid
ExecStart=/usr/local/sbin/mstored -daemon=true
ExecReload=/bin/kill -HUP $MAINPID
+1 -1
View File
@@ -24,7 +24,7 @@ import (
"sigs.k8s.io/yaml"
)
func xxxTestAccountLife(t *testing.T) {
func TestAccountLife(t *testing.T) {
var srvport int64 = 10250
srvdir := t.TempDir()
srvaddr := fmt.Sprintf("mstore:mstore@127.0.0.1:%d", srvport)
-1
View File
@@ -111,7 +111,6 @@ func TestFileLife(t *testing.T) {
require.True(t, exists)
require.NotNil(t, file)
}
return
{
// GetFile
fmt.Printf("=== GetFile ===\n")
+1 -4
View File
@@ -98,11 +98,8 @@ func TestImageLife(t *testing.T) {
fmt.Printf("=== DeleteImage ===\n")
cli := client.NewClient()
ctx, _ := context.WithTimeout(context.Background(), 1*time.Second)
info, err := cli.DeleteImage(ctx, srvaddr+"/foo/test:123")
err := cli.DeleteImage(ctx, srvaddr+"/foo/test:123")
require.NoError(t, err)
infoYaml, err := yaml.Marshal(info)
require.NoError(t, err)
fmt.Printf("deleteImage:\n%s\n", string(infoYaml))
}
}