[packer] Packer and Chef-Solo Provisioner

2018-04-06 Thread kevin . duer
I am using packer to make AMIs.  I have placed most of my code within Chef 
and I using the Chef-Solo provisioner to call the required cookbooks.  I 
have configured a reboot within my cookbook for certain software installs.  
Whenever the reboot happens during the packer build process it will cause 
the build to fail.  I receive a fatal error after the reboot is initiated 
causing packer to begin a clean-up due to lose of connection.  Is there a 
way to make the chef-solo provisioner expect a reboot or handle a reboot 
that is happening from chef cookbooks?

Error
==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Error executing Chef: Non-zero exit status: 35

Thanks,
Kevin

-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/3743eb80-3730-48e4-ad70-dc9080b767eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[packer] Re: packer ansible provisioner host_vars groups_vars

2018-04-06 Thread Tony
Thanks for answer. But you have had success in using host_vars and 
group_vars in ansible provisioner at packer script?

пятница, 6 апреля 2018 г., 0:16:28 UTC+3 пользователь Matthieu написал:
>
> Hi Tony,
>
> Unfortunately i do work for the company i was working for at the time of 
> those messages and therefore don't have the json file
>
> On Thursday, April 5, 2018 at 7:42:36 AM UTC-7, Tony wrote:
>>
>> Hi, could you please share your full json file. I have the same problem 
>> and unable to resolv it :(
>>
>> среда, 25 января 2017 г., 1:39:44 UTC+2 пользователь Matthieu написал:
>>>
>>> Hello,
>>>
>>> I am having issues with packer and the remote ansible provisioner. 
>>> Packer doesnt seems to take the variables in the different groups_vars and 
>>> in host_vars. Here is  the layout of the all project:
>>>
>>> ansible
>>>  |--Infrastructure.Analytics # submodule
>>>|---groups_vars
>>>   |-all
>>>   |-db
>>>|---host_vars
>>>   
>>> |-packer-postgresql
>>>|---postgresql.yml
>>> packer.json
>>>
>>>
>>> the provisioner looks like this:
>>>
>>>   "type": "ansible",
>>>   "extra_arguments": 
>>> ["-b","--become-method=sudo","--vault-password-file=~/.vault_pass.txt"],
>>>   "playbook_file": "ansible/Infrastructure.Analytics/postgresql.yml",
>>>   "groups": 
>>> ["all","db","postgresql","development","tag_Application_Service_PostgreSQL","packer-postgresql"],
>>>   "host_alias": "packer-postgresql"
>>> },
>>>
>>> How can i make packer use those variables?
>>>
>>> Cheers
>>>
>>

-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/03387593-e935-4051-b0f6-f803e6aa112d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[packer] Packer v1.2.1 - WinRM communicator timeout

2018-04-06 Thread Dave Nelson
Hey all,

Am using the WinRM communicator with Packer 1.2.1 using the vmware-iso 
builder.

I get the WinRM timeout unless I specify the IP address of the target VM 
using "winrm_host".  My packer exe is on a different subnet to the target 
VM but there is routing in place, as demonstrated that it works with 
the winrm_host setting.

When i run a 'netstat -ano | findstr "5985"' on my test machine (where 
Packer is running) I can see that there is no attempt by the test machine 
to 'talk' to the target VM.  However, if I specify the winrm_host setting, 
I see the test PC trying to connect on 5985 to the target VM's IP.

I hope I am doing something glaringly wrong and you can tell me to stop 
being daft.  I have checked a fair few docks, example JSON files, etc, and 
can't get a working solution.  Any help would be gratefully received.

Cheers,

Dave.


-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/e706dcf4-e791-4b30-8f49-b66675c1430e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] Docker Container Shouldn't Killed

2018-04-06 Thread Alvaro Miranda Aguilera
Hello

Packer won't run your docker container.

Packer only build docker images.

You need run it by hand, script or a different tool.

Not sure from where you are getting the idea that packer can be used to run
containers, thats what I have been trying to explain.

Alvaro.

-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAHqq0ewagJMm%2BKt9nw3yn9_3%2B-aGmybh3QSMmyDan7ojBOTLLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] Docker Container Shouldn't Killed

