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

Brcampbe/windows dcos #1132

Merged
merged 1 commit into from
Aug 17, 2017
Merged

Conversation

yakman2020
Copy link
Contributor

@yakman2020 yakman2020 commented Jul 28, 2017

What this PR does / why we need it: Support for windows agents for DCOS

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #1078

Special notes for your reviewer: Most changes in the form of new files.

Release note:


This change is Reviewable

@msftclas
Copy link

@yakman2020,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@seanknox
Copy link
Contributor

@acs-bot test this please

Copy link
Contributor

@seanknox seanknox left a comment

Choose a reason for hiding this comment

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

Thanks @yakman2020! This generally looks good. Have a few change requests. My main question is whether this functionality should be in vlabs (not yet the supported by the ACS managed service).

Makefile Outdated
@@ -57,6 +57,8 @@ checksum:
.PHONY: clean
clean:
@rm -rf $(BINDIR) ./_dist
go build -v -gcflags="-N -l" -ldflags="-X github.com/Azure/acs-engine/cmd.BuildSHA=${VERSION} -X github.com/Azure/acs-engine/cmd.BuildTime=${BUILD}"
cd test/acs-engine-test; go build -v
Copy link
Contributor

Choose a reason for hiding this comment

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

make clean should only do that—this logic is already handled in make build.

