Live data from Hacker News

Ask HN: How do you work efficiently on remote servers?

news.ycombinator.com

61–70 of 87 posts

Re: Ask HN: How do you work efficiently on remote servers?

#61

Earlier quoted context omitted.

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, bu…

So, if I get it, Vagrant is used to reproduce the production environment locally. Right? Sorry for all the questions!

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.

Re: Ask HN: How do you work efficiently on remote servers?

#62
post #36
post #29

Earlier quoted context omitted.

There is an enormous reason if you work on, or use, systems designed for massive parallelism.

I still don't see the necessity... Develop locally, test remotely.

It's not necessary, it's just extraordinarily convenient. I don't have to ever say, "Oh, wait, I'm on my laptop now, I can't run an application with 100 processes without causing my system to grind to a halt."

Even the sequential performance of the remote systems is much higher than my laptop. The system in front of me is a means to interface with the real system, and has been for a long time. Granted, I have worked on parallel and distributed languages and runtimes for most of my professional life.

Re: Ask HN: How do you work efficiently on remote servers?

#64
I use rmate + Sublime Text for a pretty seamless remote editing experience when I'm just dealing with a few files. It's really nice when you're editing config files or when you want to skim through log files. I followed a guide I found on Stack Overflow[1].

[1] https://stackoverflow.com/questions/15958056/how-to-use-subl...

Re: Ask HN: How do you work efficiently on remote servers?

#65
I do all of my development on a machine in my home office, so I have the same files and tools whether I'm downstairs or across the world. So mostly it's ssh/vim/cscope. I build/test on other machines, so throw in rsync as well - most often directly, but occasionally into an sshfs-mounted directory (actually editing via sshfs is a bit painful sometimes). When things seem particularly flaky I'll use tmux to keep stuff going through disconnections, but usually I can do without.

Re: Ask HN: How do you work efficiently on remote servers?

#67
post #66

If latency is a concern, use a remote file system (Fuse etc type thing). That way you can edit using local software and only write across the wire when you save.

Many editors will periodically check for remote changes (especially when switching away from and back to the editor) which can cause pretty annoying slowdowns.

Re: Ask HN: How do you work efficiently on remote servers?

#68

I use ssh + tmux + emacs. Security policy states no local copies of development files are allowed at my workplace without special authorization, which I never bothered asking for. Migrated my emacs configuration to the remote server as a git repository, along with any programs that aren't available (e.g. git, which I use for unofficial code; official code is managed via perforce). Use GNU stow to move those configura…

  [N]o local copies of development files are allowed
  ... without special authorization
I'm curious what kind of employer would hire programmers, and they tell them they couldn't develop locally as a matter of _security policy_, rather than "it won't fit on your machine". That seems like it would be very constraining.

Re: Ask HN: How do you work efficiently on remote servers?

#70

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)…

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.
Post reply on HN