mirror of
https://github.com/yavook/kiwi-scp.git
synced 2024-11-22 12:53:00 +00:00
"TARGETROOT" -> "TARGET_ROOT", "kiwihub" -> "kiwi_hub"
This commit is contained in:
parent
0b2b9a0a75
commit
d67b04897f
4 changed files with 15 additions and 15 deletions
22
Makefile
22
Makefile
|
@ -35,9 +35,9 @@ $(error KIWI_HUB_CIDR not set in $(CONF_WILDC))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# persistent data directory
|
# persistent data directory
|
||||||
CONF_TARGETROOT:=$(call confvalue,TARGETROOT)
|
CONF_TARGET_ROOT:=$(call confvalue,TARGET_ROOT)
|
||||||
ifeq ($(CONF_TARGETROOT),)
|
ifeq ($(CONF_TARGET_ROOT),)
|
||||||
$(error TARGETROOT not set in $(CONF_WILDC))
|
$(error TARGET_ROOT not set in $(CONF_WILDC))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# suffix for project directories
|
# suffix for project directories
|
||||||
|
@ -56,7 +56,7 @@ endif
|
||||||
# CONSTANTS
|
# CONSTANTS
|
||||||
|
|
||||||
# file to store docker network cidr
|
# file to store docker network cidr
|
||||||
KIWI_HUB_FILE:=$(CONF_TARGETROOT)/up-$(CONF_KIWI_HUB_NAME)
|
KIWI_HUB_FILE:=$(CONF_TARGET_ROOT)/up-$(CONF_KIWI_HUB_NAME)
|
||||||
|
|
||||||
# remove any suffix $2 from $1
|
# remove any suffix $2 from $1
|
||||||
rmsuffix=$(patsubst %$2,%,$1)
|
rmsuffix=$(patsubst %$2,%,$1)
|
||||||
|
@ -78,8 +78,8 @@ kiwicompose=$(call docker_bash,\
|
||||||
cd "$<"; \
|
cd "$<"; \
|
||||||
$(CONF_SOURCE) \
|
$(CONF_SOURCE) \
|
||||||
COMPOSE_PROJECT_NAME="$(call projname,$<)" \
|
COMPOSE_PROJECT_NAME="$(call projname,$<)" \
|
||||||
CONFDIR="$(CONF_TARGETROOT)/conf" \
|
CONFDIR="$(CONF_TARGET_ROOT)/conf" \
|
||||||
TARGETDIR="$(CONF_TARGETROOT)/$<" \
|
TARGETDIR="$(CONF_TARGET_ROOT)/$<" \
|
||||||
$(DOCKER_COMPOSE) $(1))
|
$(DOCKER_COMPOSE) $(1))
|
||||||
|
|
||||||
#########
|
#########
|
||||||
|
@ -101,7 +101,7 @@ $(KIWI_HUB_FILE):
|
||||||
@$(DOCKER) run --rm \
|
@$(DOCKER) run --rm \
|
||||||
-v "/:/mnt" -u root alpine:latest \
|
-v "/:/mnt" -u root alpine:latest \
|
||||||
ash -c '\
|
ash -c '\
|
||||||
mkdir -p "$(addprefix /mnt, $(CONF_TARGETROOT))"; \
|
mkdir -p "$(addprefix /mnt, $(CONF_TARGET_ROOT))"; \
|
||||||
echo "$(CONF_KIWI_HUB_CIDR)" > "$(addprefix /mnt, $(KIWI_HUB_FILE))"; \
|
echo "$(CONF_KIWI_HUB_CIDR)" > "$(addprefix /mnt, $(KIWI_HUB_FILE))"; \
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -136,12 +136,12 @@ ifneq ($(wildcard *${PROJ_SUFFX}/conf),)
|
||||||
$(DOCKER) build -t ldericher/kiwi-config:rsync . -f- &> /dev/null
|
$(DOCKER) build -t ldericher/kiwi-config:rsync . -f- &> /dev/null
|
||||||
|
|
||||||
$(eval sources:=$(wildcard *${PROJ_SUFFX}/conf))
|
$(eval sources:=$(wildcard *${PROJ_SUFFX}/conf))
|
||||||
@echo "Syncing $(sources) to $(CONF_TARGETROOT) ..."
|
@echo "Syncing $(sources) to $(CONF_TARGET_ROOT) ..."
|
||||||
|
|
||||||
$(eval sources:=$(realpath $(sources)))
|
$(eval sources:=$(realpath $(sources)))
|
||||||
$(eval sources:=$(addprefix /mnt, $(sources)))
|
$(eval sources:=$(addprefix /mnt, $(sources)))
|
||||||
$(eval sources:=$(patsubst %,'%',$(sources)))
|
$(eval sources:=$(patsubst %,'%',$(sources)))
|
||||||
$(eval dest:='$(addprefix /mnt, $(CONF_TARGETROOT))')
|
$(eval dest:='$(addprefix /mnt, $(CONF_TARGET_ROOT))')
|
||||||
|
|
||||||
@$(DOCKER) run --rm \
|
@$(DOCKER) run --rm \
|
||||||
-v "/:/mnt" -u root ldericher/kiwi-config:rsync \
|
-v "/:/mnt" -u root ldericher/kiwi-config:rsync \
|
||||||
|
@ -152,11 +152,11 @@ endif
|
||||||
|
|
||||||
.PHONY: purge-conf
|
.PHONY: purge-conf
|
||||||
purge-conf:
|
purge-conf:
|
||||||
@echo "Emptying $(CONF_TARGETROOT)/conf ..."
|
@echo "Emptying $(CONF_TARGET_ROOT)/conf ..."
|
||||||
@$(DOCKER) run --rm \
|
@$(DOCKER) run --rm \
|
||||||
-v "/:/mnt" -u root alpine:latest \
|
-v "/:/mnt" -u root alpine:latest \
|
||||||
ash -c '\
|
ash -c '\
|
||||||
rm -rf "$(addprefix /mnt, $(CONF_TARGETROOT)/conf)"; \
|
rm -rf "$(addprefix /mnt, $(CONF_TARGET_ROOT)/conf)"; \
|
||||||
'
|
'
|
||||||
|
|
||||||
#########
|
#########
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
export SUFFIX_PROJECT=.project
|
export SUFFIX_PROJECT=.project
|
||||||
export SUFFIX_DOWN=.down
|
export SUFFIX_DOWN=.down
|
||||||
|
|
||||||
export KIWI_HUB_NAME=kiwihub
|
export KIWI_HUB_NAME=kiwi_hub
|
||||||
export KIWI_HUB_CIDR=10.22.46.0/24
|
export KIWI_HUB_CIDR=10.22.46.0/24
|
||||||
|
|
||||||
export TARGETROOT=/tmp/kiwi
|
export TARGET_ROOT=/tmp/kiwi
|
||||||
|
|
|
@ -13,5 +13,5 @@ markers:
|
||||||
down: .down
|
down: .down
|
||||||
|
|
||||||
network:
|
network:
|
||||||
name: kiwihub
|
name: kiwi_hub
|
||||||
cidr: 10.22.46.0/24
|
cidr: 10.22.46.0/24
|
||||||
|
|
|
@ -6,5 +6,5 @@ markers:
|
||||||
project: .project
|
project: .project
|
||||||
down: .down
|
down: .down
|
||||||
network:
|
network:
|
||||||
name: kiwihub
|
name: kiwi_hub
|
||||||
cidr: 10.22.46.0/24
|
cidr: 10.22.46.0/24
|
||||||
|
|
Loading…
Reference in a new issue