Wednesday, June 23, 2010

Share your appliances with SUSE Gallery!

Today, nearly a year after launching SUSE Studio, we’re very excited and proud to announce the beta preview of SUSE Gallery, a new major addition to SUSE Studio.

SUSE Gallery allows you to easily share your appliances with the Studio community, in a fully searchable directory of appliances. All signed in Studio users can rate and comment on appliances, and each appliance can be downloaded — or even cloned from, to start your own custom version of that appliance.

Looking for a LAMP stack? You don’t even have to build it yourself in Studio now! Simply search for it in the Gallery, download it immediately, and start using it. Need to tweak it? That’s no problem — click the “Clone appliance...” link in the Gallery appliance page, modify the appliance configuration to suit your needs, and rebuild. Found a bug in the appliance? Post a comment and the appliance creator will (hopefully) fix it in the next release. Alternatively, you can clone it, fix the bug yourself and re-publish it back to the community.

Enabling SUSE Gallery

Since SUSE Gallery is still in beta, you need to opt-in before you can use it. It’s simple to enable:

  1. Sign in to SUSE Studio.
  2. Click your display name in the navigation bar (at the top-right of the page) to visit your account settings.
  3. Press the button labeled “Enable experimental features”.

You now have access to SUSE Gallery! Click the “Gallery” link at the top-right of the page to get started.

Publishing appliances

After joining the Gallery beta, there will be “Share” tab in the appliance editor page. In this tab, you may specify the appliance description, tags, release notes, and other information for your appliance.

Once you have built at least one appliance in the Build tab, you are able select the appliance version and click “Add” in the Share tab. As soon as you add a built, you can write the release notes, which you need to write before you can publish the appliance.

As soon as you click the “Publish” button, your appliance will be available in the Gallery!

The future

Keep in mind that the Gallery is still under beta, so there still may be a few glitches. Also, we plan on adding additional features to gallery from time to time, so don’t be surprised if things work or look a little different in the near future.

With more than 70,000 registered SUSE Studio users (and still growing), we can’t wait to see all the appliances that will appear in the Gallery soon!

We look forward to all your feedback, bug reports, and suggestions.

Friday, June 18, 2010

Hackweek: UuidIt and has_alter_ego. Two itches scratched.

During last week’s SUSE HackWeek, I worked on solving two problems we recently had in the Ruby on Rails part of SUSE Studio. The first is to easily define unique identifiers, and the second makes it simple to add new configuration to a database.

Assigning UUIDs to your models

Some time ago I was asked if we could add UUIDs (Universally Unique Identifier) to one or two (or three...?) of our models. I first looked at the available gems and plugins for doing that, but they all relied on the fact that the according model has a dedicated column for the UUID.

I was too lazy to write migrations for each of the models of course, so i decided to write a gem which makes it super-simple to add UUIDs to models: The result is UuidIt.

Once the gem is installed all you have to do in order to assign UUIDs to a model is adding one line of code:


  class Car < ActiveRecord::Base
    uuid_it # <-- that’s all. amazing, no? :)
  end

1 down, 1 to go :)

Conveniently adding and managing seed data

In SUSE Studio, new features are often added with special configuration toggles so new features can exist in our codebase in a dormant state. This technique allows us to test new code on our development and staging clusters but not have it show up on susestudio.com until it’s ready.

Until recently, these switches resided in YAML files, and this mostly met our needs. Lately, we have had rapid development of amazing new features and needed more flexibility. Our needs for feature switching grew from toggling a feature on or off to being able to support more advanced configuration, such as enable features for certain groups of users or appliances only. We also wanted to be able to change those settings on-the-fly without reloading the webserver to pick up the changed YAML files.

We thought, “Ok, let's just keep those settings in the database and add a few more columns for additional attributes! This should be easy, right?” It turns out to be not as easy as it seems — at least to get it right. We ran into questions like, “Where would you keep the seed data and when would you load it?”

There are many approaches how to load and manage seed data (YAML files, migrations (this is bad, please do not do this), Rails’ db/seed.rb, seed_fu, etc.)... but none of these solutions really worked for us. We needed:

  • automatic loading of new objects
  • automatic updates for already existing seed objects
  • possibility to override seed data and not get the changes reverted
  • possibility to define associations where you do not necessarily know the primary key

To solve these issues (and a few more), I came up with has_alter_ego. It’s simple to use, too: Simply add a call to has_alter_ego to your model


  class Car < ActiveRecord::Base
    has_alter_ego
  end

...and you automagically have the objects which you define in the according YAML file available in your database. Currently, it gets the job done well. I also have a few features which I plan to implement in the near future, too.

Wednesday, June 9, 2010

Hackweek: Graphical client for SUSE Studio

This week is hackweek at SUSE. Originally I had planned to go to Linuxtag, which also is this week, but unfortunately I'm not able to follow that plan, so I'm making the best of it and take the opportunity to hack away on a project I wanted to do for a long time already: A graphical client for SUSE Studio. It's tracked as Feature 309733 in openFATE.

I'm not going to replicate the functionality of the web interface. This can easily be used through a browser. Maybe I will experiment with embedding a browser component, but the main focus of the client will be on those tasks which can't be done online. This is stuff like managing downloads, running and deploying appliances locally, natively connecting to testdrive, etc. I'm sure you have more ideas. Don't hesitate to share them with me, if you like.

The first bit of infrastructure is already done, as you see in the screenshot below. It shows the list of my appliances on SUSE Studio in a native UI window.

The client is written in C++ using the KDE development platform. This provides me with all the infrastructure I need for UI and communication with the HTTP API of SUSE Studio. I'm also making use of KXML Compiler, which generates the C++ code for all the XML handling needed for the API. It's so nice to not have to write any XML parsing code by hand and still have a native API to access all the data.

I haven't committed the code yet, but will do so later.

I'm going back to hacking now. Let's see where this goes. I will report some more detailed progress in my Hackweek blog. If you have comments, suggestions, or would like to contribute, please let me know.

Friday, June 4, 2010

SUSE Linux Enterpise 11 SP1


SUSE Linux Enterprise 11 (SLE11) Service Pack 1 (SP1) was recently released and we are happy to announce that it is now also available on SUSE Studio.

Existing SLE11 appliances can be easily upgraded to SP1 with just one click.

Check out the release notes to see what's new in Service Pack 1.
 
© 2013 SUSE