Jan 302009
 

Now is a good time to update my resume (cv), and I’m hav­ing a little dif­fi­culty in fig­ur­ing out the best way to present it. The clas­sic “say what you did for the employ­er” tends to assume that your involve­ment in pro­jects is bounded by your employ­ment, but that’s not always the case. For example, I’ve chaired tech­nic­al com­mit­tees and been involved with con­fer­ence organ­isa­tion for time peri­ods that over­lapped both employ­ers and being self-employed. For example, I chaired the XML Con­fer­ence from 2001 to 2005, work­ing for (in chro­no­lo­gic­al order) SoftQuad Soft­ware, my own con­sult­ing firm, and Sun Microsys­tems. It’s the over­lap­ping time peri­ods that I’m hav­ing dif­fi­culty in fig­ur­ing out how to present. I guess I could go to a pure pro­ject-based resume, except for, some of what I did was on behalf of a par­tic­u­lar employ­er and thus was bounded with­in that time period.

I can­’t ima­gine I’m the only per­son with this issue; any­one con­trib­ut­ing to open source soft­ware over a peri­od of time has it, as well as people who volun­teer at oth­er organ­isa­tions in their spare time. How do oth­ers present what they’ve done in a way that suit­ably high­lights the import­ant stuff?

Jan 292009
 

Since the Apache access logs grow with time, I like to rotate them once a month or so (for minor sites that don’t get much traffic). On Debi­an, you use logrotate (I’ve writ­ten about set­ting it up here). On OpenSol­ar­is, you use the logadm com­mand, with the actu­al rota­tion being spe­cified in /etc/logadm.conf. When you look at that file, it warns you not to edit it by hand, which I found mildly amus­ing. Since you can make changes via the logadm com­mand itself, I figured I’d try that out. 

For Apache log files in the usu­al place, /var/apache2/2.2/logs/access_log, read­ing the man pages for logadm gives 

logadm -w apache -p 1m -C 24\ 
-t '/var/apache2/2.2/old_logs/access_log.%Y-%m'\
-a '/usr/apache2/2.2/bin/apachectl graceful'\
/var/apache2/2.2/logs/access_log

Test­ing with logadm -p now apache seems to work just fine. I’ll know more about how reli­able it is in a month.

Jan 292009
 

My laptop at Sun was a nice little Mac­Book; light­er than the Mac­Book Pro but power­ful enough for my needs. So when I left, I decided I’d buy myself a new Mac­Book, being the path of least res­ist­ance. In the­ory, Apple makes it easy to migrate your inform­a­tion from one Mac­Book to anoth­er. So I stripped the Sun inform­a­tion off the old one, bought my new one, added a couple of gig of RAM, and came home full of anticipation.

The migra­tion was­n’t quite as easy as all that. I installed the Migra­tion Assist­ant on the old laptop, con­nec­ted the new one with an Eth­er­net cable, typed in the num­ber that appears on the new one into the old one, got the mes­sage “Pre­par­ing inform­a­tion…” and waited. 15 or so minutes later, the new one says it’s lost the net­work con­nec­tion and gives me a new num­ber, while the old one pops up the dia­log to type the new num­ber into. I repeated the pro­cess a couple of times, chan­ging vari­ables (con­nect through DHCP rather than dir­ectly) with no suc­cess. So I made an appoint­ment with the Geni­us Bar in the loc­al Apple store and went in there.

The Geni­us bar per­son said that there’s a known issue that’s solved by updat­ing the Migra­tion Assist­ant to the latest ver­sion. She updated the soft­ware, but it did­n’t solve the issue; the same prob­lem crops up. She did offer to move everything by hand by pulling out the old disk but I decided I did­n’t feel like wait­ing that long in the mall. And I remembered that I had a Time Machine backup at home, which should also work to put the inform­a­tion on the disk.

Back at home I backed up to the Time Machine, then star­ted up the install­a­tion pro­ced­ure on the new laptop and chose to install set­tings and files from the Time Machine. Then I waited. Approx­im­ately six hours later (no exag­ger­a­tion; the con­stant mes­sage was “check­ing Time Machine backup”) there was some error say­ing it was­n’t an OS X disk, or some­thing like that. At this stage I gave up and decided to just rsync my user dir­ect­ory includ­ing my applic­a­tions. That worked just fine and was much quick­er (about 15 minutes start to finish).

It turns out that rsync on the Mac is a little con­tro­ver­sial. There’s more in-depth dis­cus­sion in the com­ments to one of Tim’s posts. For my pur­poses, rsync worked well; I did take the ele­ment­ary pre­cau­tion of log­ging out on the tar­get laptop first.

Jan 242009
 

As has been widely repor­ted, Sun Microsys­tems laid off a num­ber of people on Thursday. That num­ber included most of my pro­ject team and me, since the pro­ject I was man­aging was cancelled. 

Over the nearly four years I was at Sun I learned a lot, con­trib­uted what I could, and had fun work­ing with some excel­lent people. Some of them are still there; oth­ers, like me, are now fig­ur­ing out their next steps. These days it’s easi­er to keep in touch, for which I am grateful.

