Getting Started¶
Key Concepts¶
Before diving into the configuration it is important to understand some key concepts which will be referred to below:
host
: A host is a computer or virtual machine (locally or in the cloud) in which will have its session controlled.protocol
: The protocol to be used for the connection and communication with thehost
. Check the list of supported protocols.
Supported Protocols¶
Currently two protocols are supported:
- RDP
- AWS EC2 + RDP
RDP - Remote Desktop¶
To set up a host with Remote Desktop support you will need the following information:
- Hostname or IP Address to communicate with the host
- Username for the session to be launched
- Password for the user session to be launched
AWS EC2 + RDP¶
This protocol allow you to not only establish the RDP connection with the host but also manipulate the AWS EC2 instance state by starting and stopping it based on the demand from the BotCity Orchestrator Task queue.
To set up a host with AWS EC2 support you will need the following information:
- Instance ID
- AWS Region (Optional) the AWS region where this instance is located
- AWS Access Key ID (Optional) the AWS API Access Key
- AWS Secret Access Key ID (Optional) the AWS Secret Access Key
- Hostname or IP Address to communicate with the host
- Username for the session to be launched
- Password for the user session to be launched
Tip
The usage of AWS Credentials file is also supported. Make sure to reply Yes during the host add
command when asked.
If you use the credentials file, the Region, Access Key and Secret Access Key will not be asked.
Requirements¶
In order to properly be able to run Session Manager it is mandatory that:
- Your Session Manager server is able to communicate with the BotCity Orchestrator via HTTPS (Port 443)
- Your Session Manager server is able to reach the hosts via network in order to manage the sessions
- The user in usage to execute the Session Manager is allowed to establish RDP or other required connection to the hosts
Installation¶
Session Manager is part of the BotCity Studio SDK.
In order to obtain the Session Manager please proceed with the installation described in the getting started guide.
Installing as a Windows Service
You can install the BotCity Session Manager as a Windows Service following the instructions below:
Tip
You will a Windows OS with Administrative privileges.
Step 1: Create the Service
- Open Command Prompt as Administrator:
-
Press
Win + X
and select Command Prompt (Admin) or Windows PowerShell (Admin). -
Run the following command to create a new service:
- Replace
C:\path\to\your\SessionManager.exe
with the full path to your.exe
file. - Note: Ensure there is no space between
binPath=
and the path.
Step 2: Set the Service to Start Automatically
-
Run the following command to set the service to start automatically on system boot:
-
To start the service immediately, use:
Step 3: Verify the Service
- Open Services (press
Win + R
, typeservices.msc
, and press Enter). - Locate
SessionManagerService
in the list of services to confirm it appears. - Check that the service’s Startup type is set to Automatic.
- Reboot the system to verify that the service starts automatically on boot.
Step 4: Testing and Troubleshooting
-
To check the status of your service, you can use:
-
If the service does not start, check the
log_sm.txt
in thelogs
folder of the BotCity Studio SDK. - Alternatively, check the Event Viewer for errors under Windows Logs > Application.
Uninstalling the Service
To remove the service, run:
This command deletes the service entirely.Configuration¶
Tip
You can customize the location of your Session Manager configuration database by setting the full path to the smdb
file in your
conf/conf.bcf
under the sessionManagerDBPath
.
All the configuration for the Session Manager is conducted via the Session Manager command-line interface (CLI).
In order to execute the Session Manager you will need to at least:
- Add a
host
- Attach a Runner to a registered
host
Adding a Host¶
Tip
Before proceeding make sure you have at hand:
- The IP or hostname for the connection with the host.
- The username and password which will be used to open the session.
- Any other pertinent information required by the protocol to be used for the session connection.
- Open your command terminal of choice and navigate to the BotCity Studio SDK folder where SessionManager is located.
- Execute the command to add a new host
SessionManager host add
. - Follow the instructions on the prompt.
Attaching a Runner to a Host¶
Tip
Before proceeding make sure you have at hand:
- The full path in the
host
where the BotCity SDK for the desired Runner is installed.
- Open your command terminal of choice and navigate to the BotCity Studio SDK folder where SessionManager is located.
- Execute the command to add a new host
SessionManager runner attach
. - Follow the instructions on the prompt.
Releasing a Runner from a Host¶
- Open your command terminal of choice and navigate to the BotCity Studio SDK folder where SessionManager is located.
- Execute the command to add a new host
SessionManager runner release
. - Follow the instructions on the prompt.
Listing all Hosts and Associated Runners¶
- Open your command terminal of choice and navigate to the BotCity Studio SDK folder where SessionManager is located.
- Execute the command to add a new host
SessionManager list all
.
Removing a Host¶
- Open your command terminal of choice and navigate to the BotCity Studio SDK folder where SessionManager is located.
- Execute the command to add a new host
SessionManager host remove
. - Follow the instructions on the prompt.
Running¶
You can run the Session Manager by double clicking on the SessionManager application or by executing the following command for local execution:
Technical Details¶
How It Works¶
Session Manager monitors the task queue in real-time, activating resources as the queue grows and deactivating them when demand decreases. It is optimized to provide timely resource allocation, reducing idle time and ensuring resource availability when necessary.
Process Flow:
- Monitor Queue: Session Manager continuously monitors the task queue.
- Resource Activation: When task demand exists, resources are activated to handle the load.
- Resource Deactivation: As demand ceases to exist, resources are released to optimize efficiency and reduce costs.
Troubleshooting¶
- Service Fails to Start: Check the
sm_out.log
in thelogs
folder of the BotCity Studio SDK. Alternatively, check the Event Viewer for errors under Windows Logs > Application. - Configuration Issues: Ensure all configuration settings are correctly defined and match the system specifications.
For further assistance, contact our support team.