doc/development/ai_features/amazon_q_integration.md
This guide combines and builds on the following guides and sources. It describes Amazon Q set-up for testing and evaluation purposes:
This guide describes how to set up Amazon Q in a GitLab Linux package running in a VM, using the staging AI Gateway. The reason we need a GitLab Linux package instance instead of GDK is that the GitLab instance needs an HTTPS URL that can be accessed by Amazon Q.
Create a VM in AWS
aws-*** (not aws-services-*** or aws-dedicated-***). This will create a AWS sandbox and display login credentialsA few things to note:
Install GitLab
Follow this guide on how to install GitLab Linux package. We need to set up the external URL and an initial password. Install GitLab using the following command:
sudo GITLAB_ROOT_PASSWORD="your_password" EXTERNAL_URL="https://<vm-instance-external-ip>.nip.io" apt install gitlab-ee
This will use nip.io as the DNS service so the GitLab instance can be accessed through HTTPs
Config the newly installed GitLab instance
SSH into the VM, and add the following config into /etc/gitlab/gitlab.rb
gitlab_rails['env'] = {
"GITLAB_LICENSE_MODE" => "test",
"CUSTOMER_PORTAL_URL" => "https://customers.staging.gitlab.com",
"CLOUD_CONNECTOR_BASE_URL" => "https://cloud.staging.gitlab.com"
}
Apply the config changes by sudo gitlab-ctl reconfigure
Obtain and activate a self-managed ultimate license
https://<vm-instance-external-ip>.nip.io), log in with root account. Then in the left sidebar, go to Admin > Subscription, and enter the activation codeFollow the same step described above on how to create an AWS sandbox if you haven't had one already.
Login into the newly created AWS account and create an Identity Provider following this instruction with slight modifications:
https://glgo.staging.runway.gitlab.net/cc/oidc/<your_gitlab_instance_id>gitlab-cc-<your_gitlab_instance_id>The GitLab instance ID can be found at <gitlab_url>/admin/ai/amazon_q_settings
Create a new role using the identity provider. For this, we can follow this section exactly.