Wednesday, October 10, 2012

Public openSUSE 12.2 Amazon EC2 AMIs

We're happy to announce that public openSUSE 12.2 AMIs are now available in all EC2 regions! These public AMIs make running openSUSE server instances in Amazon EC2 easy.

If you're launching instances programmatically, pick the appropriate AMI ID(s) from the table below:

Region Region ID Arch AMI ID
Asia Pacific (Tokyo) ap-northeast-1 i386 ami-5463dc55
Asia Pacific (Tokyo) ap-northeast-1 x86_64 ami-fa63dcfb
Asia Pacific (Singapore) ap-southeast-1 i386 ami-7eacec2c
Asia Pacific (Singapore) ap-southeast-1 x86_64 ami-30acec62
EU West (Ireland) eu-west-1 i386 ami-9b0000ef
EU West (Ireland) eu-west-1 x86_64 ami-d50101a1
S. America (Sao Paulo) sa-east-1 i386 ami-6c0ad371
S. America (Sao Paulo) sa-east-1 x86_64 ami-8c0ad391
US East (Virginia) us-east-1 i386 ami-5cfe4135
US East (Virginia) us-east-1 x86_64 ami-46f7482f
US West (N. California) us-west-1 i386 ami-23c2e566
US West (N. California) us-west-1 x86_64 ami-ebc2e5ae
US West (Oregon) us-west-2 i386 ami-c6ca43f6
US West (Oregon) us-west-2 x86_64 ami-62cd4452
List of openSUSE 12.2 AMI IDs. Click on the AMI ID link to launch.

If you're using Amazon's web console, simply launch a new instance and under the "Community AMIs" tab, search for "opensuse-12.2":

As always, the source Studio images are available in SUSE Gallery (32-bit, 64-bit). The scripts used to create and manage these AMIs are also open sourced at Github. Do check them out and let us know if you have any problems!

Monday, October 8, 2012

Automatic image imports with WebHooks



We ended our last blog post with a teaser on how to automatically import Studio built images into your SUSE Cloud or OpenStack installation. Here we'll explain step by step how this can be done with Studio's WebHooks feature.
Do note that while this post and the referenced code is targetted for SUSE Cloud / OpenStack, it can easily be adpated to handle other image types and use cases.

What are WebHooks?


The WebHooks push notification feature was implemented and released by our awesome intern, Nick Lee, earlier this year. Quick recall on WebHooks -- these are simple HTTP callbacks, often used for push notifications in application integration. It makes it easy for your application or environment to react immediately to events in Studio, without having to aggressively poll for changes.
These reactions can be post-processing, such as converting the image format, performing additional configuration changes, or consumption like importing it into your deployment or test systems.

Setting it up


The WebHooks feature in Studio is pretty well-documented, including code samples on how to write the receiver. To make it even easier for production use, we've opensourced a reference implementation that includes proper logging and detailed documentation. Code contributions are very welcomed!
Once you have the WebHooks receiver running, you need to point Studio to it via http://susestudio.com/user/account#/api-hooks (replace susestudio.com with your Onsite hostname if you're using Studio Onsite). You'll need to login if you haven't already done so. Now your all your SUSE Cloud builds in Studio will be automatically and immediately imported into your SUSE Cloud instance!
Do try it out and let us know if you have any problems, or suggestions for improvements. The reference implementation is MIT licensed, so feel free to use and modify it as you like. Pull requests and additions for other image type handlers are very much appreciated!
Update: This is the last blog post in the SUSE Cloud series. The previous two blog posts in this series are:

Friday, October 5, 2012

Importing images into SUSE Cloud / OpenStack

We introduced Studio's new SUSE Cloud and OpenStack support in the last blog post, but skimmed on the details. So we'll spend some time here to explain what OpenStack and SUSE Cloud are, as well as how to import images from Studio to SUSE Cloud.

What is OpenStack?


OpenStack was founded by Rackspace and NASA and has since grown to be a global software community of developers collaborating on a standard and massively scalable open source cloud platform. The project's mission is to provide organizations the ability to create and offer cloud computing services running on standard hardware.
If you are familar with today's popular virtualization platforms, you can think of OpenStack as an open-source implementation of VMware's vDirector. In essence, both provide an easy to use user interface to launch and manage virtual machines plus other resources across your datacenter. OpenStack is currently not as feature rich as vDirector, but that's set to change and it does already have a number of advantages:
  • Open-source with a large and active community, backed by many big industry leaders including HP, IBM, Cisco, Rackspace, NetApp, and SUSE.
  • Hypervisor agnostic - supports Xen, KVM, QEMU, LXC, ESX(i) and Hyper-V.
  • Free of charge, with several companies offering premium support options.
  • Massively scalable.


There are three main subsystems in OpenStack: Compute, Networking, and Storage. These run on top of a shared services layer that manages identities and images. All these and more can be controlled via the web interface called Dashboard.

