Tuesday Feb 09, 2010

Installing and running Fluidsynth on OpenSolaris

I'm a sucker for a good multimedia package.  I love playing with software that does movie playback on encoding, audio playback, transcoding...you name it, I love playing with it.  So naturally I was pretty psyched to see that somebody has contributed the Fluidsynth software synthesizer package to OpenSolaris.  Here is what I did to install it and run it in order to prove that the package actually works.  (here's a spoiler for you: it does work.)

Fluidsynth was put into the OpenSolaris "pending" repository, the idea being that people will check it out and if it's deemed to be of reasonable quality, it'll get voted into the contributed software repository.  The "contrib" repo is where good packages go after they've been testing in the "pending" repo staging area.  We haven't voted on Fluidsynth yet as of the time I write this; I'm hoping that will change after people read what I've done here.

(note: for my testing, I am running OpenSolaris build snv_111b)

First things first: set up OpenSolaris to find packages from the Source Juicer "pending" repository with these two steps:
  1. type "pfexec pkg set-publisher -O http://jucr.opensolaris.org/pending jucr-pending"
  2. type "pfexec pkg refresh"
Next, I launched the Package Manager application and chose the "jucr-pending" repository from the pop-up menu on the right side of that application's user interface.  After Package Manager thought about its new catalog of apps for a moment, I saw a list of hundreds of packages available to me.  I used the search field to type "fluid", and found the "fluidsynth" package.  Selected that, saw that it lists several other packages as dependencies (i.e., those other packages had better be installed for Fluidsynth to work correctly), then I installed it.  Nicely, the Package Manager installed Fluidsynth and its dependent packages for me.

At this point I ran into a little snag, which is not the fault of OpenSolaris: I'm testing this within OpenSolaris, but OpenSolaris is running as a VirtualBox guest on my Mac Book Pro.  Turns out that audio support in OpenSolaris under VirtualBox needs a little bit of work to get going.  It's easy enough, though, and took less than five minutes to get it working.  The instructions on how to make it work are in this blog post, which is clearly written.  And I had fewer problems than were mentioned; I didn't have to reboot or uninstall the "SUNWaudiohd" package.  Good times!

At this point, my big challenge was where to find two files to test Fluidsynth: a sound font (basically, a description of instruments that Fluidsynth uses to play music), and some music (a MIDI file).  I did a Google search to find a nice Yamaha DX-7 electric piano sound font (I happened to find it here), and it was easy to find any number of .mid files to play.

To test, I typed "fluidsynth <name-of-sound-font.SF> <name-of-MIDI-file.mid>".  That worked just fine: I heard the music loud and clear, although Fluidsynth complained that there is no /dev/midi.  I believe it is expecting me to connect a MIDI keyboard to the computer and start playing, which is not necessary for this test.  Also, Fluidsynth had to re-map some of the MIDI file's preferred instruments to what was available in the sound font's instrument library.  Not a problem, though.

Just for fun, I tried turning off the built-in chorus and reverb effects, and I boosted the amplitude to see if these features worked:

"fluidsynth --chorus no --reverb no --gain 0.8 <name-of-sound-font.SF> <name-of-MIDI-file.mid>".  I also tried changing these parameters individually to isolate the effects.  Again, this worked fine.

As far as I can tell, Fluidsynth works perfectly well on OpenSolaris.  It should make a fine addition to the contrib repo.


Powered by ScribeFire.

Wednesday Dec 16, 2009

Movable Type Finally Makes It To The "contrib" Repository

Okay, so that title probably needs a little bit of explaining, if you're not following the saga of the OpenSolaris Source Juicer on a daily basis as I am.  I'll get back to the good news about Movable Type 4.31 in a bit; meanwhile, here's the deal with the "finally" part of this entry's title:

Sun's ISV Engineering group has been working for a while to get a pile of open source applications into the OpenSolaris "contrib" repository, which is to say, a place where you can look to find extra stuff that doesn't come with the stock OpenSolaris release.  "contrib" is by no means the only repository of cool extras -- check out the multimedia repo for example -- but it's a good place to put apps in general.  So we do.

We use this thing called the "Source Juicer"; it's a robot that builds software packages from source code, if you give the robot some instructions on where to grab the source from the web, what other software the app depends on, and how to build the app.  Once built, you ask people to test the app and vote on whether it's good-to-go or not.