2018-04-06 Thread Saurabh
Yes Sure, 

Once Docker Images is Build, After That i want to run Docker Images so that 
Container can up. 

Docker Images is Build 


{
"builders": [
{
"type": "docker",
"image": "tomcat",
"commit": "true",
"pull": "true"

}
],

"post-processors": [
   {
"type": "docker-tag",
"repository": "tomcat",
"tag": "latest"
   }
]
 }

**

Docker Container 

**

docker run -tdp 80:8080 tomcat 

** 

Docker run command should be perform by packer. 

Not by manual. 


Regards
Saurabh 



On Friday, April 6, 2018 at 4:21:33 PM UTC+5:30, Alvaro Miranda Aguilera 
wrote:
>
> Hello
>
> Can you explain more?
>
>
> Packer is to build docker images, not to run docker images.
>
>
> After packer is run, no containers should be running as part of this.
>
>
>
>
> On Fri, Apr 6, 2018 at 12:02 PM, Saurabh  > wrote:
>
>> Hi Alvaro, 
>>
>> Thanks for your response. 
>>
>> Tagging Name it will not resolve my issue. 
>>
>> I'm looking something
>>
>>
>>- packer should generate the docker image 
>>- Ansible will do configuration on docker image
>>- and finally Container should run without any manual interaction. 
>>
>> Please help me for this issue. 
>>
>> Thank you ! 
>>
>> Saurabh 
>>
>> On Friday, April 6, 2018 at 1:45:32 PM UTC+5:30, Alvaro Miranda Aguilera 
>> wrote:
>>>
>>> Hello
>>>
>>> Packer build a container, and in your code will be commited
>>>
>>> if you check
>>>
>>>
>>> docker images
>>>
>>> the top one will be the new one you did.
>>>
>>>
>>> You can add a post-processor docker-tag to tag that container
>>>
>>> ie
>>>
>>> "post-processors": [
>>> {
>>> "repository": "myxenial",
>>> "tag": "latest",
>>> "type": "docker-tag"
>>> }
>>> ],
>>>
>>> Thanks
>>> Alvaro
>>>
>>> On Fri, Apr 6, 2018 at 9:58 AM, Saurabh  wrote:
>>>
 Hi All, 

 While Running to Packer Build Command. 

 at last Docker Container is getting Killed. 

 I don't want docker Container should killed. 

 It should run Container. 

 * 
 ==> docker: Killing the container: 
 4fca9b0df6764361fefee08e4053e073ecc869a5de72e76d885dfa4f2f6cda7a
 Build 'docker' finished.

 **
 json file : 


 ***

 {
 "builders": [
 {
 "type": "docker",
 "image": "ubuntu:16.04",
 "commit": "true",
 "pull": "true",
 "changes": [
 "ENTRYPOINT [\"nginx -g 'daemon off;'\"]"
 ]
 }
 ],
 "provisioners": [
 {
 "type": "shell",
 "script": "installansible.sh"
 },
 {
 "type": "ansible-local",
 "playbook_file": "test.yml"
 }
 ]
  }


 ***

 Looking for the solutions. 

 Thank you 
 Saurabh 

 -- 
 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 the Google 
 Groups "Packer" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to packer-tool...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/packer-tool/3a2ed913-709f-4998-b370-ddffc2a2680e%40googlegroups.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> -- 
>>> Alvaro
>>>
>>> -- 
>> 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 the Google Groups 
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to packer-tool...@googlegroups.com .
>> To view this discussion on the web visit 
>> 

Re: [packer] Docker Load Tar File

2018-04-06 Thread Alvaro Miranda Aguilera
Hello

Its always better to have packer clean, and you can use a shell script to
wrap pre-requirements

as packer usually check state before running, may/may not work in the way
you want.

There is a provisioner named shell-local you can use to run commands in the
host but its too late to import a docker image there.



if I try to docker pull an image, please notice it does happen after the
docker has been "started"


# packer build template.json

*xenial output will be in this color.*


*==> xenial: Creating a temporary directory for sharing data...*

*==> xenial: Starting docker container...*

xenial: Run command: docker run -v
/root/.packer.d/tmp/packer-docker750999803:/packer-files -d -i -t
ubuntu:xenial /bin/bash

