icon Azure Publisher - World Wide
Created by Orckestra

Azure Publisher Setup Guide

Configuring Azure Publisher

Configuring Azure Publisher includes:

  1. Setting up connection to a blob storage
  2. Setting up one or more publishing profiles

As Azure Publisher comes with predefined profiles, you may want to skip Step 2 altogether.

Configuring connection to a blob storage

As Azure Publisher uploads a staging website to a dedicated container (“website container”) in an Azure blob storage, you need to configure conection using the blob connection information that includes:

  • the storage account name
  • its access key

To configure the connection:

  1. In the Content perspective, right-click Azure Publisher and click Configure in the shortcut menu to open the Configuration view.

    Figure 7: Selecting Configure from the menu

  2. On the “Blob Storage” tab, within the "Configuration" group box, fill out these fields:
    • Account Name: Your Azure storage account’s name, for example, c1blobstore
    • Account Key: Your Azure storage account's access key, for example, f4uLInNSRj9HiP9zP7FeN8dLRusthmdQggufw+yLvmaMLZzyslJzPOG65YfrIPuoKmu7rKEJmszzqHzQpKZx1A==
  3. Click Save.
 

Figure 8: Configuring Azure Publisher

Now continue to the ”Profiles” tab to set up one or more profiles for publishing.

Configuring a test site

If you are using another blob storage for test purposes, you can upload to that storage, too.

  1. In the Content perspective, right-click Azure Publisher and click Configure in the shortcut menu to open the Configuration view.
  2. On the “Blob Storage” tab, within the "Test Site Configuration (optional)" group box, fill out the fields as you did for the main configuration using the values for your test website this time.
  3. Click Save.
 

Figure 9: Configuring Azure Publisher for a test website

If the test website is configured, a new button – “Publish to Test” – will appear in the Advanced Publisher view so that you could publish changes on your staging website to an Azure blob storage set up for test purposes.

Figure 10: Publish to Test feature

Please see the “Azure Publisher User Guide” for more information on this feature.

Configuring publishing profiles

Setting up publishing profiles is part of Azure Publisher configuration.

Publishing profiles define:

  • Where the website data is published to in the blob storage (the container)
  • What website files (all or only some) are published to the blob storage
  • How the source website is published (transformation rules)
  • Whether the website data uploaded to the blob storage will be downloadable

Each publishing profile must have a unique name and a unique blob container specified.

There two types of publishing profiles:

  • Primary: A public deployment website will read from the blob container associated with this profile
  • Backup: Additional publishing profiles, each with its won blob containers for various uses.

Azure Publisher comes with these predefined publishing profiles:

  • "CD (Live)" for the primary one, set to upload to the blob container named “data”
  • "All (Backup)" for the entire website backup, set to the container named “all-backup”
  • "Content (Backup)" for the content-only data backup, set to “content-backup”
<PublishProfiles>
  <Primary name="CD (Live)" blobContainerName="data" downloadable="false">
    <SourceFiles>
      <Folder path="~/" />
    </SourceFiles>
    <FileTransforms>
      <File skip="~/App_Data/Composite/Configuration/Composite.Azure.Publisher.config" />
    </FileTransforms>
  </Primary>
  <Backup name="All (Backup)" blobContainerName="all-backup">
    <SourceFiles>
      <Folder path="~/" />
    </SourceFiles>
  </Backup>
  <Backup name="Content (Backup)" blobContainerName="content-backup">
    <SourceFiles>
      <Folder path="~/App_Data/Composite/DataStores" />
      <Folder path="~/App_Data/Media" />
      <Folder path="~/App_Data/Composite/ApplicationState/SerializedWorkflows" />
    </SourceFiles>
  </Backup>
</PublishProfiles>

Listing 1: Default profiles

If the named containers do not exist in the blob storage, they will be created automatically on the first publication.

If the default profiles work for you, you can skip the rest of this guide and go on to use Azure Publisher. (Please see “ Azure Publisher User Guide” for more information.)

