Skip to content

Instantly share code, notes, and snippets.

Last active November 3, 2019 14:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save AnoopAlias/fdbd91554134038f11d6a7986f90e060 to your computer and use it in GitHub Desktop.
# Do on master
yum -y --enablerepo=ndeploy upgrade *nDeploy* gnusys-monitoring
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -a "yum -y --enablerepo=ndeploy upgrade *nDeploy* gnusys-monitoring"
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -a "rm -f /opt/nDeploy/conf/XTENDWEB_MAXSCALE_SETUP_LOCK_DO_NOT_REMOVE"
cp -p /opt/nDeploy/conf/nDeploy-cluster/hosts /opt/nDeploy/conf/nDeploy-cluster/hosts.orig
/opt/nDeploy/scripts/ini2yaml < /opt/nDeploy/conf/nDeploy-cluster/hosts > /opt/nDeploy/conf/nDeploy-cluster/hosts.yaml
cp -p /opt/nDeploy/conf/nDeploy-cluster/hosts.yaml /opt/nDeploy/conf/nDeploy-cluster/hosts
cd /opt/nDeploy/conf/nDeploy-cluster
ansible-playbook -i ./hosts cluster.yml
nginx -t # Ensure Nginx Syntax validity
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -a "nginx -t" # Ensure Nginx Syntax validity
systemctl restart maxscale nginx
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -a "systemctl restart maxscale nginx"
maxctrl list servers
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -a "maxctrl list servers"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment