‘Fun’ with Solaris Zones

31Jan08

Had the pleasure (??) of working with a Solaris Zone for two courses so far for school. Solaris Zones are great for a lot of things, and I kinda wish I had the resources to go play around with them for a bit too.

Having your own Zone to develop stuff in is great, but everything’s not just peachy keen either. Well, for one, a decent development environment (I think), is chock-full of libraries and add-ons for the developer to play with. I mean, what’s a workshop without tools, right?

Now, the problem arises when the Zone administrators configure your Zone with a very limited set of libraries and then your course instructors expect you to develop the next killer application on that very same (very crippled) Zone.

Yeah, sure, I know I have ‘root’ on the Zone, I can install my own packages and all. But look, I want to be a developer, not a system administrator. Don’t get me wrong, I’m not afraid of the ‘./configure;make;make install’ trinity of package management. Hell, I started with Slackware =P. But in this case, we have applications to code, and we have deadlines. If I’m gonna have to spend half of my time (like I am now) downloading, configuring and installing necessary libraries just to get basic functionality, boy am I sure going to rant about it.

Some background is due first I guess. We’re supposed to be developing Facebook applications. Yeah, the fancy, creative, viral, types. Now, with that requirement, you know, you’d at least expect decent graphics libraries – libpng, libjpeg and the like. What do we get? I can’t even find bloody libreadline.

So yes, instead of coding in PHP, churning out the Next Big Thing, I’m stuck typing bash commands and wasting time just trying to get the system up.

Here’s a comparison.

Here’s the default configuration string for the included PHP installation:

./configure' '--prefix=/opt/dist/php-5.2.0' '--with-config-file-path=/usr/local/apache/conf' '--with-apxs2=/opt/apache/bin/apxs' '--with-libxml-dir=/opt/libxml2' '--with-mysql=/opt/mysql' '--with-oci8=/opt/oracle/product/9.2.0' '--with-sqlanywhere=/opt/sybase'

And here’s what I have so far (I’m installing another library in the meantime):

./configure --prefix=/usr/local/ --with-config-file-path=/usr/local/apache/conf/ --with-apxs2=/opt/apache/bin/apxs --with-libxml-dir=/opt/libxml2 --with-mysql=/opt/mysql --with-gd --with-pear --enable-soap --with-ncurses --enable-mbstring --with-mcrypt --with-png-dir=/usr/include/png --enable-exif --enable-calendar --enable-bcmath --with-openssl=/usr/sfw/include/openssl/ --with-curl --with-curlwrappers

Now, before anyone says, “Hey, why are you including so many options for? You’re not going to use them all!”, here’s my response: Look above. I’m a developer now. I develop stuff. I’d like the flexibility of some tools at least to create something I’ll be proud of.

My app needs to deal with fonts too, so I’m installing the FreeType library.

But.. look what I found

root@zonebox:/usr/local/src/freetype-2.3.5# ./configure
GNU make (>= 3.79.1) or makepp (>= 1.19) is required to build FreeType2.
Please try
`GNUMAKE= ./configure'.
or >&2
`GNUMAKE="makepp --norc-substitution" ./configure'.
root@zonebox:/usr/local/src/freetype-2.3.5#

Hm. Oh well, let’s try a pre-built binary distribution of FreeType instead. Maybe that’ll work.

root@zonebox:~# pkgadd -d http://www.blastwave.org/pkg_get.pkg
## Downloading...
..............25%..............50%..............75%..............100%
## Download Complete
The following packages are available:
1 CSWpkgget pkg_get - CSW version of automated package download tool
(all) 3.8.4
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: 1
## Waiting for up to seconds for package administration commands to become available (another user is administering packages)
pkgadd: ERROR: Unable to acquire package administration lock for this system; try again later
pkgadd: ERROR: Unable to lock this zone for administration
1 package was not processed!

=(

I’m the only user on this system (well, this Zone anyway). I’m not familiar enough with Solaris and Zones to know if the pkgadd locks are enforced across the entire host system or just within the Zones themselves, but something tells me that if I’m not even able to decently install software within a Zone I supposedly have control over, something is seriously not right.

Sorry this has been quite a ranty post.

Anyone have any ideas?

Advertisements


2 Responses to “‘Fun’ with Solaris Zones”

  1. 1 Mehrdad

    I’m having a similar problem. I even tried with gnumake, you’re gonna get error after configure in the make.

    I am counting seconds and crossing fingers to see Sun finally out of business so that we can at last live free of the crap coming out of that arrogant company.

  2. For the package administration lock, look into the /tmp directory, for files beginning with “.ai”, for instance:

    /tmp/.ai.pkg.zone.lock-afdb66cf-1dd1-11b2-a049-000d560ddc3e


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: