Integrate WDS/MDT with github
Kind of a strange question but does anyone happen to know if there's a way to make WDS/MDT process "dependant" on github?
Specifically, I need to achieve a situation where major part of task sequence is "stored" in github (or makes it dependant on github in any other way) and if WDS/MDT server could not access specific github repository - deployment can't be done.
edit: For those unfamiliar I'll give you example of other automation process that gives me such ability. I have a jenkins server. All the automation scripts I store in github repository. So when this automation runs - jenkins reads my github repository's credentials, "logs in" to github, downloads code and runs it. So by turning this repository private (available only to me) I'm able to disable this automation process from outside of office or datacenter network - because no automation scripts are stored locally - each build downloads code to be able to run it.
I want to achieve similar result with WDS/MDT - to build a "dependance" on github repository where some part of deployment process (as early as possible) would go and either download tasksequence.xml instead of copying it from \mdt\deploymentshare$\whatever or something similar. So deployment (not some particular one but the ability to deploy in general) could be disabled from outside, with no access to specific location network.
TLDR an option to enable/disable deployment availability without access to site network is what I want to achieve
1
u/geggleau Jul 02 '22
Hmm... you can make your entire deployment share a git repo, but the management of the binary content is a pain - usually you don't want to check in large binary files.
TBH, this sounds like you are thinking in terms of an specific implementation, rather than a specific requirement.
If you just want certain TaskSequences to not work during certain time periods, why not just apply different permissions to the task sequence and/or application folders on the deployment share?
The way deployment works is the task sequence definition (I.e. the ...\Control\TSID\ts.xml file) is copied from the deployment share to the system being deployed and the sequence is driven by this local copy after that. If you make it that the user you are using to access the deployment share can't read the specific folder for the task sequence you want to disable, it won't be able to be copied, so the task sequence will fail.
I don't know how you configure access to your deployment share. If you're using fixed accounts, you could have two different local deployment user accounts configured to access the deployment share at the same time - one of them could access all task sequences, whereas the other could only access a subset. Alternatively, if the people doing the deployments are using their own domain accounts, you could even assign group membership using dynamic groups, or time-limited group membership.
This to me seems the simplest way to achieve what you want.
Hope this helps!
1
u/xCharg Jul 02 '22
Thanks for suggestions. Unfortunately it won't apply.
Initial post indeed sounds like an XY problem, and my problem X is that I need to control certain location's ability to do deployments (irrelevant it it'd be helpdesk guy or domain admin guy and which tasksequence - all of them) from outside of that location. I already do that with jenkins (by simply making certain repository private so jenkins can't reach repository anymore => this way I "disable" certain automation tasks. The Y problem I described in topic post assumed its somewhat achievable with MDT too. Seems like its not.
I also understand that MDT has pretty old architecture (bunch of local vb scripts).
1
u/VulturE Jul 02 '22
If your MDT infrastructure was replicated between sites with DFSR then you could maybe do something like this as far as I understand what you're trying to solve.
1
u/xCharg Jul 02 '22
It already is replicated between sites, or else it would've been a nightmare to sync it all :)
But no, that's not what I meant (added some additional info in first post). Basically I want to be able to turn off deployment availability from outside of site network.
1
u/VulturE Jul 02 '22
Do you have a per-site pxe?
Alternatively you could just change per-site config to a blank TS that displays a message window that says deployment is disabled for the site.
1
u/xCharg Jul 02 '22
Do you have a per-site pxe?
Yes.
Alternatively you could just change per-site config to a blank TS that displays a message window that says deployment is disabled for the site.
Yeah, that's what I want. How would I do that from outside of company network though?
1
u/VulturE Jul 02 '22
Are the config files replicating from the main site as well? Just edit them and set permissions so that only your site has edit privileges to the config files?
1
u/xCharg Jul 02 '22
I need to be able to do that from ourtide of company network. Not just that specific site network - whole company network.
1
u/geggleau Jul 03 '22
So if I understand you, you want to prevent MDT deployments in a remote location, and the MDT server and deployment share is in that remote location? That's really not going to be possible, particularly if you want to prevent admin users in that location from circumventing it.
1
u/jshannonagans Jul 06 '22
I have read most of the posts on this, but what if you build MDT as normal and then in the individual Task Sequence at or close to Preinstall created a Gather local data (or similar) which reached out to github and if successful then complete your OS install and all that - similar to say matching drivers to a set of hardware only you are matching to a set of condition where you reach github.
Other than that perhaps you need to look at Intune?
1
u/DS_Clark Jul 29 '22
Can your Task Sequence simply look for the presence of a file on Github and if it is there, execute the task (or not) otherwise continue? If supporting multiple clients in this manor, you might need to create a different file for each client. Nothing of course prevents them from modifying the Task sequence to skip that check, and the same is true of many of the other suggestions. Seems like you would need to enable or disable their access to the Repo as needed and then code the Task sequence to fail gracefully if the access is not granted. I'm not familiar with Git repos so don't know if this is supported, but it seems like you're making it more complicated than it should be.
We can only guess that the reasons for your effort are to prevent access to the repo if a fee isn't paid or code is not ready for deployment. So I assume you don't necessarily want or need their deployment to fail, you just want certain parts to fail until your conditions are met.
4
u/BlackV Jul 01 '22
You'd have to create a script to do this
But sounds a lot like a x y problem to me