Partilhar via


ExtensõesSettings [SPFSDK][VMROLE]

 

Aplica-se a: Windows Azure Pack

O objeto ExtensionSettings contém a configuração da extensão do recurso, que inclui o perfil de aplicação e informações sobre a carga útil.

Hierarquia tipo

RecursosExtension [SPFSDK][VMROLE]. ExtensõesSetings

Syntax

{
    "SchemaVersion": "1.0.0.0",

    "ApplicationProfile": {
        "Name": "ApplicationProfile1",

        "ApplicationPayload": [
            {
                "ID": "49c1ccdb-9068-4b91-9409-0a7ca8a1d291",
                "RelativePath": "sharepointfiles"
            },
        ],

        "LinuxApplicationProfile": { <LinuxApplicationProfile> },
        "WindowsApplicationProfile": { <WindowsApplicationProfile> }
    }
}

Propriedades

Nome

Tipo

Necessário

Valor predefinido

Description

SchemaVersion

String

Yes

Nenhuma

A versão do esquema de definição de extensão, que é sempre 1.0.0.0.

AplicaçãoProfile

AplicaçãoProfile

Yes

Nenhuma

As aplicações e a configuração no hóspede que pretende definir para a máquina virtual.

AplicaçãoProfile

Nome

Tipo

Necessário

Valor Predefinido

Descrição

Name

String

Yes

Nenhuma

A versão do esquema de definição de extensão, que é sempre 1.0.0.0.

ApplicationPayload

Matriz de AplicaçãoPayload

No

Nenhuma

O conjunto de aplicações e configuração no hóspede que deseja para a máquina virtual.

LinuxApplicationProfile

ApplicationProfile.LinuxApplicationProfile [SPFSDK][VMROLE]

No

nulo

As aplicações para executar numa máquina virtual baseada em Linux.

WindowsApplicationProfile

ApplicationProfile.WindowsApplicationProfile [SPFSDK][VMROLE]

No

nulo

As aplicações para funcionar numa máquina virtual baseada em Windows.

ApplicationPayload

Nome

Tipo

Necessário

Valor Predefinido

Description

ID

String

Yes

Nenhuma

Um identificador único, como um GUID, para identificar a carga útil.

Caminho Parente

String

Yes

Nenhuma

O caminho, em relação ao caminho DataPackage.Location, de um ficheiro ou pasta.

Observações

O exemplo de código a seguir fornece um objeto de extensões de amostraSettings .

