Showing posts with label nexenta. Show all posts
Showing posts with label nexenta. Show all posts

Monday, May 25, 2009

Nexenta 2.0 is out

Check out the googley style toons at
http://www.nexenta.org/os

Monday, December 8, 2008

Magical apt-clone, broken system recovery

I have received some very nice feedback regarding my last blog on D-Bus, thanks guys. This week I'm going to play once more with my Nexenta installation that we completed in part1. This time around I am going to basically demo the integration the Nexenta folks have pulled mixing apt-get with ZFS file-system capabilities, resulting in transactional system upgrades, with multi-snapshots that makes system recovery a snap!

We start off booting our nexenta NCP2-alpha installation, which we'll be upgrading to beta-1 as we speak. Grub shows the default boot kernel

001-normal-grub

Once booted, and we log in, let's update apt's cache

002-apt-get-update

I have also used the command "apt-clone" to list the currently available boot environments. Basically, using ZFS snapshots the whole machine state is snapshot'ed resulting in a instantly bootable environment. Currently we only have the default environment "rootfs-nmu-000". Now I am going to use apt-clone to "dist-upgrade" the whole system. If this is new to you (who has never seen Ubuntu :) it basically means you're upgrading the whole system to the latest tasty bits

003-apt-clone-dist-upgrade

Note that I have used verbose mode "-v" in order to get more information. After a lot of downloading and dpkg grinding, I now have the latest packages installed. apt-clone has created a new system snapshot "001" and the process ends like so

004-apt-clone-done

I have simply hit 'n' to discard any automatic changes, then I used apt-clone to activate the upgraded snapshot as instructed by the on-screen output

005-apt-clone-activate-newBE-reboot

Now let's reboot and see what kind of coolness we have

006-newBE-grub

Oh cool, Grub now displays two bootable environments! One before the upgrades and one after. The dates besides each entry make that clear. Great, now let's reboot into the new envrionment and list the available clones (cloned file systems)

007-booted-into-b104

Note that the "A" and "C" in the output mean "Active" and "Current". Great, now creating instant bootable system snapshots like that is so useful that it does not relate to software installations only. Say you're running some third party closed source installation application and you're not really sure what's it going to do to your system. Or if the new clueless administrator needs to install something to the server but you think he's probably going to destroy it! In such situations, it's very helpful to manually create a system snapshot. So, let's do just that to create the environment 002 and let's activate it

008-manually-create-clone-BE

Now we have our own little safety net. Let's now boot into that new environment. Use apt-clone to make sure "002" is the active and current environment. Then's let's simulate complete system failure. I will not be too creative and will simply delete the kernel and reboot!

009-rm-kernel-reboot

Once in Grub, boot the new and destroyed system. As expected Grub errors out and we're staring at

010-grub-stops-no-kernel

So right now we have a broken system. Now do we run to tape, dump | restore, and use some black magic, nope, we simply reboot and choose our safe snapshot 001, boot into that and destroy the corrupt environment 002 and activate the safe one 001 as so

011-recovered-older-BE-rebooting

Perfect! Once rebooted, our system is back fully functional. Mind you that taking system snapshots, destroying corrupt ones all take a couple of seconds, and of course does not consume disk space except for the changed disk blocks. Now that we have our server back, let's do something useful with it. Let's "apt-clone install apache2".

012-normal-boot-install-apache2

Once done, the SMF could not start apache because I had chosen nwam network auto-configuration (think NetworkManager), which apache2 does not like. Anyway, I simply started the SysV script manually, and verified "it works" with a direct telnet connection. You can basically start installing and configuring various server software mostly just like an Ubuntu system. All in all, the Nexenta-2 system is a very promising concept. The integration of advanced Solaris kernel features with GNU userland and attempting to port Ubuntu repos, would basically be paradise. It is however a lot of work. The system is not perfect yet, for example in this beta-1, you cannot install X yet (broken deps). That will surely be resolved by release time. However, rebuilding the huge debian/Ubuntu repos, needs a lot of work. If you have free time to push this interesting FOSS project forward, please do so. Visit nexenta and join their development team. Meanwhile and separately from nexenta, I have been interacting with various open source developers working with opensolaris projects. Unfortunately it seems that Sun is not really making it easy for "outsiders" to work on opensolaris projects. I have heard such comments multiple times, from different people. One would think that after so much time, Sun would start to understand what it takes to build a community around any piece of software! Let me use the moment to shout out: Sun, please cut the community some slack! :)

