ColdFusion in an Enterprise Environment - Part 5 - Creating a Local development environment.

As a part of giving the developers power to move our office forward is to provide a coding environment where they don't need to worry about breaking someone else's momentum. So providing an environment where developers can code on their own machines is a must. Our office has implemented VMWare ESX, so when it came to pick local development we choose VMWare Server.

Scott Lingle has posted a extra content of why we choose our of VMWare Server guest host. You can view his details here http://www.personal.psu.edu/sal21/blogs/stuff/2009/06/create-a-web-application-devel.html

And Below is a snippet of his post on how to create our office's setup…

  1. Install virtual server on the machine you will be using for remote development. In my case it is my laptop. I'll refer to the machine where virtual server is installed as the 'VM host.' See, I told you that you'd have to be familiar with it. It'll get better from here.
  2. On the VM host create a local user for use with VM Server. We will also be granting some file/directory permissions to this user. I called my local user "VM." I added the VM local user to the 'Administrators' group. This was to facilitate running VMWare server. Check with your IT department regarding policies on administrative rights and permissions.
  3. The next step is to prepare your Eclipse workspace with your existing (or new) codebase. In our case, this meant creating a new workspace and checking the appropriate source files from source control, Our source control is subversion.
  4. In your workspace, choose the folder that is the root of your web server or web application. This folder will become the 'home directory' when we configure our web server on the virtual machine. Share this folder. Remember the name you give it, you'll need it later. Mine is named 'dev.local$' For those not familiar with Windows shares, the '$' makes it hidden. You can create shares for multiple project roots and create either virtual directories on the web server or virtual web servers with different host headers, but I'm going to focus on a single instance for this discussion.
  5. At the same time, we need to give our VM local user permissions to access the share and NTFS permissions for at least read permissions (add write if you are going to use things like cffile) Mine is set to "change" which on Windows is read/write and delete.
  6. Ok, let's fire up VMWare Server. Create a virtual machine. I won't go into much detail on how that is done. That is outside the scope of this example. The best thing to do is create a virtual machine, install Windows server on it, patch it to bring it up to date. This will be your baseline server.
  7. Make a copy of the base server. One will be your SQL server and one will be your CF/IIS server. You could combine these onto one machine if you'd like. We wanted to accurately represent our production servers. You may also want to make an extra copy of your baseline server. You can use this copy to make new servers in the future. This might be a good thing to put in source control for safe-keeping.
  8. Make the appropriate filename changes and register your copied server in VMWare.
  9. Start both servers. I'll leave it up to you whether you want to install VMWare tools, etc. Install CF on one server and SQL server on the other.
  10. If you're satisfied with the SQL server you can shut it down (or pause) for now. We're done with that for a while.
  11. Get on to the virtual server that houses CF. Create a local user on this server. I named this "VM" like our local user on our host machine for consistency. Actually, they both have the same password as well. This local user should be part of the administrator's group. You can mess with permissions here. We went with admin as these servers are only virtuals, not accessible from the network and not connected to our domain.
  12. In Windows services, set the ColdFusion instance of JRUN to log on as the local VM user. You will need to restart the CF service.
  13. Now we need to find the IP address of the host machine. This will be the IP assigned to your VMWare virtual ethernet adapter on the host machine. Since we are on the CF server, the easiest way to find this is to go to a command prompt and type IPCONFIG /ALL. You should see a screen similar to the one below. The IP address of your host machine is the Default Gateway on your virtual servers. This is how VMWare routes traffic from the virtual machines to public networks. In my case, it is 192.168.232.2, it may very well be different on yours.
  14. Now, in IIS configuration on the CF virtual server, go to the 'Home Directory' tab of the default web server. Set "The content for this resource should come from:" to "A share located on another computer" and fill the Network Directory as the share that we created on the host computer. You remember, the one that went to the root of our project.
  15. Click the 'Connect As...' button. For the username / password, enter the username you created on the VM host machine (your actual development machine) and added to the permissions on the shared folder in step 5. When you click 'OK' you'll have to verify the password.
  16. Now, if you do nothing else and you open a web browser on the CF virtual server and type 127.0.0.1 (the local loopback IP for the server) you should be able to browse to the root of your project. For testing purposes, I created an index.cfm in the root of my empty project and did a "Hello World" test.


Please Note: This post is conjuction with a series of blog posts about my findings in setting up an enterprise development environment. Please view the rest of the posts at Coldfusion in an Enterprise Overview


Comments

Popular posts from this blog

ColdFusion in an Enterprise Environment - Part 1 - Understanding how to use SubVersion (SVN)

coldfusion builder 2 extension not displaying browse button on type=projectdir

Being Thread Safe in Coldbox/Coldfusion