"Detach" an AWS instance from Vagrant

classic Classic list List threaded Threaded
4 messages Options
xof
Reply | Threaded
Open this post in threaded view
|

"Detach" an AWS instance from Vagrant

xof
Hi,

I've started to use Vagrant to provision real live production machines, but I live in fear that I will issue a vagrant destroy in the wrong directory.  Is there a standard way of "detaching" an instance from a VagrantFile instance so that it can go about its business and I can provision anew... or is there a better way to handle this particular situation?

Thanks!
--
-- Christophe Pettus
   [hidden email]

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: "Detach" an AWS instance from Vagrant

Mike Ryan
Hi Christophe,

Deleting the .vagrant/machines/default/aws/id file might do what you are looking for - once you do that, vagrant status will show 'not created' and you should be able to provision a new instance. This feels a bit hacky though, there might be a cleaner solution.

It is possible to protect instances from being terminated via the API - this won't let you provision new machines from the same Vagrantfile, but it will render vagrant destroy harmless if you do run it in the wrong dir.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingDisableAPITermination.html

Mike



On Friday, July 26, 2013 4:32:19 AM UTC+2, Christophe Pettus wrote:
Hi,

I've started to use Vagrant to provision real live production machines, but I live in fear that I will issue a vagrant destroy in the wrong directory.  Is there a standard way of "detaching" an instance from a VagrantFile instance so that it can go about its business and I can provision anew... or is there a better way to handle this particular situation?

Thanks!
--
-- Christophe Pettus
   <a href="javascript:" target="_blank" gdf-obfuscated-mailto="VIRMG6Bl6lUJ">x...@...

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: "Detach" an AWS instance from Vagrant

Torben Knerr


On Jul 26, 2013 5:19 PM, "Mike Ryan" <[hidden email]> wrote:
>
> Hi Christophe,
>
> Deleting the .vagrant/machines/default/aws/id file might do what you are looking for - once you do that, vagrant status will show 'not created' and you should be able to provision a new instance. This feels a bit hacky though, there might be a cleaner solution.
>
> It is possible to protect instances from being terminated via the API - this won't let you provision new machines from the same Vagrantfile, but it will render vagrant destroy harmless if you do run it in the wrong dir.
>
> http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingDisableAPITermination.html

Is this option exposed via the vagrant-aws provider?

>
> Mike
>
>
>
> On Friday, July 26, 2013 4:32:19 AM UTC+2, Christophe Pettus wrote:
>>
>> Hi,
>>
>> I've started to use Vagrant to provision real live production machines, but I live in fear that I will issue a vagrant destroy in the wrong directory.  Is there a standard way of "detaching" an instance from a VagrantFile instance so that it can go about its business and I can provision anew... or is there a better way to handle this particular situation?
>>
>> Thanks!
>> --
>> -- Christophe Pettus
>>    [hidden email]
>>
> --
> You received this message because you are subscribed to the Google Groups "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: "Detach" an AWS instance from Vagrant

Mike Ryan
No, presently it needs to be done through the EC2 API or Web Console. This might be a useful future addition:

vagrant protect-instance
vagrant unprotect-instance

... or something similar.
July 27, 2013 8:58 AM


On Jul 26, 2013 5:19 PM, "Mike Ryan" <[hidden email]> wrote:
>
> Hi Christophe,
>
> Deleting the .vagrant/machines/default/aws/id file might do what you are looking for - once you do that, vagrant status will show 'not created' and you should be able to provision a new instance. This feels a bit hacky though, there might be a cleaner solution.
>
> It is possible to protect instances from being terminated via the API - this won't let you provision new machines from the same Vagrantfile, but it will render vagrant destroy harmless if you do run it in the wrong dir.
>
> http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingDisableAPITermination.html

Is this option exposed via the vagrant-aws provider?

>
> Mike
>
>
>
> On Friday, July 26, 2013 4:32:19 AM UTC+2, Christophe Pettus wrote:
>>
>> Hi,
>>
>> I've started to use Vagrant to provision real live production machines, but I live in fear that I will issue a vagrant destroy in the wrong directory.  Is there a standard way of "detaching" an instance from a VagrantFile instance so that it can go about its business and I can provision anew... or is there a better way to handle this particular situation?
>>
>> Thanks!
>> --
>> -- Christophe Pettus
>>    [hidden email]
>>
> --
> You received this message because you are subscribed to the Google Groups "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

--
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/6uOBhj_wSD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
July 26, 2013 1:52 PM
Hi Christophe,

Deleting the .vagrant/machines/default/aws/id file might do what you are looking for - once you do that, vagrant status will show 'not created' and you should be able to provision a new instance. This feels a bit hacky though, there might be a cleaner solution.

It is possible to protect instances from being terminated via the API - this won't let you provision new machines from the same Vagrantfile, but it will render vagrant destroy harmless if you do run it in the wrong dir.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingDisableAPITermination.html

Mike



On Friday, July 26, 2013 4:32:19 AM UTC+2, Christophe Pettus wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/6uOBhj_wSD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.