Differences between revisions 2 and 13 (spanning 11 versions)
Revision 2 as of 2015-06-04 13:00:40
Size: 1786
Editor: TPG
Comment: Note about git repo
Revision 13 as of 2024-08-28 17:56:30
Size: 1828
Editor: RoyXu
Comment: added gitlab-ascend.sh
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
It's a VM on medico, with a relatively small HDD. It's a VM on medico, with a small HDD; a separate partition is available for `/var` to avoid filling the disk with logs.
Line 8: Line 8:
GitLab itself was installed from a .deb acquired from the GitLab website, which installs to /opt/gitlab. This was symlinked to /home/opt/gitlab (because / was a small partition). GitLab itself was installed from a .deb acquired from the GitLab website, which installs to `/opt/gitlab`.
Line 10: Line 10:
GitLab has been configured (using the config file in `/etc/gitlab/gitlab.rb`) to store repositories in `/home/gitlab-repositories`, which (because I'm lazy) is a symlink to
`/
services/gitlab`. This is a mount of services:/services/gitlab (the VM is only allowed access to this subdir, safety first.)
It's now kept up to date using the [[https://about.gitlab.com/update/|GitLab package server]].

GitLab has been configured (using the config file in `/etc/gitlab/gitlab.rb`) to store repositories in `/services/gitlab`. This is a mount of services:/services/gitlab (the VM is only allowed access to this subdir, safety first.)
Line 15: Line 16:
* `gitlab-ctl start` - Start the service
* `gitlab-ctl stop` - Stop the service
* `gitlab-ctl reconfigure` - Apply any configuration changes
Line 19: Line 17:
== Editing the display ==
I have done some minor patching to the GitLab code to customise the login page.
This was done in the GitLab rails application directory : `/home/opt/gitlab/embedded/service/gitlab-rails`. This has been turned into a git repo to trace changes and upgrades.
 * `gitlab-ctl start` - Start the services
 * `gitlab-ctl stop` - Stop the services
 * `gitlab-ctl reconfigure` - Apply any changes from `/etc/gitlab/gitlab.rb`
Line 23: Line 21:
To apply changes to the page templates, stopping+starting the services should suffice. If any images or CSS are changed, then you need to regenerate the assets by running the following command from the rails app root.
`RAILS_ENV=production PATH=/home/opt/gitlab/embedded/bin/:$PATH ./bin/bundle exec rake assets:precompile`
To promote a wheel member to admin role, go to [[https://gitlab.ucc.asn.au/admin/users]] and click the "Edit" for that user, set the "Access level" to "Administrator". Notice this is a user-level flag.
Line 26: Line 23:
''NOTE: This directory has been made into a git repository. When you've edited something, make sure to check it in.''
`git add <files>; git commit --author "Name <[email protected]>"`
There's also a short script `gitlab-ascend.sh` under wheel/docs/ that'll sync `wheel` group with gitlab admin list.

<<BR>><<BR>>Alternatively, ssh into `gitlab`, then:
{{{
gitlab-rails console
foobar=User.find_by_login("<username>")
foobar.admin = 1
foobar.save
exit
}}}
(see also: https://docs.gitlab.com/ee/administration/operations/rails_console.html https://docs.gitlab.com/ee/administration/troubleshooting/gitlab_rails_cheat_sheet.html )

== Documentation ==
Documentation of gitlab maintenance can be found at https://docs.gitlab.com/omnibus/maintenance/README.html

[TPG] has set up a "GitLab" instance on a VM, running at https://gitlab.ucc.asn.au/

GitLab is a git repository manager, similar to GitHub, and looks to be a good replacement for gitosis+gitweb.

Setup

It's a VM on medico, with a small HDD; a separate partition is available for /var to avoid filling the disk with logs.

GitLab itself was installed from a .deb acquired from the GitLab website, which installs to /opt/gitlab.

It's now kept up to date using the GitLab package server.

GitLab has been configured (using the config file in /etc/gitlab/gitlab.rb) to store repositories in /services/gitlab. This is a mount of services:/services/gitlab (the VM is only allowed access to this subdir, safety first.)

Management

To start/restart/stop the GitLab service, use the gitlab-ctl tool.

  • gitlab-ctl start - Start the services

  • gitlab-ctl stop - Stop the services

  • gitlab-ctl reconfigure - Apply any changes from /etc/gitlab/gitlab.rb

To promote a wheel member to admin role, go to https://gitlab.ucc.asn.au/admin/users and click the "Edit" for that user, set the "Access level" to "Administrator". Notice this is a user-level flag.

There's also a short script gitlab-ascend.sh under wheel/docs/ that'll sync wheel group with gitlab admin list.



Alternatively, ssh into gitlab, then:

gitlab-rails console
foobar=User.find_by_login("<username>")
foobar.admin = 1
foobar.save
exit

(see also: https://docs.gitlab.com/ee/administration/operations/rails_console.html https://docs.gitlab.com/ee/administration/troubleshooting/gitlab_rails_cheat_sheet.html )

Documentation

Documentation of gitlab maintenance can be found at https://docs.gitlab.com/omnibus/maintenance/README.html