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

Idea: Add the profile to the box name. #77

Open
pix opened this issue Sep 7, 2017 · 4 comments
Open

Idea: Add the profile to the box name. #77

pix opened this issue Sep 7, 2017 · 4 comments

Comments

@pix
Copy link
Contributor

pix commented Sep 7, 2017

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 ?

@Svieg
Copy link
Collaborator

Svieg commented Sep 7, 2017

I like the idea and I'd prefer the first one personally!

@obilodeau
Copy link
Contributor

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.

@obilodeau obilodeau mentioned this issue Sep 7, 2017
@pix
Copy link
Contributor Author

pix commented Sep 8, 2017

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

@pix
Copy link
Contributor Author

pix commented Sep 8, 2017

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.

@pix pix mentioned this issue Sep 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants