github.com/blystad/deis@v0.11.0/router/Makefile (about)

     1  include ../includes.mk
     2  
     3  build:
     4  	$(call rsync_all)
     5  	$(call ssh_all,'cd share/router && sudo docker build -t deis/router .')
     6  
     7  install: check-fleet
     8  	@$(foreach R, $(ROUTER_UNITS), \
     9  		cp systemd/deis-router.service ./$(R) ; \
    10  		$(FLEETCTL) load ./$(R) ; \
    11  		rm -f ./$(R) ; \
    12  	)
    13  
    14  uninstall: check-fleet stop
    15  	@$(foreach R, $(ROUTER_UNITS), \
    16  		cp systemd/deis-router.service ./$(R) ; \
    17  		$(FLEETCTL) unload ./$(R) ; \
    18  		$(FLEETCTL) destroy ./$(R) ; \
    19  		rm -f ./$(R) ; \
    20  	)
    21  
    22  start: check-fleet
    23  	@$(foreach R, $(ROUTER_UNITS), \
    24  		cp systemd/deis-router.service ./$(R) ; \
    25  		$(FLEETCTL) start -no-block ./$(R) ; \
    26  		rm -f ./$(R) ; \
    27  	)
    28  
    29  stop: check-fleet
    30  	@$(foreach R, $(ROUTER_UNITS), \
    31  		cp systemd/deis-router.service ./$(R) ; \
    32  		$(FLEETCTL) stop -block-attempts=600 ./$(R) ; \
    33  		rm -f ./$(R) ; \
    34  	)
    35  
    36  restart: stop start
    37  
    38  run: install start
    39  
    40  clean: uninstall
    41  	$(call ssh_all,'sudo docker rm -f deis-router')
    42  
    43  full-clean: clean
    44  	$(call ssh_all,'sudo docker rmi deis/router')
    45  
    46  test: test-unit test-functional
    47  
    48  test-unit:
    49  	@echo no unit tests
    50  
    51  test-functional:
    52  	GOPATH=$(CURDIR)/../tests/_vendor:$(GOPATH) go test -v -timeout 20m ./tests/...