use script cubic to create a new image

Asked by Gergely Windisch on 2019-11-23

Hi,

I would like to use Cubic to create linux images containg the actual version of our own application preinstalled. When a new version comes out, I would replace the old files with the new ones and generate the iso. Would it be possible somehow to do this automatically from a script without any user interaction on the GUI (or better yet, no gui at all?)
So from the command line tell cubic the name of the project to load and a script to execute in the chroot environment, and then have the iso created...

is there a way for Cubic to be used like this?
Thanks,
Gergely

Question information

Language:
English Edit question
Status:
Answered
For:
Cubic Edit question
Assignee:
No assignee Edit question
Last query:
2019-11-23
Last reply:
2020-02-13
Cubic PPA (cubic-wizard) said : #1

Gergely,

Cubic doesn't have a command-line interface, so scripting is not possible with the software.

You would have to write your own script to do the steps that Cubic does: extract the ISO, extract the compressed Linux file system, enter the chroot environment, and then repackage everything.

If it helps, the extracted Linux filesystem Cubic uses is <Your Cubic Project>/squashfs-root.

Another option might be to use software that automates user interactions (mouse and keyboard clicks) on GUI applications.

D L (dl-ubuntu) said : #2

Only recently have I started exploring Cubic to customise images before pushing to a remote host.
I agree that automation scripting would be useful.
The Cubic GUI is not easily driven (although that is still one option I am exploring). For example I cannot easily resize/position the GUI although devilspie2 lua script offers promise.
But perhaps the most promising option is to install ansible in the host machine running Cubic to orchestrate the building of custom image.
I thought that ansible was mainly for local to remote automation but apparently ansible can be used in local to local mode using delegate.
Here is one link I found ..

https://www.decodingdevops.com/ansible-copy-file-locally/

I think that a hybrid of these two options (GUI automation plus ansible) might be a way forward. Look at Actiona automation tool in Ubuntu repo for ideas (although that developer suffered a server fault and lost chunks of the forum).

Can you help with this problem?

Provide an answer of your own, or ask Gergely Windisch for more information if necessary.

To post a message you must log in.