Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-Contained Apache Celix Executable for Simplified Installation and Deployment1 #714

Open
pnoltes opened this issue Jan 2, 2024 · 1 comment
Labels
build/environment Categorizes an issue or PR relevant to the build environment. kind/wish Categorizes issue or PR as a wish.

Comments

@pnoltes
Copy link
Contributor

pnoltes commented Jan 2, 2024

Intro

Currently, it is difficult to install a generated Apache Celix container executable, including its required bundles and an optional config.properties file. This challenge can prevent users from using Apache Celix to create installable applications.

Bndtools bndrun export

Bndtools, a tool for Java OSGi build and development, has support for creating a single JAR that contains an OSGi framework, bundles, and configuration.

Bndtools can export a bndrun file to an executable JAR. This is a JAR that can be executed in any Java VM. The JAR contains the framework and all required bundles. When it runs with the venerable java -jar x.jar command it will unpack itself and launch a framework. The continuous integration can build this executable JAR.

Self-Contained Apache Celix Executable

Create a solution that allows users to create an Apache Celix container that is installable and runnable from a single executable file.

The executable or extracted Apache Celix container can have normal libraries dependencies (i.e. libcurl, libcelix_framework, etc), but should not depend on external bundle zip files or a config.properties file.

A possible solution could be Makeself. Note that makeself is GPL, but mentions the following:

Makeself itself is covered by the GNU General Public License (GPL) version 2 and above. Archives generated by Makeself don’t have to be placed under this license (although I encourage it ;-)), since the archive itself is merely data for Makeself.

@pnoltes pnoltes added build/environment Categorizes an issue or PR relevant to the build environment. kind/wish Categorizes issue or PR as a wish. labels Jan 2, 2024
@PengZheng
Copy link
Contributor

PengZheng commented Jan 3, 2024

It seems that Flatpak/snap/AppImage can also serve the purpose. Underlying these technologies are some read-only filesystems like squashfs.

Take firefox on Ubuntu as an exameple:

/var/lib/snapd/snaps/firefox_3358.snap on /snap/firefox/3358 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/firefox_3416.snap on /snap/firefox/3416 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)

When packaging a container, we can package uncompressed bundles and the launcher into these app formats.

PS: Uncompressed bundles within a squashfs image is already the way I use Celix 2.4.0 in my day job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/environment Categorizes an issue or PR relevant to the build environment. kind/wish Categorizes issue or PR as a wish.
Projects
None yet
Development

No branches or pull requests

2 participants