Symbol white

← Back to other Deploy suggestions

There are pre-deploy commands, we would like post-deploy commands for cluster

82db011e15edd95368585741b0267024?rating=pg&size=52&default=mm
suggested by Jose J
1

Just like we have pre-deploy commands, I would like to have post-deploy commnads, these commands should run after the "After changes have been uploaded" and have been executed on the entire cluster.
 
The use case scenario is that we put our application under maintenance mode when we are running regular commands.  This allows our database migrations to run and the site will display a maintenance page for users for each server.  This eliminates the site from loading, and possibly cause undesired effects due to the fact that database migrations are running.
 
In this scenario I can run
 
Before changes have been uploaded
enable_maintenance.sh
 
After changes have been uploaded
... do some commands
...run some database migrations (we only run this on one of the servers of the cluster)
 
After commands have been excecuted for all servers in the cluster
disable_maintenance.sh
 
This ensure that disable_maintenance.sh is only executed after all the the servers in the cluster have executed the proper commands, and the migrations are successfully ran so it will not have undesired effects.
 
Currently if add the migration commands, some of the other servers may come up sooner than the machine running migrations which gives undersired results.

Collecting We're collecting votes & feedback about this suggestion!

Login to comment on this suggestion