xenial: Container ID:
aad89910ad6ec68fc2ea2b89055476c1f406df00205548e7b5d3e3a205aeb630

*==> xenial: Executing local command: docker pull ubuntu:xenial*

xenial: xenial: Pulling from library/ubuntu

xenial: Digest:
sha256:e348fbbea0e0a0e73ab0370de151e7800684445c509d46195aef73e090a49bd6

xenial: Status: Image is up to date for ubuntu:xenial

*==> xenial: Committing the container*

xenial: Image ID:
sha256:27053b3a833a390853da0a22266f3c75bcbe10422e4f3637963fad2def3f9072

*==> xenial: Killing the container:
aad89910ad6ec68fc2ea2b89055476c1f406df00205548e7b5d3e3a205aeb630*

*==> xenial: Running post-processor: docker-tag*

xenial (docker-tag): Tagging image:
sha256:27053b3a833a390853da0a22266f3c75bcbe10422e4f3637963fad2def3f9072

xenial (docker-tag): Repository: xenial:latest

*Build 'xenial' finished.*


==> Builds finished. The artifacts of successful builds are:

--> xenial: Imported Docker image:
sha256:27053b3a833a390853da0a22266f3c75bcbe10422e4f3637963fad2def3f9072

--> xenial: Imported Docker image: xenial:latest

root@ubuntu-1604-vmware:/vagrant/import# cat template.json

{

"variables": {

},

"builders": [

{

"commit": true,

"image": "ubuntu:xenial",

"pull": false,

"type": "docker",

"name": "xenial"

}

],

"post-processors": [

{

"repository": "xenial",

"tag": "latest",

"type": "docker-tag"

}

],

"provisioners": [

{

"command": "docker pull ubuntu:xenial",

"type": "shell-local"

}

]

}

root@ubuntu-1604-vmware:/vagrant/import#


So you are better having a shell script that does the import and then runs
packer.


Alvaro.




On Fri, Apr 6, 2018 at 12:14 PM, Saurabh  wrote:

> Hi All,
>
> How I can use packer for  docker load --input tomcat.tar command ?
>
> Any Solutions for this ?
>
> Regards
> Saurabh
>
> --
> 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 the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/3827717b-7130-4031-b2d0-31e34c1edde8%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAHqq0ewBE2Jbpb2knRaFtb3Jh-3WhSiFPJzYOa1FRr-%3DOV6Jvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] Docker Container Shouldn't Killed

2018-04-06 Thread Alvaro Miranda Aguilera
Hello

Can you explain more?


Packer is to build docker images, not to run docker images.


After packer is run, no containers should be running as part of this.




On Fri, Apr 6, 2018 at 12:02 PM, Saurabh  wrote:

> Hi Alvaro,
>
> Thanks for your response.
>
> Tagging Name it will not resolve my issue.
>
> I'm looking something
>
>
>- packer should generate the docker image
>- Ansible will do configuration on docker image
>- and finally Container should run without any manual interaction.
>
> Please help me for this issue.
>
> Thank you !
>
> Saurabh
>
> On Friday, April 6, 2018 at 1:45:32 PM UTC+5:30, Alvaro Miranda Aguilera
> wrote:
>>
>> Hello
>>
>> Packer build a container, and in your code will be commited
>>
>> if you check
>>
>>
>> docker images
>>
>> the top one will be the new one you did.
>>
>>
>> You can add a post-processor docker-tag to tag that container
>>
>> ie
>>
>> "post-processors": [
>> {
>> "repository": "myxenial",
>> "tag": "latest",
>> "type": "docker-tag"
>> }
>> ],
>>
>> Thanks
>> Alvaro
>>
>> On Fri, Apr 6, 2018 at 9:58 AM, Saurabh  wrote:
>>
>>> Hi All,
>>>
>>> While Running to Packer Build Command.
>>>
>>> at last Docker Container is getting Killed.
>>>
>>> I don't want docker Container should killed.
>>>
>>> It should run Container.
>>>
>>> *
>>> ==> docker: Killing the container: 4fca9b0df6764361fefee08e4053e0
>>> 73ecc869a5de72e76d885dfa4f2f6cda7a
>>> Build 'docker' finished.
>>>
>>> **
>>> json file :
>>>
>>> 
>>> ***
>>>
>>> {
>>> "builders": [
>>> {
>>> "type": "docker",
>>> "image": "ubuntu:16.04",
>>> "commit": "true",
>>> "pull": "true",
>>> "changes": [
>>> "ENTRYPOINT [\"nginx -g 'daemon off;'\"]"
>>> ]
>>> }
>>> ],
>>> "provisioners": [
>>> {
>>> "type": "shell",
>>> "script": "installansible.sh"
>>> },
>>> {
>>> "type": "ansible-local",
>>> "playbook_file": "test.yml"
>>> }
>>> ]
>>>  }
>>>
>>> 
>>> ***
>>>
>>> Looking for the solutions.
>>>
>>> Thank you
>>> Saurabh
>>>
>>> --
>>> 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 the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to packer-tool...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/packer-tool/3a2ed913-709f-4998-b370-ddffc2a2680e%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Alvaro
>>
>> --
> 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 the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/8dc2512a-d49a-49ee-bf49-87039d68e22b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAHqq0ezVppZ2Fzy2d-CTXy_a6oqLuC3C_-9fSuZy_T2kb6HBSg%40mail.gmail.com.
For more 