{
    "SchemaVersion": "1.0.0.0",

    "ApplicationProfile": {
        "Name": "ApplicationProfile1",

        "ApplicationPayload": [
            {
                "ID": "49c1ccdb-9068-4b91-9409-0a7ca8a1d291",
                "RelativePath": "sharepointfiles"
            }
        ],

        "LinuxApplicationProfile": {
            "RunOnceCommands": [
                "ifconfig"
            ]
        },

        "WindowsApplicationProfile": {
            "WindowsServerRolesAndFeatures": [
                "TFTP-Client"
            ],

            "SQLProfile": {
                "SQLDeployments": [
                    {
                        "DeploymentName": "SQL Deployment 1",
                        "InstanceName": "[Param.SQLInstance]",
                        "InstanceID": "[Param.SQLInstance]",
                        "EnableNamedPipes": false,
                        "EnableTCP": true,
                        "MediaSource": "c:\\SQLMediaPath\\sqlsetup.exe",
                        "ProductKey": "abcdefghijklmnopqrstuvwxyz",
                        "SQLAuthenticationType": "WindowsAuthentication",
                        "SQLSysAdminMemberList": "domain\\user",
                        "DeploymentTimeOutInSeconds": 3600,
                        "SQLConfigurationPayloadId": "61A33949-46CE-4d0f-921F-A0059DA9AD1F",
                        "SAPassword": "MySAPassword",

                        "SQLDeploymentCredential": "domain\\user:password",
                        "SQLAgentServiceCredential": "NT AUTHORITY\\System:",
                        "SQLServiceCredential": "NT AUTHORITY\\NetworkService:",
                        "SQLReportingServiceCredential": "domain\\user:password"
                    }
                ]
            },

            "ProvisioningScripts": [
                {
                    "AlwaysReboot": false,
                    "ApplicationPayloadId": "49c1ccdb-9068-4b91-9409-0a7ca8a1d291",
                    "DeploymentOrder": 1,
                    "ErrorPolicy": "FailOnMatch",
                    "ExecutableAndParams": {
                        "Executable": "cmd.exe",
                        "Parameters": "/q /c msiexec sharepoint.msi"
                    },
                    "ExitCodeRegex": "[1-9][0-9]*",
                    "MaxOutputSize": 1048576,
                    "RebootExitCodeRegex": "{1641}|{3010}|{3011}",
                    "RestartOnRetry": false,
                    "ScriptBlock": null,
                    "ScriptCredential": "domain\\user:password",
                    "ScriptType": "PreInstall",
                    "StandardErrorPath": "c:\\err.txt",
                    "StandardErrorRegex": ".+",
                    "StandardInput": null,
                    "StandardOutputPath": "c:\\out.txt",
                    "StandardOutputRegex": null,
                    "TimeoutInSeconds": 900,
                    "WorkingDirectory": null
                }
            ],
            "WebDeployApplications": [
                {
                    "DeploymentName": "WebDeploy App 1",

                    "ScriptCommands": [
                        {
                            "AlwaysReboot": false,
                            "ApplicationPayloadId": "366819c2-bf11-4c85-9555- 6293e2a3ce7b",
                            "ErrorPolicy": "FailOnMatch",
                            "ExecutableAndParams": {
                                "Executable": "cmd.exe",
                                "Parameters": "/q /c installwebdeploy.cmd"
                            },
                            "ExitCodeRegex": "[1-9][0-9]*",
                            "MaxOutputSize": 1048576,
                            "RebootExitCodeRegex": "{1641}|{3010}|{3011}",
                            "RestartOnRetry": false,
                            "ScriptBlock": null,
                            "ScriptCredential": "domain\\user:password",
                            "ScriptType": "PreInstall",
                            "StandardErrorPath": "c:\\err.txt",
                            "StandardErrorRegex": ".+",
                            "StandardInput": null,
                            "StandardOutputPath": "c:\\out.txt",
                            "StandardOutputRegex": null,
                            "TimeoutInSeconds": 900,
                            "WorkingDirectory": null
                        }
                    ],

                    "DeploymentName": "Deployment1",
                    "ApplicationPayloadId": "371ade4c-03a2-492d-9589-b399b940e44f",
                    "PackagePassword": "mypassword2",
                    "WebDeployParameters": [
                        {
                            "ParameterName": "CONNECTION_STRING",
                            "Value": "[Param.ConnectionString]"
                        }
                    ]
                }
            ],

            "SQLDacApplications": [
                {
                    "DeploymentName": "SQL App 1",

                    "ScriptCommands": [
                        {
                            "AlwaysReboot": false,
                            "ApplicationPayloadId": null,
                            "ErrorPolicy": "FailOnMatch",
                            "ExecutableAndParams": null,
                            "ExitCodeRegex": "[1-9][0-9]*",
                            "MaxOutputSize": 1048576,
                            "RebootExitCodeRegex": "{1641}|{3010}|{3011}",
                            "RestartOnRetry": false,
                            "ScriptBlock": "rem some script that needs to run before sqldac package is installed",
                            "ScriptCredential": {
                                "Password": "mypassword4",
                                "UserName": "dcmanagerlab\\esdcvsec4"
                            },
                            "ScriptType": "PreInstall",
                            "StandardErrorPath": "c:\\err.txt",
                            "StandardErrorRegex": ".+",
                            "StandardInput": null,
                            "StandardOutputPath": "c:\\out.txt",
                            "StandardOutputRegex": null,
                            "TimeoutInSeconds": 900,
                            "WorkingDirectory": null
                        }
                    ],

                    "SQLScriptCommands": [
                        {
                            "DatabaseName": "[Param.SharepointDB]",
                            "DeploymentOrder": 1,
                            "EncryptConnection": false,
                            "ExecutionTimeoutSeconds": 500,
                            "LoginTimeoutSeconds": 50,
                            "OutputFilePath": "c:\\sharepointDB.sql.log",
                            "SQLAuthenticationType": "WindowsAuthentication",
                            "SQLScriptApplicationPayloadId": "db04416b-d0a8-44d5-b0ee-d5739378a98d",
                            "ScriptCredential": "[Param.SQLScriptCommandCredential]",
                            "ScriptType": "PostInstall"
                        }
                    ],

                    "DeploymentName": "Deployment1",
                    "ApplicationPayloadId": "5b064b6a-d6d0-48f0-8979-9aafc676a9e5",
                    "BlockOnChanges": false,
                    "DacInstance": "[Param.SharepointDB]",
                    "IgnoreDataLoss": false,
                    "RollbackOnFailure": true,
                    "SQLAuthenticationType": "WindowsAuthentication",

                    "SQLDeploymentCredential": "[param.SQLDeploymentCredential]",

                    "SQLInstance": "[Param.SQLInstance]",
                    "SkipPolicyValidation": true,
                    "UninstallMode": "DropDatabase"
                }
            ],

            "ScriptApplications": [
                {
                    "DeploymentName": "ScriptDeployment1",

                    "ScriptCommands": [
                        {
                            "AlwaysReboot": false,
                            "ApplicationPayloadId": "366819c2-bf11-4c85-9555- 6293e2a3ce7b",
                            "ErrorPolicy": "FailOnMatch",
                            "ExecutableAndParams": {
                                "Executable": "cmd.exe",
                                "Parameters": "/q /c installwebdeploy.cmd"
                            },
                            "ExitCodeRegex": "[1-9][0-9]*",
                            "MaxOutputSize": 1048576,
                            "RebootExitCodeRegex": "{1641}|{3010}|{3011}",
                            "RestartOnRetry": false,
                            "ScriptBlock": null,
                            "ScriptCredential": "domain\\user:mypassword",
                            "ScriptType": "PreInstall",
                            "StandardErrorPath": "c:\err.txt",
                            "StandardErrorRegex": ".+",
                            "StandardInput": null,
                            "StandardOutputPath": "c:\out.txt",
                            "StandardOutputRegex": null,
                            "TimeoutInSeconds": 900,
                            "WorkingDirectory": null
                        }
                    ],

                    "EnvironmentVariables": [
                        {
                            "Name": "envvar1",
                            "Value": "foo",
                        },
                        {
                            "Name": "envvar2",
                            "Value": "bar",
                        },
                    ],

                    "AlwaysReboot": false,
                    "ApplicationPayloadId": "49c1ccdb-9068-4b91-9409-0a7ca8a1d291",
                    "ErrorPolicy": "FailOnMatch",
                    "ExecutableAndParams": {
                        "Executable": "cmd.exe",
                        "Parameters": "/q /c msiexec sharepoint.msi"
                    },
                    "ExitCodeRegex": "[1-9][0-9]*",
                    "MaxOutputSize": 1048576,
                    "RebootExitCodeRegex": "{1641}|{3010}|{3011}",
                    "ScriptBlock": null,
                    "ScriptCredential": "username:password",
                    "StandardErrorPath": "c:\err.txt",
                    "StandardErrorRegex": ".+",
                    "StandardInput": null,
                    "StandardOutputPath": "c:\out.txt",
                    "StandardOutputRegex": null,
                    "TimeoutInSeconds": 900,
                    "WorkingDirectory": null
                }
            ]
        }
    }
}

Consulte também

RecursosExtension [SPFSDK][VMROLE]
ApplicationProfile.LinuxApplicationProfile [SPFSDK][VMROLE]
ApplicationProfile.WindowsApplicationProfile [SPFSDK][VMROLE]
RecursosRequirements [SPFSDK][VMROLE]