You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Marketplace item generation executable download does not handle disconnected environments #313
I tweaked the code in AzureStack.ComputeAdmin.psm1 to allow you to specify a pre-downloaded Marketplace Item generator package so that you can do an offline install, give it a try.
# Check if we were provided with the MarketPlace Item Generator File
if ( $MarketPlaceZipPath = '' )
{
$maxAttempts = 5
for ($retryAttempts = 1; $retryAttempts -le $maxAttempts; $retryAttempts++) {
try {
Write-Verbose -Message "Downloading Azure Stack Marketplace Item Generator Attempt $retryAttempts" -Verbose
Invoke-WebRequest -Uri http://www.aka.ms/azurestackmarketplaceitem -OutFile "$workdir\MarketplaceItem.zip"
break
}
catch {
if ($retryAttempts -ge $maxAttempts) {
Write-Error "Failed to download Azure Stack Marketplace Item Generator" -ErrorAction Stop
}
755a768,786
else
{
# Copy the provided file into the working directory
if ( Test-Path -Path "$MarketPlaceZipPath" )
{
try {
Write-Verbose -Message "Copying Market Place Item Generator zip file into working directory" -Verbose
copy-item -Path "$MarketPlaceZipPath" -Destination "$workdir\MarketplaceItem.zip"
}
catch
{
Write-Error "Failed to copy Market Place Item Generator zip into working directory: $_" -ErrorAction Stop
}
}
else
{
Write-Error "Provided Market Place Item Generator zip file does not exist" -ErrorAction Stop
}
}
Thanks Anthony Clack (@dfencegit). The AzureStack-Tools repo is a public repo. Anyone with a GitHub account has access to submit a pull request. It would be great if you can do so. Once you have submitted the PR, we'll evaluate it and if approved, we'll merge it.
Activity
MatthewMcGlynn commentedon Aug 23, 2017
A new parameter is needed to ingest the marketplace item packager from a local path
dfencegit commentedon Apr 7, 2018
Hi
I tweaked the code in AzureStack.ComputeAdmin.psm1 to allow you to specify a pre-downloaded Marketplace Item generator package so that you can do an offline install, give it a try.
137a138,140
300c303
< $GalleryItem = CreateGalleryItem -publisher $publisher -offer $offer -sku $sku -version $version -osType $osType -title $title -description $description
473c476,479
< [bool] $Net35 = $true
660c666
< Add-AzsVMImage -sku $sku -osDiskLocalPath $ImagePath @PublishArguments -title "Windows Server 2016 Datacenter Core Eval" -description $description -CreateGalleryItem $CreateGalleryItem
694c700
< Add-AzsVMImage -sku $sku -osDiskLocalPath $ImagePath @PublishArguments -title "Windows Server 2016 Datacenter Eval" -description $description -CreateGalleryItem $CreateGalleryItem
732c738,740
< [string] $Description
742,752c750,764
<
< $maxAttempts = 5
< for ($retryAttempts = 1; $retryAttempts -le $maxAttempts; $retryAttempts++) {
< try {
< Write-Verbose -Message "Downloading Azure Stack Marketplace Item Generator Attempt $retryAttempts" -Verbose
< Invoke-WebRequest -Uri http://www.aka.ms/azurestackmarketplaceitem -OutFile "$workdir\MarketplaceItem.zip"
< break
< }
< catch {
< if ($retryAttempts -ge $maxAttempts) {
< Write-Error "Failed to download Azure Stack Marketplace Item Generator" -ErrorAction Stop
755a768,786
dfencegit commentedon Apr 7, 2018
Sorry, there was an error in that update, new diff attached this time.
AzureStack.ComputeAdmin.psm1.diff.txt
marcvaneijk commentedon Apr 12, 2018
Anthony Clack (@dfencegit), thanks! Since you have the diff, can you open a PR?
dfencegit commentedon Apr 13, 2018
Marc van Eijk (@marcvaneijk) I would happily do that but I dont have access to raise a PR.
marcvaneijk commentedon Apr 26, 2018
Thanks Anthony Clack (@dfencegit). The AzureStack-Tools repo is a public repo. Anyone with a GitHub account has access to submit a pull request. It would be great if you can do so. Once you have submitted the PR, we'll evaluate it and if approved, we'll merge it.