From ffece96dd13fc99e24d65f2a374572c218c1f892 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 23 Jun 2014 10:38:22 +0200 Subject: [PATCH 1/2] Spell out rake tasks for omnibus-gitlab --- doc/raketasks/backup_restore.md | 10 ++++++++++ doc/raketasks/cleanup.md | 8 ++++++++ doc/raketasks/import.md | 4 ++++ doc/raketasks/maintenance.md | 8 ++++++++ doc/raketasks/user_management.md | 16 ++++++++++++++++ 5 files changed, 46 insertions(+) diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index 5c1594d13d..00ce6ed27c 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -7,6 +7,10 @@ Creates a backup archive of the database and all repositories. This archive will The filename will be `[TIMESTAMP]_gitlab_backup.tar`. This timestamp can be used to restore an specific backup. ``` +# omnibus-gitlab +sudo gitlab-rake gitlab:backup:create + +# installation from source or cookbook bundle exec rake gitlab:backup:create RAILS_ENV=production ``` @@ -42,6 +46,10 @@ Deleting old backups... [SKIPPING] ## Restore a previously created backup ``` +# omnibus-gitlab +sudo gitlab-rake gitlab:backup:restore + +# installation from source or cookbook bundle exec rake gitlab:backup:restore RAILS_ENV=production ``` @@ -84,6 +92,8 @@ Deleting tmp directories...[DONE] ## Configure cron to make daily backups +For omnibus-gitlab, see https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#scheduling-a-backup . + ``` cd /home/git/gitlab sudo -u git -H editor config/gitlab.yml # Enable keep_time in the backup section to automatically delete old backups diff --git a/doc/raketasks/cleanup.md b/doc/raketasks/cleanup.md index 4b3b6d71a7..9e48f56c95 100644 --- a/doc/raketasks/cleanup.md +++ b/doc/raketasks/cleanup.md @@ -5,11 +5,19 @@ Remove namespaces(dirs) from `/home/git/repositories` if they don't exist in GitLab database. ``` +# omnibus-gitlab +sudo gitlab-rake gitlab:cleanup:dirs + +# installation from source or cookbook bundle exec rake gitlab:cleanup:dirs RAILS_ENV=production ``` Remove repositories (global only for now) from `/home/git/repositories` if they don't exist in GitLab database. ``` +# omnibus-gitlab +sudo gitlab-rake gitlab:cleanup:repos + +# installation from source or cookbook bundle exec rake gitlab:cleanup:repos RAILS_ENV=production ``` diff --git a/doc/raketasks/import.md b/doc/raketasks/import.md index 628bd373b8..39b1a52a44 100644 --- a/doc/raketasks/import.md +++ b/doc/raketasks/import.md @@ -15,6 +15,10 @@ How to use: 2. run the command below ``` +# omnibus-gitlab +sudo gitlab-rake gitlab:import:repos + +# installation from source or cookbook bundle exec rake gitlab:import:repos RAILS_ENV=production ``` diff --git a/doc/raketasks/maintenance.md b/doc/raketasks/maintenance.md index 30276dd762..3339dfb03a 100644 --- a/doc/raketasks/maintenance.md +++ b/doc/raketasks/maintenance.md @@ -5,6 +5,10 @@ This command gathers information about your GitLab installation and the System it runs on. These may be useful when asking for help or reporting issues. ``` +# omnibus-gitlab +sudo gitlab-rake gitlab:env:info + +# installation from source or cookbook bundle exec rake gitlab:env:info RAILS_ENV=production ``` @@ -52,6 +56,10 @@ It will check that each component was setup according to the installation guide You may also have a look at our [Trouble Shooting Guide](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide). ``` +# omnibus-gitlab +sudo gitlab-rake gitlab:check + +# installation from source or cookbook bundle exec rake gitlab:check RAILS_ENV=production ``` diff --git a/doc/raketasks/user_management.md b/doc/raketasks/user_management.md index 81378494c6..eb9eebb4b4 100644 --- a/doc/raketasks/user_management.md +++ b/doc/raketasks/user_management.md @@ -3,6 +3,10 @@ ## Add user as a developer to all projects ```bash +# omnibus-gitlab +sudo gitlab-rake gitlab:import:user_to_projects[username@domain.tld] + +# installation from source or cookbook bundle exec rake gitlab:import:user_to_projects[username@domain.tld] ``` @@ -13,12 +17,20 @@ Notes: - admin users are added as masters ```bash +# omnibus-gitlab +sudo gitlab-rake gitlab:import:all_users_to_all_projects + +# installation from source or cookbook bundle exec rake gitlab:import:all_users_to_all_projects ``` ## Add user as a developer to all groups ```bash +# omnibus-gitlab +sudo gitlab-rake gitlab:import:user_to_groups[username@domain.tld] + +# installation from source or cookbook bundle exec rake gitlab:import:user_to_groups[username@domain.tld] ``` @@ -29,5 +41,9 @@ Notes: - admin users are added as owners so they can add additional users to the group ```bash +# omnibus-gitlab +sudo gitlab-rake gitlab:import:all_users_to_all_groups + +# installation from source or cookbook bundle exec rake gitlab:import:all_users_to_all_groups ``` From 5e00b7337ba0b9aae279e5dbaa68c4b2c644318d Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 23 Jun 2014 11:06:25 +0200 Subject: [PATCH 2/2] Also spell out gitlab-rake for web hook tasks --- doc/raketasks/web_hooks.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/raketasks/web_hooks.md b/doc/raketasks/web_hooks.md index 704473af2d..ac32c01289 100644 --- a/doc/raketasks/web_hooks.md +++ b/doc/raketasks/web_hooks.md @@ -2,26 +2,44 @@ ## Add a web hook for **ALL** projects: + # omnibus-gitlab + sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" + # source installations or cookbook RAILS_ENV=production bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" ## Add a web hook for projects in a given **NAMESPACE**: + # omnibus-gitlab + sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme + # source installations or cookbook RAILS_ENV=production bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme ## Remove a web hook from **ALL** projects using: + # omnibus-gitlab + sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" + # source installations or cookbook RAILS_ENV=production bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" ## Remove a web hook from projects in a given **NAMESPACE**: + # omnibus-gitlab + sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme + # source installations or cookbook RAILS_ENV=production bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme ## List **ALL** web hooks: + # omnibus-gitlab + sudo gitlab-rake gitlab:web_hook:list + # source installations or cookbook RAILS_ENV=production bundle exec rake gitlab:web_hook:list ## List the web hooks from projects in a given **NAMESPACE**: + # omnibus-gitlab + sudo gitlab-rake gitlab:web_hook:list NAMESPACE=/ + # source installations or cookbook RAILS_ENV=production bundle exec rake gitlab:web_hook:list NAMESPACE=/ > Note: `/` is the global namespace.