Thanks a ton Rickard. This has been really helpful!

On Sun, Feb 11, 2018 at 7:21 PM Rickard von Essen <
rickard.von.es...@gmail.com> wrote:

> Usually I add a null builder to the template. Then you can either A) add a
> inline "sleep 3600" start a build with "packer build -only amazon-ebs
> template.json". And when it pauses the provisioning in another terminal run
> "packer build -only null -var debug_ip=IP -var private_key...
> template.json" and iterate over your provisioning scripts quickly. Or B)
> just launch a EC2 instance manually and run the null builder against that.
>
>
> {
>     "variables": {
>         "debug_ip": "",
>         "private_key": "",
>         "keypair": ""
>     },
>     "builders": [
>         {
>             "type": "amazon-ebs",
>        [...]
>         },
>         {
>             "type": "null",
>             "ssh_host": "{{ user `debug_ip`}}",
>             "ssh_username": "{{ user `username`}}",
>             "ssh_private_key_file": "{{ user `private_key`}}"
>         }
>     ],
> }
>
>
> On 11 February 2018 at 12:11, tushar mathur <tusharm...@gmail.com> wrote:
>
>> Hi,
>>
>> I am trying to provision my ami using a set of custom shell scripts.
>> Sadly every time they fail I have to recreate an ec2 instance from scratch.
>> This makes sense when I am deploying in production but at the time of
>> debugging and trying out different commands it becomes really slow.
>>
>> Is there a way for me to actually reuse the state in which ec2 instance
>> is currently and keep running the provisioners again and again?
>>
>> I tried the --on-error argument but that only runs on the last failed
>> step where as what I really want is to run the provisioning again from
>> scratch.
>>
>> packer build --debug  -on-error=ask packer-aws.json
>>
>> 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 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/bcb7f49c-7225-4bbd-8cec-5caa2d863aba%40googlegroups.com
>> <https://groups.google.com/d/msgid/packer-tool/bcb7f49c-7225-4bbd-8cec-5caa2d863aba%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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 a topic in the
> Google Groups "Packer" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/packer-tool/4-yUmEO8_98/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CALz9Rt-Jy75tgnKLHWaubrW1w_sGifM%3DW0xae6c7vHUd8Trp0w%40mail.gmail.com
> <https://groups.google.com/d/msgid/packer-tool/CALz9Rt-Jy75tgnKLHWaubrW1w_sGifM%3DW0xae6c7vHUd8Trp0w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Regards,
Tushar Mathur.
www.tusharm.com

-- 
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/CAP-UOJF-2Dd7TT98%3Dobhi8Ar5Rf7_TXx5-yjowd_vynBVcbotw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to