Skip to content

Conversation

jeanfrancoislarente
Copy link

@jeanfrancoislarente jeanfrancoislarente commented Jun 14, 2018

  • Parameterized WebRoot (to avoid having to change it in multiple locations)

  • Added assets folder and changed paths to point to the new folder (keeps the 9.0.1 Commerce-level folder cleaner)

J.F. Larente added 2 commits June 14, 2018 08:44
…ations)

- Added assets folder and changed paths to point to the new folder (keeps the 9.0.1 Commerce-level  folder cleaner)
@jeanfrancoislarente jeanfrancoislarente changed the title minor parameter improvements minor parameter improvements and ability to download and extract automatically from dev.sitecore.net Jun 14, 2018
@KayeeNL KayeeNL requested review from KayeeNL and asmagin June 15, 2018 05:25
@KayeeNL
Copy link
Collaborator

KayeeNL commented Jun 15, 2018

@jeanfrancoislarente I'm reviewing atm

@KayeeNL KayeeNL added the enhancement New feature or request label Jun 15, 2018
@KayeeNL KayeeNL self-assigned this Jun 15, 2018
$cred = Invoke-FetchSitecoreCredentials
$cookie = Invoke-FetchDownloadAuthentication $cred

Invoke-SitecoreFileDownload -Uri $url -OutputFile $target -Cookies $cookie
Copy link
Owner

@asmagin asmagin Jun 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all Invoke-FetchDownloadAuthentication, Invoke-SitecoreFileDownload
can be replaced with:

$loginRequest = Invoke-RestMethod -Uri https://dev.sitecore.net/api/authorization -Method Post -ContentType "application/json" -Body "{username: '$user', password: '$password'}" -SessionVariable session -UseBasicParsing
Invoke-WebRequest -Uri $package_url -WebSession $session -OutFile $package_zip_path -UseBasicParsing

Using this approach in sitecore-packer
https://github.com/asmagin/sitecore-packer/blob/5af9ed72746d3bb64fe598373594db2eb5458f95/src/components/commerce/chef/cookbooks/scp_commerce/resources/901.rb#L20-L23

SiteHostHeader = $siteHostHeader
SiteInstallDir = "$($Drive)\inetpub\wwwroot\$Prefix.local"
XConnectInstallDir = "$($Drive)\inetpub\wwwroot\$Prefix.xconnect"
SiteInstallDir = "$(Join-Path $WebRoot $Prefix.local)"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to wrap Join-Path in a string interpolation

Write-Host "Saving $netCoreSDKUrl to $netCoreSDKPackageDestination - if required" -ForegroundColor Green
if (!(Test-Path $netCoreSDKPackageDestination)) {
Start-BitsTransfer -source $netCoreSDKUrl -Destination $netCoreSDKPackageDestination
}
Copy link
Collaborator

@KayeeNL KayeeNL Jun 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not take the latest version of the .net core runtime and sdk of 2.1.0? And I think we need to explicitly add something to the readme file that these installers (pre-reqs) need to be installed first before running the deploy script

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't it be installed once you have XP 9 on the machine?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XP 9 doesn't require .NET core, that's why it was part of my XC 9 install.

@KayeeNL KayeeNL assigned asmagin and unassigned KayeeNL Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants