Are there any wildcards for the "only" or "except" configurations?

閲覧: 50 回
最初の未読メッセージにスキップ

Evans Tucker

未読、
2016/10/11 16:29:122016/10/11
To: Packer
For example:


{
  "builders": [
    {
      "type": "virtualbox-iso",
      "name": "centos-awsaccount1",
      ...
    },

    {
      "type": "virtualbox-iso",
      "name": "centos-awsaccount2",
      ...
    },

    {
      "type": "virtualbox-iso",
      "name": "ubuntu-awsaccount1",
      ...
    },

    {
      "type": "virtualbox-iso",
      "name": "ubuntu-awsaccount2",
      ...
    }

  ]

  "post-processors": [
    {
      "type": "amazon-import",
      ...
      "only": "*-awsaccount1"
    },
    {
      "type": "amazon-import",
      ...
      "only": "*-awsaccount2"
    }
  ]
}

Alvaro Miranda Aguilera

未読、
2016/10/11 17:01:112016/10/11
To: packe...@googlegroups.com
hello

no that I am aware of.

The idea of having multiple  builders is all of those will end with the same machine, so should be 1 machine per template.

imagine you have virtualbox, vmware and aws.

by default those will run in parallel

so the options are, no-parallel, or --only aws

but not something like --only v*

Alvaro.

Evans Tucker

未読、
2016/10/11 17:16:312016/10/11
To: packe...@googlegroups.com
Ah, OK. I was using multiple virtualbox-iso builders, running a variety of provisioners to customize the images with various packages and config files, then sending them to a single amazon-import post-processor... which then turned into multiple amazon-import post-processors because we now have multiple accounts. The end result was that I could issue one command to build everything with a template that had minimal duplication of code... but I can split it up easily enough. :D Thanks!

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/muY54RK6KB8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHqq0ezjDfh6Ax6YOFgPyi%2BUTs-izGV_icadw6HByw70hHzcBg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Alvaro Miranda Aguilera

未読、
2016/10/11 17:47:482016/10/11
To: packe...@googlegroups.com
Hello

As usual, you are free to use the tool in the best way that helps in your workflow. :)

But generally speaking, the idea was to have something like this:


builder
  virtualbox-iso
  vmware-iso

provisioner
  common_to_both
  only: virtualbox-iso something_only_for_virtualbox (ie vbox additions)
  only: vmware-iso something_only_for_vmware (ie vmtools)

So you end with 2 vms that are the same.

Then later, someone decided to use the same "vm" in Digital Ocean, and aws:

builder
  digital_ocean
  aws
  virtualbox-iso
  vmware-iso

provisioner
  common_to_both
  only: virtualbox-iso something_only_for_virtualbox (ie vbox additions)
  only: vmware-iso something_only_for_vmware (ie vmtools)


So you could use, vbox for dev, vmware for on-prem prod, digital_ocean for testing, and aws for DR/cloud prod

very simple template, that generate the same "vm" (no technically the same from same iso, but a VM that was provisioned with the same scripts, so should have same dependencies, etc)

of course the tool can do more, and  be used in other ways, which is fine and very welcome too :)

Alvaro.

You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAEUyyAs-_Bq6QNs253rY1XYy%2Bdav2FADEu%2BrQQFvTuBUaHqOFg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

全員に返信
投稿者に返信
転送
新着メール 0 件