﻿﻿--------------------------
Follett ConnectOnce Agent
--------------------------

Agent is a simple program, which will be running at university premises/network. It will accept requests coming from Follett ConnectOnce Central Connectors, read data against SIS database and return the response back to the connectors.

----------------
Getting Started
----------------

	Prerequisites
	-------------

		Firewall White-listing:
		----------------------
			1. Open Inbound traffic for our proxy IP: 54.234.177.76  Port: 8080-8099 , Protocol: https
			2. Open Outbound traffic for agent to reach our proxy IP: 54.234.177.76  Port: 443
			3. Open Outbound UDP traffic for DNS: logs4.papertrailapp.com  port : 43472

		Network/Infrastructure:
		------------------------
			1. Agent host must have a static public IP address. This IP should resolve to server on which agent is installed.
			2. Agent host must have a communication path to the SIS Database.

		Database:
		----------
			The database views that were provided by the Follett Implementation team should be available at this point.(Optional)

		Database Details:
		-----------------
		The following SIS Database details will be required to complete installation:
			1. Host URL/IP
			2. Port
			3. Driver
			4. Database Name/SID/Service Name
			5. User name – Specific to this use case, not your personal or shared account
			6. Password
			7. JDBC formatted connection string

		Installation Requirements:
		--------------------------
			To install the agent software we need the following software pre-installed on your machine.

			1. Compatible Hosts: Windows or Linux.
			2. Oracle Java Runtime Environment 8 or above OR OpenJDK 11 or above OR jdk1.8.0_211 or above.
			3. User responsible for agent installation must have sudo/admin access on that machine.


	Installing ConnectOnce Agent
	-----------------------------

	Please follow the below steps to install the agent software:

		1. Download the Agent Install Package:
			Windows: https://follettdiscover-cov2.s3.us-east-1.amazonaws.com/prod/windows/ConnectonceAgentInstaller.zip
			Linux: https://follettdiscover-cov2.s3.us-east-1.amazonaws.com/prod/linux/ConnectonceAgentInstaller.zip

		2. Extract the .zip file.
		3. Login as super user (Linux) or administrator (Windows).
		4. Based on the OS do the following:
			4.1 On Windows operation systems:
				Go to the path where you have extracted the installer package and execute installer.bat file.

			4.2 On Linux/Unix systems:
				Go to the path where you have unzipped the installer package and execute any command: "sh installer.sh" or "./installer.sh" or "sudo ./installer.sh"
		5. lsof package must be installed
            Installation command for example:
           		 yum install lsof
           		 sudo apt-get install -y lsof

		6. Installation script will now check the prerequisites of agent. It will then prompt you with the installation mode.
			For GUI based installation press g or G
			For Command-line based installation press c or C

		7. Follow the on-screen prompts.
		8. If correct information is provided the agent will be able to connect to the SIS database.
		9. If any error is shown kindly check the database details and try again.
		10. If the issue still persists contact Follett ConnectOnce support team with error details.
		11. lsof package must be installed
		    Installation command for example:
		      yum install lsof
		      sudo apt-get install -y lsof

	Installing ConnectOnce Agent in Container
    ---------------------------------------------
   A. Overview:

    This approach is designed to install agent as unprivileged user. To install the agent on container, user needs to execute "agent_script .sh" file.
    Podman and netcat software should be present in the system to execute the same.
    This script file will do the below steps.
     1. Download the container image. This image will contain the information of base OS and required softwares the container will use.
     2. Podman will create the container using the downloaded image.
     3. After the successful creation of the container, this script will install agent in the same.
     4. Create a linux service so that the container is up and running after system restart.As it does in current  functionality also.
    Please follow the bellow steps to create the contianer and install the agent in the same.

   B. Steps to install:

        1. This approach is designed to install agent as unprivileged user.Create unprivilaged user account.
        2. Login directly to the user account/switch user to the created account OR login using the.pem file of the created user account (avoid login using "sudo su <username>/ su <username>" command)
        3. Create ~/.config/systemd/user this directory and give read,write,execute permission to the user.
           command:
                   mkdir -p ~/.config/systemd/user
        4. Container should be installed in the systemd enabled latest Linux distributions. for example
               a. Ubuntu version 20.04.3 LTS and above
               b. CentOs8 and above
               c. Debian 11 and above
               etc.....
        5. Install podman version 3.4.2 or above with the privilaged user account
           https://podman.io/getting-started/installation
        6. netcat package should be installed with the privilaged user account
           Installation command for example:
                   apt-get install netcat (for debian based OS)
                   yum install -y nc (for RedHat based OS)
        7. Download the script file to install the container:
               https://follettdiscover-cov2.s3.us-east-1.amazonaws.com/prod/Agent_Script_prod.zip
        8. Unzip the zip file and go to the package and give execute permission with the command
               chmod +x agent_script.sh
        9. Execute the command: "./agent_script.sh"
        10. Follow the on-screen prompts.
        11. If correct information is provided the agent will be able to connect to the SIS database.
        12. If any error is shown kindly check the database details and try again.
        13. If the issue still persists contact Follett ConnectOnce support team with error details.

-----------
Version
-----------
Follett Connectonce Agent Version: 1.2.3

--------
License
--------
This project is licensed under the Follett License - see the LICENSE.md file for details.