Chapter 2. Creating Appliances

Contents

2.1. Logging In
2.2. Selecting a Base Template
2.3. Importing from KIWI or AutoYaST
2.4. Adding Software
2.5. Changing your Configurations
2.6. Knowing Appliance Formats
2.7. Building Appliances
2.8. Building Additional Formats of an Appliance
2.9. Viewing the Supportability Report
2.10. Sending Feedback
2.11. Sharing Appliances with Other Users
2.12. Exporting KIWI Configuration

Abstract

SUSE Studio lets you create your appliance based on a base template. This chapter describes, how to add repositories and RPM packages, change your configurations, and build your appliance.

2.1. Logging In

Before you can use SUSE Studio decide where to log in:

  • If you want to use the official SUSE Studio website from http://susestudio.com, use your login credentials from Novell, Google, or Yahoo. It is also possible to use an openID account from any openID provider.

    If you do not have a SUSE Studio account yet, get an invitation by providing your e-mail address. It usually takes some time before your request is being processed.

If you still need help, click the link Need help signing in? to get detailed information.

2.2. Selecting a Base Template

After you have logged in to SUSE Studio for the first time, select one of the available base templates, see Figure 2.1. A base template determines the operating system your appliance is based upon. Depending on the server configuration, this can be any of the openSUSE, SUSE Linux Enterprise Desktop, or SUSE Linux Enterprise Server flavours, be it for 32- or 64-bit processor architectures.

Figure 2.1. Selecting from Available Base Templates

Selecting from Available Base Templates

If you have already created an appliance, SUSE Studio gives a list of your appliances that have been already built and a list of appliances which are shared with you by others, see Figure 2.2.

Figure 2.2. Home Site Displaying Own And Shared Appliances

Home Site Displaying Own And Shared Appliances

To work with appliances, you have three options:

  • Create a New Appliance.  Click Create new appliance... and choose a base template. The following sections describe, how to customize the appliance to your needs.

  • Work on Existing Appliances.  Click an entry on the Your appliances list to work with a saved appliance. If you have not created an appliance yet, the list is empty.

    To use a previously saved appliance as a base template, hover the mouse of the entry. Use the Clone link to create a new appliance based on the currently selected one.

  • Clone Shared Appliances.  Hover the mouse over an entry in the Appliances shared with me by other users list. Entries in this list can only be cloned, not modified. If no users have shared their appliances, this is empty.

Regardless of the method you choose, you always end up on the same welcome page.

2.3. Importing from KIWI or AutoYaST

Skip this section, if you neither use KIWI or AutoYaST nor did export its appliance configuration (as explained in Section 2.12, “Exporting KIWI Configuration”).

SUSE Studio allows exporting KIWI's profile into a tar archive as described in Section 2.12. If you want to import exported configurations either from you or from someone else, proceed as follows:

  1. Go to your Home site.

  2. Click the Create new appliance... button.

  3. Click Upload configuration file... and select the file, be it a tar archive of SUSE Studio's KIWI export, or the configuration file from AutoYaST.

    SUSE Studio analyses the content. If it does not find any problems, the imported appliance will be displayed under the home site.

  4. Use your imported appliance by clicking its name.

When importing KIWI's or AutoYaST's profile, the following settings are currently transfered (X denotes a supported setting):

Table 2.1. Supported Settings for Import (KIWI and AutoYaST)

Setting

KIWI

AutoYaST

Name

X

Architecture

X

(1)

Base System

X

(1)

Users

X

X

Repository

X

X

Package

X

X

Patterns

X

Network Settings

X

Boot Settings

X

Build Scripts

X

Logos

X

Background Theming

X

Overlay Files

X

X

  1. The architecture and base system are selected by the user during the import. This information is not contained in the AutoYaST profile as the profiles are designed to be generic.


The AutoYaST profile is stripped of the imported parts. The rest of the profile is applied on the first boot of the appliance. The stripped profile is available for editing as raw XML in the appliance configuration, see Configuration+Scripts.

2.4. Adding Software

The next step is to adjust the software selection to your needs. You can add missing software to or remove existing software from your base template. Choose your software from three sources:

  1. From a Preconfigured Base Template.  Add already available software from your base template. For example, if you choose SUSE Linux Enterprise Server 11/JeOS you can add everything that is available from this release.

  2. From External Repositories.  Add additional repositories from the openSUSE Build Server or any other URL providing a software collection which is compatible with SUSE Studio and its templates.

  3. Any Compatible RPMs.  Upload any compatible RPM package from your hard disk or from the Web into SUSE Studio. Make sure it is built for your base template and its architecture is the same as your appliance.

