Work(flow) Setup: Remote Debian VM (in office), ssh, web development - web-services

Normally I've developed locally (on my own machine) and pushed to wherever things needed to go via mapped drives, ftp, github, etc. I have done a bit of work with vagrant/virtualbox (but again, locally) with a shared/mirrored folder.
I am now in a situation where everyone here has access to their own dev box (a vm on the network). I see some working in Vim directly via SSH, I believe, but I'm not there yet. So I'm left with the question: What's the best way for (more of a front end guy) to approach this?
I have heard of doing an SSH-mount from my workstation... if that's a viable thing. I'm curious what everyone's take on this kind of environment is and (perhaps) any best practices. Tips, links, and reading is highly welcome and appreciated, too... any pointing in a good direction would be wonderful.
Thank you.

The best answer will come from what virtual resources do you want to capitalize on for the virtual networked VMs. If you just want the storage space, then share the VM's drives, and mount them locally, treat them as local, end of story. If you want to run all the processing on the remote machine, and connect from a thin client, you have a couple of options, but they all take the same form. Connect to the machine, edit the files on the remote machine. Depending on your OS, you will have different options available.
If the remote machine doesn't have an graphical client installed you are stuck with either, mounting the remote share locally (you can use whatever editor you want) or ssh to the remote machine and using a commandline editor (vim, nano, emacs).
If there is a graphical client installed you have more options:
Remote in the server using any visual viewer (mstsc for windows, vnc is an option), and then use any remotely installed editor of your choice.
Remote in using ssh -X, and then run the remotely installed editor. Assuming you have an X-Server locally (if you are running linux you already do), the GUI part of the application will be run on the client side of the ssh tunnel, and the process will be run on the server. This is probably the best option.
So:
Make sure the remote server has a desktop client software (gtk, kde, gnome, almost any windows os, etc...)
install GUI editor of your choice on that server
ssh -X to that server
install sublime text, geany, or your choice of editor
run subl, geany, or other to start the application.

SSH mounting would indeed allow you to use all of the files on the VM as if they were stored in your local machine, letting you edit and update files without having to manually copy them every time you perform changes. You will run into a speed bump though, since files changed will have to be synchronized/copied to your remote machine every time and that takes a couple of seconds. Check this post by DigitalOcean, they explain how to get the SSH mount working.
A better option you have (IMHO) is to use an IDE in your local machine that allows you to push changes to a server after saving or by manually doing so. This would allow you to develop faster by using your local resources (local web server) since no files would have to be copied over the network to the remote VM; and would also allow you to test on that remote VM when needed by uploading the files when you are ready to test on that environment.
PS: Exporting visual apps or environments form the remote machine to your local one can be slow (depending on your network and the VM host load running your machine). If you still like that approach, you could also install something to access that VM over something more standard and lightweight like RDP for GNU/Linux (xrdp).

Related

Cloud Gaming on a Virtual Machine on Google Cloud

On any cloud platform specifically can we run a windows VM and install a windows game ??
Will this work and will the data be lost after we disconnect the instance and is it feasible.
If you make sure to attach a persistent disk to the machine, then you can install games on it and they will stay there. Also make sure you get a machine with a GPU! You would probably have pretty bad experience using Remote Desktop though. Apart from that, this is entirely feasible.

Xenserver - Access guest VM directly from host

I've got a decent PC that I'd like to install xenserver on, but it's also my primary workstation. Wondering if it's possible to access guests directly from the host machine -- meaning, can I use the monitor, input devices, etc that are attached to the host, to interact with the guests.
Currently setup as a dual boot Linux and Windows machine. I need them both running simultaneously while still being able to treat the host like a workstation. Already using Virtualbox, which is great but not what I'm aiming for.
I've searched high and low for an answer to this question. Maybe I wasn't searching with the right terms. I've found a package in the Ubuntu repos that adds an entry in grub along the lines of 'Ubuntu with Xen Hypervisor', but that was on a test machine that couldn't actually run Xen.
Normally, I'd just wipe this puppy and find out for myself, but there are really good reasons why I can't just jump into it this time, so I'm turning to the community.
Thanks for any and all info!
You can use a simple text console on the host to interact with the guests
xe console vm=guest
but I don't know of a way to access a graphical interface from the host.

Multi-CFML engine test environment

