Skip to content

Commit 64db47c

Browse files
authored
Merge develop to master for milestone v0.8
Develop to master for milestone v0.8
2 parents 678c1a7 + be1ebda commit 64db47c

13 files changed

+308
-16
lines changed

CHANGELOG.Examples.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Examples Change log
22

3+
## pre-release v0.8
4+
5+
- GH-45 and GH-46: Azure file and blob storage support.
6+
7+
## pre-release v0.7
8+
9+
- Adjusted based on changes to match to match the main codebase.
10+
311
## pre-release v0.7
412

513
- Adjusted based on changes to match to match the main codebase.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change log
22

3+
## pre-release v0.8
4+
5+
- GH-44: ISHBootstrap is not Set-StrictMode combatible.
6+
- GH-45 and GH-46: Azure file and blob storage support. (Requires [ISHServer](https://github.com/Sarafian/ISHServer) version 1.2)
7+
- GH-48: Allow override of input parameters when installing content manager.
8+
39
## pre-release v0.7
410

511
- Added support for AWS S3 buckets. Requires [ISHServer](https://github.com/Sarafian/ISHServer) version 1.1

Examples/Cmdlets/Get-ISHBootstrapperContextSource.ps1

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ Function Get-ISHBootstrapperContextSource
2222
[Parameter(Mandatory=$false,ParameterSetName="FTP")]
2323
[switch]$FTP,
2424
[Parameter(Mandatory=$false,ParameterSetName="AWS-S3")]
25-
[switch]$AWSS3
25+
[switch]$AWSS3,
26+
[Parameter(Mandatory=$false,ParameterSetName="Azure-FileStorage")]
27+
[switch]$AzureFileStorage,
28+
[Parameter(Mandatory=$false,ParameterSetName="Azure-BlobStorage")]
29+
[switch]$AzureBlobStorage
2630
)
2731
. "$PSScriptRoot\Get-ISHBootstrapperContextValue.ps1"
2832

@@ -86,6 +90,52 @@ Function Get-ISHBootstrapperContextSource
8690
$hash.AntennaHouseLicenseKey=$awsS3Data.AntennaHouseLicenseKey
8791
break
8892
}
93+
'Azure-FileStorage' {
94+
$azureFileStorageData=Get-ISHBootstrapperContextValue -ValuePath "AzureFileStorage" -DefaultValue $null
95+
if(-not $azureFileStorageData)
96+
{
97+
return
98+
}
99+
$hash.ShareName=$azureFileStorageData.ShareName
100+
if($azureFileStorageData.StorageAccountName -and $azureFileStorageData.StorageAccountKey)
101+
{
102+
$hash.StorageAccountName=$azureFileStorageData.StorageAccountName
103+
$hash.StorageAccountKey=$azureFileStorageData.StorageAccountKey
104+
}
105+
else
106+
{
107+
$hash.StorageAccountName=$null
108+
$hash.StorageAccountKey=$null
109+
}
110+
$hash.ISHServerFolderPath=$azureFileStorageData.ISHServerFolderPath
111+
$hash.ISHCDFolderPath=$azureFileStorageData.ISHCDFolderPath
112+
$hash.ISHCDFileName=$azureFileStorageData.ISHCDFileName
113+
$hash.AntennaHouseLicensePath=$azureFileStorageData.AntennaHouseLicensePath
114+
break
115+
}
116+
'Azure-BlobStorage' {
117+
$azureBlobStorageData=Get-ISHBootstrapperContextValue -ValuePath "AzureBlobStorage" -DefaultValue $null
118+
if(-not $azureBlobStorageData)
119+
{
120+
return
121+
}
122+
$hash.ContainerName=$azureBlobStorageData.ContainerName
123+
if($azureBlobStorageData.StorageAccountName -and $azureBlobStorageData.StorageAccountKey)
124+
{
125+
$hash.StorageAccountName=$azureBlobStorageData.StorageAccountName
126+
$hash.StorageAccountKey=$azureBlobStorageData.StorageAccountKey
127+
}
128+
else
129+
{
130+
$hash.StorageAccountName=$null
131+
$hash.StorageAccountKey=$null
132+
}
133+
$hash.ISHServerFolderPath=$azureBlobStorageData.ISHServerFolderPath
134+
$hash.ISHCDFolderPath=$azureBlobStorageData.ISHCDFolderPath
135+
$hash.ISHCDFileName=$azureBlobStorageData.ISHCDFileName
136+
$hash.AntennaHouseLicensePath=$azureBlobStorageData.AntennaHouseLicensePath
137+
break
138+
}
89139
}
90140

