-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
investigate using vSphere API #4526
Comments
➕ 💯 |
+1 I'm currently use the govc cli tools from govmomi project of vmware for two different usage in the shell-local post-processor (modifying the vmx and mark the vm as a template). I wanted to try to create a post-processor for this two action using at least govc (like the vsphere post-processor use ovftool) or better directly the API.
govc also have a debug mode really handy to determine the privileges needed by a command. It could resolve the three issues I have with IT security guys that are not found of the usage of SSH directly to an ESXi and the fact that SSH usage implies a local account with admin role. I can help on testing some ideas if you want. |
I am also interested in helping with this. At a minimum to help with the testing. I would also like to help write the code assuming I can find the time. |
It would also be nice to add a feature to support vCenter content libraries. Content libraries are a new feature starting with vCenter version 6.0. |
Post of @dave2 from #3329 learn me something to be known The API is usable only if you have a paid version of ESXi. I suppose that for most of us that will not be an issue. But some may need to relies on the current implementation. |
I'm trying to mockup a shell mimicking the builder with govc. I have a minimal equivalent |
An other solution is to do as #4591 with a new driver in vmware-common to have ability to start from iso or clone another VM. |
IMHO it's best to create new builders for vsphere, but you can reuse code from |
OK, for information, I've begun to do so. I use some part of #4591 to provide the clone capability. |
Hi there! |
Nice one @LizaTretyakova, any chance of updating the README with some install and usage instructions? |
Have a look at: for some hints on what can possibly be added. I think Ruby usage of API is practically the same. |
Hi again! |
Hi everyone!, I want to share with you a simple vSphere post-processor to be used with vmware-iso builder, this allows to mark a VM as a template (using vmware/govmomi) leaving it in a path of choice, you can find it at this repo |
@bugbuilder how about opening a PR with this. It's one of the most requested features. |
@rickard-von-essen sound great, I'll work on it. |
Hi There is open PR #4882 for remote builds on VMware vSphere.
By coincidence @LizaTretyakova and me started to work on the same task at the same point of time in February-March, and now have another implementation of a vSphere plugin at https://github.com/jetbrains-infra/packer-builder-vsphere/.
At the moment it supports incremental builds only, where a base VM is already pre-created in vSphere by old My nearest priorities are:
@marema31 @mwhooker and @rickard-von-essen In the meantime I welcome everyone to join us, and contribute. Thank you. |
@mkuzmin Thanks for your reasoned summary of the state of things. I will keep that in mind for the future. I don't have the bandwidth to evaluate the two plugins right now, but what you say rings true. I think by default we'll take your advice not to merge for now, and see how things shake out. I would love to be updated when you think your plugin is in a state where it can be merged in. @marema31 I would be happy to get your thoughts as well. I noticed in the other ticket that you're not working on this any more as part of your job, so I'm not sure how much time you still want to dedicate to it. If either of you would like to discuss more in private, please feel free to email [email protected] |
@mkuzmin : You are right on the process I've taken to initialize the builder, it was also the way advised by @rickard-von-essen before on this thread. Since I'm not a seasonned developper, it was the only means for me to provides something that respect the coding philosophy of Packer. I've used the govc solution to quickly validate the architecture of the plugin, the idea was to only have to replace the driver using govc by a driver using the govmomi library (also used by govc). Since PR existed to integrate the govmomi (for post-processors), I was waiting their integration to don't have to go with this integration. @mwhooker, effectively I'm no more using packer full time since I've changed of work. I'm now working for a vSphere-based cloud product team of a cloud provider company, and I'm currently converting them to use this useful tool. I was expecting to have time to rework more on this plugin by the end of the year. To be honnest, I've initiated this plugin because it was something that was missing to facilate the adoption of Packer in my job and to try to give back to the community since I had never contributed on such large codebase. It was not simple for me due to my no knowledge of Golang but the code architecture allow me to have relatively quickly something that do the job. I made the PR to have a first quick review, some thoughts about my proposal and how to make it better and even works with other people on it. By the time, I've delivered it, I had nearly no responses, due to the fact the team was focused on 1.0 and I was waiting my turn. I've also done others PR that was interresting for my job, some were integrated because of their smallest size, some are still opens and wait for review, it's the normal rule and I respect it, the Packer team could not be reviewing and integrating every proposal in the minute they were done. Long story short, I'm trying to contribute with my capacity, but if a better solution is proposed, I'd prefer that the maintainers select it. I will continue to follow the product and propose contribution if I can in my personnal time (therefore slower than before). |
Is there anyone working on a possible builder solution for this? As much as I would love to contribute one, I don't know Go code well enough to write one myself currently. It would be helpful to have a For our use case, we want to automate the rebuild of templates and build new templates from a Kickstart file. Then our "golden images" are two documented text files. And then utilise the Terraform That workflow would simplify the maintenance of VMware images by a large factor, which I imagine would be great news to people having to do this type of work. |
I have proposed a first draft of PR for this (#4591). I was waiting for comments on it. @mkuzmin is willing to provides another solution. I suppose packer could have a such solution in a near future. Just my 2cts, I would love that this proposal ( #5367 (comment) ) could be integrated also in this builder. |
We have a huge progress at https://github.com/jetbrains-infra/packer-builder-vsphere Also, a suite of integration tests is running on a public CI server. |
@mwhooker Hi Matthew I think now we can start a discussion how to merge this builder into Packer repo. |
I will be happy to see this feature merged in packer. |
Hi @mkuzmin, that's awesome! I think the best way to do this would be to open a new PR with this as an added plugin. Like you say, you can do review there. We'll also want to talk about if/how to deprecate the current builder (or parts of it). |
Just my 2cts, be advised that since this plugin use Vsphere API that are available only on licensed ESXi (or in x days trial period), the old plugin may be always interresting for some of the current user. |
Any update when this feature will be merged into packer ? |
@samsanthana I think we're still waiting on marema31 to open a PR |
Hello, Sorry @SwampDragons but I will not open the PR. I had opened a PR for my proof-of-concept plugin to know if I was in the right tracks and asking for help (based on vmware packer plugin code as advised by mainteners and using a command line to interact with vSphere API to prototype) and it was never reviewed because mainteners was busy working on the 1.0. After months mkuzmin commented my PR to explain it was not a good idea to merge it because he was part of a team that were making a better solution (the jetbrain packer plugins for vSphere) and they will create a PR when it will be more finished and tested, I then stop the work on this plugin. One year later, the plugin exist and work well with newer vSphere versions ( we use it at work), on previous post of this issue (on may 23rd), @mkuzmin was willling to be begin the merge, and @mwhooker was proposing to open a new PR, but as far I know the PR is not opened for the moment. Since their solution is effectively more accurate than mine, I've asked Packer maintainers to close my PR. |
Thank you for the explanation, and sorry for pinging you. All of this conversation happened before I joined Packer, so I probably read wrong or messed up names when coming up to speed on the issues. @mkuzmin Are you still interested in opening a PR? |
Any updates @mkuzmin on raising a PR ? If this is a no-go then @SwampDragons can HashiCorp not push ahead with packer vSphere api integration ? |
I'll start roadmap planning assuming that we have to implement our own vSphere builder if we don't manage to get a PR from JetBrains in the next month or so. |
Hello @SwampDragons , if I can help somehow on this process, just tell |
I honestly do not understand all this rush for PRs and official status. 3 years ago Terraform merged immature vSphere provider too early, to boost community activity. We suffer from this decision till today - the tool is overcomplicated and still full of bugs. Anyway, I suppose I don't have this choice anymore, so here is #7168. |
@mkuzmin if you're not ready, that's 100% fine! I am in no rush to actually merge; I just haven't actually heard from you in a while so I wasn't sure if you were even interested in still making a PR eventually. The thing about "official" status is probably important to people because we (HashiCorp engineers) don't put our engineering time into maintaining plugins that aren't part of the Packer repo; I can understand that some people (or their companies) may not want to use a third party plugin. The other problem I think we're facing is that with every release of esxi, VMWare seems bent on making it harder and harder to not use the api bindings, and I'm concerned that we will eventually have to EOL the other VMWare builders. As that time comes closer having some kind of roadmap (even if we're not ready to merge) is probably important so people can figure out what they want to do. Let's plan to leave that PR open and work on it slowly together until you feel completely comfortable with its state. I don't want you to feel pressured or rushed to merge something you're not ready for. |
no rush - community wants this right. The terraform module initial approach was faulty, through 0.4. I think that is acceptable, though not preferable. It's part of learning the space. In early stages of product dev, a pivot is fine pre 1.0. The part that I don't really agree with, in hashicorp's dev cycles, is the main TF project. The .12 release, imho, has had a very tumultuous development cycle. Based on changelog, scope creep is a real problem. I'd recommend they move to clearly defined public PRs, instead of these waves of diffs coming from inside branches. With 220+ PRs and over 1000 issues, I believe they need some refinement in how they manage things. |
What if we do a special build where we submodule the vSphere builder so that folks don't need to deal with independent plugins? Is that the major stumbling block for people using the vSphere builder? |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
There appear to be some limitations with how we work with vSphere, where the solution seems to be using the API directly.
Will use this as a meta-ticket to track the feasibility of that.
The text was updated successfully, but these errors were encountered: