Optimizely DXP Deployment API – Updates for .NET 5.0 and EpiCloud 1.0.0

Yesterday (December 8th 2021), Optimizely sneakily released their very first major update for the EpiCloud Powershell Module; Version 1.0.0.

This is great timing, as I was also about to release an update that would provide a fix for Azure.Storage (no longer relevant – ill explain why further in this post), as well as provide updates for use with .NET 5.0, specifically in the realm of provisioning DXP environments.

In this post, we will go through the following:

What is new in this update?

So far, there are no release notes for this update, but it looks like the following have been included in the EpiCloud 1.0.0 update:

  • Cross Platform
    • This is HUGE, since .NET5 is cross-platform, it now looks like other system types can install this module to use the deployment API.
  • Built in required resources (Azure, System, Microsoft, etc…)
    • This is such a welcome change, seeing that most of the updates to these scripts have been chasing all of the changes that Microsoft has been applying to the Azure Modules.
    • This also means that I no longer have to hunt and peck to install whichever flavor of the week that Microsoft feels like using. (Az vs Azure)
    • These (highlighted) are the resources that are now included by default

In my testing, these updates have made these scripts run a lot smoother. This allows Optimizely to define which library versions are used, which will allow these scripts to work the best they can. This was such a smart decision!

Provisioning environments in .NET 5.0 environments? How?!

The provisioning script in my OptiCloud have been updated to work with .NET5 environments, which, as mentioned previously, have a different nupkg structure.

The first way of doing this is to use the out of the box parameter, which does require you to also have my “packages” folder (with nupkg files) in the directory under the .ps1 script files.

The new parameter is called “NetCore” and is a true/false.

.ProvisionEpiEnvironment.ps1  -ClientKey "****"
                              -ClientSecret "****"
                              -ProjectId "****"
                              -TargetEnvironment "Production"
                              -NetCore 1

Using the parameter like this, if true, will update the path to use “./packages/ProvisionEnvironmentCore.cms.app.1.nupkg“.

If this parameter is false (it is defaulted to false if not supplied to support backwards compatibility), it will continue to use the non-core nupkg file.

If the provisioning file cannot be in the default location, the parameter “ArtifactPath” can still be used to define a path to where the Provisioning nupkg file is located at.

.ProvisionEpiEnvironment.ps1  -ClientKey "****"
                              -ClientSecret "****"
                              -ProjectId "****"
                              -TargetEnvironment "Production"
                              -ArtifactPath "C:\ProvisionEnvironmentCore.cms.app.1.nupkg"

Conclusion

The EpiCloud script updates were a welcome surprise, and I hope that we get release notes at some point. In the case that we do, I will update this post.

Thank you Optimizely…you sneaky sneaky wonderful people.

As always, please let me know if you have any comments/questions/concerns. I am more than happy to help!

Default image
Eric Markson
Senior Technical Consultant at Perficient | Optimizely MVP (Formerly Episerver)
Articles: 14

One comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.