Page 1 of 1
Remote File Access - Need a Short "Modify Test Loop&quo
Posted: Sun Feb 25, 2007 9:54 am
by Ollie Saunders
Currently I have a desktop windows machine running my IDE and Photoshop etc. and a development server on my LAN running Ubuntu (LAMP) to execute all the code. To make the code/test loop as short as possible I'm running Samba on the dev server so I can edit the files directly as a mounted drive. Trouble is Samba is slow and I generally don't like it very much.
So what other options are there out there?
Initially I was going to interact with the dev server by running a svn server on it with a checkout on both my windows machine and in a separate folder on the dev machine that all the virtual hosts use. Trouble is every time you change something you have to commit it with tortoise (windows), switch to ssh (linux) and update there then test.....obviously this is a lot slower than just save and test with Samba.
Is NFS a possibility? Do you have to download something for windows? It would have to integrate well so that my IDE (Zend Studio Standard) can still access everything.
Posted: Sun Feb 25, 2007 10:41 am
by Chris Corbyn
If samba is slow for you, then you're running out of options. NFS won't be a lot different.
What exactly do you do on the windows machine that you can't do on a linux machine? I only ask out of curiosity if running RDP is an option to do your windows stuff.
FYI, you don't need to ssh and update the svn repository on the linux server. You can run cygwin on windows and do your svn commits from it, then set up public key access to your linux server and write a script which just executes svn update on the remote server using that key.
Posted: Sun Feb 25, 2007 11:09 am
by Ollie Saunders
What exactly do you do on the windows machine that you can't do on a linux machine?
Work faster and run Photoshop, Illustrator and Internet Explorer. What's RDP?
You can run cygwin on windows and do your svn commits from it, then set up public key access to your linux server and write a script which just executes svn update on the remote server using that key.

I think I'll leave that for another day. Unless it's much easier than it sounds.
Posted: Sun Feb 25, 2007 11:31 am
by Chris Corbyn
RDP is windows' remote desktop protocol. You can get a RDP client for linux machines. It's (relatively) fast, because unlike VNC, it's not sending entire screen images across, it's remotely rendering the windows desktop.
Using cygwin to run svn is a simple process yes. Download cygwin and when you set it up make sure you check the boxes for OpenSSH and Subversion (it's setup process also includes its package manager!).
Once cygwin is installed you can open it up and you'll feel a bit like you're in a linux console... except you're not.. you're in windows. However, cygwin does run many linux apps that have been ported to windows. You can run svn by just typing the command at the cygwin prompt. You can also use it to ssh (not via putty, actually via OpenSSH) to your Linux machine.
Ordinarily SSH requires authentication where you provide your remote password. However, you can also set up RSA keys to do this.
It's as easy as generating a key and placing it in a file on both the remote machine and the local machine... then it "just works". All you have to do if both machine sshare that key is SSH from one to the other and you wont be asked for a password.
Now, I assume you know SSH doesn't just get you a remote shell? You can also use it to run remote commands:
Code: Select all
- $ ssh remote-machine ls -l #list files on the remote machine
All you have to do therefore is make a bash script like:
Code: Select all
#!/bin/bash
echo "Update remote.machine's svn repos...";
ssh remote.machine "cd /path/to/repos && svn update";
echo "Done.";
For the key stuff:
http://mah.everybody.org/docs/ssh