launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #11758
[Merge] lp:~allenap/maas/cluster-and-region-actions into lp:maas
Gavin Panella has proposed merging lp:~allenap/maas/cluster-and-region-actions into lp:maas.
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~allenap/maas/cluster-and-region-actions/+merge/123629
--
https://code.launchpad.net/~allenap/maas/cluster-and-region-actions/+merge/123629
Your team MAAS Maintainers is requested to review the proposed merge of lp:~allenap/maas/cluster-and-region-actions into lp:maas.
=== modified file 'Makefile'
--- Makefile 2012-08-31 11:28:01 +0000
+++ Makefile 2012-09-10 19:45:24 +0000
@@ -180,37 +180,35 @@
# Development services.
#
-service_names := celeryd database dns pserv reloader txlongpoll web webapp
-services := $(patsubst %,services/%/,$(service_names))
-
-run:
- @services/run $(service_names)
+service_names_region := database dns reloader txlongpoll web webapp
+service_names_cluster := celeryd pserv reloader
+
+define service_template
+$(1)-region: $(patsubst %,services/%/@$(1),$(service_names_region))
+$(1)-cluster: $(patsubst %,services/%/@$(1),$(service_names_cluster))
+$(1): $(1)-region $(1)-cluster
+phony_services_targets += $(1)-region $(1)-cluster $(1)
+endef
+
+$(eval $(call service_template,pause))
+$(eval $(call service_template,restart))
+$(eval $(call service_template,start))
+$(eval $(call service_template,status))
+$(eval $(call service_template,stop))
+$(eval $(call service_template,supervise))
+
+run-region:
+ @services/run $(service_names_region)
+run-cluster:
+ @services/run $(service_names_cluster)
+run: run-region run-cluster
+
+phony_services_targets += run-region run-cluster run
run+webapp:
- @services/run $(service_names) +webapp
-
-start: $(addsuffix @start,$(services))
-
-pause: $(addsuffix @pause,$(services))
-
-status: $(addsuffix @status,$(services))
-
-restart: $(addsuffix @restart,$(services))
-
-stop: $(addsuffix @stop,$(services))
-
-supervise: $(addsuffix @supervise,$(services))
-
-define phony_services_targets
- pause
- restart
- run
- run+webapp
- start
- status
- stop
- supervise
-endef
+ @services/run $(service_names_region) +webapp
+
+phony_services_targets += run+webapp
# Convenient variables and functions for service control.