Saturday, November 22, 2008

Nexenta, Can you say SolaBuntu (part1)

This time around I will be playing around with nexenta OS. Nexenta is a marriage between OpenSolaris and Ubuntu, or what I like to call SolaBuntu :) Solaris has a pretty decent record in the data-center. It is a solid and widely trusted paltform, however, it was showing its age pretty badly. Many of the most commonly used tools were outdated. And most users begin their *nixy knowledge with Linux, and when faced with Solaris they don't find the GNU tools they have grown accustomed to, and thus don't like the platform. OpenSolaris has been started to fix some of those issues, however, nexneta takes this concept to an extreme. It basically takes the ubuntu userland and plugs underneath it an opensolaris kernel. Nexenta also integrates unique solaris features such as zfs with ubuntu tools like apt-get to provide system wide transactional safe upgrades. I really really like this feature. It basically means you can dist-upgrade your entire system, and once up on the new version, if something is badly broken, you can very easily boot back an earlier snapshot (pre-upgrade) image of your system. We will explore those features later, however, for now, let's get started installing NCP2 alpha. As usual I am choosing to go with the latest and greatest and least stable version ;)

Download the iso, burn it, boot it and you're faced with grub

1-GrubCD

As you can see, this is based on Ubuntu Hardy. Simply hit enter and the solaris kernel boots on your system. After the boot, you get a splash screen welcoming you to nexenta

2-installer-splash

Now I'm gonna throw a lot of images, just to give you a feeling of the installer, but I'm also gonna skip some pretty obvious screens that would be mostly obvious (a la are you sure ? Yes/No). Next you choose your country

3-language-country

Now here is an interesting tidbit, the whole installer is running inside a screen session. So, a CTRL-A followed by a 2, takes you to screen window 2, as you can see you can use the format command to view and partition your disks as needed. Window 3 is for logging the installer actions. The log is not very verbose however!

4-screen-inside-installer

Afterwards, you get to choose your disk, then confirm it

6-destroy-disks

Afterwards, the disk is zfs formatted, and package installation begins .. Go make the usual cup of nescafe

7-Installing

After this step completes (around 20 minutes), you get to specify the root password. "root" can be used for direct login (no need for sudo or pfexec here).

8-root-pass

You also create a normal user, set its password. You specify the machine name "nexy" in my case, and domain name. Afterwards, boom the installation is complete. You're ready to boot your new environment

11-Installation-complete

After the reboot, grub starts, load the opensolaris kernel, and a few seconds later, you get the default login screen, which is not a pretty GUI! The default installation is a minimal installation without X.

12-firstboot

Once logged in, you can start enjoying apt which is IMO the best main stream package manager. Let update the repos

13-apt-get-update

Let's see how good the repos are. apt-cache show the system has access to around 4700 packages. This is of course not comparable to debian or ubuntu's repos, however, it still is fairly impressive considering how young the project is. If you're feeling excited, one of the best ways you can help is by becoming a packager for nexenta, so go ahead and join their hackathon.

14-apt-cache-stats

One of the things that make nexenta an attractive opensolaris based system, is that it provides a solid array of open-source software tools that are up2date! This is pretty important at least to me. Let's check a couple of common packages

15-nexenta-new-versions

Your system is now ready, you can apt-get install any software package that's available and start running your nexenta based server. I have to say that my overall feeling is that nexenta core platform is more oritented towards being a server OS more so than a desktop one. Not that you can't install desktop apps, but rather that's what the default install offers, and that's what the core dev team seems to be focused on. NCP-2 alpha is definitely promising, and I really like the idea of an ubuntu/debian/GNU system on a solaris kernel. However, the project is very young, and I did face some bugs along the way, the is to be expected however as this release is still alpha quality. Hopefully along the upcoming posts, I will take that system for a ride and blog about it. Let me know about your experiences as well.

Update: Read part2