Gitlab
Revision as of 19:42, 14 June 2019 by imported>Jeremy-busk
Sites of Interest
Authentication
You can easily hook into your own application portal using auth api
Migrate from Local User to LDAP Auth
- https://git.pyr8.io/admin/users/
- Add New Identity like "LDAP (ldapmain) uid=
,ou=people,dc=example,dc=io"
URL Links for Licensing
- https://about.gitlab.com/pricing/licensing-faq/
- https://customers.gitlab.com/plans Buying Gitlab Licenses
- https://git.pyr8.io/admin/users
Who gets counted in the subscription? Every person with a GitLab account on the instance is a user and is counted in the subscription. Only active users count towards total user count. Blocked users do not count, nor do Guest users in an Ultimate license. For more detail, administrators can find user counts under the Admin wrench > Users. The Active Users tab indicates the users currently counted.
Backup & Migration to New Host
https://pikedom.com/migrate-gitlab-instance-to-new-host/
Some useful commands
gitlab-ctl reconfigure
Script
Add your new server ssh key into from_gitlab /root/.ssh/authorized_keys
#!/bin/bash set -e # This is after you have installed fresh OS and installed from from latest omnibus package # You need to make sure source host is same version of gitlab as well gitlab_from_host=x.x.x.x gitlab_to_host=y.y.y.y gitlab_backup_name=latestbackup ssh gitlab_from_host "sudo gitlab-rake gitlab:backup:create STRATEGY=copy BACKUP=${gitlab_backup_name}" scp ${gitlab_from_host}:/var/opt/gitlab/backups/${gitlab_backup_name}_gitlab_backup.tar /var/opt/gitlab/backups/ chown -v git:git /var/opt/gitlab/backups/${gitlab_backup_name} scp ${gitlab_from_host}:/etc/gitlab/gitlab.rb /etc/gitlab/ scp ${gitlab_from_host}:/etc/gitlab/gitlab-secrets.json /etc/gitlab/ scp ${gitlab_from_host}:/etc/ssh/ssh_host_* /etc/ssh/ gitlab-rake gitlab:backup:restore BACKUP=${gitlab_backup_name} # You can use --skip if you want to skip artifacts and such cd /etc/gitlab gitlab-ctl reconfigure # You may want/need to reboot
Issues with backup runners after move (if you've lost gitlab-secrets.json)
gitlab-rails console ApplicationSetting.current.reset_runners_registration_token!
Other
gitlab-rails dbconsole
- tail -f /var/log/gitlab/gitlab-rails/*.log
- https://stackoverflow.com/questions/54216933/internal-server-error-500-while-accessing-gitlab-admin-runners
- https://gitlab.com/gitlab-org/gitlab-ce/issues/57038