autobotAI Linux Agent
Overview
The autobotAI Linux Agent is part of a broad range of automation solutions from autobotAI, including No Code, Low Code, and Full Code options. While the Linux Agent itself supports comprehensive automation, it is particularly useful for interacting with command-line utilities to perform specific actions.
Linux Action Nodes offer a No Code experience, abstracting away the need for manual coding. These nodes empower users to quickly execute tasks leveraging AI, such as running AWS CLI commands or Ansible playbooks—allowing them to focus on outcomes instead of code. For more information on available actions, see About Linux Actions.
Prerequisites
- Linux Integration: Ensure you have the necessary integrations set up.
- VM Instance: You will need a virtual machine instance running Ubuntu 22.04 or later. Currently, we only support Ubuntu systems.
- Minimum Requirements: A minimum instance type of
t2.micro
on AWS or an equivalent on other providers. - Privilege Mode: The agent service requires to run as root. Ensure you have the necessary permissions to install and operate the agent.
How to Install the Agent?
To install and set up the autobotAI Linux agent, please follow the steps outlined below.
-
Add a New Linux Integration
- First, log in to autobotAI.
- Use this link to go to the autobotAI Linux integration page: Linux Integration.
- Add a new Linux integration by providing the integration name and group, then click 'Create.'
-
Add an Agent
- On the next page, add an agent by providing a name in the designated field.
-
Generate Credentials
- Click "Next Step" to generate the credentials (API URL, Agent API Key, Agent ID) required for the agent. Copy these credentials to a secure location, as you will need them in the next step.
-
Get the Installation Command
- Click "Next Step." You will receive an agent installation link. Copy this link and paste it into the terminal on your target agent system. For more information, refer to the Prerequisites.
-
Enter Credentials in Terminal
- The installation script will prompt you to enter the API URL, Agent API Key, and Agent ID. Input the details you saved in Step 3.
-
Verify Installation
- After the installation completes, you can verify the agent service status by running the command:
sudo systemctl status autobotAI-agent.service
-
After completing these steps, the agent will be added to the Linux integration, and you will see a message indicating successful agent registration. You can then start using this integration in your automation workflows.
Non-Interactive Installation
If you prefer to install the agent non-interactively, you can execute the following command:
sudo /bin/bash -c "$(curl -fsSL https://autobotai-linux-agent.s3.amazonaws.com/scripts/install.sh)" -- --non-interactive --agent-api-url=<YOUR_AGENT_API_URL> --agent-api-key=<YOUR_AGENT_API_KEY> --agent-id=<YOUR_AGENT_ID>
Note: Make sure to replace <YOUR_AGENT_API_URL>
, <YOUR_AGENT_API_KEY>
, and <YOUR_AGENT_ID>
with the values obtained from the agent credentials you generated during the installation process.
Linux Agent Key Components
Agent Configuration File
The agent configuration file is located at /etc/autobotAI/config.yaml
. This file serves as the primary configuration hub for the autobotAI agent. It contains profiles and settings required for executing CLI commands for various cloud providers or tools.
Purpose
The purpose of the configuration file is to define environment variables specific to different profiles. Each profile corresponds to a cloud provider or tool, enabling the agent to operate within distinct environments seamlessly.
Usage
To use the configuration file, you can add new profiles under the profiles
section. Here’s an example configuration for an AWS profile:
profiles: aws: # "aws" is the cloud provider staging: # "staging" is the profile name AWS_ACCESS_KEY_ID: "your_staging_access_key" AWS_SECRET_ACCESS_KEY: "your_staging_secret_key" AWS_REGION: "your_staging_region" production: # "production" is another profile name AWS_ACCESS_KEY_ID: "your_production_access_key" AWS_SECRET_ACCESS_KEY: "your_production_secret_key" AWS_REGION: "your_production_region"
NOTE: Make sure to replace the placeholder values with actual credentials for your cloud environments. When adding other providers or tool variables, follow the same schema.
Using Configuration Profiles in Actions
When using Linux actions that require a configuration profile, specify the profile in the format cloud_provider/profile_name. For example, in the Execute Terraform Configuration action, you would specify the profile in the config_profile parameter as aws/staging. This allows the agent to retrieve the correct environment variables associated with the specified profile during the execution of the action
Linux Actions
Linux actions are predefined operations executed via the autobotAI Linux Agent, allowing users to perform various command-line interfaces and scripts on Linux systems within automation workflows. These actions enable seamless integration with cloud providers and automation tools, making resource management more efficient.
Linux Actions are powered by AI, allowing you to leverage AI capabilities to streamline tasks like generating AWS CLI commands or crafting Bash scripts and many more.
We currently support the following Linux actions:
- Execute AWS CLI Command
- Execute Azure CLI Command
- Execute Google Cloud CLI Command
- Execute Terraform Configuration
- Execute Ansible Playbook
- Execute Local Ansible Playbook
- Execute Kubectl Command
- Execute Kubernetes Manifest
- Execute Bash Script
Agent Credentials
The agent credentials are stored in the file located at /root/.autobotAI/credentials
. This file contains essential API information required for the agent to authenticate and communicate with the specified services.
Credentials Location
- Path:
/root/.autobotAI/credentials
- Content: The credentials file typically contains the following variables:
AGENT_API_URL
: The URL of the API the agent will connect to.AGENT_API_KEY
: The key used to authenticate the agent.AGENT_ID
: The unique identifier for the agent.
Agent Logging
The logs generated by the autobotAI agent are stored in the directory /var/log/autobotAI
. This directory contains all log files related to the agent's operations, including error messages, informational logs, and other runtime information.
Log Location
- Path:
/var/log/autobotAI
- Contents: The logs provide insights into the agent's activities and can be useful for troubleshooting and monitoring its performance.
Accessing Logs
You can view the logs using standard command-line tools. For example, to view the latest log entries, you can use:
tail -f /var/log/autobotAI/*.log
This command will display real-time log updates as they occur.
Agent Service Commands
Command | Description |
---|---|
sudo systemctl status autobotAI-agent | Check the status of the autobotAI agent. |
sudo systemctl start autobotAI-agent | Start the autobotAI agent. |
sudo systemctl stop autobotAI-agent | Stop the autobotAI agent. |
sudo systemctl restart autobotAI-agent | Restart the autobotAI agent. |
sudo journalctl -f -u autobotAI-agent | Follow the logs for the autobotAI agent in real-time. |
Uninstall/Remove Agent
To uninstall the autobotAI agent and remove all its associated data, run the following command:
sudo /bin/bash -c "$(curl -fsSL https://autobotai-linux-agent.s3.amazonaws.com/scripts/uninstall.sh)"