1.2. Installing Ngenea Worker¶
This section provides a step-by-step process for installing and configuring the Ngenea Worker. Following these instructions will enable you to install the worker on a system and have it interact with the Ngenea Hub.
1.2.1. Pre-requisites¶
Ngenea Server Software
Ensure that the Ngenea Server software is installed and configured before proceeding with the worker installation.
File Systems Configuration with Auto-Inode-Limit
The file systems on the nodes where you will install the ngenea-worker package must be configured with the auto-inode-limit.
This setting is essential for the proper functioning of the worker.
To configure auto-inode-limit on the file system, use the following command:
mmchfs <file_system_name> --auto-inode-limit
Replace <file_system_name>
with the name of the file system.
1.2.2. Installing the Ngenea Worker Package¶
To install the ngenea-worker package, use the YUM package manager. This process assumes that your system is configured to use YUM repositories.
Run the following command to install the package:
yum install ngenea-worker
The yum
command will download and install the ngenea-worker package along with its necessary dependencies. Wait for the installation to complete.
1.2.3. Worker Configuration¶
After the package installation, the next step involves configuring the worker so that it can communicate with the Ngenea Server.
1.2.3.1. Create or Edit the Worker Configuration File¶
The Ngenea Worker configuration is stored in a file located at: /etc/ngenea/ngenea-worker.conf
.
If this file does not already exist, please create it. The configuration file utilizes the .ini format. You will need to include the following content within it:
[settings]
site = site1
api_host = localhost
api_port = 8000
api_secure = true
redis_port = 6379
gpfs_nodes = ["localhost"]
Here’s how to adjust the example configuration based on your setup:
site: Replace site1 with the name of your specific site.
api_host: Enter the hostname or IP address of your API server. If the API is hosted on the same machine as the worker, leave this as localhost.
api_port: Enter the port on which your API server is running. The default value is 8000.
redis_port: This is the port Redis is running on. The default value is 6379, and you should only change it if Redis is using a different port.
gpfs_nodes: If you are using a General Parallel File System (GPFS), list your nodes here. If GPFS is installed on the same machine, [“localhost”] is sufficient. You can specify multiple nodes if needed, using a comma-separated list within the brackets.
1.2.3.2. Handling SSL Configuration¶
SSL (Secure Sockets Layer) ensures encrypted communication between the Ngenea Worker and the API. Here’s how to handle the SSL settings:
If you have a valid SSL certificate, set
api_secure=true
.When
api_secure=true
, the system requires a valid SSL certificate, and self-signed certificates are not allowed.Ensure that a valid SSL certificate is installed on the server if using SSL (
api_secure=true
). For assistance with obtaining or installing an SSL certificate, refer to the documentation on External SSL provisioning.If you do not have a valid SSL certificate and want to disable SSL, set
api_secure=false
. This will allow the system to communicate without using SSL.If you do not specify the ``api_secure`` option in the configuration file, the system will automatically default to
api_secure=true
. If you do not have SSL, you must explicitly setapi_secure=false
to avoid issues with the connection.
1.2.3.3. Worker Configuration Settings - Introduction¶
The Ngenea Worker configuration involves setting up and managing workers that process tasks for the Ngenea Hub.
It includes options for API connectivity, task concurrency, Redis integration, and advanced logging settings. The system allows customization through custom configurations, multiple site setups, and debug-level adjustments to ensure efficient task handling and monitoring.
Note
Click the link to learn more about Ngenea Worker settings and configurations!
Note
Please refer to the link to understand more about Hub Configuration: Hub Configuration Documentation.
1.2.4. Joining the Worker to the Hub¶
To establish secure communications and register the worker with the hub, you will need to run the join command with a valid hub admin username and password.
Use the following command:
ngenea-worker join --user <USERNAME>
Example: Let’s assume the username for the hub admin is hubadmin. To run the join command:
ngenea-worker join --user hubadmin
The system will then prompt you to enter the password for the hubadmin user.
After providing the password, the worker will authenticate with the hub, and you should see output similar to this:
hubadmin's password:
Attempting to auth the hub using the provided credentials...
Authenticated as user onprem-worker.
Storing the client certificates for the worker...
Client certificate stored at /etc/pki/tls/certs/onprem.crt
Client private key stored at /etc/pki/tls/private/onprem.key
Storing the root CA for NgeneaHub...
Root CA stored at /etc/pki/tls/certs/ng-hub-ca.crt
1.2.5. Enabling and Starting the Ngenea Worker Service¶
The steps for authentication and certificate storage are automatically performed as part of the `ngenea-worker join` command.
Once the worker is authenticated and certificates are stored, the next step is to ensure that the Ngenea Worker service is enabled and running. You will use the systemd system and service manager for this.
Enable and start the Ngenea Worker service using this command:
systemctl enable --now ngenea-worker
Verification: You can verify the service status by running:
systemctl status ngenea-worker
If everything is configured correctly, you should see an active and running status.