Does anyone have a good way to set up multiple CFML engines, and versions of them, together in a suitable environment for cross testing a CFML based application.
Ideally, I'd like this to be Ubuntu Server based as I'm using it with VirtualBox (under Windows 7). Plus it'd be helpful if it was possible to switch between, so my laptop can cope with one at a time rather than all running at once. I'm thinking of the following:
Adobe ColdFusion 9
Adobe ColdFusion 10
Railo 3.3.x
Railo 4.x
OpenBD 2.x
I'd also like to get them serving from the same shared directory, so I don't have to have a copy of the code for each engine. Cheers
You mentioned being able to "switch between, so my laptop can cope with one at a time rather than all running at once", I'm guessing that you are thinking that each one will run on a different VM, or that they might require a huge amount of memory. I don't think you need to worry about that. Unless you require that they be on different machines, I think you could do this all on one VM and with one instance of a servlet container (like Tomcat).
From a high-level view, here is how I would do it.
Install Tomcat
Create or download .wars for each of the engines.
Deploy said .wars to that one instance of Tomcat
Set up Tomcat to use each of those servlets from a different host name (server.xml)
Create a code directory outside of Tomcat for your one copy of the code
Set up a Symbolic link in each webapp to link the code folder into the servlet
You should then be able to hit the same source from each engine by visiting the different host names in the browser.
I may be missing something. It has been a long time since I set something like this up. You'll likely need to make a bunch of tweaks (JVM settings, switching to Sun/ORACLE JVM vs. OpenJDK, etc).
I don't think running this many engines will cause you great trouble. In my experiences, for development, I have had 3 instances of CF9 running on Tomcat using only 189mb of RAM. And each additional instance did not increase that number by 1/3. Far less. It would not surprise me if you could run all of those handily with less than 512md of RAM. Possibly even 256mb if you are really hurting on memory.
I hope this helps.
For ColdFusion 10, Railo and OpenBD you would be looking at deploying with standalone installations of Tomcat, Jetty or JBoss.
ColdFusion 9, probably the easiest solution is "Enterprise Multiserver configuration" setup.
With these kinds of installation they are pretty much platform agnostic.
The things to be aware of are the web server, proxy and jndi ports that are used by each installation, but only if you want to run more than one server at a time.
After that it's whether you are bothered about proxying from apache or Nginx to the server instances and the connector you want to use.
No idea if this helps...
Since you've mentioned the VirtualBox, I'll share my personal approach to this task. It includes few fairly simple steps:
Install Ubuntu Server as VirtualBox guest (host is also Ubuntu).
Set up only basic software like JVM and updates. Set up virtual
machine networking as bridged adapter to use my Wi-Fi connection.
Configure my Wi-Fi router DHCP to assign static IP for MAC address of the virtual machine.
Add entry to my (host) system hosts: ip_assigned_to_vm virtual.ubuntu
Set up guest additions and mount my ~/www directory inside the machine to access web applications.
Now, when I need another machine for experiments, or some other configuration of software (I've tested ACF 10 and Railo 4 this way) I do two things:
Clone existing clean machine.
Make sure it is using the same MAC address with bridged interface.
That's it.
It doesn't matter which of the machines I run, they all can be accessed as http://virtual.ubuntu (of course, it requires proper web-server configuration on the guest). Same time they are independent and it is completely safe to make anything I wish and test anything that runs on Ubuntu.
Obvious downsides are that I can run just one machine at a time, plus much more disk space is used. Not a problem to me.
I've tried approach with Tomcat and multiple WARs, but it has couple of issues: I can't use different JVM and Tomcat settings, also if I screw the setup -- all the Tomcat hosts are down.
Hope this helps.

Linux as a guest on MacOS X: VirtualBox or Parallels?

I'm going to develop mostly Django sites on a MacBook Pro and would like to use Ubuntu VMs for testing purposes.
Which product is better suited for this purpose?
Can I connect to the VM via TCP/IP (so I can have apache running on the VM and access it from Safari on my MBP)?
Thanks!
It should be possible using VMWARE FUSION. It has a good network management, and you should be able to access easily your vm via network.
I've successfully used both VirtualBox and VMWare Fusion for this. On both systems, you can set the guest up so that it has its own IP address, and connect to it via HTTP, SSH and even native file sharing, so you can mount the guest's drive as a network drive from the Mac, and vice versa. This makes it possible to do the editing on the Mac in eg Textmate, but run the server on the VM.
I can only tell you about my experiences with a Core2Quad Q6600 on VMWare Fusion 3.0. I have three boot partitions on this system (ahem yes it is a hackintosh running with the E-Fix USB).
So i can do performance measurements. I use it for sometimes very large compiler sessions. And the amazing fact was that Linux as a Guest runs without any measureable time difference on virtualised and native Linux. Windows7 on the other hand only runs with 40% on my machine and GUI is allmost non useable while the GNOME Desktop from latest Ubuntu still works fine.
Check this out. Virtual Box is free so there is nothing to loose.

Remote C++ Development using SSH only inside Eclipse Environment

How do you integrate Remote Systems Explorer and CDT plugin inside eclipse ?
What I mean is that you can use Remote Systems Explorer (RSE) plugin to work on C++ code on a remote linux box inside Eclipse but when you try to compile, you basically run a shell command through SSH. The CDT plugin is unable to locate the remote system and off course the remote compiler.
Is there a way to integrate both the plugins so that we can use the parsing / suggestion features of CDT for the remote system as well; and also features like remote compilation, remote debugging using SSH only. If this is not possible, then what is the closest open source alternative to the above problem.
While I don't know how to integrate the plugins you mentioned I do something similar to what you want to achieve on a daily basis with SSH's X forwarding.
If the remote box has X libraries installed and you have a local X server running, you can just ssh -CXY ... into the development box and simply run eclipse (or any other X application) there. The process will live on the remote box and, therefore, have access to all the filesystems and tools, but the GUI elements and those alone will be displayed in your local X session. That, though, may require quite a bit of bandwidth. Please see man ssh and X documentation for security stuff and compression settings.
The PTP project is building a remote build for CDT. Not sure how good that works, but you could always use the Terminal view from RSE to manually call your remote build (make).
I have not used it myself, but maybe you could try NetBeans and see if it works for you.
According to page https://netbeans.org/kb/docs/cnd/remotedev-tutorial.html it has everything you need, even
[...] system includes, macro definitions, platform, etc. All of this information is gathered from the remote server and stored locally on your client system, so that when you edit locally the code assistance will work even when the project is set up to use a remote build host.