The following subsections give you detailed instructions.

2.4.1. Adding Software from a Base Template

Base templates are a fixed set of complete products. Depending on the setup of the SUSE Studio server, you can choose among the following templates:

SUSE Linux Enterprise Server 11 SP1

Contains version 11 with service pack 1 of SUSE Linux Enterprise Server. Base templates are usually JeOS, Server, VMware, GNOME and KDE desktops.

SUSE Linux Enterprise Server 10

Contains version 10 of SUSE Linux Enterprise Server. Base templates are Server, GNOME and KDE desktops.

To create software from your base template, proceed as follows:

  1. Click the Software link.

  2. If you already know the name of your package, click the Quick link and enter the name. If the name exists, it will be automatically inserted into your software list and you are done.

  3. If you do not know the exact name, enter the name in the Search packages & patterns text field and press Enter. SUSE Studio displays a list names, their version, size, repository, and popularity.

  4. Use the +add button to incorporate the package into your list of installable software. As each package can depend on other packages, SUSE Studio tries to automatically resolve any dependencies. In such a case, SUSE Studio notifies you about missing packages. This package list is displayed and has to be confirmed to resolve any dependecies.

2.4.2. Adding Software from External Repositories

To add an external repository from the openSUSE Build Server, proceed as follows:

  1. Go to the Software link and click Add repositories.... The page displays the available repositories:

  2. Enter a search word to reduce the list of shown repositories. Whenever a user adds a repository, the repository will be available for all users. When you found the repository you were looking for, click Add.

  3. If your repository is not available in the list, click Import new repository.... The following page is shown:

  4. Choose from a local or a remote source (usually openSUSE Build Server):

2.4.3. Adding Compatible RPM Packages

If you have downloaded or built an RPM package yourself, upload it to SUSE Studio to use it for your appliance.

[Note]Use Only Compatible RPM Packages

Although SUSE Studio verifies your RPM packages after the upload, it is recommended to roughly check your RPM packages in advance. This quick test safes you bandwidth and time. Check for the following properties:

  • Same Architecture: you cannot install a 64-bit RPM package on a 32-bit appliance. The architecture is part of the RPM filename (watch for i586 or x86_64)

  • Same Distribution: it is not recommended to install an openSUSE package on a SUSE Linux Enterprise product.

Use YaST to find information about your package or execute the following command:

rpm -qp --queryformat "%{NAME}: %{DISTRIBUTION} %{ARCH}\n" RPMFILES

Proceed as follows to add an RPM package:

Procedure 2.1. Uploading an RPM Package

  1. Go to the Software link and click Upload and manage RPMs....

  2. Select your RPM either from your file systems with Upload RPM... or from a remote source with Add from the Web (URL)....

  3. Add as many RPM packages as you want. You can also remove existing packages.

  4. Click Back to the software overview to integrate it to your software collection.

If you need to add more RPM packages, the previous procedure is a bit cumbersome. In this case, create an archive first and upload it to SUSE Studio. This archive contains all the RPM packages you want to add and can be in tar, tar.gz, tar.bz2, or zip format. Proceed as follows:

Procedure 2.2. Uploading a ZIP Archive Containing RPM Packages

  1. Create a directory /tmp/RPMs.

  2. Copy all your RPM packages to /tmp/RPMs.

  3. Open a shell, for example press Alt+F2 and enter xterm.

  4. Execute the following commands:

    cd /tmp/RPMs
    zip myrpms.zip *.rpm
  5. Upload the archive as described in Procedure 2.1, “Uploading an RPM Package” and start with Step 2. After a successful upload, the archive name is shown in the list.

2.5. Changing your Configurations

Use the Configuration link in the SUSE Studio Web page to control several aspects of your appliances:

General

Change your default locale and timezone, configure your network, enable your firewall, and add users and groups.

Personalize

Add new logo and background for your appliance.

Startup

Define your default runlevel and any end user license agreement. Per default this is empty. If you choose this, the user has to agree to your licenses the first time he installs your appliance.

Server

Set up the PostgreSQL or MySQL database configuration.

Desktop

Configure automatic login for users or any program which is automatically started during login.

Appliance

Set up advanced configuration for your appliance as disk, memory, and logical volume manager. Usually for experts.

Scripts

Run custom scripts at the end of your build. Usually for experts.

The following subsections describe some often used scenarios.

2.5.1. Using Predefined Logos and Background Images

To change the logo or background of your appliances, proceed as follows:

  1. Click Configuration+Personalize.

  2. Select from predefined logos or upload your own.

  3. Do the same for the background.

