Updating Erlang and RabbitMQ to latest version in Atria

Updating Erlang and RabbitMQ to latest version in Atria

Overview

This article explains and shows the requirements and steps for Erlang and RabbitMQ Upgrade.

Details of Erlang and RabbitMQ Upgrade

  1. Upgrading RabbitMQ can be done via in-place upgrade but will step through each version- as per RabbitMQ documentation, skipping minor versions are not fully tested.
    1. In-place upgrade version consideration step-through needs to be considered for both Erlang and RabbitMQ.
    2. All or some feature flags are required before doing an upgrade.
  2. Fresh installation directly to the latest version but make sure that the configuration files have a backup for configuration.
    1. Doing a fresh installation will delete all RabbitMQ data.
    2. Queues are auto-generated upon start up of Atria Services.
More Details on Erlang and RabbitMQ version compatibility requirements are here:
Doing a fresh installation is the recommendation from Atria, but make sure all configuration files, RabbitMQ account username, password are saved/backup. It will be used for configuration after the installation.
This action will be done on a maintenance window.
Proceed only once backup and server snapshot (Provisioning Server) are done.
As of writing this article, Erlang (latest 27.x) and RabbitMQ (latest 4.0.9) are the tested version with Atria.

Steps (Primary Provisioning Server)

1. Backup the RabbitMQ configuration files from the data directory.
      - On the provisioning server, to verify the directory path you may use the command: .\rabbitmqctl.bat status
      
      - The config file path will be show. Backup all the files from this folder.
      Sample:
      
2. Make sure to have a copy of the RabbitMQ account username and password, this will be used after the clean installation of the newer version.
      - If there is no record at the moment, the RabbitMQ account username and password is stored in AtriaConfigService.
      - Use the command: Get-AtriaSecret -SecretKey 'Messaging' -UseEnvironment
Repeat this step for each remote/dedicated environment. Each username and password will be used later.
      
3. Snapshot Provisioning Server
4. Stop the RabbitMQ Service, this will also stop the Atria services.

5. Uninstall both Erlang and RabbitMQ applications in Programs and Features (appwiz.cpl).

6. Delete the RabbitMQ Data Directory (db and logs folder) based on the folder location in step 1.
7. Restart the server after uninstallation.
8. Download the Erlang (latest 27.x version) and RabbitMQ (latest 4.0.x version).
As of this article's writing this is the latest compatible version tested with Atria
9. Run Installation of Erlang.
10. Run Installation of RabbitMQ, but exclude on the option to create the RabbitMQ service.
11. Create a directory to where RabbitMQ_BASE path will be pointed going forward (i.e. C:\AtriaRabbitMQ)
If this is already done previously, you may skip to the re-install, start service step of RabbitMQ

      
12.  From the backup (step 1), copy the advanced.config, RabbitMQ.conf, and plugin files going to the new directory location .
      
      
13. Open PowerShell (admin) then run the commands:
      $rabbitdir = 'C:\AtriaRabbitMQ'
      [Environment]::SetEnvironmentVariable("RABBITMQ_BASE", $rabbitdir, "Machine")
14. Restart the PowerShell session, then list to check the RABBITMQ_BASE path Environment Variable. If the environment variable is missing, a restart of machine might be needed.
      [Environment]::GetEnvironmentVariables()
      
15. Navigate to the RabbitMQ sbin folder.
This depends also on the RabbitMQ version.
      cd 'C:\Program Files\RabbitMQ Server\rabbitmq_server-3.12.12\sbin\'
      
      Set the RABBITMQ_BASE Path
      SET RABBITMQ_BASE=C:\AtriaRabbitMQ
16. On the Windows Menu, navigate to RabbitMQ Server and select RE(INSTALL) and then START. 
      
17. Check the status of RabbitMQ, this should now show that the paths have been changed to the new one.
      .\rabbitmqctl.bat status
      
18. Add back the RabbitMQ accounts and passwords that came from the Primary and Remote Environments.
      Primary Environment Account (the only account tagged as administrator):
      .\rabbitmqctl add_user '<username>' '<password>'
      .\rabbitmqctl set_permissions -p / '<username>' ".*" ".*" ".*"
      .\rabbitmqctl set_user_tags '<username>' administrator
      .\rabbitmqctl delete_user guest
      
      Remote Environment Account (if any Remote Shared or Dedicated Customer)
      .\rabbitmqctl add_user '<username>' '<password>'
      .\rabbitmqctl set_permissions -p / '<username>' ".*" ".*" ".*"
      
19. Once RabbitMQ accounts are added, try to login into the RabbitMQ Web Management using the RabbitMQ administrator account. (i.e. http://atriamessaging:15672) 
      This depends on the FQDN, if SSL is enabled it will be on port 15671. Navigate to the Admin to see the list of Users. All added accounts should be here.
      
20. Start the Atria Services on the Primary Environment.
      AtriaConfigService
      AtriaAgent
      AtriaPlatformApi
      AtriaProvisioningService

21. Restart the Atria Services for each of the Remote Environments.
      AtriaConfigService
      AtriaAgent
      AtriaProvisioningService

22. When all services are started/restarted, the queues in RabbitMQ will be generated
      

23. Once services are all started and queues are ready, you can run a Provisioning request to validate.
AlertIf any of the services fails to start or if there are any issues, please stop the process and contact support@automate101.com immediately.


    • Related Articles

    • Atria Platform v15+ Update Guide for Legacy Versions

      Overview This article outlines the upgrade process for the Atria Platform. Applies To Atria 12.6+ Atria 12.11+ Atria 12.13+ Atria 12.14+ (Early Adopters) If environment is still on CPSM, kindly coordinate this with Atria Support System Requirements ...
    • RabbitMQ on Atria v15

      RabbitMQ Overview RabbitMQ is an Open Source Message Broker, it is a lightweight and easy to deploy platform that enables Atria service components to securely communicate asynchronously with each other. RabbitMQ is a core part of Atria’s ...
    • Atria Billing Setup User Guide

      Objective This article describes how to configure Atria to utilize the latest billing features. This document outlines the billing setup attributes that should be configured.    Applies to Introduced in Atria version 12.0.0 Billing Setup Overview To ...
    • Updating Atria Service Account Password – v12.13

      Overview This article is a guide for Updating Atria Service Account Password both in Primary and Remote Environment. This only applies to version v12.13 Service Account Details (Core) Both Primary and Remote Environments have 4 core service accounts ...
    • Updating Remote Environments via Atria Update

      Overview Coming into Atria v15.2, there is now a feature to update the Remote Environments Components for Atria without any login interaction needed into the Atria remote servers. This means, instead of needing to log into each different Atria ...