GitLab: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
==Administration== | ==Omnibus Administration== | ||
Here are notes on running your own gitlab instance. | Here are notes on running your own gitlab instance. | ||
===Terms=== | ===Terms=== | ||
Line 68: | Line 68: | ||
</pre> | </pre> | ||
Then have your reverse proxy terminate TLS and forward 5050 to 5000. | Then have your reverse proxy terminate TLS and forward 5050 to 5000. | ||
==Kubernetes Administration== | |||
Notes on deploying GitLab using their Helm chart. |
Revision as of 16:53, 23 January 2022
Omnibus Administration
Here are notes on running your own gitlab instance.
Terms
- unicorn - this is the web server portion of gitlab
- sidekiq - the background job processor
Basic Commands
sudo gitlab-ctl start sudo gitlab-ctl stop sudo gitlab-ctl restart
LFS
Edit the config in /etc/gitlab/gitlab.rb
and set the following:
### Git LFS gitlab_rails['lfs_enabled'] = true gitlab_rails['lfs_storage_path'] = "/var/opt/gitlab/gitlab-rails/shared/lfs-objects" # gitlab_rails['lfs_object_store_enabled'] = false # gitlab_rails['lfs_object_store_direct_upload'] = false # gitlab_rails['lfs_object_store_background_upload'] = true # gitlab_rails['lfs_object_store_proxy_download'] = false # gitlab_rails['lfs_object_store_remote_directory'] = "lfs-objects" # gitlab_rails['lfs_object_store_connection'] = { # 'provider' => 'AWS', # 'region' => 'eu-west-1', # 'aws_access_key_id' => 'AWS_ACCESS_KEY_ID', # 'aws_secret_access_key' => 'AWS_SECRET_ACCESS_KEY', # # # The below options configure an S3 compatible host instead of AWS # # 'aws_signature_version' => 4 # For creation of signed URLs. Set to 2 if provider does not support v4. # # 'endpoint' => 'https://s3.amazonaws.com' # default: nil - Useful for S3 compliant services such as DigitalOcean Spaces # # 'host' => 's3.amazonaws.com', # # 'path_style' => false # Use 'host/bucket_name/object' instead of 'bucket_name.host/object' # }
- Notes
- If you change the LFS directory, you should run
sudo gitlab-ctl reconfigure
- The LFS directory should be
700
andgit:root
. - Parent directories need to have permissions
775
withgit
in the group or owned by usergit
. - See https://docs.gitlab.com/omnibus/settings/configuration.html#disable-storage-directories-management for more details.
- The LFS directory should be
The easiest way if you have very few users like me is to setup a separate gmail account.
Then use forwardemail.net such that the separate gmail account can send using your domain.
Then fill in the configuration.
See settings:smtp#gmail.
Also set:
gitlab_rails['gitlab_email_from'] = '[email protected]'
Container Registry
In /etc/gitlab/gitlab.rb
, edit the following:
registry_external_url 'https://gitlab.davidl.me:5050' ### Settings used by GitLab application gitlab_rails['registry_enabled'] = true gitlab_rails['registry_host'] = "gitlab.davidl.me" gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry" registry_nginx['enable'] = false
Then have your reverse proxy terminate TLS and forward 5050 to 5000.
Kubernetes Administration
Notes on deploying GitLab using their Helm chart.