Installing the File System Agent.
Before you begin
The Atomia File System Agent is part of the Atomia agents package. You should start by reading the general package overview and instructions here.
Pre-installation actions
The agent doesn’t require anything special before the installation.
Post-installation actions
In order to properly function, the agent must use root
Linux user. So, the first thing to change is the default agent user in the /etc/atomia/config
. Open the file and replace atomia-agent
with root
.
One more thing to do is to create and set up the agent’s configuration file. Start by copying the example config file:
sudo cp /etc/atomia/filesystem-agent.json.example /etc/atomia/filesystem-agent.json
Edit new copy and change some default properties if needed.
Example file and what each option means:
{
"auth": {
"username":"someauthusername",
"password":"someauthpassword"
},
"port": 7356,
"host": "127.0.0.1",
"log_path": "/var/log/atomia/filesystem-agent.log",
"content_path":"/storage/content",
"mail_content_path":"/storage/mailcontent",
"backup_path":"/storage/content_backup",
"parent_root_folders_pattern":["^/[0-9][0-9]$"],
"user_root_folders_pattern":["^/?[0-9][0-9]/([0-9]{6,})", "^/?ssl/([0-9]{6,}).*$"],
"arbitrary_root_folders_pattern":["^/awstats-sites$"],
"parent_accounts": "100000",
"additional_group": 33,
"list_symbolic_links": 0,
"interval":5",
"rsync_delete_enabled": false,
"rsync_delete_speed_in_kbs": 1000
}
Option | Meaning |
---|---|
auth | Basic access authentication (username and password) for the Atomia File System agent. Without these fields, the client won’t be able to use the File System agent. |
port | Port of the File System Agent REST API. |
host | The IP address of the machine which gonna be used for listening by the File System agent. |
log_path | The file where should File System agent log info and error messages. |
content_path | The root path where web content is stored |
mail_content_path | The root path where mail content is stored |
backup_path | The path where the backup is stored |
parent_root_folders_pattern | Check for root folder parent pattern |
user_root_folders_pattern | Check for valid user folder pattern and stores to $1 UID |
arbitrary_root_folders_pattern | Legacy config option that existed in the old File System Agent – probably obsolete |
parent_accounts | Parent account UID |
additional_group | Parent user account group number used for some operations where UID is fetched from the path and this is GID |
list_symbolic_links | Show/hide symbolic links [obsolete] |
interval | Interval for cleanup |
rsync_delete_enabled | Should the cleanup be performed with rsync or recursively (default) |
rsync_delete_speed_in_kbs | How fast you want to delete folders – 0 means unlimited (default). |
Changes in the Automation Server
In order to connect the File system agent with the Atomia provisioning module, the Resource file should be updated on the server where Atomia Automation Server is installed.
Resource description
Make sure you have the following resource in the resource file (C:Program Files (x86)AtomiaAutomationServerCommonResources.xml
):
<?xml version="1.0"?>
<resourceDescription xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<bindings>
<moduleList>
<module name="Atomia.Provisioning.Modules.FileSystem.FileSystem" resourceAsignmentPolicy="RoundRobin" />
</moduleList>
<resourceList>
<resource name="FileSystemAgent">
<property name="URL">http://192.168.33.21:10201/</property>
<property name="Username">someauthusername</property>
<property name="Password">someauthpassword</property>
<property name="DeleteMailStoragePath">/mailfolder</property>
<property name="DeleteWebStorage">true</property>
<property name="DeleteMailStorage">false</property>
</resource>
</resourceList>
</bindings>
</resourceDescription>
In the transformation file example above, the URL
property should match exactly the host
and port
properties in the filesystem-agent.json
file (as defined in the example at the beginning of this section). Also, the Username
and Password
properties should be equivalent to the corresponding fields in the auth
section of the same config file. For more details about the resource properties, check the Administrator’s guide.
Running the service
systemctl start atomia-filesystem-agent
To start the cleanup (deleted files) process run:
systemctl start atomia-filesystem-daemon