Coding in the cloud without the need of local environment

At our company, we have been getting a few WordPress-based website jobs lately. Usually, three of us work simultaneously on such a project and need to edit the same codebase with the same database (so the theme settings and content stays the same). We can share the changed files through git and database through exports and imports. However, this process is tedious and it slows down the development speed.

The Solution.

So, how to solve this problem? (referral link)

Enter is an online development environment with access to a real console (with Vim and everything!) and file editor with syntax highlighting. Simply put, it is like a VPS hosting (with Ubuntu as of writing) with file editing capabilities in your browser.

It means that you can install, configure and deploy apps such as apache, mysql, php, ruby, rails, you name it. It comes with some of them preinstalled (e.g. LAMP) so you can jump in, clone your git repo and start developing right away without the need of installing everything locally and then configuring it.

After signing up, you get 1 CPU, 1 GB of RAM and 3GB of space for free and also domain so you can see the fruits of your hard work. Of course, you can setup apache for your own domain name and have that connected to your virtual machine.

I think the best way to understand and see what it can do is to register and try it for free at your own.

Configuring sshfs, alias how to easily manage the files on your VM.

While it is true that gives us an option to upload, move and delete files right in the browser, uploading files is not working for me at the moment (I’m using Safari) and I like to have a better control over the process of managing files. How to solve this issue?

A while ago I told you that you have access to real console in real Ubuntu. We can use this fact and setup sshfs so Koding’s filesystem will mount locally in our OS. You need to have sshfs installed and working on your local system, though.

Keys and SSH

  1. Generate an RSA ssh key on your local machine (guide)
  2. Copy your (public part of your generated key) into Koding’s .ssh/authorized_keys file.
  3. Add this also in your Koding’s Account Management under the SSH Keys settings.
  4. Create a config for connecting into Koding’s ssh server in your local machine’s .ssh/config file.
    Host *
     User <your user name>
     ProxyCommand ssh nc %h %p

    We need this config because Koding uses multiple servers (proxy) to access your VM.

  5. You can then connect to the Koding’s console with the command
    ssh <vm-number>.<your user name>

    For example, connecting to one of my VM looks like this

  6. Create some temporary folder for mounting your coding file system. I have created a folder called tempMount.
  7. Finally, you can mount the remote filesystem with the help of sshfs command by typing this command
    sshfs <vm-number>.<username><username>/ tempMount

And that’s it! Have fun with your VM and try new things there.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s