fabrica/.packer/targets/services.mk

35 lines
1.0 KiB
Makefile
Raw Normal View History

SDOMAIN = services
SOUTPUT_DIR = images/services
SSYSSIZE ?= 10240
SEOLEBASE = images/eole/2.7.2/eolebase/eolebase-2.7.2.img
SALPINEBASE = images/alpine/3.12/alpine-virt/alpine-virt-3.12.img
SPUBUSER ?= root
SPSERVER ?= hephy.service
SPSOURCE ?= ./images/cadoles/services
SPUBDIR ?= /var/www/html/market/master/cadoles/
SPROVDIR ?= ./recipes/cadoles/production/provisioning
build: services
deploy: deploy-services
services: bitwarden.services.img
%.$(SDOMAIN): %.services.img
@echo Building : $*
%.$(SDOMAIN).img: $(SEOLEBASE) $(SALPINEBASE)
@rm -rf $(SOUTPUT_DIR)
VM_NAME=$*.$(SDOMAIN) SYS_DISK_SIZE=$(SSYSSIZE) \
script/build recipes/services/$*.json ${BUILD_OPTS} ${BUILD_OPT}
%.$(SDOMAIN)-publish:
@echo scp -r $(SPSOURCE)/$*.$(SDOMAIN) $(SPUBUSER)@$(SPSERVER):$(SPUBDIR)production/
@scp -r $(SPSOURCE)/$*.$(SDOMAIN) $(SPUBUSER)@$(SPSERVER):$(SPUBDIR)production/
services-publish:
@echo scp -r $(SPSOURCE) $(SPUBUSER)@$(SPSERVER):$(PUBDIR)
@scp -r $(SPSOURCE) $(SPUBUSER)@$(SPSERVER):$(SPUBDIR)