Fresh Install of AgilitySync with Amazon DB on RHEL 8
Prerequisites
System Requirements
Before proceeding, please read the System Requirements
- Create a cluster in Amazon DB using Amazon Web Services(AWS) documentation
- Assign the current App Box to the Cluster.
- Download the Amazon DocumentDB Certificate Authority (CA) certificate required to authenticate to your App box.
- Check the cluster connection using the mongo shell command given in document DB cluster in AWS.
Create an agilitysync user account
On the Linux machine, create a services account for the Agility Sync application account named "agilitysync". This user account is used to install and own the Agility Sync application.
sudo useradd -m agilitysync
Then set a password for the account:
sudo passwd agilitysync
Verify that shell (/bin/bash or /bin/sh
) is set, if not add it:
grep agilitysync /etc/passwd
Add "agilitysync" user to sudoers file
echo \"agilitysync ALL=(ALL) NOPASSWD: ALL\" \| sudo tee -a /etc/sudoers
Verify sudo Capability
The "agilitysync" user account used to run the install must have sudo capabilities. Add this user to the "sudoers" group by following steps specific to your OS. This can be tested by running the following command as the user account. Switch user account to "agilitysync" with the command su - agilitysyncand then test sudocapability with this command:
- Switch user account to "agilitysync"
su - agilitysync
- Test sudo capability
sudo echo "helloworld"
An error such as "user not in sudoers file" must be corrected before proceeding.
Curl
"curl" must be installed on the server to download the install script to run and to complete these directions. "wget" is a popular alternative and can be substituted in these instructions where applicable.
Python 3.6/3.8
requires Python 3.6 for RHEL 7.x/CentOS7.x and 3.8 for Ubuntu 20 to run, which is installed by default. You can run the following commands to install Python 3.x:
- Update package list
apt-get update
- Install Python 3.x
For Ubuntu, use minstall python3.8
For RHEL 7.x/CentOS7.x, use
yum install python36
Check Time and Timezone Settings
This would be a good time to make sure that your Linux server has NTP (network time protocol) configured properly, the date and time are correct and the timezone is configured properly for the locale of the server. The date and time matter on reports so choose the timezone that most accurately reflects yours organizations primary business operations.
For more information on setting server time zone, see Setting the Time Zone topic in the documentation.
Installing Digital.ai Agility Sync
To install the Agility Sync platform, perform the following steps on the Linux server. This begins with installing the database servers, then creating running the Agility Sync installer and configuring the databases.
Refresh System Variables
Ubuntu:source .profile
RHEL/Centos:source .bash_profile
Download the Latest Agility Sync Installer
Copy the latest installer
agilitysync-installer.sh
that was provided by the Agility Sync team to a temporary directory (Example: /tmp) and run the following command. This file contains both the latest application and the script to perform the install.
In the following command, substitute theurl
in the command below with
the url that was provided by the Agility Sync support team.
curl -o agilitysync-installer.sh "url"
mv agilitysync-installer.sh /tmp/agilitysync-installer.sh
If the target server is not connected to the internet, download the installation file to an intermediate server then sftp to /tmp.
Make it Executable
Make the script executable and change the script owner to
agilitysync
user
chmod +x /tmp/agilitysync-installer.sh
chown -R agilitysync.agilitysync /tmp/agilitysync-installer.sh
Run the Install Script
The following options will NOT start the Agility Sync services(-p) after the installer completes.
NOTE: Run as the "agilitysync" user. The user that runs this script will be the owner of the Agility Sync application, files, and directories. This user should not be the root user. A common practice is to create a service account on the Linux machine called "agilitysync".
**NOTE:**Do not run the installer using "sudo" or using the root user, the script itself will sudo when it needs to.
/tmp/agilitysync-installer.sh -msp
Create a user in DocumentDB using an encrypted password.
a. Download the backup script to App Server:
cd /tmp
wget \<script.py\>
a. Make it Executable:
chmod +x \<script.py\>
a. Encrypt a password:
./script.py -o encrypt \--encryption_key \"key from agilitysync.yaml
file\" \--password_to_encrypt \"password\"
Make a note of the plain password and the encrypted password.
- Script to add a new user in App box (which will be used for cluster setup):
cd /opt/agilitysync/current/common/install/
./adduser_mongodb.py --adminuser <DocumentDBCluster username> --adminpassword <DocumentDBCluster pwd> --newuser syncuser --newpassword <new encrypted pwd> --replicasetname rs0 --replicasethosts <replicahostname> --sslcacertfile /etc/global-bundle.pem --ssl true
- Modify the
agilitysync.yaml
vim /etc/agilitysync/agilitysync.yaml
Add Amazon Cluster details like below:
mongodb_replicaset_hosts: \<replicate hostname\>
mongodb_database: agilitysync
mongodb_username: syncuser
mongodb_password: \<Encrypted pwd of the user\>
mongodb_ssl: true
mongodb_ssl_ca_certs: /etc/global-bundle.pem
mongodb_replicaset_name: rs0
mongo_retry_writes: false
mongodb_read_preference: secondaryPreferred
And Save.
- Run the following command for Mongo DB initialization.
cd /opt/agilitysync/current/common/install
./init_mongodb.py
- Start services:
as-start-services