The Preview section shows an overview of how your appliance will look like during boot and login.

2.5.2. Changing Default Locale

The default locale setting is English. If you want to change it, go to Configuration+General and choose your preferred language, keyboard layout, and time zone.

2.5.3. Adding Users and Groups

If your appliance requires more than the default users root and tux, go to Configuration+General and click Add new user.... SUSE Studio creates a new line where you can change the login name, an optional user ID, password, group, home directory, and its shell. Add as many users as you want. To remove a user, click the cross icon on the right side.

2.5.4. Customizing Network Settings

Configure your network settings under Configuration+General. SUSE Studio allows to choose from different entries:

Do not configure network

Disable the network.

Configure network during first boot

Let your network configure during boot.

Use NetworkManager to configure the network at run-time

Enable the network through NetworkManager. See http://www.novell.com/documentation/sles11/book_sle_admin/data/book_sle_admin_pre.html for more information.

Discover network settings automatically (DHCP)

Use a DHCP server to get the IP address.

Manually configure network

Enter the hostname, IP address, netmask, route, and name servers manually.

2.5.5. Adding an End User Licence Agreement (EULA)

In case your appliance contains special programs under a certain license, it may be necessary that the user agrees to this license during boot time.

If you want to add a license (EULA) to your appliance, go to Configuration+Startup and click the Add a new EULA link. Insert your license in the text field. It is possible to enter more licenses, if necessary.

2.5.6. Customizing Appliance Configuration

If you need to change some aspects in your appliance, such as memory or swap space, go to Configuration+Appliance. Configure the disk size and memory for VMware and Xen. Select the memory value from the pop-up menu and insert the needed disk size in the text field. The same is possible with the swap image.

To help to build a Xen host (or Xen hypervisor), check Enable Xen host mode and SUSE Studio installs the packages xen-kernel, xen-tools, and related packages to the Xen hypervisor. This option is only useful for a disk image format.

The checkbox Enable VMware CD-ROM support is a workaround for a bug in VMware Workstation. This bug causes the host Windows 2003 Server to crash, when CD-ROM support is enabled. Use this option, to enable CD-ROM support in the VMware virtual machine.

2.5.7. Using LVM for SUSE Studio

The Logical Volume Manager (LVM) is an abstract layer between hard disks, partitions, and file systems. LVM gives the system administrator more flexibility. See the flexibility in Figure 2.3, “Physical Partitioning versus LVM” which compares physical partitioning (left) with LVM segmentation (right).

Figure 2.3. Physical Partitioning versus LVM

Physical Partitioning versus LVM

On the left, one single disk has been divided into three physical partitions (PART), each with an assigned mount point (MP) so that the operating system can access them. On the right, two disks have been divided into two and three physical partitions. Two LVM volume groups (VG 1 and VG 2) have been defined. VG 1 contains two partitions from DISK 1 and one from DISK 2. VG 2 contains the remaining two partitions from DISK 2. In LVM, the physical disk partitions that are incorporated in a volume group are called physical volumes (PVs). Within the volume groups, four logical volumes (LV 1 through LV 4) have been defined, which can be used by the operating system via the associated mount points. The border between different logical volumes do not have to be aligned with any partition border. See the border between LV 1 and LV 2 in this example

Find more about the details of LVM in http://www.novell.com/documentation/sles11/stor_admin/data/lvm.html

SUSE Studio supports LVM with one volume group. To create your individual logical volume, proceed as follows:

  1. Create your appliance as described in Chapter 2, Creating Appliances.

  2. Go to Configuration+Appliance.

  3. Enable the Configure LVM checkbox.

  4. Enter the name or the volume group name, default is systemVG.

  5. Enter the volume mount path and its size. You need at least one entry. More can be added with the Add new LVM volume... link.

  6. Build your appliance.

2.6. Knowing Appliance Formats

SUSE Studio can create appliances in several formats which are used for different purposes:

Live CD/DVD (.iso)

Use the Live CD/DVD, if you want to try out your appliance without installing it. This is useful for testing and debugging or if you do not have a spare hard disk available at the moment.

OVF Virtual machine

Use the OVF format, if you need to exchange appliances in different virtual machines like VirtualBox, VMware ESX servers, and others. The Open Virtualization Format (OVF) is an open standard to distribute and package virtual appliances. It requires the ovftool from VMware. Due to licensing issues we cannot distribute the tools with SUSE Studio at the moment. Download, install and set up the tools from http://communities.vmware.com/community/developer/ovf. This option is disabled by default.

Preload ISO (.iso)