[packer] Docker Load Tar File

2018-04-06 Thread Saurabh
Hi All, 

How I can use packer for  docker load --input tomcat.tar command ? 

Any Solutions for this ? 

Regards
Saurabh 

-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/3827717b-7130-4031-b2d0-31e34c1edde8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] Docker Container Shouldn't Killed

2018-04-06 Thread Saurabh
Hi Alvaro, 

Thanks for your response. 

Tagging Name it will not resolve my issue. 

I'm looking something


   - packer should generate the docker image 
   - Ansible will do configuration on docker image
   - and finally Container should run without any manual interaction. 

Please help me for this issue. 

Thank you ! 

Saurabh 

On Friday, April 6, 2018 at 1:45:32 PM UTC+5:30, Alvaro Miranda Aguilera 
wrote:
>
> Hello
>
> Packer build a container, and in your code will be commited
>
> if you check
>
>
> docker images
>
> the top one will be the new one you did.
>
>
> You can add a post-processor docker-tag to tag that container
>
> ie
>
> "post-processors": [
> {
> "repository": "myxenial",
> "tag": "latest",
> "type": "docker-tag"
> }
> ],
>
> Thanks
> Alvaro
>
> On Fri, Apr 6, 2018 at 9:58 AM, Saurabh  > wrote:
>
>> Hi All, 
>>
>> While Running to Packer Build Command. 
>>
>> at last Docker Container is getting Killed. 
>>
>> I don't want docker Container should killed. 
>>
>> It should run Container. 
>>
>> * 
>> ==> docker: Killing the container: 
>> 4fca9b0df6764361fefee08e4053e073ecc869a5de72e76d885dfa4f2f6cda7a
>> Build 'docker' finished.
>>
>> **
>> json file : 
>>
>>
>> ***
>>
>> {
>> "builders": [
>> {
>> "type": "docker",
>> "image": "ubuntu:16.04",
>> "commit": "true",
>> "pull": "true",
>> "changes": [
>> "ENTRYPOINT [\"nginx -g 'daemon off;'\"]"
>> ]
>> }
>> ],
>> "provisioners": [
>> {
>> "type": "shell",
>> "script": "installansible.sh"
>> },
>> {
>> "type": "ansible-local",
>> "playbook_file": "test.yml"
>> }
>> ]
>>  }
>>
>>
>> ***
>>
>> Looking for the solutions. 
>>
>> Thank you 
>> Saurabh 
>>
>> -- 
>> 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 the Google Groups 
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to packer-tool...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/3a2ed913-709f-4998-b370-ddffc2a2680e%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Alvaro
>
>

-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/8dc2512a-d49a-49ee-bf49-87039d68e22b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] AMI Tags not propagated to other accounts?

2018-04-06 Thread Rickard von Essen
This is how AWS works. AMI's can be shared with other accounts, basically
giving them read access. But tags are a separate construct, metadata
separate from the resources they "tag". They are not shared and and not
visible from the other account just because the AMI is shared.