91141
New-Object -TypeName PSObject -Property $hash

Examples/Copy-ISHCD.ps1

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ $ishServerVersion=($ishVersion -split "\.")[0]
3939
$unc=Get-ISHBootstrapperContextSource -UNC
4040
$ftp=Get-ISHBootstrapperContextSource -FTP
4141
$awss3=Get-ISHBootstrapperContextSource -AWSS3
42+
$azurefilestorage=Get-ISHBootstrapperContextSource -AzureFileStorage
43+
$azureblobstorage=Get-ISHBootstrapperContextSource -AzureBlobStorage
4244

4345
if($unc)
4446
{
@@ -56,4 +58,13 @@ if($awss3)
5658
$key="$($awss3.ISHCDFolderKey)$($awss3.ISHCDFileName)"
5759
& $scriptsPaths\ISHServer\Copy-ISHCD.ps1 -Computer $computerName -Credential $credential -ISHServerVersion $ishServerVersion -BucketName $awss3.BucketName -Key $key -AccessKey $awss3.AccessKey -SecretKey $awss3.SecretKey
5860
}
59-
61+
if($azurefilestorage)
62+
{
63+
$path="$($azurefilestorage.ISHCDFolderPath)$($azurefilestorage.ISHCDFileName)"
64+
& $scriptsPaths\ISHServer\Copy-ISHCD.ps1 -Computer $computerName -Credential $credential -ISHServerVersion $ishServerVersion -ShareName $azurefilestorage.ShareName -Path $path -StorageAccountName $azurefilestorage.StorageAccountName -StorageAccountKey $azurefilestorage.StorageAccountKey
65+
}
66+
if($azureblobstorage)
67+
{
68+
$path="$($azureblobstorage.ISHCDFolderPath)$($azureblobstorage.ISHCDFileName)"
69+
& $scriptsPaths\ISHServer\Copy-ISHCD.ps1 -Computer $computerName -Credential $credential -ISHServerVersion $ishServerVersion -ContainerName $azureblobstorage.ContainerName -BlobName $path -StorageAccountName $azureblobstorage.StorageAccountName -StorageAccountKey $azureblobstorage.StorageAccountKey
70+
}

Examples/Initialize-ISHServer.ps1

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ if(-not $isSupported)
4747
$unc=Get-ISHBootstrapperContextSource -UNC
4848
$ftp=Get-ISHBootstrapperContextSource -FTP
4949
$awss3=Get-ISHBootstrapperContextSource -AWSS3
50+
$azurefilestorage=Get-ISHBootstrapperContextSource -AzureFileStorage
51+
$azureblobstorage=Get-ISHBootstrapperContextSource -AzureBlobStorage
5052

5153
if($unc)
5254
{
@@ -60,6 +62,14 @@ if($awss3)
6062
{
6163
& $scriptsPaths\ISHServer\Get-ISHServerPrerequisites.ps1 -Computer $computerName -Credential $credential -ISHServerVersion $ishServerVersion -BucketName $awss3.BucketName -FolderKey $awss3.ISHServerFolderKey -AccessKey $awss3.AccessKey -SecretKey $awss3.SecretKey
6264
}
65+
if($azurefilestorage)
66+
{
67+
& $scriptsPaths\ISHServer\Get-ISHServerPrerequisites.ps1 -Computer $computerName -Credential $credential -ISHServerVersion $ishServerVersion -ShareName $azurefilestorage.ShareName -FolderPath $azurefilestorage.ISHServerFolderPath -StorageAccountName $azurefilestorage.StorageAccountName -StorageAccountKey $azurefilestorage.StorageAccountKey
68+
}
69+
if($azureblobstorage)
70+
{
71+
& $scriptsPaths\ISHServer\Get-ISHServerPrerequisites.ps1 -Computer $computerName -Credential $credential -ISHServerVersion $ishServerVersion -ContainerName $azureblobstorage.ContainerName -FolderPath $azureblobstorage.ISHServerFolderPath -StorageAccountName $azureblobstorage.StorageAccountName -StorageAccountKey $azureblobstorage.StorageAccountKey
72+
}
6373

6474
& $scriptsPaths\ISHServer\Install-ISHServerPrerequisites.ps1 -Computer $computerName -Credential $credential -ISHServerVersion $ishServerVersion -InstallOracle:$installOracle -InstallMSXML4:$installMSXML
6575

@@ -88,7 +98,7 @@ if($computerName)
8898
else
8999
{
90100
& $scriptsPaths\ISHServer\Initialize-ISHServerOSUser.ps1 -ISHServerVersion $ishServerVersion -OSUser ($osUserCredential.UserName)
91-
Write-Warning "Cannot execute $scriptsPaths\ISHServer\Initialize-ISHServerOSUserRegion.ps1 locally."
101+
& $scriptsPaths\ISHServer\Initialize-ISHServerOSUserRegion.ps1 -OSUserCredential $osUserCredential -ISHServerVersion $ishServerVersion
92102
}
93103

94104
$webCertificate=Get-ISHBootstrapperContextValue -ValuePath "WebCertificate"
@@ -170,6 +180,23 @@ if($awss3)
170180
}
171181
}
172182

