revamp: the making of (Part 1) - Setting up an Eclipse IDE development environment for your Pantheon Project

This is the first of a series of articles which will log the revamping of the AWebFactory company website and its migration to Pantheon, the "Cloud Platform for Drupal", which will not only be host to live deployment, but which will also serve as a development platform.

Signing up

So I signed up for an account on Pantheon, a free developer account to begin with. I went to and clicked on Create Free Account. Filled out the details, received a confirmation account (curiously, even with GMail, which is pretty discerning about those things, it arrived in the Spam folder, so do check that when you create your account), and after validating my site when I was logged in ( ) there was a sign on my dashboard offering a link to Create a site now.

Uploading my ssh public key

Before doing anything, I uploaded my public key (clicking on Add key under Your Keys), required whether you use the git push and pull or On-Server Development and sftp editing method for managing your code.

I then created a Panopoly site, since I wanted to leverage the power of Panels, Panelizer and a host of other convenient apps (see Report back on a set of key DrupalCon Denver 2012 presentations for background, especially the sections on the What's new in the Panels Universe and Open Academy presentations).

Creating and commiting the barebones starting point based on a Drupal distribution

To create this site, I repeated the steps documented in Making your life simpler: Just do it on Pantheon! Once I had finished and had a basic Panopoly based site with the Stark theme, I refreshed the site dashboard and since On Server Development was enabled (automatically upon choosing the Panopoly distribution as the site building start state) all I had to do was type in a commit message for the 236 file changes which had resulted. I typed in “Initial commit after installing Panopoly distribution with the Stark theme created” and clicked Commit. In order to make a local continuing backup of my work, I clicked on Make backup. After being notified of the completion of the backup, I clicked on the Configuration tab and download the database, the files and the code, unpacked it all and created a git repo on one of my own servers which gave me a nice warm secure feeling. So after each important commit I decided I would do the same and mirror the commits on my own local server.

Setting up a suitable development environment using the Eclipse IDE

In order to set up a development environment that clicked with the On-Server Development, I set up Eclipse with Remote User Explorer as my IDE for the project. After readying my Eclipse IDE with remote explorer support, from the Site Dashboard for Development (Testing and Live not yet being used and in any case to be managed through deployment via the Pantheon dashboard) I triple-clicked on the textarea to the right of the Codebase title, and selected the sftp connection string, which looked something like the following:

sftp -oPort=2222 dev.{lots of numbers}{lots of numbers}

Actually, clicking on the context sensitive help “?” to the right of the text area, the string is broken down into its component parts suitable for sticking into an sftp client (like Transport on the Mac, for example, or, Eclipse Remote Explorer):

username: dev.{lots of numbers}

host:{lots of numbers}

port: 2222

In Eclipse I clicked on the Define a connection to a remote system icon, left ssh selected and click Next, filled in the Host name field (which was replicated in the Connection name field and typed in “AWebFactory dev instance on Pantheon”, left Verify host name checked and clicked Finish. I right-clicked on the Sftp files node and open Properties; clicked on the Subsystem node, and filled in the Port number and User ID. I then opened up the Sftp files node on the Code tree, and then the My Home node. The file system tree then opened up as shown in the Pantheon Support Center documentation (if you receive a request to enter a password, it will be because you neglected to upload a public ssh key as mentioned above).

Now, if I add, delete or modify files via the Eclipse IDE, I will be prompted to commit those changes as described above. I have a great and simple develoopment environment!

Next I set up the user stories on Pivotal Tracker, which we will review as they are implemented in future editions of this log.

Remote System Explorer perspective

Thanks for the great posts on Panoply, Pantheon, and RSE. Perhaps this is just due to the version of Eclipse I'm running (Helios), but I had to open a Remote System Explorer perspective before I could see the "Define a connection to the remote system" icon (you can also define a remote connection by going to File|New|Other|Remote System Explorer). I was able to follow your instructions after that. I was, however, prompted for a passphrase even though I added my Public Key as described in the post. In fact, I was prompted twice and I could not get past the second request so I had to cancel out of it. The directory structure from Pantheon showed up anyway under My Home.

Very cool stuff.


Thanks for the additional detail on the Remote System Explorer

It is necessary to open the corresponding perspective to actually define a remote connection, that is correct. Your comment will help people who are trying this out without having a lot of experience with Eclipse.
And yes, the whole sftp connexion with Pantheon (assuming you do have your public key registered with your account) does become quirky at times. I now have my "set method" of doing a manual sftp on the command line with the string I directly copy from my Pantheon dashboard, and as soon as that works, then Eclipse remote sftp will work. I don't know if that is just my superstition (like not stepping on the cracks) or what, but it is consistent :)
All in all, I find it a very cool way to get stuff done.
I wonder if anyone else has experience with other IDE's?

Interesting! What about debugging?

The Pantheon setup sounds very interesting for me because I develop on multiple machines and it would save a lot of setup time locally. Two questions:

- Can you still debug via e.g. XDebug with this setup?

- Do you still use EGit in Eclipse or are all the Git manipulations performed via web interface?

Gerard, also look into doing

Gerard, also look into doing this on Amazon EC2 and associated services -- they have come a long way. The micro instance is good enough to run Drupal on with a lean server like Nginx and cheap enough to run monthly. One can also create a RAID 10 using EBS to avoid IO problems.

You can set up things to do it whichever way that you like and shut it down when you're not using it to save money.

You even can assign a static IP address that refers to a virtual box. They also have various mechanisms to set up a whole virtual infrastructure and scale that according to your personal specifications.

I personally like to be as close to the cloud as possible and I don't like dashboards to do anything. Backups are also easy enough on Amazon's infrastructure.

Their panel to manage virtual machines, and user defined clouds has improved significantly from the olden days.

My 2 cents.

Pantheon will definitely save you time

Hi Gerald,

With PDT you can install either Zend or XDebug. I have not tried them with Pantheon however.

Regarding Git, in this example I installed Panopoly, which requires On-Server development, so all the commits are done via the site dashboard interactively.

Victor Kane