Operations Cheat Sheet

This document describes how to perform most common operations on Maestrano components such as restarting an application server, manually deploying a new version etc.

1 - Frontend Application

1.1 Restart Application Server

Login to the server via SSH and run the following command:

# Tell Puma (Application server) to restart itself
sudo service puma restart
 
# Monitor the application server logs
sudo tail -f /app/[tenant]-enterprise/current/logs/puma.*


To force a restart in case the process does not respond do:

# Grab process IDs
sudo ps -ef | grep puma
 
# Kill each process manually
sudo kill -9 <process-id>
 
# Finally, manually start Puma
sudo service puma start
 
# Monitor the application server logs
sudo tail -f /app/[tenant]-enterprise/current/logs/puma.*

1.2 - Restart Web Server

Login to the server via SSH and run the following command:

# Tell Nginx to restart itself
sudo service nginx restart

1.3 - Manually (re)deploy

Login to the server via SSH and run the following command. This will rerun the EC2 User Data (server initialisation scripts) which in turn will run Ansible to ensure the server is in a deployed state.

# Run initialisation scripts (Ansible)
sudo bash <(curl -s http://169.254.169.254/latest/user-data)

2 - MnoHub

2.1 - Restart Application Server

Login to the server via SSH and run the following command:

# Tell Puma (Application server) to restart itself
sudo service puma restart
 
# Monitor the application server logs
sudo tail -f /app/mnohub/current/logs/puma.*


To force a restart in case the process does not respond do:

# Grab process IDs
sudo ps -ef | grep puma
 
# Kill each process manually
sudo kill -9 <process-id>
 
# Finally, manually start Puma
sudo service puma start
 
# Monitor the application server logs
sudo tail -f /app/mnohub/current/logs/puma.*

2.2 - Restart Web Server

Login to the server via SSH and run the following command:

# Tell Nginx to restart itself
sudo service nginx restart

2.3 - Manually (re)deploy

Login to the server via SSH and run the following command. This will rerun the EC2 User Data (server initialisation scripts) which in turn will run Ansible to ensure the server is in a deployed state.

# Run initialisation scripts (Ansible)
sudo bash <(curl -s http://169.254.169.254/latest/user-data)

3 - Impac!™

3.1 - Restart Application Server

Login to the server via SSH and run the following command:

# Tell Puma (Application server) to restart itself
sudo service puma restart
 
# Monitor the application server logs
sudo tail -f /app/impac/current/logs/puma.*


To force a restart in case the process does not respond do:

# Grab process IDs
sudo ps -ef | grep puma
 
# Kill each process manually
sudo kill -9 <process-id>
 
# Finally, manually start Puma
sudo service puma start
 
# Monitor the application server logs
sudo tail -f /app/impac/current/logs/puma.*

3.2 - Restart Web Server

Login to the server via SSH and run the following command:

# Tell Nginx to restart itself
sudo service nginx restart

3.3 - Manually (re)deploy

Login to the server via SSH and run the following command. This will rerun the EC2 User Data (server initialisation scripts) which in turn will run Ansible to ensure the server is in a deployed state.

# Run initialisation scripts (Ansible)
sudo bash <(curl -s http://169.254.169.254/latest/user-data)

4 - Connec!™

4.1 - Restart Application Server

Login to the server via SSH and run the following command:

# Tell Puma (Application server) to restart itself
sudo service puma restart
 
# Monitor the application server logs
sudo tail -f /app/connec/current/logs/puma.*


To force a restart in case the process does not respond do:

# Grab process IDs
sudo ps -ef | grep puma
 
# Kill each process manually
sudo kill -9 <process-id>
 
# Finally, manually start Puma
sudo service puma start
 
# Monitor the application server logs
sudo tail -f /app/connec/current/logs/puma.*


4.2 - Restart Web Server

Login to the server via SSH and run the following command:

# Tell Nginx to restart itself
sudo service nginx restart


4.4 - Restart Workers

In case Connec! Jobs are not running correctly, login to the server via SSH and run the following command:

# Tell Sidekiq to restart itself
sudo service sidekiq restart

4.5 - Manually (re)deploy

Login to the server via SSH and run the following command. This will rerun the EC2 User Data (server initialisation scripts) which in turn will run Ansible to ensure the server is in a deployed state.

# Run initialisation scripts (Ansible)
sudo bash <(curl -s http://169.254.169.254/latest/user-data)

1.5 - Nex!™ Orchestrator

5.1 - Restart Application Server


Login to the server via SSH and run the following command:

# Tell Puma (Application server) to restart itself
sudo service puma restart
 
# Monitor the application server logs
sudo tail -f /app/nex/current/logs/puma.*


To force a restart in case the process does not respond do:

# Grab process IDs
sudo ps -ef | grep puma
 
# Kill each process manually
sudo kill -9 <process-id>
 
# Finally, manually start Puma
sudo service puma start
 
# Monitor the application server logs
sudo tail -f /app/nex/current/logs/puma.*

5.2 - Restart Web Server

Login to the server via SSH and run the following command:

# Tell Nginx to restart itself
sudo service nginx restart

5.3 - Manually (re)deploy

Login to the server via SSH and run the following command. This will rerun the EC2 User Data (server initialisation scripts) which in turn will run Ansible to ensure the server is in a deployed state.

# Run initialisation scripts (Ansible)
sudo bash <(curl -s http://169.254.169.254/latest/user-data)