Add swarm config
This commit is contained in:
47
Makefile
47
Makefile
@@ -1,8 +1,8 @@
|
||||
# Bare Bones Vagrant Makefile
|
||||
|
||||
.PHONY: help start stop destroy status ssh-host ssh-machine1 ssh-machine2 ssh-machine3 ssh-machine4 clean \
|
||||
ansible-ping ansible-setup ansible-deploy ansible-list ansible-facts \
|
||||
reset-full reset-destroy reset-start reset-test reset-ssh reset-ansible reset-setup reset-deploy
|
||||
.PHONY: help start stop destroy status ssh-manager ssh-worker1 ssh-worker2 ssh-worker3 clean \
|
||||
ansible-ping ansible-setup ansible-deploy ansible-list ansible-facts \
|
||||
reset-full reset-destroy reset-start reset-test reset-ssh reset-ansible reset-setup reset-deploy
|
||||
|
||||
# Default target
|
||||
help: ## Show this help message
|
||||
@@ -28,25 +28,21 @@ status: ## Show machine status
|
||||
@echo "Showing machine status..."
|
||||
./manage.sh status
|
||||
|
||||
ssh-host: ## Access host machine via SSH
|
||||
@echo "Accessing host machine..."
|
||||
./manage.sh ssh host
|
||||
ssh-manager: ## Access swarm manager via SSH
|
||||
@echo "Accessing swarm manager..."
|
||||
./manage.sh ssh swarm-manager
|
||||
|
||||
ssh-machine1: ## Access machine1 via SSH
|
||||
@echo "Accessing machine1..."
|
||||
./manage.sh ssh machine1
|
||||
ssh-worker1: ## Access swarm worker1 via SSH
|
||||
@echo "Accessing swarm worker1..."
|
||||
./manage.sh ssh swarm-worker1
|
||||
|
||||
ssh-machine2: ## Access machine2 via SSH
|
||||
@echo "Accessing machine2..."
|
||||
./manage.sh ssh machine2
|
||||
ssh-worker2: ## Access swarm worker2 via SSH
|
||||
@echo "Accessing swarm worker2..."
|
||||
./manage.sh ssh swarm-worker2
|
||||
|
||||
ssh-machine3: ## Access machine3 via SSH
|
||||
@echo "Accessing machine3..."
|
||||
./manage.sh ssh machine3
|
||||
|
||||
ssh-machine4: ## Access machine4 via SSH
|
||||
@echo "Accessing machine4..."
|
||||
./manage.sh ssh machine4
|
||||
ssh-worker3: ## Access swarm worker3 via SSH
|
||||
@echo "Accessing swarm worker3..."
|
||||
./manage.sh ssh swarm-worker3
|
||||
|
||||
clean: ## Clean up temporary files
|
||||
@echo "Cleaning up temporary files..."
|
||||
@@ -54,11 +50,10 @@ clean: ## Clean up temporary files
|
||||
@echo "Cleanup complete!"
|
||||
|
||||
# Quick access targets
|
||||
host: ssh-host ## Alias for ssh-host
|
||||
m1: ssh-machine1 ## Alias for ssh-machine1
|
||||
m2: ssh-machine2 ## Alias for ssh-machine2
|
||||
m3: ssh-machine3 ## Alias for ssh-machine3
|
||||
m4: ssh-machine4 ## Alias for ssh-machine4
|
||||
manager: ssh-manager ## Alias for ssh-manager
|
||||
w1: ssh-worker1 ## Alias for ssh-worker1
|
||||
w2: ssh-worker2 ## Alias for ssh-worker2
|
||||
w3: ssh-worker3 ## Alias for ssh-worker3
|
||||
|
||||
# Ansible targets
|
||||
ansible-ping: ## Test Ansible connectivity to all hosts
|
||||
@@ -71,8 +66,8 @@ ansible-setup: ## Run setup playbook to install dependencies
|
||||
@echo "Running setup playbook..."
|
||||
ansible-playbook -i inventory setup-playbook.yml
|
||||
|
||||
ansible-deploy: ## Run deployment playbook
|
||||
@echo "Running deployment playbook..."
|
||||
ansible-deploy: ## Run Docker Swarm deployment playbook
|
||||
@echo "Running Docker Swarm deployment playbook..."
|
||||
ansible-playbook -i inventory deploy-playbook.yml
|
||||
|
||||
ansible-list: ## List all hosts in inventory
|
||||
|
||||
Reference in New Issue
Block a user