1. Edit siemplify_pg_detect.sh and update
    1. V_SERVER_NODE_1=”[primary_db_ip]”
    2. V_SERVER_NODE_2=”[slave_db_ip]”
    3. PRIMARY_NODE_1=$(PGPASSWORD=[db_password]
    4. PRIMARY_NODE_2=$(PGPASSWORD=[db_password]
    5. SMTP_SERVER=” “
    6. PORT=” “
    7. SENDER_EMAIL=” “
    8. PASSWORD=” “
    9. RECEIVER_EMAIL=” “
    10. SUBJECT=” “
    11. CONTENT=” “
    12. At line 55 Edit the path to the file Sendmail.py location.
  2. Configure Mailx on the application nodes for sending emails in case of a failover, if Mailx is not configured, the mail notification resource configuration can be omitted.
    1. sudo yum install mailx
    2. Edit mail.rc file → etc/ mail.rc
      Delete all the content on the file and add the following fields:
 account gmail {
    set smtp-use-starttls
    set ssl-verify=ignore
    set smtp-auth=login
    set smtp=smtp://smtp.gmail.com:587
    set from="example@siemplify.co"
    set smtp-auth-user=<examle@siemplify.co>
    set smtp-auth-password=<mail app password>
    set ssl-verify=ignore
    set nss-config-dir=/etc/pki/nssdb/
}

  1. Create pcs resource
    pcs resource create importantgroup-mailto MailTo email=exmaple@siemplify.co subject=“A fail over of siemplify app has occurred”
  2. The following command creates a colocation constraint:
    pcs constraint colocation add importantgroup-mailto with PlaybookActions_service score=INFINITY
  3. Validate the resource is added to the cluster and following the master application “pcs status”
  1. Upload HA APP rpms.zip and siemplify_pg_detect.sh to both app machines
  2. Unzip HA APP rpms.zip and install with “sudo yum install” the rpms on both app machines.
  3. Configure the crontab job on both app machines with the following commands:
    1. chmod +x /home/siemplify_pg_detect.sh
    2. chmod +x /home/Sendmail.py
    3. crontab -l > //tmpjobs
    4. echo reboot /home/siemplify_pg_detect.sh >> /root/tmpjobs@ (make sure the path here is the same as the path in a above)
    5. crontab /root/tmpjobs
    6. rm -f /root/tmpjobs
    7. reboot - both nodes
    8. Use ps -aux | grep siemplify to make sure the process finished successfully.

Need more help with this?
Click here to open a Support ticket

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.