183+
if($azurefilestorage)
184+
{
185+
if($azurefilestorage.AntennaHouseLicenseKey)
186+
{
187+
& $scriptsPaths\ISHServer\Set-ISHAntennaHouseLicense.ps1 -Computer $computerName -Credential $credential -ISHServerVersion $ishServerVersion -ShareName $azurefilestorage.ShareName -Path $azureblobstorage.AntennaHouseLicenseKey -StorageAccountName $azurefilestorage.StorageAccountName -StorageAccountKey $azurefilestorage.StorageAccountKey
188+
}
189+
}
190+
191+
if($azureblobstorage)
192+
{
193+
if($azureblobstorage.AntennaHouseLicenseKey)
194+
{
195+
& $scriptsPaths\ISHServer\Set-ISHAntennaHouseLicense.ps1 -Computer $computerName -Credential $credential -ISHServerVersion $ishServerVersion -ContainerName $azureblobstorage.ContainerName -BlobName $azureblobstorage.AntennaHouseLicenseKey -StorageAccountName $azureblobstorage.StorageAccountName -StorageAccountKey $azureblobstorage.StorageAccountKey
196+
}
197+
}
198+
199+
173200
if($computerName)
174201
{
175202
& $scriptsPaths\Helpers\Restart-Server.ps1 -Computer $computerName -Credential $credential

Examples/Install-Module.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ try
4747

4848
$scope=Get-ISHBootstrapperContextValue -ValuePath "InstallModuleScope" -DefaultValue "AllUsers"
4949

50-
& $scriptsPaths\PowerShellGet\Install-Module.ps1 -Computer $computerName -Credential $credential -ModuleName @("CertificatePS","PSFTP","AWSPowerShell") -Repository PSGallery -Scope:$scope
50+
& $scriptsPaths\PowerShellGet\Install-Module.ps1 -Computer $computerName -Credential $credential -ModuleName @("CertificatePS","PSFTP","AWSPowerShell", "Azure.Storage") -Repository PSGallery -Scope:$scope
5151
& $scriptsPaths\PowerShellGet\Install-Module.ps1 -Computer $computerName -Credential $credential -ModuleName $ishServerModuleName -Repository $ishServerRepository -Scope:$scope
5252
& $scriptsPaths\PowerShellGet\Install-Module.ps1 -Computer $computerName -Credential $credential -ModuleName $ishDeployModuleName -Repository $ishDeployRepository -Scope:$scope
5353
}

