Hello All! đ
Yesterday, a CUGC Webinar took place covering a new community project called PowerScale! (Click here for the recording.)
PowerScale is a community-driven replacement for Citrix SmartScale, which went end of life in July 2019. PowerScale was created by Leee Jeffries, in response to a number of clients he works with asking for similar features.
PowerScale provides the following scaling features for Virtual Machines in a XenDesktop Environment:
- Scaling by Virtual Machine Numbers
- Scaling by CPU/RAM
- Scaling on a scheduled basis â e.g. business hours
- Scaling by Load Index
PowerScale also provides a dashboard with historical data â allowing you to log and retain data for analysis:
- Dashboard view of PowerScale Statistics
- Machines On/Maintenance/Scaled
- Farm CPU/Memory/Load Index/Session Averages
- Historical Dashboard and Logging Retention
- Configurable retention period
So, how do I get PowerScale Up and Running?
Installation is super easy and takes only 3 steps: Download, Configure, Run. It should take no longer than around 30 minutes from download to PowerScale up and running. Before starting, ensure that you have the following prerequisites:
- A Citrix Environment and Citrix Studio!
- Citrix PowerShell SDK â included on machines with Studio installed
- WMI Access enabled
- A Service Account that has access to the Citrix Servers (my account is a Citrix Admin and a Local Admin of the Session Hosts)
Step 1 â Download:
- Head over to the Project GitHub Page:Â https://github.com/leeej84/PowerScale
- Create a C:\PowerScale Folder on the Server that will run the script
- Download the Project and Extract the Zip Contents into the C:\PowerScale Folder:
Step 2 â Configure:
- Edit the âCreate Config File.ps1â script â and add the variables to suit your environment. (These are documented in the file)
- For a super quick start to scale based on VM Number and Time of Day â only 9 variables are needed
- $citrixController = âctx01.jake.labâ â Our Citrix Delivery Controller the script will communicate with
- $machinePrefix = âCTXSESSIONâ   â The Machine name prefix for Session Hosts
- $businessStartTime =Â â06:00â â The start time of the business working day
- $businessCloseTime = â18:00â â The end time of the business working day
- $outOfHoursMachines = â1â â The number of machines to run outside of working hours
- $inHoursMachines = â3â â The number of machines to run inside of working hours
- $wmiServiceAccount = âDOMAIN\accountâ â The user account that the script will run as
- $wmiServicePassword = âPowerScaleRocks123â â The password that the above account uses
- $testingOnly = $false â we need to set this to True for power operations to take place â otherwise it will only log!
3. Finally â run the Create Config script and the variables and configuration will be securely stored ready for use:
Step 3 â running the Script
We are now ready to run the script â and this is done by running the âDecision Making.ps1â script, which will then run PowerScale using the configuration provided. This script can be set to run as a scheduled task. If you wish to have PowerScale running more regularly:
OK â so I am up and running, what next?
PowerScale also provides more detailed configuration options â for example:
- Dynamic Performance Scaling â based on load, not just machines on or off
- Session Closure â to force or not to force? This can be configured
- Isolating individual machines â in case you need to work on a specific machine
- Logging â all actions can be logged for further analysis and retention
Finally â PowerScale also has an awesome dashboard! This can be used to display the scaling and give an overview of the PowerScale activity:
- PowerScale creates a static HTML Dashboard with some JavaScript that displays graphs on recent activity.
- These are stored with the script inside a separate folder called âDashboardâ
- Retention of these Dashboard is configurable â <I32 N=âdashboardRetentionâ>3</I32> (3 days of Dashboards)
- The time when Dashboards will be recycled can also be configured â <S N=âdashboardBackupTimeâ>04:00</S> (This will now happen at 4am each day.)
- Important:Â Donât forget to set your script run interval, this is used as a variance on the 04:00 backup window. This should match your scheduled task run time.
Hopefully this post will help you get up and running with PowerScale â as always, any questions, comments, feature requests are welcome â please reach out to either Leee or myself!
Until next time,
Jake Walsh