Every once in a while, the Source Juicer people decide to look at the list of apps that have been favorably voted on, and they promote these apps from a repository called "pending" to the "contrib" repo.  If you look at this list of apps that have been so promoted, what you'll notice is that for the past almost-a-month, the only guy who's gotten his apps promoted are some dude named "Roboporter"; that's not a nickname, that's a clever mechanism the Source Juicer folks use to get a whole big batch of packages into a repo if it looks like the rules for building those apps are really straightforward, or really similar to other apps they've set up for the roboporter.  The roboporter is another 'bot.

Anyway.

We've had Movable Type in the "pending" repo for a while now, and we've had it tested and ready to go for over a month.  (here's proof)  Finally, Eric Reid tells me that the app got promoted into the contrib repo.

Bottom line: if you like the Movable Type blogging engine, you've now got a simple way to create a blog site, protect its data, or to do development and test snapshots of sites you create with Movable Type.  Just install it on OpenSolaris and ZFS will make your data nice and safe.

Check it out, let us know what you think.


Powered by ScribeFire.

Wednesday Nov 11, 2009

How To Install Acquia Drupal on OpenSolaris (it's easy!)

I just published a short how-to video showing how you can easily install Acquia Drupal on OpenSolaris.


Sun's ISV Engineering group has been working with Drupal for a couple of years now; I also use Acquia Drupal to develop and maintain this web site, which also hosts my personal blog.  The Drupal community is amazingly vibrant and growing by leaps and bounds, and Acquia has done a nice job of commercializing the Drupal open source content management software package.  Acquia Drupal is still free, but it has some nice additions that any Drupal user or developer would want.

Anyway, check out the video; it's about 8 minutes long and walks you through the steps to find the catalog of third party applications, then get Acquia Drupal and configure it on your OpenSolaris system.  It's easy, and it just works.

Oh and by the way: props to our Sun Learning Exchange web site and staff for making it so darned easy to publish content.  Nice job, folks!



Powered by ScribeFire.

Friday Nov 06, 2009

Installing and running Ruby-rack on OpenSolaris

Rack is a webserver interface for the Ruby open source programming environment.  Amanda Waite took the trouble of making this package available via the OpenSolaris packaging mechanism; ultimately, ruby-rack will be in the OpenSolaris "contrib" repository, but not until it gets a little testing and review, and some votes from the community, this functionality is now in the OpenSolaris "pending" repository.  I admit to great naivete about Ruby, so I'll refer you to this excellent explanation of what Rack does for Ruby developers.  (my summary of what I got from the explanation: Rack is a web framework for Ruby developers; in other words, if you like writing Ruby code and you want to write code to create a web-based application, Rack is a nice extension to Ruby to make doing this easy).

Anyway, been doing some testing of the package that Amanda submitted.  Here's what I did and what I observed:

First, I made sure I had access to the OpenSolaris Source Juicer "pending" repository.  As I've noted before, two steps:
  1. type "pfexec pkg set-publisher -O http://jucr.opensolaris.org/pending jucr-pending"
  2. type "pfexec pkg refresh"
After that, the next time you launch the Package Manager application, look on the right side of the application and you can choose "jucr-pending" from the pop-up menu.  Do that, and after a moment you'll see a list of all the packages in the "pending" repository.  You will find the package "ruby-rack" there.  Note that case matters; the package name is all lowercase.

So I did this and downloaded the package.  The package notes that it depends on the Ruby package.  The Package Manager pulled it in just fine.  How do I know?  Before installation, I could not type "ruby" and get anything back.  Afterward, it worked.

Next step:

$ cd /usr/ruby/1.8/lib/ruby/gems/1.8/gems/rack-1.0.1/example
$ rackup lobster.ru


This starts a web server on port 9292 with a little "lobster" program.  I launch the web browser and go to "http://localhost:9292" and I saw a simple web app that shows a crude "picture" of a lobster, and two things I can do: flip the lobster from right to left and back again, and show a crash dump of the Ruby Rack program.  I tried both of those things; they worked just fine.

After this, I killed the "rackup" program then tried it again with the other ".ru" file in that same directory, "protectedlobster.ru".  That gives an added feature of authenticating into the web app (password is "secret"; as far as I can tell, use any username you wish).  That worked, too: if I didn't provide the right password, nothing happened.  If I provided the right password, it worked fine.

So that all worked just fine.  The next set of tests was more in-depth, running a partial test suite.  For this set of steps, I had to install both the "SUNWgcc" and "SUNWgmake" packages, again with the Package Manager.  I did these steps:
  1. su - (i.e., pretend you're root; without doing this, step 3 below complained that it couldn't write to /var/ruby/1.8/gem_home/bin)
  2. Add /var/ruby/1.8/gem_home/bin to your $PATH
  3. type CXX=/usr/sfw/bin/g++ gem install memcache-client ruby-openid camping mongrel thin test-spec --no-ri --no-rdoc
  4. type "gem install rake"
  5. type "rake test".
The output showed it compiling some stuff, then it said "Started" followed by a bunch of periods showing status, then "Finish in 3.960495 seconds."  Finally, a results line said "267 tests, 928 assertions, 0 failures, 0 errors".

That sounds like good news to me!

So folks: the Ruby Rack web framework is available via OpenSolaris.  Check it out and see if it works for you, Ruby developers.  Let us know how it goes, will ya?


Powered by ScribeFire.

Tuesday Oct 27, 2009

Installing and running Silverstripe on OpenSolaris

SilverStripe is an open source content management system (CMS); we in Sun's ISV Engineering department have been working on getting this and other important open source applications into the OpenSolaris "contrib" repository, a place meant for third party applications that anybody can contribute.  I've been testing the SilverStripe package that Jenny Chen contributed; here are my notes.

Mostly, SilverStripe installs just fine; however, it has the same little hiccup as Joomla! did when I tested its installer.  (I documented that problem and workaround here)  No big deal, though: it's easy to apply the same quick workaround for MySQL before you get on your way.

Once done, I launched my web browser on my OpenSolaris box and went here: "http://localhost/silverstripe".  That brings me to the web-based SilverStripe installer.  It all looks good, but one thing to note at the bottom of the page (in the "Webserver Configuration" section) is that SilverStripe can't tell what web server OpenSolaris is running.  With the Web Stack, we're running the Apache web server.

One other note from the SilverStripe installer: it advises me to set the "allow_call_time_pass_reference" parameter in /etc/php/5.2/php.ini to "On", which I did just to avoid getting warnings shown to me during the installation process.

Anyway, did that, then pressed the "Install SilverStripe" button to get the installation on its way.  The installation took two minutes fifteen seconds (really; I timed it) under a fairly heavily-loaded computer.

It worked fine; I was able to add a couple of pages to my site, add a user and give that user privileges, and see it in action.

So now, if you use SilverStripe you can get to it in OpenSolaris via the Package Manager.  If you don't know how to install packages from the OpenSolaris "pending" repository (a staging area we use to test packages before they're promoted to the "contrib" repo I mentioned above)., then the main thing you need to learn is how to add repositories to your Package Manager application.  Do these two steps from a shell on your OpenSolaris installation:
  1. type "pfexec pkg set-publisher -O http://jucr.opensolaris.org/pending jucr-pending"
  2. type "pfexec pkg refresh"
After that, the next time you launch the Package Manager application, look on the right side of the application and you can choose "jucr-pending" from the pop-up menu.  Do that, and after a moment you'll see a list of all the packages in the "pending" repository.  You will find the package "silverstripe" there.  Note that case matters; the package name is all lowercase.

Check it out and let us know what you think.  Did SilverStripe install and work fine for you in OpenSolaris?  Give us some feedback.


Powered by ScribeFire.

Monday Oct 26, 2009

U.S. Government re-launches whitehouse.gov on Drupal

A big win for open source software happened this weekend, with the primary U.S. government web site being re-built using the Drupal open source content management system:

Also, Tim O'Reilly talked about it as well.

General Dynamics is the prime contractor for the project, with several Drupal shops being subs.

Nice job, Drupal people!


Powered by ScribeFire.

Monday Oct 19, 2009

Nagios is available for OpenSolaris; did we get it right?

Nagios is an open source system monitoring software package; we thought it important to get the Nagios community supported on OpenSolaris so Sun's ISV Engineering department spent some time on the task.  You can check out our results by going to the OpenSolaris "pending" repository and installing these packages:
  1. nagios
  2. nagios-plugins
  3. nrpe
If you want to see what I did to test these packages after installation, look at this review page and you'll see my comments from October 17.

If you don't know how to install packages from the OpenSolaris "pending" repository, then the main thing you need to learn is how to add repositories to your Package Manager application.  Do these two steps from a shell on your OpenSolaris installation:
  1. type "pfexec pkg set-authority -O http://jucr.opensolaris.org/pending jucr-pending"
  2. type "pfexec pkg refresh"
After that, the next time you launch the Package Manager application, look on the right side of the application and you can choose "jucr-pending" from the pop-up menu.  Do that, and after a moment you'll see a list of all the packages in the "pending" repository.  Nagios, nagios-plugins, and nrpe will be there.

Check 'em out, and leave comments to let us know what you think.  If they look fine, we'll promote them to the main third-party applications repository, the "contrib" repo.


Powered by ScribeFire.

Wednesday Oct 14, 2009

Update: Drupal now available in OpenSolaris

Sun's ISV Engineering group has been working hard all spring and summer to get fistfuls of popular and important open source applications into the OpenSolaris "contrib" repository, a repo for third-party applications that can be assumed to have some level of sanity checking done on them.

Eric Reid in ISV Engineering has submitted three different releases of Drupal; today, the final release (Acquia Drupal) was approved and placed into /contrib.  These three applications are
  1. Drupal 5 (release 5.20)
  2. Drupal 6 (release 6.14)
  3. Acquia Drupal, created by the commercial enterprise backing Drupal: Acquia.com
It's nice and easy to try out any of these Drupal packages in OpenSolaris.  Want help?  Read this entry on drupal.org for complete yet succinct instructions.

(update)
I should also point out that when you install Drupal in OpenSolaris, the package management system will pull in the Sun WebStack components automatically, which is all free as you would expect.  It's the AMP stack components you know and love, but optimized by Sun for out-of-the-box performance improvement, plus a management console that lets you see what's going on with the components while you're running your Drupal web site.

(Okay, that may have sounded a bit like an advertisement, but we really did put a lot of engineering effort into optimizing the AMP components on Sun's systems and the new analytics thingy is pretty cool looking.)
(/update)

Meanwhile, this adds one of the premier open source content management systems to the stable of apps freely and easily available to you when you install OpenSolaris on your computer.  You can even choose from amongst the leaders in blog engines / content management systems / web site building tools: Drupal, Joomla!, WordPress are all available now.  Here is a list of packages published to the contrib repository.

Check 'em out!




Powered by ScribeFire.



Friday Sep 11, 2009

Installing and running Joomla! in OpenSolaris

The OpenSolaris "/contrib" repository is a place where anybody can contribute open source software packages, which are then available for you to install on OpenSolaris.  Before a packages gets promoted to the contrib repo, you submit your package / application to a repository called "pending".  The idea is that people can test packages and get others to try them out before they get promoted so that the packages in "contrib" have been at least smoke-tested.

Recently I've noticed the number of packages and apps available growing pretty nicely, and I've been testing some of the apps that our own group (Sun's ISV Engineering organization) has been contributing.  Most of the packages I've tested have gone smoothly.  One gave me a little hiccup so I thought I'd describe what I did to get it working.

That package is the Joomla! content management system.

Installation was actually a snap; once you install the package with the OpenSolaris Package Manager, just fire up the web browser and go to http://localhost/joomla and you get the Joomla! installer.

Well, it's a little more complicated than that; you need to make sure you create a database for Joomla! to use, like this:

mysqladmin -u joomla -p create joomla

mysql -u joomla -p
mysql> grant all privileges on joomla.\* to 'joomla'@'localhost' identified by [password in single quotes here];

(assuming I created a MySQL database user called "joomla", I'm also creating a database called "joomla")

After a few web screens, I can login as the Joomla! admin just fine, but trying to go to the Joomla! front page as a regular non-admin person causes a long series of errors to spit out at me (and rather rudely, I might add); see the end of this post for the details.

Turns out it's a MySQL problem; you can see the discussion here.  The current workaround is to run MySQL in 64-bit mode, but in order to do that, you need to make sure you're running OpenSolaris in 64-bit mode.  If you type "isainfo -k" and it returns "x86", that's not good enough.

I am doing my testing in VirtualBox; to make sure I'm running OpenSolaris in 64-bit mode, I go to the VirtualBox main application panel where I can see the settings for my virtual machine.  Near the top, the section called "General", The "OS Type" field sais "OpenSolaris".  I change that to "OpenSolaris (64-bit)" and the next time I boot OpenSolaris, it's in 64-bit mode.

One more step; making sure to launch the 64-bit version of the MySQL service.  Do this:

svccfg -s mysql:version_51 setprop mysql/enable_64bit=true
svcadm refresh mysql:version_51
svcadm restart mysql:version_51

I did just this, and went back to http://localhost/joomla and everything worked perfectly well.  Joomla! works just fine in OpenSolaris, as you would expect.  Nice looking app, too.

P.S.:  (Joomla / MySQL error message below)



\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
Technorati Tags: , , , , , , , ,

Powered by ScribeFire.

Friday Aug 14, 2009

Terracotta on Sun's CMT and x64 Solaris servers

In our ISV Engineering organization, we do some pretty cool work with a variety of software companies built around open source business models; here are just a few of our more strategic open source partners.  This week, we published some work we've been doing with Terracotta for the last few months to help them optimize their technology on Sun's products.  The 4-page document provides an overview of the business benefits of Terracotta for Java developers, plus some results of testing we did with Terracotta on both x64 and CMT servers.  We also ran their same tests on RedHat Enterprise Linux to see how we did.  We did great.

I really like what Terracotta's done; my overly-simplistic explanation of what they do is to hook into a Java Virtual Machine (JVM) and link it with other JVMs working together, so that a cluster of JVMs look like a single, big JVM to the Java developer.  The significance is this: if you're a Java developer and you want to easily scale up your application so it can take on more load, Terracotta makes it really easy for you to do that.



In the document that we published, we showed the results of tests we did with sample workloads that Terracotta created to demonstrate what it can do for some common Java application scenarios.  (one scenario models an online test-taking application where many people login concurrently to take their tests, maybe leave the test midway through, come back where they left off, etc.)  If you look at the results table, you'll see a couple of results that I find interesting:
  1. Performance of Terracotta on Solaris vs. RedHat.  Everything else was the same: same JVM, same physical hardware.  But Terracotta on Solaris performed much better, making more efficient use of the compute resources.  You leave less of your computing budget on the table with Terracotta on Solaris, is what this says to me.
  2. Terracotta performance on CMT.  On the T5240 CoolThreads server, we didn't get the top result, but we had plenty of headroom to go (using 9% of the CPU resource available), which means we could launch more copies of Terracotta, or the Java application itself.  Our tests with Terracotta show us we can use CMT to get massive scaling; the results table clearly reflects that.
Once we started scaling up with Terracotta on CMT, we started to notice that their persistence mechanism was becoming a bottleneck (if you read more about Terracotta, you find that they make your cluster of JVMs reliable because Terracotta keeps track of Java objects that change, and persists those changes to its local disk).  So we introduced Terracotta to our solid state disk (SSD) products and configured the Terracotta server to persist its data to the SSDs instead of spinning disk.  That essentially gave us reliability at in-memory speeds which means that you don't have to make the tradeoff of performance vs. reliability.  It's very cool.

We've had a blast working with Terracotta; they're sharp people, and they create a product that I think is hugely valuable to Java developers, especially those trying to write apps that work at large scales on the web.  If you're such a developer, you should check them out.  Their software is available as open source and it works.





Powered by ScribeFire.



Wednesday Aug 12, 2009

Some interesting reading about VMWare's acquisition of SpringSource

This week's announcement that VMWare is acquiring SpringSource sure caught me by surprise.  I'm not surprised that VMWare is making an acquisition; it clearly needs to get away from the "one trick pony" problem of being known only as a hypervisor vendor, because there are many entrants in that field now, and it will become commoditized soon.

What surprised me was that VMWare picked a company known for its support of software development frameworks, namely, the Spring framework.  Also what surprised me was that VMWare pretty much explicitly commits to Java as the programming language of choice for their cloud offering.

Don't get me wrong: I love Java as a choice of programming language.  But I have two basic questions about this choice:
  1. Really?  Java is the language you're choosing for rapid-beyond-belief development and deployment of applications on the web?
  2. Why is VMWare locking themselves into a single language?  That's essentially what I get out of the announcement and press.
Maybe there weren't any other credible candidate frameworks in PHP, for example.

Here is a nicely-written opinion piece by an IBM guy about what the deal means to VMWare and the industry.  I like his take that this purchase is less help to VMWare's cloud vision than what you might think, but it does help VMWare get into the addressable market for application servers

But what do you think is going on?  Why did VMWare choose to buy SpringSource?  Does this really make VMWare more credible as a cloud vendor, or do you think VMWare is off track with this decision?

Powered by ScribeFire.

About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle. What more do you need to know, really?

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today