Source/Scripts/ISHServer/Copy-ISHCD.ps1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,22 @@ param (
4646
[string]$SecretKey,
4747
[Parameter(Mandatory=$false,ParameterSetName="From AWS S3")]
4848
[string]$SessionToken,
49+
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
50+
[string]$ShareName,
51+
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
52+
[ValidatePattern(".+\.[0-9]+\.0\.[0-9]+\.[0-9]+.*\.exe")]
53+
[string]$Path,
54+
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
55+
[string]$ContainerName,
56+
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
57+
[ValidatePattern(".+\.[0-9]+\.0\.[0-9]+\.[0-9]+.*\.exe")]
58+
[string]$BlobName,
59+
[Parameter(Mandatory=$false,ParameterSetName="From Azure FileStorage")]
60+
[Parameter(Mandatory=$false,ParameterSetName="From Azure BlobStorage")]
61+
[string]$StorageAccountName,
62+
[Parameter(Mandatory=$false,ParameterSetName="From Azure FileStorage")]
63+
[parameter(ParameterSetName="From Azure BlobStorage")]
64+
[string]$StorageAccountKey,
4965
[Parameter(Mandatory=$true,ParameterSetName="From UNC")]
5066
[string]$FilePath
5167
)
@@ -83,6 +99,14 @@ try
8399
Get-ISHCD -BucketName $BucketName -Key $Key -Expand -AccessKey $AccessKey -ProfileName $ProfileName -ProfileLocation $ProfileLocation -Region $Region -SecretKey $SecretKey -SessionToken $SessionToken
84100
break
85101
}
102+
'From Azure FileStorage' {
103+
Get-ISHCD -ShareName $ShareName -Path $Path -Expand -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
104+
break
105+
}
106+
'From Azure BlobStorage' {
107+
Get-ISHCD -ContainerName $ContainerName -BlobName $BlobName -Expand -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
108+
break
109+
}
86110
'From UNC' {
87111
if($Computer)
88112
{

Source/Scripts/ISHServer/Get-ISHServerPrerequisites.ps1

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,20 @@ param (
4343
[Parameter(Mandatory=$false,ParameterSetName="From AWS S3")]
4444
[string]$SecretKey,
4545
[Parameter(Mandatory=$false,ParameterSetName="From AWS S3")]
46-
[string]$SessionToken
46+
[string]$SessionToken,
47+
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
48+
[string]$ShareName,
49+
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
50+
[string]$ContainerName,
51+
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
52+
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
53+
[string]$FolderPath,
54+
[Parameter(Mandatory=$false,ParameterSetName="From Azure FileStorage")]
55+
[Parameter(Mandatory=$false,ParameterSetName="From Azure BlobStorage")]
56+
[string]$StorageAccountName,
57+
[Parameter(Mandatory=$false,ParameterSetName="From Azure FileStorage")]
58+
[Parameter(Mandatory=$false,ParameterSetName="From Azure BlobStorage")]
59+
[string]$StorageAccountKey
4760
)
4861
$cmdletsPaths="$PSScriptRoot\..\..\Cmdlets"
4962

@@ -78,6 +91,14 @@ try
7891
Get-ISHPrerequisites -BucketName $BucketName -FolderKey $FolderKey -AccessKey $AccessKey -ProfileName $ProfileName -ProfileLocation $ProfileLocation -Region $Region -SecretKey $SecretKey -SessionToken $SessionToken
7992
break
8093
}
94+
'From Azure FileStorage' {
95+
Get-ISHPrerequisites -ShareName $ShareName -FolderPath $FolderPath -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
96+
break
97+
}
98+
'From Azure BlobStorage' {
99+
Get-ISHPrerequisites -ContainerName $ContainerName -FolderPath $FolderPath -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
100+
break
101+
}
81102
}
82103

83104

Source/Scripts/ISHServer/Initialize-ISHServerOSUser.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ try
6565
}
6666
$remote=Add-ModuleFromRemote -Session $session -Name $ishServerModuleName
6767
}
68+
else
69+
{
70+
$session=$null
71+
}
6872

6973
Write-Progress @scriptProgress -Status "Initializing $OSUser"
7074
Initialize-ISHUser -OSUser $OSUser

Source/Scripts/ISHServer/Initialize-ISHServerOSUserRegion.ps1

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#>
1616

1717
param (
18-
[Parameter(Mandatory=$true)]
18+
[Parameter(Mandatory=$false)]
1919
[string]$Computer,
2020
[Parameter(Mandatory=$true)]
2121
[PSCredential]$OSUserCredential,
@@ -46,10 +46,25 @@ try
4646
$ishServerModuleName="ISHServer.$ISHServerVersion"
4747
$session=New-PSSession -ComputerName $Computer -Credential $OSUserCredential
4848
$remote=Add-ModuleFromRemote -Session $session -Name $ishServerModuleName
49+
50+
Write-Progress @scriptProgress -Status "Initializing regional settings"
51+
Initialize-ISHRegional
52+
}
53+
else
54+
{
55+
$session=$null
56+
57+
Write-Progress @scriptProgress -Status "Initializing regional settings"
58+
# Initialize-ISHRegional needs to execute from the osuser's context.
59+
$arguments=@(
60+
"-Command"
61+
"Initialize-ISHRegional"
62+
)
63+
$powerShellPath=& C:\Windows\System32\where.exe powershell
64+
65+
Start-Process -FilePath $powerShellPath -ArgumentList $arguments -Credential $OSUserCredential -LoadUserProfile -NoNewWindow -Wait
4966
}
5067

51-
Write-Progress @scriptProgress -Status "Initializing regional settings"
52-
Initialize-ISHRegional
5368
}
5469

5570
finally

0 commit comments

Comments
 (0)