Closed osallou closed 11 years ago
I like the general idea of this. Though I would prefer making plugins so easy to code that people use them instead of scripts I can see how this is easier when doing a "quick test/debug" or one has a rather large script that may not be made specifically for the bootstrapper.
I added comments directly in the code. Maybe one way of running external commands would be enough. After all, it is quite easy to create a command which runs a script, so the second option is kind of superfluous.
Instead of running the command directly in chroot, how about letting the user decide where to run it? This would give him the option to maybe copy data from the host machine. Also: What about variables? Check out my AMIName task. It replaces any variables in the AMI name with actual values. Date, time and arch may not make much sense, but mount_dir, device_path etc. do, they can be used as parameters in the command.
Le 9 sept. 2013 00:17, "Anders Ingemann" notifications@github.com a écrit :
I like the general idea of this. Though I would prefer making plugins so easy to code that people use them instead of scripts I can see how this is easier when doing a "quick test/debug" or one has a rather large script that may not be made specifically for the bootstrapper.
I added comments directly in the code.
Thanks I gonna look those
Maybe one way of running external commands would be enough. After all, it is quite easy to create a command which runs a script, so the second option is kind of superfluous.
Depending on script complexity, it may be complex to go only with commands, especially with conditons or loops.
Instead of running the command directly in chroot, how about letting the user decide where to run it? This would give him the option to maybe copy data from the host machine.
Why not indeed, I will think about this
Also: What about variables? Check out my AMIName task. It replaces any variables in the AMI name with actual values. Date, time and arch may not make much sense, but mount_dir, device_path etc. do, they can be used as parameters in the command.
I will have a look
— Reply to this email directly or view it on GitHub.
Depending on script complexity, it may be complex to go only with commands, especially with conditons or loops.
Agreed, but what you do in the script task is to simply invoke the script, that can just as easily be done with the command task (and on top of that you get the option to specify your own parameters to the script).
2013/9/9 Anders Ingemann notifications@github.com
Depending on script complexity, it may be complex to go only with commands, especially with conditons or loops.
Agreed, but what you do in the script task is to simply invoke the script, that can just as easily be done with the command task (and on top of that you get the option to specify your own parameters to the script).
oh, ok, I understand what you mean
Olivier
— Reply to this email directly or view it on GitHubhttps://github.com/andsens/build-debian-cloud/pull/95#issuecomment-24049875 .
gpg key id: 4096R/326D8438 (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438
I have remove scripts and kept commands only (and used your suggestions). commands can include some variables to be used in command (only a few for the moment, we could add others later on). command is executed in user context to allow copies to image etc...
I made updates according o your commands
This is beginning to look really good! Maybe you could rebase it all into one commit?
I made modifications for manifest and add a different commit to fix a missing package in kvm and virtualbox providers.
I tried to make a rebase, that worked fine locally (to group plugin commits), but it seems to fail when I pushed to github repo. I have my commit with everything, but I still see the individual commits before... :-( I don't know what I should do here with git.
Well, you rebased, sooo.. git push -f
?
Anders
On 9 September 2013 20:49, Olivier Sallou notifications@github.com wrote:
I made modifications for manifest and add a different commit to fix a missing package in kvm and virtualbox providers.
I tried to make a rebase, that worked fine locally (to group plugin commits), but it seems to fail when I pushed to github repo. I have my commit with everything, but I still see the individual commits before... :-( I don't know what I should do here with git.
— Reply to this email directly or view it on GitHubhttps://github.com/andsens/build-debian-cloud/pull/95#issuecomment-24104552 .
thanks, I am not used to use rebase....
I mixed the commits related to plugin and kept separate commit for kpartx
This is looking great! Normally you'd separate the two fixes in different pull requests but this is fine. If you could just fix the indentation issue I'll merge :-) (it's thoroughly tested, right? My setup is broken right now.)
where do you have indent issue ? I had to work on 2 different systems (one that manage indent for python, not the other...).
I tested the plugin on my server.
2013/9/9 Anders Ingemann notifications@github.com
This is looking great! Normally you'd separate the two fixes in different pull requests but this is fine. If you could just fix the indentation issue I'll merge :-) (it's thoroughly tested, right? My setup is broken right now.)
— Reply to this email directly or view it on GitHubhttps://github.com/andsens/build-debian-cloud/pull/95#issuecomment-24110626 .
gpg key id: 4096R/326D8438 (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438
I had not seen the indent message in the code. I fixed it with a new rebase.
Great stuff! Merging...
Hi, here is a new plugin proposal. It helps the user to execute some commands or some local scripts in the image. This is helpful to customize the image with custom commands/scripts.
Olivier