Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

AutomateEvergreenPackaging v1

Overview

This is my first draft of a script that leverages the Evergreen PowerShell module and Cloudpager module to automatically package and patch applications using Numecent Cloudpaging Studio for packaging and Cloudpager for deployment. Combining these technologies can provide a solution to automatically package application and patches plus deploy to your early adopters automatically. Thank to Cloudpager's unique rapid rollback feature, you can also have confidence that any changes made that need to be rolled back, can be rolled back quickly and easily. As the application are packaged into application containers before deployment, the rollback and any removal should always be clean and net-new deployments and application updates are delivered dynamically and seamlessly to the users.

This version should still work but is limited and based on early versions of the Cloudpager PowerShell module and non-interactive Packager

For an overview demo, watch this video: https://vimeo.com/824779149

I put info at the bottom of this document to get a video of me walking through the script and explaining the main parts of the script.

Disclaimer

During my time at Numecent, I developed this project independently. It served as a trial for the Cloudpager API and an improvement to my existing automated application packaging and patching system. Although you are welcome to utilize this script as you wish, please note that it is not an official product of Numecent, and contacting Numecent support regarding this script is unnecessary.

Setting Up Evergreen Packaging Machine

I have only tested the script on Windows 10 Enterprise. It should work on a machine that is domain joined or non-domain joined. Typically, the preference for pacakging VMs is that they should be non-domain joined to avoid unncessary noise polluting packages.

image

On your Windows 10 VM, install Cloudpaging Studio. This will be used for packaging the applications and patches into application containers. You can find the latest version of Studio on the Numecent customer support portal.

In order to download applications found in the Evergreen PowerShell and upload completed packages using this script, you should launch the default browser on your machine at least once before taking your snapshot. If Internet Explorer is still on the VM, you should launch this once too.

image

To use the script, you will need to get the Cloudpager PowerShell module from Numecent and you will need to contact support to retrieve your tenant's unique API key. To ensure you can use the PowerShell module in the script as needed, I recommend placing the module in your Modules directory on your VM e.g. C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Cloudpager.

image

Next step, run the SetupScript.ps1 that is on my GitHub repository (https://github.com/Rorymon/AutomateEvergreenPackaging/blob/main/SetupScript.ps1), this will create the directories for your packaging projects and it will download the relevant scripts.

image

Next, install the Evergreen PowerShell Module e.g. Install-Module Evergreen

image

You should I recommend following Numecent's guidance on prepping your packaging VM. https://github.com/numecent using the prep script on the Numecent github repo.

image

With the pre-requisites all now on your VM, you should open the main script to populate some of the variables that are unique to you.

image

You will need to input your API Key and you can optionally step through the script, uncomment some of the optional sections and put in other variables such as your OpenAI API key (if you have one) and a Teams Channel Webhook URI.

When you had edited the PowerShell script and input your API key. It is a good idea to reboot the VM at least once and ensure services were stopped correctly, UAC is disabled etc. When ready, shutdown and save a snapshot of your VM.

image

Power back on the VM and run your script for the first time.

image

Using the Script

Here is a common example you may use:

.\AutomateEvergreenPackaging.ps1 -AppName "GoogleChrome" -Publisher "Google" -Sourcepackagetype "msi" -Sourcechannel "stable" -image_file_path "<PathToImageFile" -CommandLine "C:\Program Files\Google\Chrome\Application\chrome.exe" -Description "Google Chrome is the world's most popular web browser." -WorkpodID "<WorkdpodID>"

Before running this, you will want to get a decent icon image for the application. I tend to use .png files that are around 512 x 512 in size. The WorkdpodID is optional, this is only used when you wish to auto-deploy the new package to a Workpod. I always auto-deploy my applications and patches to an Early Adopters Workpod that contains a subset of my users. This way, if the vendor makes a big change to their application and it upsets users, it won't impact the entire organization. If you do not have a Workpod yet, you can create one via the Cloudpager Admin portal or via PowerShell. To retrieve your WorkpodID, use the Cloudpager PowerShell Module e.g. Get-CloudpagerWorkpod -SubscriptionKey "" -Name ""

image

The package uploads may take some time if the application is large. If you did not have Chrome in your tenant already, upon completion of the script you should now have the latest version available. If you already had Chrome but it was not the latest version, the latest version should be published. If the latest version is already in your tenant when you run the script, the script will detect the latest version is already available and exit.

For More Information

There are some additional tips you will need when working with the script such as the name currently must match the name listed in the Evergreen PowerShell Module and if the vendor media you select from the Evergreen PowerShell module is an msi, you do not require to pass -Arguments but if it is an exe, you will need to pass arguments to achieve a silent installation.

For a full explanation of this script and how it works, sign up to the Cloudpaging User Group and request access to the Slack Workspace for previous recordings. Join Now: https://www.meetup.com/cloudpaging-user-group/

About

This is my first draft of a script that leverages the Evergreen PowerShell module and Cloudpager module to automatically package and patch applications

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages