Composer generates custom images suitable for deploying systems or uploading to the cloud. It integrates into Cockpit as a frontend for osbuild composer
The web interface for on-premises Image Builder!
Image Builder generates custom images suitable for deploying systems or uploading to the cloud. It integrates into Cockpit as a frontend for osbuild.
Cockpit Composer can be installed on RHEL and Fedora systems using:
$ dnf install cockpit-composer
Make sure to install/enable Cockpit with:
$ systemctl enable --now cockpit.socket
First download the code from Github:
$ git clone https://github.com/osbuild/cockpit-composer.git
$ cd cockpit-composer/
Running cockpit-composer on MacOS requires running a Fedora/CentOS/RHEL VM.
This installation focuses on a visual install. There are many tools to create a VM on Mac but the following steps are focused on the open source VM host UTM. Other VM tools should work similarly.
Create/download an installer .iso
. Using hosted Image Builder is a great way to create this installer with cockpit-composer and dependencies already installed.
Select Create a New Virtual Machine
.
Assuming the installer is for ARM/AArch64 Virtualize
is the best selection. But UTM can also Emulate
x86_64. Select whichever is best for your system.
Select your installer as the Boot ISO Image
.
Edit the VM settings but the defaults should be fine.
Make sure the VM's network is set to bridged so that you can access it from your host machine.
Click through installer steps.
If your image was not preinstalled with cockpit-composer follow the instructions in the Install from official repositories section.
Inside the running VM get the IP address. The command ip a
will show the network settings and will include the IP to access the VM.
In a browser, on the host machine, navigate to port 9090 on the VM's IP address. i.e. https://192.168.178.00:9090/
Login and access Image Builder in Cockpit.
It's easy to set up your local machine to develop on Cockpit Composer.
On Fedora or Red Hat Enterprise Linux:
$ dnf install osbuild-composer cockpit
$ systemctl start osbuild-composer
$ dnf install nodejs npm
rpm-build
is required $ dnf install rpm-build
$ make build
This will create a public
directory which can be sym-linked into Cockpit as a plugin:
$ mkdir -p ~/.local/share/cockpit
$ ln -s $(pwd)/public ~/.local/share/cockpit/composer
Now you can log into Cockpit Composer on your local machine at the following address. Use the same user and password that you used to log into your local user account.
https://localhost:9090/composer
Cockpit Composer can also be built in watch
mode so that it will rebuild on code changes without having to manually rerun make build
. This can be done using:
npm ci
npm run watch
We use eslint and prettier to enforce code style. To run the linters, run:
$ npm run lint
$ npm run prettier
Any auto fixable errors can be corrected with:
$ npm run format
$ make rpm
Run test without visually seeing what the browser is doing:
$ make check
To learn more about testing see our testing docs.
To keep Cockpit Composer working with Cockpit API all code should follow the following rules.
utils.apiFetch
. Any non API fetch
requests
must use credentials: 'same-origin'
so that cookies are included with those ajax requests.It is important to keep the NPM modules up to date, to keep up with security updates and bug fixes. This is done automatically by Dependabot. which is run daily.
Similarly, translations are refreshed automatically by Weblate.
This source code is licensed under the MIT license found in the LICENSE.txt
file.
Made with ♥ by the OSBuild team, Welder team, Cockpit team, and contributors