Creating publishing profiles

To create a primary publishing profile:

  1. From the "Content" perspective, right-click "Azure Publisher" and select "Configure".
  2. On the "Profiles" tab, below <PublishProfiles>:
    1. add a <Primary></Primary> element
    2. set its name attribute to the name of the profile you like, for example, "CD (Live)".
    3. set its blobContainerName attribute to the name of a blob container where the website files are published to.
  3. Within the <Primary> element:
    1. add a <SourceFiles></SourceFiles> element
    2. within the <SourceFiles> element, add one or more <Folder/> elements
    3. set their path attribute to the website folder path to include in publishing, for example, "~/".
  4. Click "Save".

Please note that only one primary publishing profile can be defined. Normally for the primary profile, you should have one <Folder/> element set to "~/" (meaning 'all the files').

You can also have none, one or more backup publishing profiles. The steps for creating a backup publishing profile are almost the same as those for the primary profile, except that you should use the <Backup></Backup> element instead of <Primary></Primary> in Step 2a above.

When the user clicks the "Publish", "Republish" or “Test to Publish” button, Azure Publisher runs through all the defined profiles and publish the website data accordingly to respective blob containers in the storage.

Please see further below for information about the <FileTransforms> element and the downloadable attribute used in the example above.

Transforming files when publishing

Instead of copying all files ‘as is’ to the blob storage, you can configure Azure Publisher to:

  • exclude specific files from being copied to the storage (skip) and / or
  • replace a file when copying with the one on the target environment (skip + use)

You define file transformation rules for each publishing profile individually.

  1. From the "Content" perspective, right-click "Azure Publisher" and select "Configure".
  2. On the "Profiles" tab, locate a profile you want to set file transformation rules for.
  3. Below the <Primary> or <Backup> element, add a <FileTransforms></FileTransforms> element.
  4. Within the <FileTransforms> element, add one or more <File/> elements.
  5. Set their skip attribute to the path to the file to skip.
  6. If you want to replace a file with the one on the target environment, in addition to skip, set the use attribute to the path to the file on the target environment to use instead.
  7. Click "Save".
<FileTransforms>
    <File skip="~/file-to-skip.txt" />
    <File skip="~/example.config" use="~/example.LIVE.config" />
</FileTransforms>

Listing 2: Example of transformation rules

By default, the primary publishing profile, with which Azure Publisher comes, is set to skip the Composite.Azure.Publisher.config file.

<FileTransforms>
  <File skip="~/App_Data/Composite/Configuration/Composite.Azure.Publisher.config" />
</FileTransforms>

Listing 3: Example of transformation rules

Setting up downloadable profiles

The user can have Azure Publisher download the website files from the blob container associated with a specific profile and replace the corresponding files on the staging website.

For this you need to define a publishing profile as ”downloadable” or ”non-downloadable”.

  1. From the "Content" perspective, right-click "Azure Publisher" and select "Configure".
  2. On the "Profiles" tab, locate a profile you want to make downloadable or non-downloadable.
  3. Add the downloadable attribute to the <Primary> or <Backup> element.
  4. Set its value to "true" or "false" accordingly.
  5. Click "Save".
 
<PublishProfiles>
  <Primary name="CD (Live)" blobContainerName="data" downloadable="false">
    <!-- the profile's settings -->
  </Primary>
  <Backup name="All (Backup)" blobContainerName="all-backup" downloadable="true">
    <!-- the profile's settings -->
  </Backup>
</PublishProfiles>

Listing 4: The primary profile defined as downloadable and the backup – as not.

Please note that by default the primary profile is not downloadable, and the backup profiles are downloadable.

The downloadable profile will appear on the drop-down "Download" button. If no profile is set as downloadable, the "Download" button will be hidden.

Please note that the user must have the "Administrate" permission to see the "Download" button in Azure Publisher.

   

Back to top
Part of subscriptions:

Have a question?

Phone: +45 39 15 76 00
Email: Write us
4:50 PM
(Local time at HQ)