Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove cygwin and openssh builds? #72

Closed
rasa opened this issue Jun 1, 2016 · 13 comments
Closed

Remove cygwin and openssh builds? #72

rasa opened this issue Jun 1, 2016 · 13 comments
Labels
question stale This issue has had no recent or new discussion and will be forcefully closed in 1 month

Comments

@rasa
Copy link
Member

rasa commented Jun 1, 2016

With winrm, we don't need these builds any more, and they just overly complexify things. Also, if a user needs them, we can modify bin/tweak-json.py to regenerate them.

Therefore, I volunteer to remove them. @annawake?

@jebegin
Copy link

jebegin commented Jun 1, 2016

I was unable to make vmware//win7x86-enterprise today. I kept getting an error when the VMware tools were suppose to upload, right after WinRM successfully connected. I tried make clean before trying again and it failed the same way. I then tried make vmware//win7x86-enterprise-ssh and it worked. So removing ssh and cygwin would be removing a quick work around when WinRM is obviously not working right.

@rasa
Copy link
Member Author

rasa commented Jun 1, 2016

I fixed that issue locally, using
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="2048"}

@jebegin
Copy link

jebegin commented Jun 2, 2016

rasa, I'm new to using packer/boxcutter/vagrant/chocolately. I'm currently on a Windows 10 PC using VMware Workstation and I'm not aware of where I would use that winrm set command? Is it something I configure for my Windows environment or for VMware somehow? Does it go into a config file? Thanks.

@jebegin
Copy link

jebegin commented Jun 2, 2016

rasa, never mind, I figured it out.

@Azulinho
Copy link

Azulinho commented Nov 6, 2016

openssh/cygwin builds are pretty useful, for example I use packer/vagrant for running windows builds on remote bare-metal boxes which only have remote access over ssh.

Being able to do ssh into one of those remote vbox builds is priceless.
(ssh -X/vnc/rdp is not an option)

@casept
Copy link

casept commented Jan 12, 2017

This would make the boxes unusable on linux and OSX as these platforms don't have winrm client support in vagrant.

@dragon788
Copy link
Contributor

Linux and OSX had the vagrant-winrm plugin available and I believe in more recent versions the functionality has been rolled into Vagrant proper, so it shouldn't even require a plugin anymore.

@arizvisa
Copy link
Contributor

I'm all for this removal as well.

@arizvisa
Copy link
Contributor

arizvisa commented Jan 5, 2020

It appears that the vote is to not remove these templates.

How about consolidating them? There aren't too many differences between the templates, it might be possible to use something like jq to merge the ssh or cygwin parts into the main template?

If there's no interest in either of the aforementioned solutions, I'll likely close this in a month or so as "wontfix" if nobody has any objections. Let me know.

@dragon788
Copy link
Contributor

Now that Packer supports writing templates in HCL I wonder if there is an option to write them in HCL and do an import or merge on top of a base with the SSH and cygwin functionality and export to JSON. I'd definitely hope to avoid going too crazy with having code that generates templates just to avoid a little bit of repeated code.

@arizvisa
Copy link
Contributor

arizvisa commented Jan 6, 2020

Yeah, agreed on avoiding going crazy with generating templates for everything.

With regards to jq or whatever other mechanism, I was thinking something along the lines of the following...like you can do relatively quick merges like the following to add/replace some fields to an individual builder.

jq '.builders[] |= . + {"communicator":"ssh","ssh_username":"blah","ssh_password":"blah"}' eval-win7x86-enterprise.json

This logic simply adds the communicator, ssh_username, and ssh_password from specified dict into each of the builder elements for a template.

But with regards to integrating this into boxcutter/windows, it'd probably look something more like the following if we've isolated the ssh-specific/cygwin-specific components into their own json. I've been doing this sort of stuff in my own fork of boxcutter/windows to de-vagrantify all of the templates, and to change the default usernames/passwords.

jq --slurpfile builders /path/to/ssh-builders.json --slurpfile provisioners /path/to/ssh-provisioners.json '(.provisioners[].scripts += $provisioners) | (.builders[] |= . + $ssh)' eval-win7x86-enterprise.json

But, to avoid forcing people to have to build these templates themselves (which'd require having jq), we could split up the logic for ssh-ifying (or cygwin-ifying) a template into the makefile, and then have a maintainer just ensure that its part of a pre-commit hook or something similar so that from the users' perspective, nothing appears to have changed.

Re-writing all of the json templates in HCL kind of feels out of scope for this project, especially since its kind-of in "maintenance" mode. It might be better to consider a whole rewrite for non-json templates in some newer project like github.com/boxcutter/windows-ps or something similar

@arizvisa arizvisa added the stale This issue has had no recent or new discussion and will be forcefully closed in 1 month label Jul 19, 2020
@arizvisa
Copy link
Contributor

This issue has had no discussion or input for over 6 months. I've tagged it as stale and as a result this issue will be closed in 1 month.

If you disagree and feel this decision is a mistake, please let me know and I'll remove the label.

@arizvisa
Copy link
Contributor

Closing this issue as it's been stale for over a month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question stale This issue has had no recent or new discussion and will be forcefully closed in 1 month
Projects
None yet
Development

No branches or pull requests

6 participants