Skip to content

Allow offline cloud license upload

Corinna Gogolok requested to merge 349611_modify_license_upload into master

What does this MR do and why?

Part of https://gitlab.com/gitlab-org/gitlab/-/issues/349611

Has to be in the same release as !80382 (merged).

Allow the upload of offline cloud licenses.

How to set up and validate locally

Since CustomersDot does not support all of the required workflows yet (at the time of writing this), I think the quickest way to test this is to purchase a new self-managed subscription and modify some code to create the license:

  1. Purchase a self-managed subscription.
  2. Add the following code after this line:
    license.offline_cloud_licensing_enabled = offline_cloud_licensing_enabled?
    Note: Looks like there's already a merge request in progress to set this.
  3. Go to your local CustomersDot's rails console and create a new license with the purchased subscription:
    subscription = Customer.find(<CUSTOMER_ID>).find_subscription(<SUBSCRIPTION_NAME>)
    License.build_from_subscription(subscription: subscription)
  4. Upload the license key to your local GitLab instance.
  5. With the changes here, it should successfully work.
  6. Without the changes, an invalid license key error should show up.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Corinna Gogolok

Merge request reports