What’s next? I’m not really sure. First I’ll take some time off, help out with North­ern Voice, fin­ish off recon­fig­ur­ing my base­ment firewall/website sys­tem, do some house and cot­tage renov­a­tions, catch up on my crafts, and think about what I want to do next. Even­tu­ally some good oppor­tun­ity will come my way that I can­’t res­ist; ideas and leads are welcome.

Jan 162009
 

Notes on installing Apache’s vir­tu­al hosts on OpenSol­ar­is 2008.11; part of a series that star­ted with Installing OpenSol­ar­is.

On Debi­an, you have to set up vir­tu­al hosts using sep­ar­ate files, called sites-enabled and sites-avail­able, part of the Debi­an Way Of Doing Things, which is not doc­u­mented on the Apache site. (I’ve writ­ten about this before; the link I refer to there is no longer avail­able, so try this one if you’re on a Debi­an or Ubuntu plat­form.) For­tu­nately, OpenSol­ar­is seems to use the stand­ard Apache meth­ods, so named vir­tu­al hosts can be set up using the doc­u­ment­a­tion at Name-based Vir­tu­al Host Sup­port (the meth­od you choose when you want to run mul­tiple web sites from one IP address). It’s easy to find the httpd.conf file, it’s in the Web Stack Options applic­a­tion, under Advanced Con­fig­ur­a­tion on the Apache2 tab (and even labelled “edit httpd.conf”).

I set up a vir­tu­al host for each web site on the devel­op­ment machine. This is a little more com­plic­ated than it is if you’re start­ing from scratch with a new site, since I want to be able to set up all the soft­ware and sys­tems on each web site on a test basis, before switch­ing the old serv­er off and the new one on. In the mean­time of course, the old serv­er is still serving those web­sites with the same URLs. So I needed a sys­tem that allows the com­puter I’m devel­op­ing on to see the new sites reached from those URLs, while the rest of the world sees the old sites.

The way to do this is to edit the hosts file on the devel­op­ment machine. In a ter­min­al win­dow, type pfexec vim /etc/hosts. After the bot­tom line, which should look some­thing like 127.0.0.1 machinename.local localhost loghost, add the line(s) 127.0.0.1 websitename. You don’t even need to reboot or restart the Apache serv­er, which is nice. If it does­n’t work (you don’t see what you expect in your browser), take a look at your /etc/nsswitch.conf file and make sure that the hosts line has the files dir­ect­ive before the dns dir­ect­ive, oth­er­wise the sys­tem will ask the DNS serv­er (which will return the site the rest of the world sees) before ask­ing the hosts file on your sys­tem. One way to check which IP address you’re look­ing at to make sure you’re look­ing at your test sys­tem, not the out­side one on the net, is to use getent hosts websitename. This should tell you the IP address is 127.0.0.1. The com­mon altern­at­ive com­mand, host websitename, asks the DNS serv­er and thus will tell you what the out­side world sees.

Debug­ging the httpd.conf file is the next step, to make sure you have those vir­tu­al hosts set up cor­rectly. In the end, I just added 

NameVirtualHost *:80

<VirtualHost *:80>
  ServerName domainname
  ServerAlias domainname www.domainname
  DocumentRoot "/var/apache2/2.2/htdocs/domain"
  CustomLog "/var/apache2/2.2/logs/access_log" combined
</VirtualHost>

to the end of the exist­ing httpd.conf file. 

Update: I also had to add

  <Directory /var/apache2/2.2/htdocs/domain>
         Options Indexes MultiViews FollowSymLinks
          AllowOverride FileInfo
          Order allow,deny
          Allow from all
</Directory>

to the vir­tu­al host dir­ect­ive (just above the cus­tom log line) to make Word­Press’s pret­ti­er permalinks work.

The one thing OpenSol­ar­is does that is dif­fer­ent to the Apache doc­u­ment­a­tion is put­ting things some­where dif­fer­ent, so instead of using /usr/local/apache2/bin/httpd -S to debug the vir­tu­al host con­fig­ur­a­tion, you use /usr/apache2/2.2/bin/httpd -S. I learned the hard way that if you want to use a default vir­tu­al host, you have to define a ServerName for it.

Jan 152009
 

The next step in the OpenSol­ar­is odys­sey (here’s the first post) is to come up with the to-do list. I will prob­ably for­get a few things, but this list will get me star­ted (and remind me when I have to do this again in the future). Since I’m doing this for my per­son­al web sites, I don’t have to be ter­ribly effi­cient about meth­od­o­logy, as long as it all works in the end.

  • fig­ure out which web sites I want to rep­lic­ate on the new sys­tem and their require­ments for soft­ware and lan­guages (Ruby? Perl?) [mostly done]
  • find out how to change the DynDNS set­tings auto­mat­ic­ally on OpenSol­ar­is, i.e., wheth­er the script I’ve used without touch­ing for years on Debi­an will work
  • fig­ure out how to con­fig­ure vir­tu­al hosts on OpenSol­ar­is Apache, which is bound to be dif­fer­ent to the Debi­an Apache way of doing things [done]
  • set up log file archiv­ing and roll-over [done]
  • down­load and install Word­Press, one for each Word­Press sys­tem I main­tain [done]
  • down­load and install the pack­ages for the oth­er sites I run
/* ]]> */