News for hackers. Stuff that matters.
Re:Ask HN: How do you work efficiently on remote servers? by falcolas on Friday March 27, 2015 @09:41AM (#9276153)
Vim, mostly. The customization is remarkably easy, just copy my .vimrc and .vim out to the server. I have a folder containing all of my dot files which I sync between servers, and a simple bash script which creates softlinks to them in my home directory.

However, I don't do remote development as much anymore since I picked up the habit of using Vagrant locally. Now I can edit the files locally (though still with Vim), and debug them on a local VM. Throw in Salt and Ansible for orchestration, and once I get my local VM working, I know my remote end will work as well.

Re:Ask HN: How do you work efficiently on remote servers? by gknoy on Friday March 27, 2015 @01:05PM (#9277548)
How do you share the files with your Vagrant VM? When we tried that at work, we noticed that trying to have a git repo on a share with Vagrant (rather than having it created within the VM's filesystem) was VERY slow.
Re:Ask HN: How do you work efficiently on remote servers? by falcolas on Saturday March 28, 2015 @10:19AM (#9281555)
I hear you - Virtual Box is getting worse and worse in terms of being able to interact with the host in anything resembling a timely manner. I wish the competition in the free VM space was better.

To get around this shortcoming, the sharing is mostly one way: from the host to the VM, via the default shared folder. I've not had problems with VBFS when managing files in this manner.

There have also been times where I have implemented watch scripts against files on the host, which triggers a rsync to the guest's normal file systems. From there, the file system behavior is more like what we can expect from a typical virtual machine.

To support workflows similar to what I do against non-local VMs, I've worked up some wrapper scripts which allow me to interact with the Vagrant VM via the usual ssh, scp, and rsync. When running "vagrant up", I also write out the VM's SSH configs and a ssh alias concatenates these with my base .ssh/config file.

Re:Ask HN: How do you work efficiently on remote servers? by filsmick on Friday March 27, 2015 @09:46AM (#9276190)
Correct me if I'm wrong, as I'm not experienced with these tools: when you're done, you upload the image to a server?
Re:Ask HN: How do you work efficiently on remote servers? by falcolas on Friday March 27, 2015 @10:38AM (#9276518)
No - Salt and Ansible both act as deploy automation tools. That is, you run the scripts on the server and they will install packages, move files, change permissions, etc. Most deploy steps are available using these tools.

Vagrant itself acts as a user-friendly wrapper around the creation and management of local virtual machines.

There are ways to use Vagrant to create and push machine images up to cloud providers, but we're not at a point with our deployments where machines are so easily interchangeable.

http://docs.saltstack.com/en/latest/contents.html http://docs.ansible.com/intro.html

Re:Ask HN: How do you work efficiently on remote servers? by filsmick on Friday March 27, 2015 @10:51AM (#9276601)
So, if I get it, Vagrant is used to reproduce the production environment locally. Right? Sorry for all the questions!
Re:Ask HN: How do you work efficiently on remote servers? by falcolas on Friday March 27, 2015 @11:08AM (#9276706)
Pretty much, yup. And with a bit of hostfile magic and using intra-VM networks, you can emulate an entire environment on your local machine if necessary.