November Happy Hour will be moved to Thursday December 5th.

Elias.Lundmark
Dec 4, 2023
  1342
(2 votes)

Import Blobs and Databases to Integration Environments

In this blog, we are going to explore some new extensions to the Deployment API in DXP Cloud Services, specifically the ability to import databases and blobs via the API. Some caveats to consider before we jump into the details,

  1. Blob and database imports are limited to integration and ADE environments
  2. Database imports are only available when using -DirectDeploy.

Uploading and Deploying Databases

You can know supply a bacpac file to Add-EpiDeploymentPackage

$saslink = Get-EpiDeploymentPackageLocation
Add-EpiDeploymentPackage -SasUrl $saslink -Path “C:\MyDatabaseFiles\environmentname.cms.sqldb.20231106.bacpac”

Bacpac is the same format that is used when databases are exported along with the same naming convention, so that any database that is exported can easily be imported again.

Once the upload is done, we can simply pass it to Start-EpiDeployment

Start-EpiDeployment -DeploymentPackage (”environmentname.cms.sqldb.20231106.bacpac”,”cms.app.1.0.0.nupkg”) -TargetEnvironment “Integration” -DirectDeploy

This example deploys a nupkg at the same time, but that can be ommitted to just import a database. E.g., -DeploymentPackage “environmentname.cms.sqldb.20231106.bacpac”. As usual, you will be able to see the status of the deployment in the management portal, or Get-EpiDeployment.

Creating a writeable SAS URI to upload blobs

For quite some time now, we have had the possibility to create readable SAS URIs via the Deployment API. E.g.,

Get-EpiStorageContainerSasLink -Environment “Integration” -StorageContainer “mysitemedia”

You can now add a -Writable flag to this command which enables you to upload blobs to the container as well. You can use this SAS URI to write via HTTPS, or use with Azure Storage Explorer. If you are using Azure Storage Explorer, select connect to a Blob container or Directory

Then select Shared access signature URL (SAS), and paste the writeable SAS URL

Our hope is that this will make it easier to deploy an existing site to our Cloud Services, and allow you to export content from any environment and easily import it again. 

Dec 04, 2023

Comments

Ove Lartelius
Ove Lartelius Dec 4, 2023 04:14 PM

Nice! Love it! Made me wanted to try deploy a Alloy website to DXP to test. This is my experience. https://www.epinova.se/en/blog/2023/setup-website-in-dxp-integration/

Vincent
Vincent Dec 5, 2023 01:26 AM

Great feature and glad to see DXP keeps improving to provide better developer's experience. 

Mark Hall
Mark Hall Dec 21, 2023 03:08 PM

Just a heads up the flag should be -Writable not -Writeable  

Tomas Hensrud Gulla
Tomas Hensrud Gulla Feb 13, 2024 11:59 AM

Another heads up: -Writable is only possible for the Integration environment.

KennyG
KennyG Mar 11, 2024 09:08 PM

Is there a trick to get it to do both the CMS and Commerce databases at the same time? I was able to upload both but only able to specify one at a time.

Mar 12, 2024 08:41 AM

@KennyG it should be possible to deploy a CMS and Commerce database at the same time - give this a try!

Start-EpiDeployment -DeploymentPackage @('myapp.cms.sqldb.1.0.0.bacpac', 'myapp.commerce.sqldb.1.0.0.bacpac') -TargetEnvironment Integration -DirectDeploy

Please login to comment.
Latest blogs
Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Set Default Culture in Optimizely CMS 12

Take control over culture-specific operations like date and time formatting.

Tomas Hensrud Gulla | Nov 15, 2024 | Syndicated blog

I'm running Optimizely CMS on .NET 9!

It works 🎉

Tomas Hensrud Gulla | Nov 12, 2024 | Syndicated blog

Recraft's image generation with AI-Assistant for Optimizely

Recraft V3 model is outperforming all other models in the image generation space and we are happy to share: Recraft's new model is now available fo...

Luc Gosso (MVP) | Nov 8, 2024 | Syndicated blog