Use the preload ISO, if you want to boot from CD/DVD and dump it to your hard disk without knowing too much about the details of the dump procedure. A preload ISO is an image wrapped as a bootable CD/DVD. After you have booted, it offers to overwrite your hard disk. If you select Yes, the image will be dumped to your hard disk.

PXE/Net boot

Use the PXE/Net image format, if you have a TFTP server on your network where your computer can boot from. The Preboot Execution Environment (PXE) is invented for this purpose. The tar archive contains the initrd modules, the kernel, the hard disk image along with a configuration and a MD5 checksum file.

[Note]Disabled SUSE Linux Enterprise Desktop11 SP1 KDE/GNOME Template

SUSE Linux Enterprise Desktop 11 repositories do not include atftp, which is required for proper PXE boot. For this reason, PXE is disabled.

USB stick/hard disk image

Use this format, if you need a convenient method to boot from a USB stick or you want to manually control the dump process. You need some knowledge about the dd command.

VMware / VirtualBox / KVM (.vmdk)

Use the VMDK format, if you want to start your appliance in a virtual machine like VMware® or VirtualBox®. It is similar to the OVF format. This is another method to test an appliance without formatting any hard disk.

XEN guest

Use this format, if you want to run your appliance in a Xen hypervisor. This is mainly useful for experts and is not covered in this manual. See http://www.novell.com/documentation/sles11/book_xen/data/book_xen.html for additional information.

2.7. Building Appliances

Each appliance, independently of the format, is given a version number in the format major.minor.release. It is recommended to use the following scheme for version numbering:

  • Increment the release number, if there are no software related changes.

  • Update the minor number, and change release to 0, if you add or remove any packages.

  • Update the major number, and change minor and release to 0, when you have done substantial modifications to your appliance.

To build your appliance, proceed as follows:

  1. Click the Build link.

  2. Select your default format.

  3. If needed, select additional formats.

  4. Insert the version number of your appliance.

  5. Check the messages for tips and errors on the left side. If your appliance has to fit on a CD (700 MB limit) you have to deselect some software under the Software link.

  6. Click the Build button to start the creation process. Depending on the number of packages this takes some time.

  7. Download your appliance or start the testdrive (see Chapter 3, Testing Appliances).

2.8. Building Additional Formats of an Appliance

It is possible to build additional formats after having built your default format already. Proceed as follows:

  1. Build your appliance the usual way as described in Section 2.7, “Building Appliances”. You should end up with an appliance format with a specific version.

  2. From the Additional formats area check all formats you want to build. If you select one entry, the Build additonal button appears on each built appliances.

  3. Press the Build additional button on the respective appliance version to start the build process. The build process takes over and needs a while to finish.

2.9. Viewing the Supportability Report

If you have a support contract with Novell, you need to know whether your appliance is supported or not. SUSE Studio can analyze each package in your appliance and determine any possible conflicting changes to your support contract.

Go to the Build page. If you have successfully built your appliance, SUSE Studio displays the report with the View supportability report... link. The report is viewed in a new window and contains a summary of each format of your appliance. With full supportability report it lists each package in your appliance.

2.10. Sending Feedback

If your SUSE Studio administrator has enabled feedback, it is possible to send your comments to him (see Figure 2.4, “Feedback Link on The Home Site”). Click Home to display your home site. On the left pane click the Send feedback link and enter your text in the text field below. When you are finished, press the Send feedback button to send your comments.

Figure 2.4. Feedback Link on The Home Site

Feedback Link on The Home Site

2.11. Sharing Appliances with Other Users

To share an appliance, select your appliance from the home site and go to the Share tab, see Figure 2.5, “Appliance Summary for Sharing”.

Figure 2.5. Appliance Summary for Sharing

Appliance Summary for Sharing

If you want to share your appliance with other users, enter the user name to allow cloning of your appliance. Finish by clicking the Share button. The permitted user sees your appliance on his home site.

2.12. Exporting KIWI Configuration

SUSE Studio uses KIWI as back-end to build its appliances. KIWI is a image build system which is designed to provide a complete operating system image. It supports both hardware platforms as well as virtualization systems.

Usually SUSE Studio provides everything what you need to build your appliances. Experienced users can manually intervene in the build process in case of special needs. For this reason, SUSE Studio offers to export your appliance's configuration which can be used by KIWI.

To export your appliance's configuration, click the Build tab, scroll down and select Export your appliance's Kiwi configuration. Download the archive, extract it and run it as explained in KIWI's User Guide. Find more information on KIWI's homepage at http://kiwi.berlios.de.