This topic describes first-time onboarding deployment of an existing CMS website to the Integration environment, as part of the Optimizely DXP.
When is this applicable?
This is an onboarding scenario for an existing site which you want to move to a cloud-based environment for the first time, for further development and maintenance there. In this case, you already have a database with content, and you will need to get that restored to the correct application, which will be done by Optimizely.
In this topic
- Before you start
- Creating the output files
- Uploading the output files
This topic uses Visual Studio with the Optimizely extensions and publish profiles. However, you can also use other deployment methods.
- See Requirements for recommended versions of software, tools and services to use when deploying.
- See Getting started for information needed to deploy.
To deploy from your local development environment, export the database as a .bacpac file and upload it to the DXP integration environment’s storage account. Optimizely support will import it for you.
You can also upload the BLOBs directly (unpacked) to your DXP integration enviroment’s storage account.
Also, you can deploy the code using Visual Studio or the deployment tool of your choice to the DXP integration environment.
- Add cloud platform to the website. In the NuGet package manager:
- Select Browse.
- Enter Optimizely Azure in the search field.
- Select the EPiServer.CloudPlatform.Cms package.
- Select your project.
- Click Install and confirm the installation.
- Run the solution.
- In Visual Studio's Solution Explorer, right-click the project and select Publish.
- In the Pick a publish target dialog box, select New Folder.
- Click Next.
- Choose location or keep default.
- Click Finish.
Zip the contents of the publish directory and rename to ProjectName.cms.app.00001.nukpg.
# Connect EpiCloud using credentials from portal Connect-EpiCloud -ProjectId "projectId" -ClientKey "key" -ClientSecret "secret" # Upload .NET Core Alloy to blob storage $sasUrl = Get-EpiDeploymentPackageLocation Add-EpiDeploymentPackage -SasUrl $sasUrl -Path .\AlloyNetCore.cms.app.0.1.0.nupkg # Deploy package to environment. This will first build a docker image out of the package and then deploy it to the target environment. Start-EpiDeployment -DeploymentPackage "AlloyNetCore.cms.app.0.1.0.nupkg" -TargetEnvironment "Integration" -DirectDeploy -Wait
- In Microsoft SQL Server Studio, connect to the database to use.
- Right-click on the database, and select Tasks > Export Data-tier Application...
- In the Export Settings tab:
- Select Save to local disk
- Select a target location for the files
- Enter a name for the bacpac file
- Click Next.
- After the export, verify the results and click Close.
- In Visual Studio, right-click on your project and select Open folder in File Explorer.
- Locate the blobs folder under App_Data, and zip the content of the blobs folder using a zip tool of your choice.
When you have created the output files, you can deploy the code yourself. For the bacpac and media/BLOB files, contact Optimizely and follow the instructions provided. You will receive the keys to upload the bacpac and media/BLOB files to the upload container on the storage account, and Optimizely will finalize the deployment.
Last updated: Sep 28, 2021