Idea: Add the profile to the box name.
When using the custom profiles, it would be great that the generated box included the used profile. E.g.:
$ malboxes build win10_32 --profile analyst
$ malboxes build win10_32 --profile test
with either:
$ malboxes spin win10_32_analyst Test.Spin.Analyst
$ malboxes spin win10_32_test Test.Spin.Analyst
or
$ malboxes spin win10_32 --profile analyst Test.Spin.Analyst
$ malboxes spin win10_32 --profile test Test.Spin.Analyst
I already toyed with --profile switch, but this would require some additionnals changes. What do you think ?
I like the idea and I'd prefer the first one personally!
I think a command-line switch to specify the profile is nice. This would decouple a template which is more or less an OS / arch and the stuff you want to do with it.
However, what would a profile change when it's specified at spin time?
Maybe we should do the template thing using packer and the profile thing using Vagrant provisioning. This way we have few base boxes (less disk waste) and more flexibility.
Maybe we should do the template thing using packer and the profile thing using Vagrant provisioning. This way we have few base boxes (less disk waste) and more flexibility.
Yeah, I don't know Vagrant that enough to do it.
I tested a simple approach:
// In config.js
{ "profile": "test1" }
$ malboxes build win10_64_analyst
# Results: a win10_64_analyst_test1 box is built
$ malboxes build win10_64_analyst --profile test2
# Results: a win10_64_analyst_test2 box is built
$ malboxes spin win10_64_analyst Foo
# Uses `win10_64_analyst_test1` as the base box since `"test1"` is the default profile
$ malboxes spin win10_64_analyst Foo --profile test2
# Uses `win10_64_analyst_test2` as the base box
You can take a look at https://github.com/pix/malboxes/tree/profiles (not tested, build in progress). I'll submit a proper pull request once stabilized.