The other account can add it's own tags to an AMI shared with it.

Hope that clears things up a bit. Feel free to follow up with further
questions.

On Fri, Apr 6, 2018, 09:44 Byte Flinger  wrote:

> I have built an AWS AMI image using the EBS backed builder and I set the
> "ami_users" to a couple of different accounts so the ami is available for
> using in all of these acounts.
>
> I noticed that the AMI in the account which I built the image on has all
> the AMI tags I configured in the packer configuration however the other
> accounts have no tags whatsoever in that same ami.
>
> Is anybody aware if this is by design or an issue with packer ebs backed
> builder?
>
> Regards
> Byte
>
> --
> 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 the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/521def5a-952a-424b-9576-ce44ef28f8d2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt88%2BPZckxHCBBN09pic4geL0eD-aQn7VXX8sz-HdUotiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] Docker Container Shouldn't Killed

2018-04-06 Thread Alvaro Miranda Aguilera
Hello

Packer build a container, and in your code will be commited

if you check


docker images

the top one will be the new one you did.


You can add a post-processor docker-tag to tag that container

ie

"post-processors": [
{
"repository": "myxenial",
"tag": "latest",
"type": "docker-tag"
}
],

Thanks
Alvaro

On Fri, Apr 6, 2018 at 9:58 AM, Saurabh  wrote:

> Hi All,
>
> While Running to Packer Build Command.
>
> at last Docker Container is getting Killed.
>
> I don't want docker Container should killed.
>
> It should run Container.
>
> *
> ==> docker: Killing the container: 4fca9b0df6764361fefee08e4053e0
> 73ecc869a5de72e76d885dfa4f2f6cda7a
> Build 'docker' finished.
>
> **
> json file :
>
> 
> ***
>
> {
> "builders": [
> {
> "type": "docker",
> "image": "ubuntu:16.04",
> "commit": "true",
> "pull": "true",
> "changes": [
> "ENTRYPOINT [\"nginx -g 'daemon off;'\"]"
> ]
> }
> ],
> "provisioners": [
> {
> "type": "shell",
> "script": "installansible.sh"
> },
> {
> "type": "ansible-local",
> "playbook_file": "test.yml"
> }
> ]
>  }
>
> 
> ***
>
> Looking for the solutions.
>
> Thank you
> Saurabh
>
> --
> 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 the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/3a2ed913-709f-4998-b370-ddffc2a2680e%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAHqq0exfvEgFVR-10iBR_kbm340GLiBLoaQkDJqYOhxTK0j%3D1A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[packer] Docker Container Shouldn't Killed

2018-04-06 Thread Saurabh
Hi All, 

While Running to Packer Build Command. 

at last Docker Container is getting Killed. 

I don't want docker Container should killed. 

It should run Container. 

* 
==> docker: Killing the container: 
4fca9b0df6764361fefee08e4053e073ecc869a5de72e76d885dfa4f2f6cda7a
Build 'docker' finished.

**
json file : 

***

{
"builders": [
{
"type": "docker",
"image": "ubuntu:16.04",
"commit": "true",
"pull": "true",
"changes": [
"ENTRYPOINT [\"nginx -g 'daemon off;'\"]"
]
}
],
"provisioners": [
{
"type": "shell",
"script": "installansible.sh"
},
{
"type": "ansible-local",
"playbook_file": "test.yml"
}
]
 }

***

Looking for the solutions. 

Thank you 
Saurabh 

-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/3a2ed913-709f-4998-b370-ddffc2a2680e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[packer] AMI Tags not propagated to other accounts?

2018-04-06 Thread Byte Flinger
I have built an AWS AMI image using the EBS backed builder and I set the 
"ami_users" to a couple of different accounts so the ami is available for 
using in all of these acounts.

I noticed that the AMI in the account which I built the image on has all 
the AMI tags I configured in the packer configuration however the other 
accounts have no tags whatsoever in that same ami.

Is anybody aware if this is by design or an issue with packer ebs backed 
builder?

Regards
Byte

-- 
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 the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/521def5a-952a-424b-9576-ce44ef28f8d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.