Setup Guide for Hire2Retire OnPrem Docker Based Agent
How to install on Linux?¶
Pre-Requisites/ Recommended Specs¶
Supported Platform | CPU | RAM | Disk Space |
---|---|---|---|
Ubuntu Debian Red Hat Enterprise Linux (RHEL) Fedora |
2 Core CPU | 4 GB | 32 GB |
Using APT/YUM/etc. to install and verify OpenSSL and Docker¶
Before you start installing the software, ensure you have Docker and OpenSSL on your server.
To check whether docker is installed, open command line interface of your server and try running:
$ docker info
If docker is installed, you should get an error free response. If not, you can follow below mentioned steps to install it.
Docker Installation Guide for Linux¶
Docker helps run the agent on your server in an isolated environment, to avoid conflicts.
- Step 1: Update the package index
sudo apt-get update
- Step 2: Install required packages
$ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
For Red Hat-based distributions (e.g., CentOS, Fedora):
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
- Step 3: Add the Docker GPG key to the system
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Step 4: Add the Docker repository to the system
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
For Red Hat-based distributions (e.g., CentOS, Fedora):
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- Step 5: Update the list of packages and then install Docker
$ sudo apt-get update
$ sudo apt-get install docker-ce
For Red Hat-based distributions (e.g., CentOS, Fedora):
sudo yum install docker-ce
- Step 6: Start the Docker service
$ sudo systemctl start docker
- Step 7: Verify Docker Installation
$ sudo docker run hello-world
- Step 8: To be able to carry out Docker commands without using sudo, add your user to the docker group
$ sudo usermod -aG docker $USER
OpenSSL Setup Guide for Linux¶
OpenSSL ensures your data stays safe by encrypting and decrypting files, keeping your information private.
To verify that OpenSSL is installed on your system, open a terminal or command prompt and run:
$ openssl version
If OpenSSL is installed, you should see output showing the installed version. If not, you can follow below mentioned steps to install it.
Download OpenSSL¶
You can download the latest version of OpenSSL from the official website: OpenSSL Downloads. Ensure you download the appropriate version for your operating system.
Installation¶
- Step 1: Update the package list
$ sudo apt-get update
- Step 2: Install OpenSSL
$ sudo apt-get install openssl
For Red Hat-based distributions (e.g., CentOS, Fedora):
$ sudo yum install openssl
Starting the Hire2Retire On-Prem Docker Agent¶
- Start Docker on your server. This is necessary for the installation process.
-
After filling up the connection information for your OnPremise Active Directory, download the On-Premise installation package from the connection page as shown below, which contains the setup files needed to install and run the agent.
-
Unzip the installation package after it's downloaded. Inside, you'll find three files:
- config.enc
- run.sh
- secrets.enc
Before running any commands, make sure you're in the folder where you extracted the installation files.
-
Open command line interface with admin privileges on your server. For Windows Operation System it will be present as command-prompt and for MacOS and linux OS it will be present as terminal.
-
Run sudo bash ./run.sh [ path to private key ] [ -p passphrase ] [ --username username]
Make sure to provide all the options to the command in the order they are mentioned.
Example:
$ sudo bash ./run.sh /Users/JohnSnow/.ssh/id_rsa --username admin@example.com
'username' here refers to your AD Service Account/ Bind Account
To list all the available options that the run.sh script supports, run the following command:
$ sudo bash ./run.sh --help
For '-p': If you have configured passphrase while generating rsa key pair, it will be REQUIRED here.
If the bash command is running successfully, the result of this will look like the following:
To check if the agent is up and running on your server, run:
$ docker ps
If the agent is running, the result to above command must look like following:
To verify the connection, follow the instructions.
How to install on Windows?¶
Pre-Requisites/ Recommended Specs¶
Windows Version | CPU | RAM | Disk Space |
---|---|---|---|
Server 2019/2022 | 2 Core CPU | > 4 GB | 32 GB |
Windows 10/11 | 2 Core CPU | > 4 GB | 64 GB |
Using Chocolatey to install and verify OpenSSL and Docker¶
OpenSSL Setup Guide for Windows¶
OpenSSL is used to decrypt the encrypted configuration file. Follow the below steps to setup OpenSSL:
- Step 1: Open PowerShell and execute the following commands. This installs Chocolatey package manager which helps to install OpenSSL.
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol =
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((NewObject
System.Net.WebClient).DownloadString('https://community.chocolatey.org/insta
ll.ps1'))
- Step 2: Restart the system after executing the above commands.
- Step 3: In PowerShell, run the command to verify if the Chocolatey is installed and it will display its version. If it is, proceed to the next step.
choco –-version
- Step 4: Open PowerShell and run it as Administrator, execute the following command to install OpenSSL:
choco install openssl
- Step 5: Restart the PowerShell terminal and verify the installation of OpenSSL by executing the command, it will display a version of OpenSSL:
openssl --version
If Docker Desktop is already installed in your system, you need to uninstall it by following these instructions Uninstall Docker Desktop.
Enable Required Windows Features¶
Enable the following required Windows features for Docker virtualization. After executing each command, it will ask to restart the machine. Run the following commands in PowerShell:
Enable-WindowsOptionalFeature -Online -FeatureName containers –All
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All
Install Docker CE(Community Edition)¶
Run the below commands to install Docker CE.
Invoke-WebRequest -UseBasicParsing
"https://raw.githubusercontent.com/microsoft/WindowsContainers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" -o
install-docker-ce.ps1
.\install-docker-ce.ps1
docker ps
After running the last command above, you will see the following in the terminal:
Starting the Hire2Retire On-Prem Docker Agent¶
- Step 1: Start a PowerShell terminal and run the following command to generate an RSA key pair:
ssh-keygen -t rsa -m PEM
- Step 2: Copy the contents of the
id_rsa.pub
file to the Hire2Retire On-Prem Docker Agent connection page. The default location of this file isC:\Users\myuser\.ssh\id_rsa.pub
. - Step 3: After filling up the connection information for your OnPremise Active Directory, download the package from the Hire2Retire connection page and extract it.
- Step 4: Change your PowerShell directory to the folder where the extracted package files are located.
- Step 5: To run the agent, use the following command:
.\run.bat <path_to_private_key> --username <user_name>
-
Step 6: After executing the above command, a terminal prompt will request you to give the password of the above-mentioned user.
a. Use the -p flag to provide the passphrase for your private RSA key.
b. If the script is unable to detect Windows version, an error message will appear with help instructions. In this case, you can manually specify the Windows version by using the -v flag. Please refer to the example provided below.
- For Windows Server 2019 or Windows 10, provide “-v 2019”. - For Windows Server 2022 or Windows 11, provide “-v 2022”.
c. Use the –n flag to run more than one instance of the agent.
d. User_name is the username of the delegated AD domain controller user. For example: .\run.bat C:\Users\myuser\ssh\id_rsa -p passphrase -v 2019 –n 2 --username robo.connect@telesenz.com
-
Step 7: Run the command below to check if the On-Prem Docker Agent container is up and running. It will show a container running with the name “onprem-agent-
- replica”. The term "replica" indicates the instance number (e.g., 1, 2, 3), and "connection-name" refers to the name you provided in Hire2Retire.
docker ps
- Step 8: To verify the connection follow the steps Verifying Connection is visible on Hire2Retire.
Uninstall Docker Desktop¶
If Docker Desktop is already installed in your system, you need to uninstall it by following below steps:
-
Step 1: Search for Docker from the home screen search bar and Click on Uninstall.
-
Step 2: A new window will open; locate the Docker Desktop app in the list of all applications.
-
Step 3: Click on the three dots next to the Docker Desktop app and select Uninstall.
Verifying Connection is visible on Hire2Retire¶
-
After set up of installed package , click on the "Verify Connection" button.
Figure 1. Verify Connection button
Once the On-Premise Docker Agent is up and running with connection verification, user can continue to configure the workflow by clicking on "Configure Workflow" button.