wip-mcaptcha-mcaptcha #3

Merged
realaravinth merged 5 commits from wip-mcaptcha-mcaptcha into master 2023-12-09 03:03:07 +05:30
Showing only changes of commit da087a74c7 - Show all commits

View file

@ -24,6 +24,12 @@ define configure_cache
ansible-playbook -i $(INVENTORY) -f 10 ./ansible/cache.yml
endef
define configure_mcaptcha
. ./venv/bin/activate && \
ansible-playbook -i $(INVENTORY) -f 10 ./ansible/mcaptcha.yml
endef
define test_base
. ./venv/bin/activate && \
@ -49,6 +55,19 @@ define test_cache
endef
define test_mcaptcha
. ./venv/bin/activate && \
cd tests/mcaptcha/ && \
ANSIBLE_REMOTE_USER=root \
py.test --hosts='ansible://mcaptcha_hosts' \
-n 10 \
--verbose \
--ansible-inventory="../../${INVENTORY}" \
base.py
endef
define test_locust
. ./venv/bin/activate && \
@ -88,6 +107,13 @@ conf.dos: ## Configure all DoS VMs
conf.cache: ## Configure all cache VMs
$(call configure_cache)
# ```bash
# INVENTORY=./terraform/dos/hosts.ini make conf.mcaptcha
# ```
conf.mcaptcha: ## Configure all mcaptcha VMs
$(call configure_mcaptcha)
# ```bash
# INVENTORY=./terraform/dos/hosts.ini make conf.ping
# ```
@ -105,7 +131,8 @@ test.base: ## Test base configuration on all VMs
test.cache: ## Test cache configuration
$(call test_cache)
test.mcaptcha: ## Test mcaptcha configuration
$(call test_mcaptcha)
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}'