Commit 48ce1cd5 authored by Magnus Westergaard's avatar Magnus Westergaard
Browse files

DEICH-4573: Deploy to cold node first to avoid two masters when switching....

DEICH-4573: Deploy to cold node first to avoid two masters when switching. Debug stopping of existing containers.
parent c5b1502d
......@@ -207,9 +207,9 @@
- chmod 644 ~/.ssh/known_hosts
- export APPLICATION_NAME=${APPLICATION_NAME}
script:
- make remote-deploy-cold ssh_user=${SSH_USER} cold_node="${SSH_COLD_SERVER}"
- make remote-deploy ssh_user=${SSH_USER} ssh_servers="${SSH_SERVERS}" CONTAINER=${APPLICATION_NAME}
- make remote-deploy-voting ssh_user=${SSH_USER} voting_node="${SSH_VOTING_SERVER}"
- make remote-deploy-cold ssh_user=${SSH_USER} cold_node="${SSH_COLD_SERVER}"
when: manual
#Deploy test
......
......@@ -133,7 +133,7 @@ endif
remote-deploy-cold: | check-ssh_user check-TAG
ifdef cold_node
@echo "Deploying to cold stand by node $(cold_node)" ; \
ssh $(ssh_user)@$(cold_node) "mkdir -p /opt/deichman/deployments/$(TAG)/deichman && rm -rf /opt/deichman/deployments/$(TAG)/config && cd /opt/deichman/deployments/$(TAG)/ && cp -r /opt/deichman/deployment-config config && cd /opt/deichman/deployments/$(TAG)/deichman && TAG=$(TAG) DEPLOYMENT_CONFIG_LOCATION=../ docker-compose --env-file=../config/.env -f ../config/debcold/docker-compose.yml config > docker-compose.yml && docker-compose pull && docker stop \$(docker ps -aq) && docker-compose up -d";
ssh $(ssh_user)@$(cold_node) "mkdir -p /opt/deichman/deployments/$(TAG)/deichman && rm -rf /opt/deichman/deployments/$(TAG)/config && cd /opt/deichman/deployments/$(TAG)/ && cp -r /opt/deichman/deployment-config config && cd /opt/deichman/deployments/$(TAG)/deichman && TAG=$(TAG) DEPLOYMENT_CONFIG_LOCATION=../ docker-compose --env-file=../config/.env -f ../config/debcold/docker-compose.yml config > docker-compose.yml && docker-compose pull && docker ps -aq && docker-compose up -d";
endif
remote-docker-command:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment