为 Azure-SSIS 集成运行时安装付费或许可的自定义组件Install paid or licensed custom components for the Azure-SSIS integration runtime

本文介绍 ISV 如何为 Azure-SSIS 集成运行时的 Azure 中运行的 SQL Server Integration Services (SSIS) 包开发和安装付费或许可的自定义组件。This article describes how an ISV can develop and install paid or licensed custom components for SQL Server Integration Services (SSIS) packages that run in Azure in the Azure-SSIS integration runtime.

问题The problem

Azure-SSIS 集成运行时的性质带来了多种挑战,使得在本地安装自定义组件所用的典型许可方法并不足以解决问题。The nature of the Azure-SSIS integration runtime presents several challenges, which make the typical licensing methods used for the on-premises installation of custom components inadequate. 因此,Azure-SSIS IR 需要不同的方法。As a result, the Azure-SSIS IR requires a different approach.

  • Azure-SSIS IR 的节点是易失性的,随时可以分配或释放。The nodes of the Azure-SSIS IR are volatile and can be allocated or released at any time. 例如,可以启动或停止节点来管理成本,或者通过不同的节点大小进行纵向扩展和缩减。For example, you can start or stop nodes to manage the cost, or scale up and down through various node sizes. 因此,使用计算机特定的信息(例如 MAC 地址或 CPU ID)将第三方组件许可证绑定到特定节点不再可行。As a result, binding a third-party component license to a particular node by using machine-specific info such as MAC address or CPU ID is no longer viable.

  • 还可以横向扩展或缩减 Azure-SSIS IR,使节点数目能够随时缩减或扩展。You can also scale the Azure-SSIS IR in or out, so that the number of nodes can shrink or expand at any time.

解决方案The solution

由于上一部分中介绍的传统许可方法的局限性,Azure-SSIS IR 提供了一种新的解决方案。As a result of the limitations of traditional licensing methods described in the previous section, the Azure-SSIS IR provides a new solution. 此解决方案使用 Windows 环境变量和 SSIS 系统变量来绑定许可证和验证第三方组件。This solution uses Windows environment variables and SSIS system variables for the license binding and validation of third-party components. ISV 可以使用这些变量来获取 Azure-SSIS IR 的唯一和持久信息,例如群集 ID 和群集节点计数。ISVs can use these variables to obtain unique and persistent info for an Azure-SSIS IR, such as Cluster ID and Cluster Node Count. 有了此信息,ISV 就可以将其组件的许可证作为群集绑定到 Azure-SSIS IR。With this info, ISVs can then bind the license for their component to an Azure-SSIS IR as a cluster. 此绑定使用的 ID 不会在客户启动或停止、增加或减少、缩小或扩大或以任何方式重新配置 Azure-SSIS IR 时发生变化。This binding uses an ID that doesn't change when customers start or stop, scale up or down, scale in or out, or reconfigure the Azure-SSIS IR in any way.

下图显示了使用这些新变量对第三方组件执行的典型安装、激活和许可证绑定以及验证流:The following diagram shows the typical installation, activation and license binding, and validation flows for third-party components that use these new variables:

许可组件的安装

说明Instructions

  1. ISV 可在各种 SKU 或层(例如,单个节点、最多 5 个节点、最多 10 个节点,等等)中提供其许可组件。ISVs can offer their licensed components in various SKUs or tiers (for example, single node, up to 5 nodes, up to 10 nodes, and so forth). 当客户购买某个产品时,ISV 会提供相应的产品密钥。The ISV provides the corresponding Product Key when customers purchase a product. ISV 还可以提供包含 ISV 安装脚本和关联文件的 Azure 存储 Blob 容器。The ISV can also provide an Azure Storage blob container that contains an ISV Setup script and associated files. 客户可将这些文件复制到其自己的存储容器中,并使用其自己的产品密钥修改这些文件(例如运行 IsvSetup.exe -pid xxxx-xxxx-xxxx)。Customers can copy these files into their own storage container and modify them with their own Product Key (for example, by running IsvSetup.exe -pid xxxx-xxxx-xxxx). 然后,客户可以使用容器的 SAS URI 作为参数,来预配或重新配置 Azure-SSIS IR。Customers can then provision or reconfigure the Azure-SSIS IR with the SAS URI of their container as parameter. 有关详细信息,请参阅 Azure-SSIS 集成运行时的自定义设置For more info, see Custom setup for the Azure-SSIS integration runtime.

  2. 在预配或重新配置 Azure-SSIS IR 时,ISV 安装程序将在每个节点上运行,以查询 Windows 环境变量 SSIS_CLUSTERIDSSIS_CLUSTERNODECOUNTWhen the Azure-SSIS IR is provisioned or reconfigured, ISV Setup runs on each node to query the Windows environment variables, SSIS_CLUSTERID and SSIS_CLUSTERNODECOUNT. 然后,Azure-SSIS IR 会将许可产品的群集 ID 和产品密钥提交到 ISV 激活服务器,以生成激活密钥。Then the Azure-SSIS IR submits its Cluster ID and the Product Key for the licensed product to the ISV Activation Server to generate an Activation Key.

  3. 收到激活密钥后,ISV 安装程序可在每个节点的本地存储密钥(例如,在注册表中)。After receiving the Activation Key, ISV Setup can store the key locally on each node (for example, in the Registry).

  4. 当客户在 Azure-SSIS IR 的某个节点上运行使用 ISV 许可组件的包时,该包将读取本地存储的激活密钥,并根据节点的群集 ID 验证该密钥。When customers run a package that uses the ISV's licensed component on a node of the Azure-SSIS IR, the package reads the locally stored Activation Key and validates it against the node's Cluster ID. 该包还可以选择性地向 ISV 激活服务器报告群集节点计数。The package can also optionally report the Cluster Node Count to the ISV activation server.

    下面是验证激活密钥并报告群集节点计数的代码示例:Here is an example of code that validates the activation key and reports the cluster node count:

    public override DTSExecResult Validate(Connections, VariableDispenser, IDTSComponentEvents componentEvents, IDTSLogging log) 
    
    {                                                                                                                             
    
    Variables vars = null;                                                                                                        
    
    variableDispenser.LockForRead("System::ClusterID");                                                                           
    
    variableDispenser.LockForRead("System::ClusterNodeCount");                                                                    
    
    variableDispenser.GetVariables(ref vars);                                                                                     
    
    // Validate Activation Key with ClusterID                                                                                     
    
    // Report on ClusterNodeCount                                                                                                 
    
    vars.Unlock();                                                                                                                
    
    return base.Validate(connections, variableDispenser, componentEvents, log);                                                   
    
    }
    

后续步骤Next steps