What is SUSE Cloud?



SUSE Cloud is a pre-packaged and supported version of OpenStack that has been tested to work with the SUSE family of products. It is designed for oranizations to setup and manage their own private clouds. It is much easier to install and setup than the vanilla OpenStack.

Importing images from SUSE Studio to SUSE Cloud


So let's get our Studio built images into SUSE Cloud! The steps here are for SUSE Cloud, but it should also work with vanilla OpenStack. There's no graphical user interface to import images into SUSE Cloud/OpenStack at the moment, so you'll have to import it using the command line tool. First, login to your SUSE Cloud instance:

And then download the openrc.sh credentials file from "Settings" => "OpenStack Credentials" => "Download RC File":

Assuming you're using a SLE11 SP2 system, run the following commands to add the Cloud:OpenStack:Grizzly repository and install the the python-glanceclient package. If you're using openSUSE, just change the repository URL accordingly. These packages will eventually make their way into the standard repositories. For example:
  sudo su -
  zypper addrepo \
    http://download.opensuse.org/repositories/Cloud:/OpenStack:/Grizzly/SLE_11_SP2/ \
    Cloud:OpenStack:Grizzly
  zypper refresh Cloud:OpenStack:Grizzly
  zypper install python-glanceclient

Now you can import your image directly from susestudio.com (or your SUSE Studio Onsite >=1.3 instance) to your SUSE Cloud instance. For example:
  . openrc.sh
  glance image-create --name="Studio built VM" --is-public=True \
    --disk-format=qcow2 --container-format=bare \
    --copy-from http://bit.ly/UHn5C7

You should get output in the command line that looks like the following:

The image will now also show up in the "Images & Snapshots" section in your SUSE Cloud instance:

We can now easily launch instances of this image:

You'll notice in the screenshot that we've chosen the keypair "jamestyj" when launching the instance. This is important as password based authentication is automatically disabled for the root account for security reasons. Without a matching keypair, you won't be able to login to the instance via SSH. Keypairs can be created in the "Access & Security" section of SUSE Cloud. During keypair creation, you'll be offered to save the private key locally. Keep this in a safe and secure place as you'll need to generate a new keypair if it is misplaced. Run the following command on the downloaded private key to ensure the correct file permissions, eg:
  chmod 600 jamestyj.pem

You can then connect securely to the instance via SSH. The IP address can be obtained from the "Overview" tab of the running instance in SUSE Cloud. For example:
  ssh -i jamestyj.pem root@10.122.160.81

There's also the VNC viewer in the instance's "VNC" tab, though you won't be able to login there since password based logins are disabled. It's useful for debugging if something goes wrong:

As you can see here, it's easy to import images from Studio into SUSE Cloud once you have the initial setup. In the next post of this series, we'll show how to use Studio's WebHooks to automatically import images into SUSE Cloud.

[8 Oct 2012] Update: The third and last blog post in this series, "Automatic image imports with WebHooks" is out now.

[26 Jun 2013] Update: The package is now available from Cloud:OpenStack:Grizzly project.

Tuesday, October 2, 2012

KVM build format & SUSE Cloud support

We've been showing sneak previews of several new features in Studio at SUSECon a couple of weeks ago. I'm happy to announce today that they are now ready for public use!

Feature #1: New build format "SUSE Cloud / OpenStack / KVM"

The first feature is the new build format "SUSE Cloud / OpenStack / KVM". This outputs a compressed qcow2 file that is native to KVM. The built-in compression is so efficient that we no longer need to re-compress (gzip) the resulting image to reduce the download size. This means you can directly consume the image from Studio, without any uncompression step. It is available to all base systems (eg. openSUSE and SLE) and templates (eg. JeOS, Server, Desktop).

Studio supported KVM for years but only via VMWare's VMDK format, which KVM is able to boot directly. However, this format lacked some features and in cases where the target environment only supports qcow2, a slow image conversion is required. With the new native KVM qcow2 format, this additional step is eliminated. This is also the preferred format for SUSE Cloud and OpenStack, hence those are also in the format name.

Feature #2: SUSE Cloud support

The second feature is SUSE Cloud support, which is currently only available for SLE11 SP2. You'll find a new "SUSE Cloud" section in the Configuration -> Appliance tab. When enabled, the cloud-init package is installed and is triggered on first boot when running outside of Testdrive. This sets up the root keypair with that from SUSE Cloud or OpenStack when booting the image in those environments. For added security, it disables password based logins for the root account as well. Therefore, you must use the associated SSH keypair from SUSE Cloud / OpenStack to login.

This is the first blog post in a series of SUSE Studio and SUSE Cloud integration articles, so stay tuned for more details and examples.

[5 Oct 2012] Update: The second post in this series, "Importing images into SUSE Cloud / OpenStack" is out now.

[8 Oct 2012] Update: The third and last blog post in this series, "Automatic image imports with WebHooks" is out now.

 
© 2013 SUSE