Shutdown Procedure

Shutdown Services

You can use either Portainer or the command line to scale down services as described below.

Portainer

  1. Access Portainer.
  2. Click on the “primary” endpoint.
  3. Go to the Services page.
  4. Increase “Items per page” in the lower right-hand corner to “100” to ensure you see all services.
  5. If this is done on a production system with a non-default number of instances of any services then the number of replicas for each service should be recorded before proceeding to the next step.
  6. For each service with “replicated” Scaling Mode except for Portainer itself (infrastructure_portainer), click “Scale”, change the number to “zero”, and click the checkmark.

Command Line

Log into the primary docker node and run the following commands:

docker service ls --filter mode=replicated --format "{{.Name}}={{.Replicas}}" \
    | grep -v portainer | cut -d '/' -f 1 > amag_services
cat amag_services | cut -d '=' -f 1 | xargs -I{} docker service scale {}=0

Shutdown RabbitMQ

  1. Log into the RabbitMQ administration portal by accessing the RabbitMQ server IP port 15672 in a browser window.
  2. Click to the “Queues” tab.
  3. Ensure all non-error queues are empty before continuing.
  4. Log in to the Linux host for each non-primary RabbitMQ node. Run the following command and wait for it to return you to the prompt: sudo rabbitmqctl shutdown
  5. Log in to the Linux host for the primary RabbitMQ node. Run the following command and wait for it to return you to the prompt: sudo rabbitmqctl shutdown

Shutdown Redis

  1. For 3-server systems, log into each Redis node and run: sudo systemctl stop sentinel_26379
  2. Log into each Redis node and run: sudo systemctl stop redis_6379

Shutdown SQL Server

Since SQL Server is not configured or managed via the Connect & Guest install process, it is outside the scope of this document. However, it should be shut down after shutting down Redis and before shutting down Elasticsearch.

Shutdown Elasticsearch

Log into each Elasticsearch node and run: sudo systemctl stop node1_elasticsearch

Shutdown NFS

Log into the NFS server. If you are running Ubuntu, use this command: sudo systemctl stop nfs-server

If you are using RHEL, use this command: sudo systemctl stop nfs

At this point, all services have been gracefully shut down and servers may be powered off.