Commit 50721c0d authored by Mattias Lundmark's avatar Mattias Lundmark
Browse files

DEICH-4573: Added debcold deploy for stage

parent 29704f0f
......@@ -200,6 +200,7 @@
script:
- 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} voting_node="${SSH_COLD_SERVER}"
when: manual
#Deploy test
......@@ -385,6 +386,7 @@
SSH_SERVERS: "${STAGING_SERVERS}"
SSH_KEY: $DEPLOY_KEY
SSH_VOTING_SERVER: ${STAGING_VOTING_SERVER}
SSH_COLD_SERVER: ${STAGING_COLD_SERVER}
deploy-all-staging:
extends:
......
......@@ -130,6 +130,12 @@ ifdef voting_node
ssh $(ssh_user)@$(voting_node) "mkdir -p /opt/deichman/deployments/$(TAG)/deichman && rm -rf /opt/deichman/deployments/$(TAG)/config && cd deployments/$(TAG)/ && cp -r /opt/deichman/deployment-config config && cd deichman && TAG=$(TAG) DEPLOYMENT_CONFIG_LOCATION=../ docker-compose --env-file=../.env -f ../config/debvoter/docker-compose.yml config > docker-compose.yml && docker-compose pull && docker-compose up -d";
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 deployments/$(TAG)/ && cp -r /opt/deichman/deployment-config config && cd deichman && TAG=$(TAG) DEPLOYMENT_CONFIG_LOCATION=../ docker-compose --env-file=../.env -f ../config/debcold/docker-compose.yml config > docker-compose.yml && docker-compose pull && docker-compose up -d";
endif
remote-docker-command:
ssh $(ssh_user)@$(ssh_server) "cd /opt/deichman/deployments/$(TAG)/deichman && docker-compose exec -T $(CONTAINER) $(cmd)"
......
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