Oct 23
This is the first post in a series I will call "What I Learned Today". While this post focuses on tech, expect this series to contain lessons learned from all parts of my life.
With my recent issues regarding getting CF8 installed, I decided to learn how to run CF in a multi-server mode using JRun4 to manage it. The goal for me was to have CF7 and CF8 running on my Macbook concurrently and natively. The reason for this is that the production environment for my day job is CF7 (Unix)/SQL Server (Windows) environment. I work full-time from home, and have a local development environment here so I do not need to work over Citrix remote access all day and be bogged down by the oft-times slow netowrk there. Therefore, I need to mimic that environment so I can code with the rest of my team and keep the same environment variables. Up until now, the way I did it was to rely heavily on VMware Fusion and have two separate virtual machines running at the same time, since I never could get CF7 to install and run correctly natively on OS X. This was a huge memory hog, and often I would be pushing my 4GB of memory to the limit. Knocking out one of the VM's would help me greatly.
Through the aid of the House of Fusion folks, I came across a blog post that described how one person used multi-server mode to do exactly this. I combined the knowledge there with this page from Adobe on how to deploy CF9 as an EAR file, and I had my solution. Using Apache for my web server (I use MAMP Pro for super easy creation of multiple virtual hosts) I will have different CF servers running for different virtual domains.
So, here is how I did it all. I won't steal from the blog posts I reference, I will note where I got the steps from though. These directions assume you are using OS X, modify as needed for Windows or Unix.
- Uninstall all CF server instances from OS X.
- Reboot (force of habit, might not be needed but better to be safe).
- Choose which version will be your most often used version of CF. For me it is CF8. This drives the rest of my instructions, change yours accordingly.
- Install CF8 as a multi-server installation. This will install JRun4 as well. *
- Run the ColdFusionLauncher application from the /Applications/JRun4 directory.
- Start the admin server and CF8 server (if not running).
- Open Terminal, and connect to the JRun web server configuration tool with the following command
[code]java -jar /Applications/JRun4/lib/wsconfig.jar[/code]
- Connect to your Apache server of choice.
- Select the CF8 server from the JRun server list.
- Enter the directory containing your httpd.conf file in the configuration directory field.
- Check the configure web server for coldfusion applications check box.
- Click on the Advanced button
- Ignore the top three check boxes
- Enter the location of the httpd binary in the server binary field.
- Enter the location of the apachectl binary in the server control script field.
- Click OK to close the window.
- Click OK to commit the settings.
- Make sure Apache and the CF8 server are running, then run the CF8 administrator setup at http://localhost/CFIDE/administrator/. If this runs correctly, you have CF8 and JRun installed properly!
The next steps are to be done for each other version of CF you want to have running.
- Run the installer for CF, choose the create the J2EE files. Choose EAR for file version. I changed the "cfusion" value in the context root option in the installer to "/".
- Find the location of the cfusion.ear file the installer created.
- Go to your /Applications/JRun4/servers directory in finder. Create a new subdirectory called "cf[enter your version number here]".
- Go to the JRun admin console web page (http://localhost:8000/) and create a new server named the same as the new directory name.
- Delete the default-ear directory from the new directory.
- Copy the cfusion.ear file to that new directory.
- Expand the EAR file according to the steps in the Adobe page I referenced.
- Go back to the JRun admin console, and choose the CF server.
- Start the server in JRun, it should do initial setup for you.
- To hook into Apache, make sure that the ProxyService is running. By default it is not. It is found under Services/Active Web Servers. Kee the JRun web server running, you need it for CF administrator access.
- Use the blog post I referenced to hook this CF server directly to the virtual hosts in Apache that you want to use it.
- Connect to the CF administrator using the JRun web server and port it defined for you. This will allow CF to finish it's initial set up.
- Configure CF, and away you go!
Oct 13
No, this time it's not a new physical address (though Lord knows I've had enough of those recently). It's a new home for all my web sites. I now own my own virtual private server (VPS) with Viviotech.
After a truly disastrous trial with a VPS with Gearworx (I loved the VPS concept, Gearworx was awful. They have earned their "F" rating from the Better Business Bureau for sure), I moved back to a shared server with HostNexus. At first things were good. The price was a little steep for a shared server (meaning I am sharing space and resources with literally hundreds of other sites) but the setup was good, at least at first. Then, over the last month, a variety of things began to go bad. First, they began removing customization access rights from us (under the veil of security, I can't argue with that but it's not what I signed up for), then their network began to slow down big time, it's still suffering as far as I can tell. That led to their administrative console becoming almost useless because it was so slow, and finally one or more other domains on the shared servers started doing things to eat up so many resources that everyone else started timing out. Combine all that with tech support that, while extremely courteous, seemed to struggle sometimes to fix the more basic problems encountered, and I had to find a new home and fast.
Upon recommendations from several people in the ColdFusion community, I looked at Viviotech. For not much more than I was already paying, I could get back to having my own VPS. My server, my control, my setup. The only catch was that it was Linux-based. Not a big deal at all for my code, but it meant I had to convert my databases from Microsoft SQL Server to MySQL 5. This, while adding to my task list, was also ot a big deal since I will have to be well versed in MySQL as part of my PHP development skill building.
So, I made the switch over the weekend to a CF8 VPS server (PHP is standard on Linux VPS so I can run both), and today got all but one of my sites set up. There were a few hiccups in the setup process, but Vivio's support staff was there quickly, and competently, and with little headache I got things taken care of. I am extremely happy. Happy enough that I am more than willing to place a banner for them on my blog.
Oct 5
For over a dozen years now I have been coding web applications using ColdFusion, from version 3 all the way through version 8. I love ColdFusion, and given the choice I would choose it over any of the other server languages. Unfortunately, the people who pay the people who employ me are forcing me to go another route. It's not offical yet, but at the very least the Department of Education is adding the LAMP stack (Linux, Apache, MySQL, PHP) to it's preferred list of web development platforms, and I have heard opinions that it may displace ColdFusion in the future. So, in the interest of remaining gainfully employed, I am becoming a PHP developer over the next few months.
The trick of this is that I am going to have to become proficient on my own time, they won't pay me to do this. So I am going to have to use my personal projects as training grounds for PHP. I have some work that I need to finish that I am going to keep in ColdFusion, and I am not going to rewrite sites in PHP, but new tasks on existing sites, and new sites, are going to be done primarily in PHP for the short run.
To aid me in my learning process, I will be using this blog as a brain dump to note what I like, don't like, and struggle with as I go about learning PHP.
Sep 24
The theme of my workday so far has been one of frustrations. The core of my original workday was managing the release of two site updates to production in the early afternoon. Before any site is released, we have to jump through hoops of a process of paperwork submittal and approval by a change request board. Welcome to life in the government. Today, for the first time in my nearly 5 years working at this position, a request to release was denied. The reason being becasue the CIO decided to put a blackout on all releases for the next 10 days, which apparently nobody knew the scope of this blackout until the weekly approval meetings were held. And from what I can glean, this blackout is, as a co-worker stated, "like hitting a gnat with a sledgehammer."
Prior to that, I was asked to do some last minute estimations to one of our applications to really beef up the level of security both in data storage and in access. This was for a group that needed to use this application on October 5th. Now keep in mind that in our little world of CMMI, there is no such thing as a 5-minute fix, so the mere fact that they were willing to forego a lot of our QA processes to get this done in time spoke volumes about it's importance. My initial estimates put it at about 48 hours of just coding and unit testing, but we pared it down to 32 hours. In this timeframe however is my birthday (on Monday) and a weekend trip starting tomorrow that my wife has had planned for a while now (where to, I still have no idea), so when all was said and done, not only was I going to be scraping the bare minimum for time to get it done, I was looking at pulling a double-shift on my birthday in addition to working late the night we return for this trip (making the overall prospects for relaxation less). So we go through all of this, get our schedules seemingly lined up.... and then find out that the group requesting this never got permission from the Office of General Counsel to go ahead with it in the first place.
Ready.... FIRE!!!... Aim...
Recent Comments