Friday, June 23, 2023

Build Custom Operating System with OpenSUSE Build Service (OBS)

Access OBS here: https://build.opensuse.org

Create an account if necessary, and login.

Navigate to "Your Home Project". This should display your default project page.





Once there, you should by default be on the Overview tab. The context-based menu will have the option to create a "New Image".



The next step is to choose a base template - either an ISO or a container. Browse to the bottom to be familiar with the options available. The JeOS (Just Enough OS) provides the base minimum to get a server up and running.

Once you have the image selected, scroll to the bottom of the screen to name your custom OS.


With a name inserted, you can click "Create appliance". Note that this creates the sub-project and base files. A default build will also be initiated, but we still want to do some customising.

After creating the appliance, you will be taken to the sub-project / appliance overview.



Under "Software", you can (1) choose the type of appliance files to be generated (VMware, Hyper-V, etc) and (2) add/remove software packages to be pre-installed.


Finding your image

From "Your Home Project", go to "Subprojects" to access the appliance.
Select your Custom OS under "Packages"



Once completed, you can "View Image" - where you can again edit the software packages and build types.



Adding software

When you are viewing your image, select the Software tab.



Under "Packages", select "Add package"




Start typing a package name to get the package search started.



Note that dependencies need to be manually specified. I normally run the base image as a virtual machine, and then with each zypper in package-name, note down the additional packages to be installed. These will need to be manually added in OBS.




Downloading images

After saving changes to build type or adding/removing software packages, a build is automatically scheduled. Follow it's status on the "Build results" box (you may need to click the "Refresh" button from time to time).

Click on the "images" hyperlink to view the appliance files.