S3 Marketplace

Overview

This Marketplace uses an S3 API-capable service as the Back-end. This means Marketplace Appliances will be stored in the official AWS S3 service , or in services that implement that API, like Ceph Object Gateway S3.

Limitations

Since the S3 API does not provide a value for available space, this space is hard-coded into the driver file, limiting it to 1TB. See below to learn how to change the default value.

Requirements

To use this driver you require access to an S3 API-capable service:

Make sure you obtain both an access_key and a secret_key of a user that has access to a bucket with the exclusive purpose of storing Marketplace Apps.

Configuration

These are the configuration attributes of a Marketplace template of the S3 kind:

Attribute Required Description
NAME YES Marketplace name that is going to be shown in OpenNebula.
MARKET_MAD YES Must be s3.
ACCESS_KEY_ID YES The access key of the S3 user.
SECRET_ACCESS_KEY YES The secret key of the S3 user.
BUCKET YES The bucket where the files will be stored.
REGION YES The region to connect to. If you are using Ceph-S3 any value here will work.
ENDPOINT NO This is only required if you are connecting to a service other than Amazon AWS S3. Preferably don’t use an endpoint that includes the bucket as the leading part of the host’s URL.
SIGNATURE_VERSION NO Leave blank for Amazon AWS S3 service. If connecting to Ceph S3 it must be s3.
FORCE_PATH_STYLE NO Leave blank for Amazon AWS S3 service. If connecting to Ceph S3 it must be YES.
TOTAL_MB NO This parameter defines the total size of the Marketplace in MB. It defaults to 1048576 (MB).
READ_LENGTH NO Split the file into chunks of this size in MB, never user a value larger than 100. Defaults to 32 (MB).

For example, the following template illustrates the definition of a Marketplace:

cat market.conf
NAME              = S3CephMarket
ACCESS_KEY_ID     = "*********************"
SECRET_ACCESS_KEY = "*********************"
BUCKET            = "opennebula-market"
ENDPOINT          = "http://ceph-gw.opennebula.org"
FORCE_PATH_STYLE  = "YES"
MARKET_MAD        = s3
REGION            = "default"
SIGNATURE_VERSION = s3

which is created by passing the following command:

onemarket create market.conf
ID: 100

Note

In order to use the download functionality make sure you read the Sunstone Advanced Guide.

Tuning & Extending

Important

Any modification of code should be handled carefully. Although we might provide hints on how to fine-tune various parts by customizing the OpenNebula internals, in general, it’s NOT recommended to make changes in the existing code. Please note the changes will be lost during the OpenNebula upgrade and have to be introduced back again manually!

In order to change the available size of the Marketplace from 1 TB to your desired value, you can modify /var/lib/one/remotes/market/s3/monitor and change:

TOTAL_MB_DEFAULT = 1048576 # Default maximum 1TB

System administrators and integrators are encouraged to modify these drivers in order to integrate them with their datacenter. Please refer to the Market Driver Development guide to learn about the driver details.