HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In


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.

## Before you start

This topic uses Visual Studio with the Optimizely extensions and publish profiles. However, you can also use [other deployment methods](🔗).

  • See [DXP requirements](🔗) for recommended versions of software, tools and services to use when deploying.

  • See [Getting started with DXP](🔗) for information needed to deploy.

Important

If not already done, remember to **change the default login credentials** (admin/store) provided in the Customized Commerce installation, before deploying. See [Installing Optimizely](🔗) (CMS 11 and Customized Commerce 13).

## Output and file formats

To deploy from your local development environment, you need to create a set of output files, and provide these to Optimizely for deployment to the Integration environment.

A Customized Commerce solution consists of two databases: one for CMS and one for Customized Commerce. So, there will be additional output components compared to a plain CMS site.

## Creating the output files

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 deployment API to the DXP integration environment.

### 1. Create code package

  1. Add cloud platform to the website. In the NuGet package manager:

    1. Select **Browse**.

    2. Enter **cloud** in the search field.

    3. Select the _EPiServer.CloudPlatform.Commerce_ package.

    4. Select your project.

    5. Click **Install** and confirm the installation.

    6. Repeat step 1 to 5 to install _EpiServer.CloudPlatform.Cms_ package.



  1. To configure the EPiServer.CloudPlatform.Cms package, you need to add this code in ConfigureServices method in startup.cs file.





Note

If you only want to add the EPiServer.CloudPlatform.Cms package to specific environments, you can run something similar to the following code to check the environment.





  1. Run the solution.

### 2. Publish website to create code package

  1. In Visual Studio's Solution Explorer, right-click the project and select **Publish**.

  2. In the **Pick a publish target** dialog box, select **New Folder**.



  1. Click **Next**.

  2. Choose location or keep default.



  1. Click **Finish**.

Zip the contents of the publish directory and rename to _ProjectName.cms.app.00001.nukpg_.

### 3. Deploy package

Get API credentials, if you need to know how to do that click [Deployment API authentication](🔗)

The sample to deploy the code is using PowerShell. Any deployment API method will work as long as you are deploying a package. 





### Database

In Microsoft SQL Server Studio, repeat steps 1-4 below for the **front-end site database**, and for the **back-end Commerce Manager database**, to create the bacpac output files.

  1. Connect to the database to use.

  2. Right-click on the database, and select **Tasks** > **Export Data-tier Application...**

726




  1. In **Export Settings:**

    1. Select **Save to local disk**.

    2. Select a target location for the files.

    3. Enter a name for the _bacpac_ file.

    4. Click **Next**.



  1. After the export, verify the results and click **Close**.



### Media/BLOB

For the **front-end site**, follow the steps below to create the output file for the media/BLOB content.

  1. In Visual Studio, right-click on your project and select **Open folder in File Explorer**.

  2. Locate the _blobs_ folder under _App\_Data_, and zip the content of the _blobs_ folder using a zip tool of your choice. 



## Uploading the output files

When you have created the output files, contact [Optimizely](🔗), and follow the instructions provided to upload them to the assigned area. The deployment will then be finalized by Optimizely.