@@ -0,0 +1,240 @@
{
"apiVersion": "[variables('apiVersionDefault')]",
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is an artifact from a merge conflict, you can delete it.

@@ -0,0 +1,204 @@
{
"apiVersion": "[variables('apiVersionDefault')]",
Copy link
Contributor

Choose a reason for hiding this comment

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

You can delete this file too.

@@ -1,6 +1,5 @@
bootcmd:
- bash -c "if [ ! -f /var/lib/sdb-gpt ];then echo DCOS-5890;parted -s /dev/sdb mklabel
gpt;touch /var/lib/sdb-gpt;fi"
- bash -c "if [ ! -f /var/lib/sdb-gpt ];then echo DCOS-5890;parted -s /dev/sdb mklabel gpt;touch /var/lib/sdb-gpt;fi"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a little harder to grok than the two line version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done as requested.

@@ -0,0 +1,1707 @@
// Code generated by go-bindata.
Copy link
Contributor

Choose a reason for hiding this comment

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

You might be working off of an old branch as pkg/acsengine/templates.go is not checked into source control. Please delete it.

@@ -9,6 +9,7 @@ import (
"github.com/Azure/acs-engine/pkg/api/v20160930"
"github.com/Azure/acs-engine/pkg/api/v20170131"
"github.com/Azure/acs-engine/pkg/api/v20170701"
"github.com/Azure/acs-engine/pkg/api/v20170801"
Copy link
Contributor

Choose a reason for hiding this comment

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

@anhowe Should DCOS Windows support be in vlabs only for now?

@acs-bot
Copy link

acs-bot commented Jul 28, 2017

Can one of the admins verify this patch? Say "@acs-bot test this please" to start tests.

@yakman2020 yakman2020 force-pushed the brcampbe/windows-dcos branch from bc4f900 to 5db9e86 Compare July 28, 2017 16:57
@yakman2020
Copy link
Contributor Author

@acs-bot test this please

@yakman2020 yakman2020 force-pushed the brcampbe/windows-dcos branch 3 times, most recently from d922c64 to 48f1183 Compare July 28, 2017 17:12
@seanknox
Copy link
Contributor

@acs-bot test this please

@yakman2020 yakman2020 force-pushed the brcampbe/windows-dcos branch from 48f1183 to 0f1c833 Compare July 28, 2017 17:28
@seanknox
Copy link
Contributor

seanknox commented Aug 1, 2017

@acs-bot test this please

@seanknox seanknox closed this Aug 1, 2017
@seanknox seanknox reopened this Aug 1, 2017
@ghost ghost assigned seanknox Aug 1, 2017
@ghost ghost added the in progress label Aug 1, 2017
@msftclas
Copy link

msftclas commented Aug 1, 2017

@yakman2020,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@seanknox
Copy link
Contributor

seanknox commented Aug 1, 2017

@acs-bot test this please

@seanknox seanknox requested a review from dmitsh August 1, 2017 03:32
@seanknox
Copy link
Contributor

seanknox commented Aug 1, 2017

@dmitsh believe you're on the docket to help @yakman2020 on this one...CI doesn't seem to be running for this branch, or at least the bot isn't kicking off jobs.

@seanknox seanknox removed their assignment Aug 1, 2017
dmitsh
dmitsh previously requested changes Aug 1, 2017
@@ -0,0 +1 @@
export EXPECTED_NODE_COUNT=2
Copy link

Choose a reason for hiding this comment

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

Why do you need this?
By default we calculate the node count by parsing api model file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the file.

attributeContents := getDCOSAgentCustomNodeLabels(profile)
log.Info("GetDCOSAgentCustomData2\n");
Copy link

Choose a reason for hiding this comment

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

not very descriptive log message

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the log message

@dmitsh dmitsh requested a review from JiangtianLi August 1, 2017 15:14
Copy link
Contributor

@seanknox seanknox left a comment

Choose a reason for hiding this comment

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

Thanks for addressing. Please rebase off of master—we just merged in CircleCI support. Rebasing will kick off a job in CI (which you'll be able to see).

@seanknox seanknox closed this Aug 2, 2017
@seanknox seanknox reopened this Aug 2, 2017
@ghost ghost removed the in progress label Aug 2, 2017
@ghost ghost assigned seanknox Aug 2, 2017
@ghost ghost added the in progress label Aug 2, 2017
@msftclas
Copy link

msftclas commented Aug 2, 2017

@yakman2020,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@yakman2020 yakman2020 force-pushed the brcampbe/windows-dcos branch 10 times, most recently from 57506b1 to c9776eb Compare August 16, 2017 17:00
@seanknox seanknox dismissed stale reviews from dmitsh and themself August 16, 2017 20:58

Addressed

@@ -36,8 +46,15 @@
"masterNSGName": "[concat(variables('orchestratorName'), '-master-nsg-', variables('nameSuffix'))]",
"masterPublicIPAddressName": "[concat(variables('orchestratorName'), '-master-ip-', variables('masterEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]",
"apiVersionStorage": "2015-06-15",
"storageAccountBaseName": "[uniqueString(concat(variables('masterEndpointDNSNamePrefix'),variables('location'),variables('orchestratorName')))]",
"masterStorageAccountExhibitorName": "[concat(variables('storageAccountBaseName'), 'exhb0')]",
{{if .HasWindows}}
Copy link
Member

Choose a reason for hiding this comment

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

These additional windows-specific vars should go inside the existing {{if .HasWindows}} block above. (see line 26)

"{{.Name}}WindowsRDPEndRangeStop": "[add(variables('{{.Name}}WindowsRDPNatRangeStart'), add(variables('{{.Name}}Count'),variables('{{.Name}}Count')))]",
{{end}}
"{{.Name}}windowsAgentCustomScriptArguments": "[concat('$arguments = ', variables('singleQuote'),'-subnet ', variables('{{.Name}}Subnet'), ' -MasterCount ', variables('masterCount'), ' -firstMasterIP ', parameters('firstConsecutiveStaticIP'), ' -bootstrapUri ', '\"', variables('dcosWindowsBootstrapURL'), '\"', ' -isAgent $true -isPublic:$true', variables('singleQuote'),' ; ')]",
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be a windows-only change? (i.e., inside the {{if .IsWindows}} branch)?

"{{.Name}}windowsAgentCustomScriptArguments": "[concat('$arguments = ', variables('singleQuote'),'-subnet ', variables('{{.Name}}Subnet'), ' -MasterCount ', variables('masterCount'), ' -firstMasterIP ', parameters('firstConsecutiveStaticIP'), ' -bootstrapUri ', '\"', variables('dcosWindowsBootstrapURL'), '\"', ' -isAgent $true -isPublic:$true', variables('singleQuote'),' ; ')]",
{{else}}
"{{.Name}}windowsAgentCustomScriptArguments": "[concat('$arguments = ', variables('singleQuote'),'-subnet ', variables('{{.Name}}Subnet'), ' -MasterCount ', variables('masterCount'), ' -firstMasterIP ', parameters('firstConsecutiveStaticIP'), ' -bootstrapUri ', '\"', variables('dcosWindowsBootstrapURL'), '\"', ' -isAgent $true', variables('singleQuote'),' ; ')]",
Copy link
Member

Choose a reason for hiding this comment

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

ditto

"{{.Name}}windowsAgentCustomScriptArguments": "[concat('$arguments = ', variables('singleQuote'),'-subnet ', variables('{{.Name}}Subnet'), ' -MasterCount ', variables('masterCount'), ' -firstMasterIP ', parameters('firstConsecutiveStaticIP'), ' -bootstrapUri ', '\"', variables('dcosWindowsBootstrapURL'), '\"', ' -isAgent $true', variables('singleQuote'),' ; ')]",
{{end}}
"{{.Name}}windowsAgentCustomScript": "[concat('powershell.exe -ExecutionPolicy Unrestricted -command \"', variables('{{.Name}}windowsAgentCustomScriptArguments'), variables('windowsCustomScriptSuffix'), '\" > %SYSTEMDRIVE%\\AzureData\\dcosWindowsProvision.log 2>&1')]",
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@yakman2020 yakman2020 force-pushed the brcampbe/windows-dcos branch from c9776eb to 909916e Compare August 16, 2017 23:18
@yakman2020
Copy link
Contributor Author

Jack's requested changes added

@jackfrancis
Copy link
Member

Thanks for hanging with us, LGTM!

@jackfrancis jackfrancis merged commit 61a2db0 into Azure:master Aug 17, 2017
@ghost ghost removed the in progress label Aug 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add osType=Windows for DC/OS deployment
6 participants