33 lines
2.9 KiB
Plaintext
33 lines
2.9 KiB
Plaintext
TaloyhtioIdpRobot.ps1 is PowerShell script which moves data from PMS (property management system) to Taloyhtio Azure storage.
|
|
The following data supposed to be moved:
|
|
- maintenance fee
|
|
- user-flats mappings
|
|
Data is moved as files in csv/html format (or other format specific for PMS which is agreed preliminary with Taloyhtio). Data flow is the following:
|
|
1. Taloyhtio creates own Azure storage account for each PMC (property management company) so each PMC will have access only to own data
|
|
2. Taloyhtio provides Azure storage account name and key (it is obtained from Azure portal after creation of storage account) to PMC together with TaloyhtioIdpRobot.ps1
|
|
NOTE: PMC should keep Azure storage account name and key in secret!
|
|
3. PMC uses provided Azure storage account name and key as input parameters for TaloyhtioIdpRobot.ps1 (see below)
|
|
4. In addition PMC specifies local folder path (where files with data will be copied by PMS) as input parameters for TaloyhtioIdpRobot.ps1 (see below)
|
|
5. Script will monitor specified folder. If new file will be created in this folder - it will be transfered to specified storage account
|
|
6. After file has been moved to Azure storage - it is moved to /movedfiles subfolder of the script's folder (where TaloyhtioIdpRobot.ps1 is located) - so it won't be transfered twice
|
|
(script will create it automatically)
|
|
7. For automating this process PMC creates Windows scheduled task which runs TaloyhtioIdpRobot.ps1 by schedule (e.g. once per hour)
|
|
8. All actions done by TaloyhtioIdpRobot.ps1 are logged to log files in /logs subfolder of the script's folder
|
|
9. After file is transfered to PMC-specific Azure storage account it is parsed by parser which monitors storage account for this PMC and then parsed data is saved to Azure db
|
|
|
|
Installation guide for partners is described in more details in ~\IDP\robot\installation_partners.txt file in git.
|
|
|
|
Script input params:
|
|
- azureStorageAccountName - Azure storage account name which will be used for storing files. Provided by Taloyhtio to PMC
|
|
- azureStorageAccountKey - Azure storage account key. Provided by Taloyhtio to PMC
|
|
- pathToMonitor - Folder on local file system which should be monitored by script (folder to where PMS will store files with data)
|
|
- fileNamePrefix - Prefixes of the files which should be moved to Azure blob storage. Files which will be moved to Azure storage should have some common prefix
|
|
e.g. "_maintenancefee" or "_userflat". This is done as additional ensurance that script will move only those files which should be moved and prevent unintended files transfer
|
|
- fileNameExtension - Extensions of the files which should be moved to Azure blob storage (e.g. "csv" or "html")
|
|
|
|
For communicating with Azure script uses standard MS PowerShell cmdlets:
|
|
New-AzureStorageContext
|
|
Get-AzureStorageContainer
|
|
New-AzureStorageContainer
|
|
Set-AzureStorageBlobContent
|
|
which work on top of secured protocols. Script has open code and may be reviewed by PMC IT department. |