Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

DCOS: use CDN to host Windows bootstrap binaries #3244

Merged
merged 2 commits into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion parts/dcos/dcosWindowsProvision.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Get-BootstrapScript($download_uri, $download_dir)
# Get Mesos Binaries
$scriptfile = "DCOSWindowsAgentSetup.ps1"

Write-Log " get script "+ ($download_uri+"/"+$scriptfile) + "and put it "+ ($download_dir+"\"+$scriptfile)
Write-Log "get script $download_uri/$scriptfile and put it $download_dir\$scriptfile"

Invoke-WebRequest -Uri ($download_uri+"/"+$scriptfile) -OutFile ($download_dir+"\"+$scriptfile)
}
Expand Down Expand Up @@ -193,6 +193,7 @@ try
$run_cmd += ">"+$global:BootstrapInstallDir+"\DCOSWindowsAgentSetup.log 2>&1"
Write-Log "run setup script $run_cmd"
Invoke-Expression $run_cmd
Write-Log "setup script completed"
}
else # We must be deploying a master
{
Expand All @@ -202,9 +203,12 @@ try
}

PREPROVISION_EXTENSION

Write-Log "Provisioning script succeeded"
}
catch
{
Write-Log "Provisioning script failed"
Write-Error $_
exit 1
}
3 changes: 0 additions & 3 deletions pkg/acsengine/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,6 @@ func setOrchestratorDefaults(cs *api.ContainerService) {
if o.DcosConfig == nil {
o.DcosConfig = &api.DcosConfig{}
}
if o.DcosConfig.DcosWindowsBootstrapURL == "" {
o.DcosConfig.DcosWindowsBootstrapURL = DefaultDCOSSpecConfig.DCOSWindowsBootstrapDownloadURL
}
dcosSemVer, _ := semver.Make(o.OrchestratorVersion)
dcosBootstrapSemVer, _ := semver.Make(common.DCOSVersion1Dot11Dot0)
if !dcosSemVer.LT(dcosBootstrapSemVer) {
Expand Down
12 changes: 12 additions & 0 deletions pkg/acsengine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,18 @@ func getDCOSDefaultBootstrapInstallerURL(profile *api.OrchestratorProfile) strin
return ""
}

func getDCOSDefaultWindowsBootstrapInstallerURL(profile *api.OrchestratorProfile) string {
if profile.OrchestratorType == api.DCOS {
switch profile.OrchestratorVersion {
case common.DCOSVersion1Dot11Dot2:
return "https://dcos-mirror.azureedge.net/dcos-windows/1-11-2"
case common.DCOSVersion1Dot11Dot0:
return "https://dcos-mirror.azureedge.net/dcos-windows/1-11-0"
}
}
return ""
}

func getDCOSDefaultProviderPackageGUID(orchestratorType string, orchestratorVersion string, masterCount int) string {
if orchestratorType == api.DCOS {
switch orchestratorVersion {
Expand Down
1 change: 1 addition & 0 deletions pkg/acsengine/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func getParameters(cs *api.ContainerService, isClassicMode bool, generatorCode s
dcosBootstrapURL = cloudSpecConfig.DCOSSpecConfig.DCOS110BootstrapDownloadURL
default:
dcosBootstrapURL = getDCOSDefaultBootstrapInstallerURL(properties.OrchestratorProfile)
dcosWindowsBootstrapURL = getDCOSDefaultWindowsBootstrapInstallerURL(properties.OrchestratorProfile)
}
}

Expand Down