views:

868

answers:

6

We have a business application that basically runs on an os-independent stack (tomcat+java+mysql) but we have always run it redhat or centos.

There is a customer that is insisting to run it on opensolaris for his own reasons (an expensive everything-is-included support agreement with Sun).

How painful can such a migration be? We have a lot of configuration file and support scripts such as:

  • apache
  • apache/tomcat connector
  • email interaction with postfix
  • customized service start/stop
  • a couple of cron jobs (backup, monitoring)
  • different users and permissions (java, mysql, email, backup...)

Our build process outputs a .tar.gz file with our business code + some shell scripts that edit all the os-configuration files.

Any previous experience on this.

+2  A: 

The biggest issues will be with the non-POSIX (non-standard) options you've used to the GNU tools provided on Linux that are not in the Solaris standard commands. You might decide that porting the relevant tools from the GNU set is simpler than modifying your system. If you've laced the code with absolute pathnames for commands (/usr/bin/ls) but you decide to use the GNU versions instead, you've got to find a way of fixing those. I'd be extremely cautious about replacing the OpenSolaris versions with the GNU versions; you don't know when you would break something that the system relies on. So, you would put the GNU commands in a separate directory - probably not /usr/local because that is for the machine owners to populate, not you as an application-monger - and arrange for that to be used in place of the system commands. (Note: on Solaris, /bin is a symlink to /usr/bin; I assume the same is true of OpenSolaris.) AFAIK, Postfix is not standard on OpenSolaris, so you'd have to ensure you get that installed, too.

All of this is doable - there's nothing insuperable. But a lot depends on your code base.

Jonathan Leffler
Not familiar with OpenSolaris, but back in the day installing the GNU tools was essential and IIRC Sun even supplied a build of them for customers
Ronny Vindenes
+1  A: 

OpenSolaris includes all the GNU utilities already, just point your scripts at /usr/gnu/bin

Installing Postfix shouldn't present any problems, and Apache/MySQL are present in a base OpenSolaris install (in truth, the Cool Web Stack stuff makes it about as easy to administer as WAMP/Instant Rails). Beyond which, SMF manifests (SMF is a replacement for rc scripts sort of like OSX's launchd, though you can still use regular init scripts) may make your life easier, since specifying dependencies and run order is somewhat nicer (it'll recursively start/stop all dependent services also).

Tomcat certainly works, though everybody I know on OpenSolaris uses GlassFish. YMMV, but deploying a .war is pretty much the same everywhere.

It may not be a bad first step to deploy into a LX branded zone (think FreeBSD jails or Linux vServer for a comparison), as the LX branded zones can run Linux binaries, and are explicitly CentOS/RHEL based.

Other than that, OpenSolaris is a Xen dom0 since b77 or something, and putting CentOS/RHEL into a domU is dead simple, if that's an option.

You also get all the Solaris goodies along with it (DTrace, ZFS, network virtualization [via CrossBow], etc). Who knows? You may even like it! Java is Java, so that shouldn't pose any issues.

phresus
A: 
  • you'll probably have to rewrite a big part of your scripts (user creations, service launch) as it is probably different in CentOS and OpenSolaris.

  • as previously written, ask your customer to install the GNU tools so you'll have less work to rewrite your scripts.

  • os configuration files may also not be in the same format, you'll need to check.

  • your tar.gz file should be extractable without troubles, but again you will have less surprises if you use GNU tools. some unix OS have tar with some limitations

Any previous experience on this.

(maybe a little offtopic)

we package and distribute our java/tomcat/postgresql/unix application with all binaries referenced in our scripts. this implies to have 1 build system for each OS we support, this implie we support our application but also external binaries, but in the end we do not have bad surprises @ customers.

we also ask them to do all root operations (user creation, directory creation, sendmail config, system tuning) before we install the application. we have written shutdown / startup scripts for all supported OS, and their installation is the only thing we do in root on the customer machine.

chburd
+2  A: 

We run both, though we don't use OpenSolaris as a web servers.

The good:

  • OpenSolaris comes with the gnu tools, so, get your path right and that's ok.

  • Most things just build and run just fine.

The not so good:

  • Make sure that you've installed and are using bash. Otherwise all those bashisms that you are using that you didn't think you were using will bite you.

  • Make sure that you're not using hard coded paths to /usr/bin or /bin. These tools are not the GNU ones and therefore have different options. Use /usr/gnu as mentioned above.

  • You don't have the huge number of packages that you can install straight off as you do with yum or apt. Yes, you have a package manager, it's just not quite so well populated. As a result you probably will be installing packages by hand. They should install, it's just a bit more work for your system admins.

  • Are you sure that OpenSolaris runs well on your hardware? It's worth a check. You might find that some of the hardware drivers aren't as well tested.

Otherwise we find OpenSolaris to be nice. It has a lot of good ideas.

Have you looked at Nexenta - http://www.nexenta.org/os It's the OpenSolaris kernel with a Ubuntu userland.

Bruce ONeel
A: 

I am Linux Guy, and i am RHCE, i just want to know which facility Solaris have and Linux Doesn't have that.

Solaris is Worst. i dont know why people is using that. i like to shutting it down.

Shrii-

shrikant
A: 

Beside the fact that you're a troll, somebody just said above that (Open)Solaris has: - ZFS - DTrace

We can understand that you are afraid of not losing your RHCE job, but you just proved me once again that my decision as an employer to ignore all the certifications when interviewing people was a good one. It seems that a large percentage of such people (especially in the Microsoft world) are not so... open-minded, to put it nicely.

Regards, Alex

Alex
well put. Troll like comments are not appropriate at this site. The above was neither a Question or an Answer.
Mark Underwood