diff --git a/Makefile b/Makefile index b3c2f24..73d7ad3 100644 --- a/Makefile +++ b/Makefile @@ -53,29 +53,29 @@ define test_loadbalance endef -configure: +configure: ## Configure whole deployment $(call configure_ping) $(call configure_base) $(call configure_libreddit) $(call configure_loadbalance) -configure.ping: +configure.ping: ## Ping all VMs $(call configure_ping) -configure.base: +configure.base: ## Configure all VMs to base production configuration $(call configure_ping) $(call configure_base) -configure.libreddit: +configure.libreddit: ## Configure libreddit $(call configure_ping) $(call configure_libreddit) -configure.loadbalance: +configure.loadbalance: ## Configure loadbalancer $(call configure_ping) $(call configure_loadbalance) -lint: +lint: ## Lint source code terraform fmt ansible-lint --write ./ansible/playbook.yml ansible-lint --write ./ansible/shutdown.yml @@ -83,23 +83,27 @@ lint: ansible-lint --write ./ansible/libreddit.yml . ./venv/bin/activate && black tests/ -on: +on: ## Boot VMs ./scripts/on.sh virsh list -shutdown: +shutdown: ## Shutdown VMs ansible-playbook -i ./ansible/inventory/hosts.ini -f 10 ./ansible/shutdown.yml -test: +test: ## Run all tests $(call test_base) $(call test_loadbalance) $(call test_libreddit) -test.base: +test.base: ## Test base configuration on all VMs $(call test_base) -test.loadbalance: +test.loadbalance: ## Test loadbalancer installation $(call test_loadbalance) -test.libreddit: +test.libreddit: ## Test libreddit installation $(call test_libreddit) + + +help: ## Prints help for targets with comments + @cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-].+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'