Azure Blob Storage Deployment Handler

Handles the deployment of one or more Deployment Packages to an Azure Blob Storage Container.

The Azure Blob Storage Container is described by:

connectionString
containerName

And optionally:

prefix    

The contents of the Deployment Packages will be deployed sequentially to the target location. If any of the content within the Deployment Packages fails to copy, it will simply be skipped. Other content objects will be allowed to proceed unabated.

Configuration

{
    "connectionString": "{connectionString}",
    "containerName": "{containerName}",
    "prefix": "{prefix}"
}

The prefix setting is optional. All other settings are required.

Connection String

To obtain the connectionString, go into Azure Portal and click into your Blob Storage Account. On the left-hand side, click on Shared access signature.

Click on the Generate SAS and connection string button to produce the SaaS connection profile.

The connection string is available in the Connection string box.

Mappings

The Azure Blob Storage Deployment handler respects the f:deployment-config feature if applied to a node. This feature lets you configure a set of mappings that determine how a node's JSON object and any binary attachments should be mapped down and written to disk.

The default mappings are:

[{
    "type": "object-to-file",
    "config": {
        "filepath": "/{{dependency.id}}/{{dependency.typeId}}.json"
    }
}, {
    "type": "attachment-to-file",
    "config": {
        "attachmentId": "*",
        "filepath": "/{{dependency.id}}/{{attachment.filename}}"
    }
]

These default mappings make it so that your Node's JSON is written to the bucket along with any of its attachments.

  • Nodes are written to disk like this:

    {prefix}/{nodeId}/node.json

  • Node attachments are written as well, like this:

    {prefix}/{nodeId}/attachments/{attachmentId}.{ext}

  • Associations are written to disk like this:

    {prefix}/{associationId}/association.json

  • Association attachments are written as well, like this:

    {prefix}/{associationId}/attachments/{attachmentId}.{ext}

Example

{
    "connectionString": "BlobEndpoint=https://test.blob.core.windows.net/;TableEndpoint=https://test.table.core.windows.net/;SharedAccessSignature=MORE",
    "containerName": "my-container",
    "prefix": "/static"
}