-
Notifications
You must be signed in to change notification settings - Fork 155
vagrant reload does not work #21
Comments
+1. same issue here. I need to be able to reload |
Can you guys give some more details on what you´re trying to accomplish? I think the reload semantics are left to each provider. The built-in provider (virtualbox) does quite a bit, but I think most other providers have basic, if any, reload ability. Otherwise... http://agilewarrior.wordpress.com/2010/11/06/the-agile-inception-deck/ |
Thanks for picking this up, @maxlinc. Two outcomes would be satisfactory for me.
To be honest, I haven't had a strong use case for |
Actually...now that I'm looking a bit more carefully at Rackspace, it doesn't seem like there is a way to halt a machine, but you can restart it. A revised option 2 might then be to have |
Yep, reload is a short cut The equivalent of running a halt followed by an up. This command is usually required for changes made in the Vagrantfile to take effect. After making any modifications to the Vagrantfile, a reload should be called. The configured provisioners will not run again, by default. You can force the provisioners to re-run by specifying the --provision flag. |
@BenjyC looks like we were writing at nearly the same time. The tricky bit is that there isn't an equivalent cloud operation to |
Looks like there isn't https://github.com/mitchellh/vagrant-rackspace/blob/master/lib/vagrant-rackspace/action.rb |
Sorry...that wasn't terribly clear. I realize there isn't a What I'm wondering is whether its possible to power down a machine on Rackspace (retaining the same IP) without destroying the virtual machine? That would be the Rackspace equivalent to the Independent of whether you can just power down a machine on Rackspace, you can certainly reboot the box. This seems like a reasonable fallback for the time being. Thoughts? |
@deanmalmgren I am the racker that is responsible for this project. Sorry for taking so long to get back to you on this one! I believe we could implement http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Rebuild_Server-d1e3538.html Implementing What are your thoughts? |
@deanmalmgren Will do! |
@deanmalmgren I started to implement this feature, but I ran into a cloud servers issue populating ssh keys with the rebuild command. I am going to pick this back up when it gets fixed. In the meantime, thanks for your patience! |
sounds good Kyle. Thanks for the update! On Wed, Oct 23, 2013 at 3:57 PM, Kyle Rames [email protected]:
|
@deanmalmgren This problem is with the underlying rebuild command itself. It is not using the ssh keys I am sending. |
ahhhhh, gotcha! On Tue, Jan 7, 2014 at 4:36 PM, Kyle Rames [email protected] wrote:
|
Hi, I am wondering whether this is still actively worked on? My current use case is that I'd like to have the ability to reset a Vagrant Box on Rackspace while keeping the IP address. Thanks for any help! Note: Referred from google groups (https://groups.google.com/forum/#!topic/vagrant-up/FRWf2e6XmVo). |
Any progress, @krames? |
Any progress on this? It would be nice to be able to update the vagrant file on these servers without losing our IP address. |
It looks like @krames no longer works at Rackspace (LinkedIn Profile), and nobody else has contributed to the rackspace/vagrant-rackspace fork that @krames was working on back in 2014. |
Kyle was part of the group behind https://developer.rackspace.com. The best On Fri, Jul 15, 2016, 1:20 PM Matt Johnson [email protected] wrote:
|
It looks like this should be possible. I thought I would share what I have uncovered, in the event someone knows how to translate this into this vagrant plugin: The Rackspace Cloud has some API calls you can use to rebuild the server, but from what I can tell when it rebuilds the server there isn't an option to set a public key on the server during the rebuild process. You could set a password during rebuild, but who uses those for authentication these days. I found that if you associate an SSH key name with the server when it is created, the key will persist during a rebuild and allow you to login with key authentication after the rebuild. You can add an SSH key and assign it a key name in the Control Panel or you can import one via the API.
You would need to create the machine initially with a key_name specified referencing the key you use with Vagrant.
For interacting with the Rackspace API you can reference their documentation. Get the tenant id, endpoint, and token for subsequent API calls
In the response look for the tenantId and endpoint address from the "cloudServersOpenStack" endpoint for the region you are working with.
Also in the response from above get the token id
If you don't already have a public key on your Rackspace Account you can import one or add one from the Control Panel
Import key pair
List existing key pairs
You need the server ID for the server you want to rebuild which you can get from a server list or from the Control Panel
Set the value for your server ID
You need the Image Id which you can get from the server details above, or list all images and find the one you are wanting to rebuild with
Set the value for the image ID
Rebuild the server - based on API documentation
Re-run vagrant provisioner after the rebuild
|
So... I took a stab at trying to figure out how to add this functionality to the plugin: I found the rebuild method listed on the fog-rackspace gem: Considering this is the first time I've tried to modify much Ruby code, let alone deal with a vagrant plugin, I'm still trying to figure out how to test my modifications with vagrant to see if anything I hacked up actually does anything. |
I am trying to install my local modified copy of the vagrant-rackspace plugin with no success. I cloned the vagrant-rackspace repo
Am I missing something? All the various documentation I can find is indicating those are the steps to follow, but I don't understand what to do about the fact that it's claiming it can't find the gem that I gave it the exact path for. |
I ended up figuring out how to execute the modified version of the plugin by creating a
Then I ran the commands via bundler to test the new command and fix a couple bugs
Everything worked great rebuilding the machine. It kept the same IP address and ID, retained the storage volumes I had attached to the machine, re-ran the provisioners, and most importantly I was still able to SSH into the box using key authentication. Happy Day! |
Based on the documentation, it seemed like the
vagrant reload
command would work, but I receive an error when I run it:What other information would be helpful for debugging here?
The text was updated successfully, but these errors were encountered: