You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2016/07/08 18:48:45 UTC
[1/2] brooklyn-library git commit: MSSQL installmssql refactoring
Repository: brooklyn-library
Updated Branches:
refs/heads/master e1db211fb -> 10fbecdc0
MSSQL installmssql refactoring
- Use external brooklyn-invoke-command-credssp
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/376b24b6
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/376b24b6
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/376b24b6
Branch: refs/heads/master
Commit: 376b24b66510e83f094dda82b94e612e86943852
Parents: 7ceb3c2
Author: Valentin Aitken <bo...@gmail.com>
Authored: Wed May 25 23:24:41 2016 +0300
Committer: Valentin Aitken <bo...@gmail.com>
Committed: Tue Jun 28 08:27:30 2016 +0300
----------------------------------------------------------------------
.../entity/database/mssql/installmssql.ps1 | 20 ++++----------------
.../brooklyn/entity/database/mssql/mssql.yaml | 6 ++----
2 files changed, 6 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/376b24b6/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
----------------------------------------------------------------------
diff --git a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1 b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
index 7777a22..e62bb26 100644
--- a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
+++ b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
@@ -28,11 +28,7 @@ New-Item -ItemType Directory -Force -Path "C:\Program Files (x86)\Microsoft SQL
New-Item -ItemType Directory -Force -Path "C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\WorkingDir"
$operationResult = Install-WindowsFeature NET-Framework-Core
-if (-Not $operationResult.Success) { exit 1 }
-
-$pass = '${attribute['windows.password']}'
-
-$exitCode = 1
+if (-Not $operationResult.Success) { exit 2 }
Try {
$WebClient = New-Object System.Net.WebClient
@@ -42,18 +38,10 @@ Try {
$mountResult = Mount-DiskImage $Path -PassThru
$driveLetter = (($mountResult | Get-Volume).DriveLetter) + ":\"
- $secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force
- $mycreds = New-Object System.Management.Automation.PSCredential ($($env:COMPUTERNAME + "\${location.user}"), $secpasswd)
-
- $exitCode = Invoke-Command -ComputerName $env:COMPUTERNAME -Credential $mycreds -ScriptBlock {
- param($driveLetter)
- $process = Start-Process ( $driveLetter + "setup.exe") -ArgumentList "/ConfigurationFile=C:\ConfigurationFile.ini" -RedirectStandardOutput "C:\sqlout.txt" -RedirectStandardError "C:\sqlerr.txt" -Wait -PassThru -NoNewWindow
- $process.ExitCode
- } -Authentication CredSSP -ArgumentList $driveLetter
-
+ C:\invoke-command-credssp.ps1 -Command ( $driveLetter + "setup.exe") -ArgumentList "/ConfigurationFile=C:\ConfigurationFile.ini" -LogOutputInFile
+ exit $LastExitCode
} Catch {
Write-Error $_.Exception
Write-Host 'Exception logged'
- exit 1
+ exit 3
}
-exit $exitCode
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/376b24b6/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
----------------------------------------------------------------------
diff --git a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
index d9f2a32..dbc5fc2 100644
--- a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
+++ b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
@@ -7,15 +7,13 @@ location:
hardwareId: m3.medium
useJcloudsSshInit: false
templateOptions:
- subnetId: subnet-a10e96c4
- securityGroupIds: [['sg-a2d0c2c7']]
mapNewVolumeToDeviceName: ["/dev/sda1", 60, true]
-
services:
- type: org.apache.brooklyn.entity.software.base.VanillaWindowsProcess
brooklyn.config:
templates.install:
- classpath://org/apache/brooklyn/software/base/custom-enable-credssp.ps1: "C:\\custom-enable-credssp.ps1"
+ classpath://org/apache/brooklyn/software/winrm/utils/enable-credssp.ps1: "C:\\enable-credssp.ps1"
+ classpath://org/apache/brooklyn/software/winrm/utils/brooklyn-invoke-command-credssp.ps1: "C:\\brooklyn-invoke-command-credssp.ps1"
classpath://org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini: "C:\\ConfigurationFile.ini"
classpath://org/apache/brooklyn/entity/database/mssql/installmssql.ps1: "C:\\installmssql.ps1"
classpath://org/apache/brooklyn/entity/database/mssql/configuremssql.ps1: "C:\\configuremssql.ps1"
[2/2] brooklyn-library git commit: This closes #40
Posted by al...@apache.org.
This closes #40
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/10fbecdc
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/10fbecdc
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/10fbecdc
Branch: refs/heads/master
Commit: 10fbecdc0a456f7b0a1cda72e045e27e2f5c9baf
Parents: e1db211 376b24b
Author: Aled Sage <al...@gmail.com>
Authored: Fri Jul 8 19:48:32 2016 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Fri Jul 8 19:48:32 2016 +0100
----------------------------------------------------------------------
.../entity/database/mssql/installmssql.ps1 | 20 ++++----------------
.../brooklyn/entity/database/mssql/mssql.yaml | 6 ++----
2 files changed, 6 insertions(+), 20 deletions(-)
----------------------------------------------------------------------