# How to create a new image definition For the sake of simplicity, we assume that the new image definition is derived from something (e.g. a distribution or image type) that exists already. ## 1. Set up your development environment Need a better link, but something like https://www.osbuild.org/guides/developer-guide/index.html ## 2. Add image definition to osbuild/images Read through the guide on how to work with the images repo: https://github.com/osbuild/images/blob/main/HACKING.md 1. Create a distribution The distributions are kept in https://github.com/osbuild/images/blob/main/pkg/distro/distro.go Here's the example of Fedora: https://github.com/osbuild/images/blob/main/pkg/distro/fedora/distro.go 3. Create an imagetype Continue reading here to understand what an imagetype is: https://github.com/osbuild/images/blob/main/pkg/distro/distro.go#L81-L129 Here's the example of Fedora: https://github.com/osbuild/images/blob/main/pkg/distro/fedora/imagetype.go Here's an example of adding two image definitions to Fedora (iot-simplified-installer and iot-qcow2): https://github.com/osbuild/images/pull/79 ### 2.1 Optional: Add stages in osbuild where needed If necessary, you might have to add a new stage to osbuild: https://github.com/osbuild/osbuild/tree/main/stages Continue reading here: https://www.osbuild.org/guides/developer-guide/projects/osbuild/index.html#stage-development ## 3. Expose it in osbuild-composer (weldr and cloudapi) To be able to really make use of your image definition, you need to expose it in osbuild-composer. Continue reading here: https://www.osbuild.org/guides/developer-guide/projects/osbuild-composer/index.html ### 3.1 Optional: Expose it in image-builder ### 3.2 Optional: Expose it in image-builder-frontend ### 3.3 Optional: Expose it in cockpit-composer