Ben Ruset Sysadmin, etc.

19Aug/070

WordPress as a CMS

I love WordPress. I've worked with a bunch of web apps over the years, and nothing comes close to WordPress for ease of use and cleanliness of design.

My other website, NJPineBarrens.com, uses a bunch of different web apps to run. Joomla for the content management (articles and file downloads), vBulletin for discussion forums, and PhotoPost PHP Pro for image galleries. Ranked in order of happiness, vBulletin is the best, followed by Joomla, then followed distantly by PhotoPost.

I've been interested in replacing Joomla for a while. The WYSIWYG editor isn't all that hot, adding weird tags when I don't want them. Article management gets unwieldy when you have a lot of content. There's a ton of hard coded CSS that's impossible to track down. It's also pretty slow. That's not to say I don't like Joomla -- I do. It's probably the best open source CMS out there (sorry, Drupal folks.) I've been blogging with WordPress for a while, and saw that other people were turning it into a CMS platform.

I had some requirements. First, if I was going to use WordPress, I didn't want to have to hack any core files to get functionality that I wanted. I was going to limit myself to using plugins and a custom theme. Secondly, I wanted to limit the number of plugins I would need in the interest of speed. Lastly, I didn't want to really lose any functionality that I already had with Joomla.

You can take a look at WordPress as a CMS here. You can see the original Joomla powered site here.

Rather than start with a 3rd party skin, I modified the default Kubrick theme to my needs. For category lists, I changed the code to only display post titles and author metadata. Other guides seem to want to point people towards getting rid of timestamps. For my purposes, I don't really mind them being displayed. For older articles that I have reprinted (from the 1930's) it's funny to see the create date set so far back. Speaking of, I got rid of the box in the sidebar that shows the d/m/y archives.

I got my design together, and spent the bulk of the day loading my content (by hand!) in. When I was done, my front page (index.php) was a mess. Worse of all, things show up on the front page in chronological order. That's not good at all - I often take old content and "re-feature" it in Joomla. (By checking 'show on homepage') I found a plugin to take care of this - Opt In Front Page - by Denis de Bernardy. This lets me create a new category (Blog) with a post slug of "blog." His plugin makes WordPress only show articles that are in the Blog category on the front page. Best part is, you can rename the category as long as you keep the slug the same. So blog became "featured" on my site. I then changed index.php to show the full text of the article -- I'm going to limit my front page to only one article at a time. You can, however, have more and if you're worried about size just change the_content to the_excerpt to just show post excerpts. I loaded the WP-Cats plugin for faster/better mass category management.

One of the plugins I use for Joomla is JCE - it's made adding images to my articles, and formatting them,  a breeze. The defaut WordPress image upload feature is okay, but sucks for formatting. I noticed a lot of people had problems wrapping text around the image. Well, the Kubrick theme and the TinyMCE Advanced plugin addresses this. Add your image, send the image or the thumb to the editor, and then click on the image in the editor. Click on the image icon in the editor, and then click on the appearance tab. Select the "alignleft" or "alignright" class in the dropdown. Volia, your text should wrap around the image when you apply the changes. For fun I also installed the Slightbox plugin for some eye candy when people click on thumbnails. My one complaint about it is that it doesn't scale down images that are too large for the screen. I may look for an alternative.

Finally, the file downloads on my site needed to come over. There aren't many download managers for WordPress. The best I could find is wp-publications-archive. It's not great, but it gets the job done. Make sure you manually create your icons directory, or file type icons you upload won't work. You'll also need to add some CSS to your stylesheet - you can find it on the plugin's Wiki page (and stupidly, not the readme.)  The plugin sucks, for the most part, but it does the job. Fortunately media downloads are not a large part of my site.

The last thing I wanted was the ability to have links to the subdomains for the site - the forums, the gallery, etc. in my sidebar - ideally with my pages. The Page Links To plugin does the trick. You create a new blank page, and add a custom field containing the URL that you want to redirect to. When you create your page links, make sure to uncheck "allow comments" and "allow pings" otherwise your page won't save - and will show up as a draft post. You may also want to re-order your pages.

I also took a look at integrating vBulletin for article comments. I found a plugin on vBulletin.org, but it required the blog and the forums to live in the same subdomain, which mine doesn't. I tried it quickly and it didn't work, so I'm stuck with WordPress's commenting engine. Of course that meant that I had to enable Akismet.

This is just a very high level overview of what you need to do to turn WordPress into a rudimentary CMS. I have 90% of the functionality that Joomla gave me, but I feel like things are much more in control with presentation and article management. It's still a work in progress, but after my users beta test it for a while, I'll be rolling it out to production.

Filed under: Blogging, Tech No Comments
14Aug/070

VirtualCenter 1.4: VMWare’s Redheaded Stepchild?

We're pretty heavy VMWare consumers at work. Each developer has a local copy of VMWare on their desktop, and we have a decent number of VMWare Servers deployed as well. It was only natural for us to want to get some form of central management system to handle the administration and performance monitoring of our virtual infrastructure. We recently bought five Dell PowerEdge 1950's, with dual quad core Xeons, 15GB RAM, and a 130GB 15K SAS drive. One of those boxes is loaded with CentOS 5 64 bit, the other four are loaded with CentOS 4.4 64 bit. The CentOS 5 box will most likely be reprovisioned to CentOS 4.4 for uniformity.

VirtualCenter 1.4 is the old version of VC. It was used to manage ESX 2.x and GSX servers. They've released VirtualCenter 2.0 which manages ESX only, and have relegated the old 1.4 codebase to manage legacy - and currently shipping VMWare Server - products. It's a decent enough product, but it has some real quirks.

