ResourceExtension [SPFSDK][VMROLE]
적용 대상: Windows Azure Pack
리소스 확장은 리소스 정의에서 설명하는 리소스 내에서 리소스를 설치하고 구성하는 방법을 설명하는 버전이 지정된 템플릿입니다.
형식 계층 구조
ResourceExtension
구문
{
"SchemaVersion": "1.0",
"Name": "string",
"Version": "string in version format",
"Publisher": "string",
"ExtensionType" : "Microsoft.Compute/EnterpiseApplicationExtension/1.0",
"DataPackage": {
"Version": "1.0.0.0",
"Location": "MyTemplatePayload",
"ExternalPayload": [
{
"RelativePath": "string",
"Hash": "string",
"URLHint": "string"
}
]
},
"ResourceExtensionParameters": { <ResourceExtensionParameters> },
"ResourceRequirements": { <ResourceRequirements> },
"ExtensionSettings": {
"ApplicationProfile": { <ApplicationProfile> }
}
}
속성
이름 |
유형 |
필수 |
기본값 |
Description |
---|---|---|---|---|
schemaVersion |
String |
예 |
없음 |
리소스 확장 스키마의 버전입니다. 항상 1.0으로 설정해야 합니다. |
Name |
String |
예 |
없음 |
이 리소스 확장의 이름입니다. |
버전 |
String |
예 |
없음 |
리소스 확장의 버전입니다. 버전 형식은 주> 형식입니다<.< minor>.< 빌드합니다>.< 릴리스.> 예를 들어 6.33.2.10입니다. |
Publisher |
String |
예 |
None |
리소스 확장의 게시자입니다. |
ExtensionType |
String |
예 |
없음 |
이 리소스 확장을 호스트하는 계약의 이름입니다. 이 리소스 확장을 지원할 수 있는 리소스를 식별합니다. Microsoft.Compute/EnterpiseApplicationExtension/1.0으로 설정해야 합니다. |
DataPackage |
DataPackage |
아니요 |
null |
패키지에서 사용되는 페이로드의 위치입니다. |
ResourceExtensionParameters |
아니요 |
null |
리소스 확장에 의해 선언된 매개 변수의 배열입니다. |
|
ResourceRequirements |
아니요 |
null |
리소스 확장의 리소스에 대한 요구 사항입니다. |
|
ExtensionSettings |
예 |
없음 |
호스팅 가상 머신에 대한 애플리케이션 및 게스트 내 구성입니다. |
DataPackage
이름 |
유형 |
필수 |
기본값 |
Description |
---|---|---|---|---|
버전 |
String |
예 |
없음 |
데이터 패키지의 버전입니다. 버전 형식은 주> 형식입니다<.< minor>.< 빌드합니다>.< 릴리스.> 예를 들어 6.33.2.10입니다. |
위치 |
String |
예 |
없음 |
확장 페이로드를 포함하는 리소스 확장 패키지 보관 내의 상대 경로입니다. |
ExternalPayload |
ExternalPayload의 배열 |
예 |
None |
리소스 확장 패키지 보관의 일부로 재배포되지 않는 리소스 확장에 필요한 파일입니다. |
ExternalPayload
이름 |
유형 |
필수 |
기본값 |
Description |
---|---|---|---|---|
RelativePath |
String |
예 |
없음 |
파일이 있는 리소스 확장 패키지의 상대 경로입니다. |
Hash |
String |
예 |
None |
외부 페이로드 파일의 SHA256 해시입니다. |
URLHint |
String |
예 |
None |
외부 페이로드 파일을 다운로드하는 데 사용할 수 있는 URL입니다. |
설명
다음 코드 예제에서는 샘플 ResourceExtension 개체를 제공합니다.
{
"Name": "MyVirtualMachineRoleExtension",
"Version": "Version of the resource extension",
"Publisher": "Publisher of Extension",
"SchemaVersion": "1.0",
"ExtensionType": "Microsoft.Compute/ EnterpiseApplicationExtension/1.0",
"DataPackage": {
"Version": "1.0.0.0",
"Location": "MyTemplatePayload",
"ExternalPayload": [
{
"RelativePath": "sharepoint.msi",
"Hash": "...",
"URLHint": "http://<webpage-to-download-sharepoint>"
}
]
},
"ResourceExtensionParameters": [
{
"Name": "SQLInstance",
"Type": "string",
"Description": "my description"
},
{
"Name": "ConnectionString",
"Type": "string",
"Description": "my description"
},
{
"Name": "SharepointDB",
"Type": "string",
"Description": "my description"
}
],
"ResourceRequirements": {
"OSVirtualHardDiskRequirements": [
"WS2008",
"SysprepSQL"
],
},
"ExtensionSettings": {
"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
}
]
}
}
}
}
참고 항목
VM 역할 JSON 참조 [SPFSDK][VMROLE]
VirtualMachineRole(인스턴스) [SPFSDK][VMROLE]
ResourceDefinition [SPFSDK][VMROLE]
ResourceConfiguration [SPFSDK][VMROLE]
매개 변수 및 형식 [SPFSDK][VMROLE]
ResourceRequirements [SPFSDK][VMROLE]
ExtensionSettings [SPFSDK][VMROLE]