I want to create an appliance based on the Ubuntu 22.04 distro in order to upload it to a common OpenNebula marketplace with the other partners of the project. This appliance will include a service installed via a process of six commands. I have watched the OpenNebula webinar: “Introducing one-apps project, an OpenNebula appliance building tool,” and I have some questions.
To create this appliance, should I follow the approach demonstrated with the MariaDB service, or is there a different approach I should take? Specifically, I am aiming to create an Ubuntu Image appliance with a service installed, rather than a service appliance.
If I modify one-apps/packer/ubuntu.10-upgrade-distro.sh to include the commands needed to install my service, will that work? Should I follow the same approach shown in the webinar?
In general, the approach followed on the webinar is the “ideal” scenario for a bash based approach. What you could really change is using the ruby framework (more modern one, there is a note about that in the webinar) instead of the bash one.
I am aiming to create an Ubuntu Image appliance with a service installed, rather than a service appliance.
Would you mind explaining this ?
If I modify one-apps/packer/ubuntu.10-upgrade-distro.sh to include the commands needed to install my service, will that work? Should I follow the same approach shown in the webinar?
You can place your logic wherever you want, but if the intention is to create a custom appliance, it would be ideal to have a dedicated script for it and referencing it within the packer code. That script is used in the base ubuntu distro building.
ubuntu is not a good name for a custom app, it could be confusing as there is already ubuntu flavours. But is not a big deal as long as users are aware.
you want to execute the script through another script. This means you’d need to modify said script which is stock OpenNebula script.
If for some reason we change that context install script, then you’ll need to maintain the change sync.
Why not simply add another script with a numbered order ? Packer will call it sequentially.
So, if I create a script in one-apps/packer/ubuntu/99-add-logic.sh with the logic of the appliance that I want to create, will it be called automatically?
Yes, I agree that the name “ubuntu” is not a good name for a custom appliance. If I change the variable appliance.name in one-apps/packer/ubuntu/variables.pkr.hcl, will it work?