I have to make 20+ identical virtual machines. VirtualCenter has a templating option which will allow me to create a template and clone it off when I want to deploy a new VM. "Perfect," I think to myself. Our standard Linux agent build has some customizing.

  • CPU: 1 virtual CPU
  • Memory: 1024 MB
  • Disk: 6GB SCSI. Virtual disk should be preallocated, and chopped up into 2GB files.
  • Ethernet: Two ethernet cards, each bridged to a different physical NIC in the box - this is needed for Oracle RAC
  • No Floppy

So, I go ahead and make a template. It saves it up on the server thats running VirtualCenter. Oddly enough, the template only takes 1MB worth of space. I figure that since I have not provisioned a OS on the template yet, the software is smart enough to not keep 6GB worth of empty virtual disk files around, and when you deploy it on a VMWare server, it will just create the 6GB file then.

Not the case.

When you deploy the VM from the template, you're prompted if you want to change the memory size, which NIC's you want to bridge, and the floppy returns. The kicker -- the virtual disk is created, but not preallocated. When loaded with the OS build we use for the agent, the VM only ends up taking up about 1.2GB. Which is pretty bad when you go back to the status screen for the physical VMWare Server and see that you still have 40GB free on it's disk. So what can happen is that your VM's can grow and grow unchecked, until they all hit the boundary that was set for them (in this case 6GB) -or- the physical server runs out of disk space.

I'm also not a huge fan of the way that the software presents data. It takes too many clicks to navigate to see what VM's are hosted where. Errors are reported by icons that show up next to the VM's name, and buried in logs, instead of right on the status page for the VM.

It's also pretty braindead about copying VM's around. VC will do cold migrations of VM's between managed servers. It does this by copying the file between the two servers. What happens if they both share the same storage on NFS? The system should be smart enough to see that and not copy the file, right? Nope. The file gets transfered from the NFS share, through the old VMWare Server, to the new one, and back up to the NFS share. It also appends an underscore on the name of the VM since the file name is the same. It can take a really long time to copy VM's around.

It seems to me that they just hacked VC 1.4 support for VMWare Server, and that they would have been far better off adding support into VirtualCenter 2.0, and adding some logic to make things like templating and cold migrations of VM's work better.

So, I battled VMWare today. As a reward, I went body surfing after work. I often think how cool it is for all of my friends that live and work in Manhattan. Then I remember that I live 5 minutes from a clean beach that's safe to swim at. It's not so bad here on the shore.

Filed under: Tech, VMWare, Work No Comments
14Aug/070

Dana Goes to Batsto / Pine Barrens Website Thoughts

Last Sunday I decided to give Laura a break and took Dana down to Batsto Village for some father-daughter bonding time. You can see pics in the gallery.

I was discussing Batsto with a few people and they asked what and where it is. Despite me running a rather comprehensive site about the Pine Barrens of New Jersey, and specifically the Ghost Towns of the Pine Barrens,  I don't have anything where I can say: "Batsto - take a look at this link" and have something akin to a wiki article for people to look at.

I've toyed with the idea of setting up a wiki (probably using Mediawiki) for Pine Barrens content, but given that I already run Joomla, vBulletin, and Photopost for the site, I'm not really eager to install another piece of software and potentially open up another attack vector on the site. I'm also worried about wiki vandalisim - I don't really want it to be something that I solely edit/maintain myself, but frankly I just don't have the time to run a wiki on top of the other software. I could make articles in Joomla for each ghost town, but frankly Joomla/Mambo's article management sucks and I forsee it becoming an unweildly mess. Still, I can't think of a better way to do it.

I'm interested in a Joomla replacement that isn't Drupal. I'd really like to switch the main site over to WordPress, but there's a lot that WordPress needs to do to become a better CMS system. It's article presentation system sucks (and rightly so, since it's a blog) for a CMS type site.

Another big part of me says that I should worry about just going out into the woods and enjoying my time on this earth rather than worry about what software I use to run the website.

Filed under: Family, Tech No Comments
10Aug/070

Lame Update

Couple of things to touch on:

1. I found my first example of "why do it in Perl when shell will do it better/quicker/easier?" Consider this - njpinebarrens.com backs up it's database and the webroot for three sites nightly to a gzipped tar file to a 40GB USB external drive. The site itself takes up a few gig, so clearly a nightly script that doesn't clean out old stuff is not a sustainable thing. As such, the drive filled up and I lost a few nights backup. I was going to write a perl script to run the backup (which really is just doing a mysqldump and tar czvf'ing the /var/www directory up) and delete files older than X days. Then I googled a bit and came up with:

find /backup -mtime +7 -exec rm -f {} \;

That pretty much does what I need it to do. One line. No mess. Of course I now feel like an awful sysadmin for not realizing I could do that before. Oh well.

2. Verizon is coming to fix the loud hummmmmmmmmmm in my line tomorrow. I feel like my copper phone line is an antique. I really need to find a nice old 1940's rotary phone and stick it in my house somewhere.

3. BBQ at Helene's tomorrow. Maybe there will be some Zumba.

4. Devin mentioned me in his blog. I don't rate high enough to be mentioned by name though. Also, I like to think of myself as more than just "the IT guy." I may have to flip my BOFH excuse calendar out and blame the slow network on... sunspots.

5. Gonna try to take some photos this weekend. Gonna try to remember to charge the battery in the camera.

6. Getting vendors to call you back is a pain. So far I am waiting on:

  • A quote from Yipes for point to point Metro Area Ethernet (it's a MAN baby!) between the office and the colo
  • A con call with Watchguard on Monday
  • A replacement Sun V210 (should be shipping next week)
  • Verizon to call me back about their metro area ethernet
Filed under: Perl, Work No Comments