Closed
Bug 1032688
Opened 10 years ago
Closed 10 years ago
Bare Metal Provisioning 2008 Puppet: schedule task to start buildbot on cltbld login
Categories
(Infrastructure & Operations :: RelOps: Puppet, task)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: markco, Assigned: markco)
Details
Will need to export the task from a current machine on the domain and the import through exec command in a manifest. ref: http://technet.microsoft.com/en-us/library/cc709661.aspx
Assignee | ||
Updated•10 years ago
|
Assignee: relops → mcornmesser
Assignee | ||
Comment 1•10 years ago
|
||
Added this to buildslave::startup under the Windows clause: #Bat file to start build bot file { 'C:/mozilla-build/start-buildbot.bat': source => "puppet:///modules/buildslave/start-buildbot.bat", require => Class['packages::mozilla::mozilla_build'], } #XML file to set up a schedule task to to launch build bot on cltbld log in. #XML file needs to exported from the task scheduler gui. Also note when using the XML import be aware of machine specific values such as name will need to be replaced with a variable. #Hence the need for the template. file { 'C:/mozilla-build/startbuild.xml': content => template("buildslave/startbuildbot.xml.erb"), require => Class['packages::mozilla::mozilla_build'], } #Importing the XML file using schtasks #Refrence http://technet.microsoft.com/en-us/library/cc725744.aspx and http://technet.microsoft.com/en-us/library/cc722156.aspx exec { "startbuildbot": creates => 'C:\programdata/PuppetLabs/puppet/var/lib/startbuildbot.txt', command => '"C:\Windows\winsxs\x86_microsoft-windows-sctasks_31bf3856ad364e35_6.1.7601.17514_none_8c46e17f1398738b\schtasks.exe" /Create /XML "C:\mozilla-build\startbuild.xml" /tn StartBuildbot', require => File['C:/mozilla-build/startbuild.xml'], } From the XML template is the replacement of the exact machine name with: <UserId><%= @env_computername %>
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 2•10 years ago
|
||
How does that exec create the file it names? Also, looks like you're mixing forward and backward slashes there -- is that a problem?
Assignee | ||
Comment 3•10 years ago
|
||
Missed a portion in the copy. require => File['C:/mozilla-build/startbuild.xml'], } file { 'C:/programdata/PuppetLabs/puppet/var/lib/startbuildbot.txt': require => Exec["startbuildbot"], content => "Semaphore", } I am using forward slashes specifically in the file resource name as pointed out previously in feedback for the patch attached to 979540. In all other Windows directory paths I use backwards slashes because it requires far less escape characters.
Comment 4•10 years ago
|
||
Ah, that additional bit makes more sense :) I was looking at the backslash in creates => 'C:\programdata/PuppetLabs/puppet/var/lib/startbuildbot.txt',
Assignee | ||
Comment 5•10 years ago
|
||
Ah... I have changed that. I blame late night copy and paste laziness.
You need to log in
before you can comment on or make changes to this bug.
Description
•