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

add step remote upload for iso builder #164

Merged

Conversation

remijouannet
Copy link
Contributor

@remijouannet remijouannet commented Oct 16, 2018

this PR include a step to upload an iso to vpshere for the builder vsphere-iso

I used the generic iso downloader from packer to include it in vpshere-iso
the limitation here is you can't use iso_paths and iso_urls at the same time, because iso_urls overwrite the parameter iso_paths after the iso is upload

the ISO location on the datastore is hardcode to ISO/, the folder is create if not exists

(I misclicked and close #146 by mistake)

@mkuzmin
Copy link
Contributor

mkuzmin commented Oct 18, 2018

related issue #99

@remijouannet
Copy link
Contributor Author

remijouannet commented Oct 18, 2018

to answer the same question

what datastore should the file be uploaded to?
    I use the "datastore" parameter that's already include in this plugin

delete it after a build or not?
    I don't for the moment, i can add a parameter for that if people really need it

how to share the same files between different Packer builds?
    since I can't make a checksum on the datastore, the code only check the filename

will you use such option in your daily production builds or only in demos?
    For production I'm  working on a jenkins pipeline right now for that

@remijouannet
Copy link
Contributor Author

@mkuzmin let me know is there anything wrong with that patch,
I'm currently using a fork of your plugin in production but i'm trying to push every patch

@mkuzmin
Copy link
Contributor

mkuzmin commented Dec 23, 2018

I'm sorry that took so much time on my side again.
If you are still interested in finishing the feature, please rebase it onto master, so PR has just a single commit. Otherwise, I can do it myself.

@remijouannet
Copy link
Contributor Author

No problem, I will rebase it tonight or tomorrow

@mkuzmin
Copy link
Contributor

mkuzmin commented Dec 25, 2018

The branch has a set of merges from 'master', so rebasing is quite complicated.
Here is a good post https://seesparkbox.com/foundry/how_to_not_dread_rebases_when_managing_long_lived_feature_branches

You need to do something like

git checkout 4f952613
git checkout -b upload
git diff HEAD pull/164 >a.diff
git apply a.diff 
git commit

@remijouannet
Copy link
Contributor Author

yeah really sorry, I haven't got the time for the moment to look at your comments, I will try to to work on this merge this week

@remijouannet remijouannet force-pushed the feature-stepremoteupload branch from 9f5c58b to 75387ea Compare December 26, 2018 13:02
@remijouannet
Copy link
Contributor Author

Hi @mkuzmin, I rebased everything and push just one commit, I "almost" solved all comments, tell me if this is OK now

@remijouannet remijouannet force-pushed the feature-stepremoteupload branch from 12eeaf1 to b7feda6 Compare December 26, 2018 14:01
@mkuzmin
Copy link
Contributor

mkuzmin commented Dec 26, 2018

don't mind failed builds. we have network connectivity issues, I'm working on them.

@remijouannet
Copy link
Contributor Author

done

@mkuzmin mkuzmin merged commit 23ce26e into jetbrains-infra:master Jan 4, 2019
@mkuzmin
Copy link
Contributor

mkuzmin commented Jan 4, 2019

Thank you!

@remijouannet
Copy link
Contributor Author

👍

@mkuzmin
Copy link
Contributor

mkuzmin commented Jan 5, 2019

I've tested a mixed set of pre-created and dynamically uploaded ISO images for macOS build (4586e8d), and it actually works!

@remijouannet
Copy link
Contributor Author

glad to hear it :)

@RPitt
Copy link

RPitt commented Jan 9, 2019

Great stuff @mkuzmin

However looking at this it seems to be restricted to uploading/mounting of a single ISO (albeit from multiple sources) ... but doesn't facilitate uploading 2 different ISOs (e.g. Windows setup.ISO + VMWare tools). OR have I misread things?

UPDATE: ah, I now see these seems to be a limitation of packer itself, not the vSphere builder.

@mkuzmin
Copy link
Contributor

mkuzmin commented Jan 9, 2019

That’s correct, multiple URLs for the same image.
This is how the core Packer feature is designed. Inside a plug-in we don’t have any flexibility.

What’s the use case?

@RPitt
Copy link

RPitt commented Jan 10, 2019

Understood, a packer limitation.
The use case I had in mind was VM creation from Windows ISO + VMWare Tools ISO, pretty much like your Windows example.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants