Thursday, June 30, 2011

Using AutoYaST for customizing your appliance on first boot

When building appliances with SUSE Studio, I was often challenged with finding a way to configuring an appliance on first boot. The most common use cases like locale, time zone and network configuration are being offered by Studio already.

Selecting these options will make Studio include the required packages and configuration to guide the user through a YaST workflow on first boot.

But is there an easy way for further customizing your application on first boot? Yes, there is! Enter AutoYaST and it's powerful "Ask the user for values during installation" feature.

Switch to the Configuration tab, select Scripts and check the "Run AutoYaST profile on appliance's first boot" option.

Next we need to create the AutoYaST profile, which will be run on first boot. The profile format is an ASCII XML file.

Here is a simple example, that will create a simple ask dialoge "Enter the user for this machine" and promt for input. The result will be writen to /tmp/answer_user.

Now let's look at a more complex profile, that uses a script to validate the users input. This technique can also be used to process the users input and e.g. change config files accordingly.

Note, the user provided value is present in the script as $VAL. If the script exit code is non-zero, AutoYaST will show the script output as an error.

Make sure to always include cont which will tell AutoYaST to process the question. (In AutoYaST terms the first boot is also called stage "cont".)

For more details refer to the AutoYaST documentation on this feature which is available here.

One more way to customizing your appliance on first boot is to simply place scripts or binaries in /usr/share/firstboot/scripts. They will be executed automatically by YaST on first boot.

Friday, June 24, 2011

Update for openSUSE 11.4 AMIs on EC2



We updated all openSUSE 11.4 public AMIs on Amazon EC2! (All built with SUSE Studio.) If you are using 11.4 on EC2 we highly recommend switching to those updated AMIs. We ran into some disk space related problems with the old ones and re-released these with 5GB of virtual disk space to ensure there is enough space for your software packages.

Region Type Arch AMI ID
US East (Virginia)EBSi386ami-e626de8f
US East (Virginia)EBSx86_64ami-d226debb
US East (Virginia)S3i386ami-b2768edb
US East (Virginia)S3x86_64ami-e468908d
US West (N. California)EBSi386ami-d3471596
US West (N. California)EBSx86_64ami-dd471598
US West (N. California)S3i386ami-274c1e62
US West (N. California)S3x86_64ami-8f4c1eca
EU West (Ireland) EBS i386 ami-9e2e1fea
EU West (Ireland) EBS x86_64 ami-982e1fec
EU West (Ireland) S3 i386 ami-f81f2e8c
EU West (Ireland) S3 x86_64 ami-201e2f54
Asia Pacific (Singapore) EBS i386 ami-647d0536
Asia Pacific (Singapore) EBS x86_64 ami-6a7d0538
Asia Pacific (Singapore) S3 i386 ami-aa750df8
Asia Pacific (Singapore) S3 x86_64 ami-38760e6a
Asia Pacific (Tokyo) EBS i386 ami-8e3e948f
Asia Pacific (Tokyo) EBS x86_64 ami-903e9491
Asia Pacific (Tokyo) S3 i386 ami-5e319b5f
Asia Pacific (Tokyo) S3 x86_64 ami-72319b73
List of public openSUSE 11.4 AMIs. S3 = instance-store.

And remember, Amazon is offering a free usage tier, which means you can now run an openSUSE 11.4 micro instance in Amazon EC2 completely free of charge for one year!
 
© 2013 SUSE