doc/development/ai_features/ai_development_license.md
To use GitLab Duo Features, you need to:
This document walks you through how to get ensure these requirements are met for your GDK.
Why: Cloud licenses are mandatory for our cloud connected GitLab Duo features for
GitLab Self-Managed and Dedicated customers. As opposed to "legacy" GitLab
licenses, cloud licenses require internet connectivity to validate with
customers.gitlab.com (CustomersDot). GitLab periodically checks license
validity, and provides automatic updates to subscription changes through
CustomersDot.
GitLab Duo is available to Premium and Ultimate customers only. You likely want an Ultimate license for your GDK. Ultimate gets you access to all GitLab Duo features. Premium gets access to only a subset of GitLab Duo features.
How:
Follow the process to obtain an Ultimate license for your local instance. Start with a GitLab Self-Managed Ultimate license. After you have a GitLab Self-Managed license configured, you can always simulate a SaaS instance and assign individual groups Premium and Ultimate licenses in the admin panel.
Set environment variables in GDK:
export GITLAB_LICENSE_MODE=test
export CUSTOMER_PORTAL_URL=https://customers.staging.gitlab.com
export CLOUD_CONNECTOR_SELF_SIGN_TOKENS=1
Developers may also choose to connect their local GitLab instance to the staging AI Gateway instance.
To connect to the staging AI Gateway:
DEVELOPMENT_AI_GATEWAY_URL environment variable to https://cloud.staging.gitlab.comAI_GATEWAY_URL is unset and Ai::Setting.instance.ai_gateway_url is nilIf you're having issues with your GitLab Duo license setup:
root user only. If you want to test with other users, make sure
to assign them a seat.GlobalPolicy.new(User.first, User.first).debug(:access_duo_entry_point). This Declarative Policy debug output will help you dive into the specific access logic for more granular debugging.admin/subscriptions and that it is an online license or open the rails console by running rails c in the GitLab project, then run License.current.License.find(:id).destroy where the ID is of the unwanted license. Legacy licenses are known to have caused problems with feature access.#s_fulfillment_engineering in Slack#g_ai_framework in SlackWhen working in staging environments, you may need to set up GitLab Duo add-ons for your staging.gitlab.com account.
Upgrade to Ultimate.Continue with your Gitlab.com account.Buy GitLab Duo Pro.Settings > GitLab Duo and managing seats.Internal use only: Purchasing a license for GitLab Duo Enterprise is not
self-serviceable; post a request in the #g_provision Slack channel to grant
your staging account a GitLab Duo Enterprise license.