One private marketplace for multiple environments

Hi!

I am trying to setting up a private marketplace that can be used by multiple OpenNebula environments we have running. The storage where the marketplace images will be placed is a CephFS, which is available on all nodes running Oned and on the web server of the marketplace.

Now, I have created an own Ubuntu image with one-apps that I want to make available through our own marketplace. However, it is not clear how I can do this so that it is immediately available to all OpenNebula environments.

What I’m trying to achieve is similar to the official OpenNebula Marketplace: the ability to upload new images to the marketplace from a central point and have them immediately accessible on all our OpenNebula environments. Does anyone know how I can set this up?

The information I’ve been able to find mainly focuses on scenarios where you already have an image in OpenNebula and then move it to your private marketplace. However, in such cases, it’s only recognized within the specific OpenNebula environment and not across all environments. Ideally, we’d like to skip the step of first importing it into OpenNebula before it goes to the marketplace because we aim to automate the entire process of building images and uploading them to a marketplace.

Thanks!

2 Likes

Public marketplaces (DockerHub, official marketplace, etc.) drivers ship with a monitoring system that provides app discovery capabilities, whereas private marketplace drivers have a simple monitoring that only outputs information about space usage.

You’d need to extend a private marketplace driver and provide such feature. Take a look at this section. Following this procedure is how the unofficial public marketplaces have been added to complement the official OpenNebula marketplace. Here is where the marketplace drivers are located.

1 Like

Thank you for the information! I’ll take a look at this and if I have any questions, I’ll let you know.

Did you ever get this figured out? I am looking to do the same thing.

Yes, we have been running it for a while now and it works well. We solved it by making a copy of the official marketplace and making adjustments where necessary. It was mostly a matter of figuring out how the JSON should look so that the marketplace driver could work with it. The easiest way to do this is by downloading the JSON from the official marketplace and creating your own JSON file based on the original.

Here is an example of what our JSON looks like.

{
    "sEcho": 1,
    "appliances": [
        {
            "_id": {
                "$oid": "<UUID>"
            },
            "name": "[COMPANY] Ubuntu 24.04",
            "version": "6.8.1-02072024",
            "publisher": "<OUR COMPANY NAME>",
            "tags": [
                "ubuntu"
            ],
            "format": "qcow2",
            "creation_time": <EPOCH_TIMESTAMP>,
            "os-id": "Ubuntu",
            "os-release": "24.04",
            "os-arch": "x86_64",
            "hypervisor": "ALL",
            "opennebula_version": "6.4, 6.6, 6.8",
            "opennebula_template": "<TEMPLATE_IN_BASE64>",
            "logo": "ubuntu.png",
            "short_description": "<SHORT_DESCRIPTION>",
            "files": [
                {
                    "name": "ubuntu2404",
                    "type": "OS",
                    "dev_prefix": "sd",
                    "driver": "qcow2",
                    "size": 10737418240,
                    "hypervisor": "ALL",
                    "os-arch": "x86_64",
                    "format": "qcow2"
                }
            ]
        }
    ]
}

The UUID is used as the filename of the image. We’re running a Redis instance that stores the UUIDs and the actual filenames (for example; alma9.qcow2). This information is retrieved via a PHP script and sent back to the OpenNebula Marketplace driver so that the correct image is downloaded.

Nginx config (don’t enable HTTP2, otherwise cURL isn’t working):

    location / {
        index index.json;
    }

    location /images/ {
        try_files $uri $uri/ /images/download.php?id=$uri;
    }

It’s important to note that if you want to use both your own marketplace and the official marketplace, you need to ensure that the app names are not the same. For example, you cannot use the name “AlmaLinux 9” in your own marketplace if this name is also used in the official marketplace. In my case, only the app/image was visible in the official marketplace.

1 Like