Introducing PowerScale! A Community Driven SmartScale Replacement by Leee Jeffries

By Jake Walsh posted 12 days ago

  

Introducing PowerScale! A Community Driven SmartScale Replacement by Leee Jeffries


Hello All! :)

Yesterday, a CUGC Webinar took place covering a new community project called PowerScale! (Click here for the recording and slide deck.)

powerscale_webinar.png

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:
  1. Head over to the Project GitHub Page: https://github.com/leeej84/PowerScale
  2. Create a C:\PowerScale Folder on the Server that will run the script
  3. Download the Project and Extract the Zip Contents into the C:\PowerScale Folder:
Step 2 - Configure:
  1. Edit the "Create Config File.ps1" script - and add the variables to suit your environment. (These are documented in the file)
  2. 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:

config.png

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:

running.png

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.
dashboard.png

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







​​