diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 18:09:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 18:09:15 +0300 |
commit | 536aa3a1f4b96abc4ca34489bf2cbe503afcded7 (patch) | |
tree | 88d08f7dfa29a32d6526773c4fe0fefd9f2bc7d1 /doc/administration/raketasks | |
parent | 50ae4065530c4eafbeb7c5ff2c462c48c02947ca (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/administration/raketasks')
-rw-r--r-- | doc/administration/raketasks/check.md | 14 | ||||
-rw-r--r-- | doc/administration/raketasks/geo.md | 16 | ||||
-rw-r--r-- | doc/administration/raketasks/github_import.md | 4 | ||||
-rw-r--r-- | doc/administration/raketasks/ldap.md | 22 | ||||
-rw-r--r-- | doc/administration/raketasks/maintenance.md | 36 | ||||
-rw-r--r-- | doc/administration/raketasks/project_import_export.md | 4 | ||||
-rw-r--r-- | doc/administration/raketasks/storage.md | 44 | ||||
-rw-r--r-- | doc/administration/raketasks/uploads/migrate.md | 16 | ||||
-rw-r--r-- | doc/administration/raketasks/uploads/sanitize.md | 8 |
9 files changed, 82 insertions, 82 deletions
diff --git a/doc/administration/raketasks/check.md b/doc/administration/raketasks/check.md index 7f3405df060..6f9a7f4293d 100644 --- a/doc/administration/raketasks/check.md +++ b/doc/administration/raketasks/check.md @@ -33,13 +33,13 @@ integrity check described previously. **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:git:fsck ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:git:fsck RAILS_ENV=production ``` @@ -58,7 +58,7 @@ Currently, integrity checks are supported for the following types of file: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:artifacts:check sudo gitlab-rake gitlab:lfs:check sudo gitlab-rake gitlab:uploads:check @@ -66,7 +66,7 @@ sudo gitlab-rake gitlab:uploads:check **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:artifacts:check RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:lfs:check RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:uploads:check RAILS_ENV=production @@ -82,7 +82,7 @@ Variable | Type | Description `ID_TO` | integer | Specifies the ID value to end at, inclusive of the value. `VERBOSE` | boolean | Causes failures to be listed individually, rather than being summarized. -```bash +```shell sudo gitlab-rake gitlab:artifacts:check BATCH=100 ID_FROM=50 ID_TO=250 sudo gitlab-rake gitlab:lfs:check BATCH=100 ID_FROM=50 ID_TO=250 sudo gitlab-rake gitlab:uploads:check BATCH=100 ID_FROM=50 ID_TO=250 @@ -90,7 +90,7 @@ sudo gitlab-rake gitlab:uploads:check BATCH=100 ID_FROM=50 ID_TO=250 Example output: -```bash +```shell $ sudo gitlab-rake gitlab:uploads:check Checking integrity of Uploads - 1..1350: Failures: 0 @@ -107,7 +107,7 @@ Done! Example verbose output: -```bash +```shell $ sudo gitlab-rake gitlab:uploads:check VERBOSE=1 Checking integrity of Uploads - 1..1350: Failures: 0 diff --git a/doc/administration/raketasks/geo.md b/doc/administration/raketasks/geo.md index 8bf720d2872..91c83b5f6ba 100644 --- a/doc/administration/raketasks/geo.md +++ b/doc/administration/raketasks/geo.md @@ -11,13 +11,13 @@ This is equivalent of running `git repack -d` on a _bare_ repository. **Omnibus Installation** -```bash +```shell sudo gitlab-rake geo:git:housekeeping:incremental_repack ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake geo:git:housekeeping:incremental_repack RAILS_ENV=production ``` @@ -29,13 +29,13 @@ when this is enabled in GitLab. **Omnibus Installation** -```bash +```shell sudo gitlab-rake geo:git:housekeeping:full_repack ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake geo:git:housekeeping:full_repack RAILS_ENV=production ``` @@ -46,13 +46,13 @@ a reachability bitmap index when this is enabled in GitLab. **Omnibus Installation** -```bash +```shell sudo gitlab-rake geo:git:housekeeping:gc ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake geo:git:housekeeping:gc RAILS_ENV=production ``` @@ -63,12 +63,12 @@ can remove them using the rake task `geo:run_orphaned_project_registry_cleaner`: **Omnibus Installation** -```bash +```shell sudo gitlab-rake geo:run_orphaned_project_registry_cleaner ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake geo:run_orphaned_project_registry_cleaner RAILS_ENV=production ``` diff --git a/doc/administration/raketasks/github_import.md b/doc/administration/raketasks/github_import.md index d6dd39cb1bc..6bf77b1fa0b 100644 --- a/doc/administration/raketasks/github_import.md +++ b/doc/administration/raketasks/github_import.md @@ -16,7 +16,7 @@ before/after the brackets. Also, Some shells (e.g., zsh) can interpret the open/ To import a project from the list of your GitHub projects available: -```bash +```shell # Omnibus installations sudo gitlab-rake "import:github[access_token,root,foo/bar]" @@ -32,7 +32,7 @@ will get created from your GitHub project. Subgroups are also possible: `foo/foo To import a specific GitHub project (named `foo/github_repo` here): -```bash +```shell # Omnibus installations sudo gitlab-rake "import:github[access_token,root,foo/bar,foo/github_repo]" diff --git a/doc/administration/raketasks/ldap.md b/doc/administration/raketasks/ldap.md index 41a9a4192cf..899b1ef9f4d 100644 --- a/doc/administration/raketasks/ldap.md +++ b/doc/administration/raketasks/ldap.md @@ -9,20 +9,20 @@ using the command below. **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:ldap:check ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:ldap:check RAILS_ENV=production ``` By default, the task will return a sample of 100 LDAP users. Change this limit by passing a number to the check task: -```bash +```shell rake gitlab:ldap:check[50] ``` @@ -41,13 +41,13 @@ instead. **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:ldap:group_sync ``` **Source Installation** -```bash +```shell bundle exec rake gitlab:ldap:group_sync ``` @@ -79,13 +79,13 @@ as the `old_provider` and the correct provider as the `new_provider`. **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:ldap:rename_provider[old_provider,new_provider] ``` **Source Installation** -```bash +```shell bundle exec rake gitlab:ldap:rename_provider[old_provider,new_provider] RAILS_ENV=production ``` @@ -95,7 +95,7 @@ Consider beginning with the default server ID `main` (full provider `ldapmain`). If we change `main` to `mycompany`, the `new_provider` is `ldapmycompany`. To rename all user identities run the following command: -```bash +```shell sudo gitlab-rake gitlab:ldap:rename_provider[ldapmain,ldapmycompany] ``` @@ -116,13 +116,13 @@ for them: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:ldap:rename_provider ``` **Source Installation** -```bash +```shell bundle exec rake gitlab:ldap:rename_provider RAILS_ENV=production ``` @@ -136,6 +136,6 @@ What is the new provider? Ex. 'ldapcustom': ldapmycompany This tasks also accepts the `force` environment variable which will skip the confirmation dialog: -```bash +```shell sudo gitlab-rake gitlab:ldap:rename_provider[old_provider,new_provider] force=yes ``` diff --git a/doc/administration/raketasks/maintenance.md b/doc/administration/raketasks/maintenance.md index efc7a84a80e..6dc5542466f 100644 --- a/doc/administration/raketasks/maintenance.md +++ b/doc/administration/raketasks/maintenance.md @@ -6,13 +6,13 @@ This command gathers information about your GitLab installation and the System i **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:env:info ``` **Source Installation** -```bash +```shell bundle exec rake gitlab:env:info RAILS_ENV=production ``` @@ -66,13 +66,13 @@ You may also have a look at our Troubleshooting Guides: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:check ``` **Source Installation** -```bash +```shell bundle exec rake gitlab:check RAILS_ENV=production ``` @@ -129,13 +129,13 @@ In some case it is necessary to rebuild the `authorized_keys` file. **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:shell:setup ``` **Source Installation** -```bash +```shell cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:shell:setup RAILS_ENV=production ``` @@ -153,13 +153,13 @@ clear Redis' cache. **Omnibus Installation** -```bash +```shell sudo gitlab-rake cache:clear ``` **Source Installation** -```bash +```shell cd /home/git/gitlab sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production ``` @@ -174,7 +174,7 @@ Omnibus packages. **Source Installation** -```bash +```shell cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:assets:compile RAILS_ENV=production ``` @@ -194,13 +194,13 @@ in the GitLab Performance Monitoring database. **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:track_deployment ``` **Source Installation** -```bash +```shell cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:track_deployment RAILS_ENV=production ``` @@ -213,13 +213,13 @@ is included to help you with this: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:tcp_check[example.com,80] ``` **Source Installation** -```bash +```shell cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:tcp_check[example.com,80] RAILS_ENV=production ``` @@ -238,13 +238,13 @@ To clear all exclusive leases: DANGER: **DANGER**: Don't run it while GitLab or Sidekiq is running -```bash +```shell sudo gitlab-rake gitlab:exclusive_lease:clear ``` To specify a lease `type` or lease `type + id`, specify a scope: -```bash +```shell # to clear all leases for repository garbage collection: sudo gitlab-rake gitlab:exclusive_lease:clear[project_housekeeping:*] @@ -256,14 +256,14 @@ sudo gitlab-rake gitlab:exclusive_lease:clear[project_housekeeping:4] To check the status of migrations, you can use the following rake task: -```bash +```shell sudo gitlab-rake db:migrate:status ``` This will output a table with a `Status` of `up` or `down` for each Migration ID. -```bash +```shell database: gitlabhq_production Status Migration ID Migration Name @@ -279,6 +279,6 @@ This could be as a result of [updating existing metrics](../../development/prome To re-import the metrics you can run: -```bash +```shell sudo gitlab-rake metrics:setup_common_metrics ``` diff --git a/doc/administration/raketasks/project_import_export.md b/doc/administration/raketasks/project_import_export.md index 2857f5a27aa..f782a24e654 100644 --- a/doc/administration/raketasks/project_import_export.md +++ b/doc/administration/raketasks/project_import_export.md @@ -13,7 +13,7 @@ The GitLab Import/Export version can be checked by using: -```bash +```shell # Omnibus installations sudo gitlab-rake gitlab:import_export:version @@ -23,7 +23,7 @@ bundle exec rake gitlab:import_export:version RAILS_ENV=production The current list of DB tables that will get exported can be listed by using: -```bash +```shell # Omnibus installations sudo gitlab-rake gitlab:import_export:data diff --git a/doc/administration/raketasks/storage.md b/doc/administration/raketasks/storage.md index 1198f3414c5..a14c8ed7969 100644 --- a/doc/administration/raketasks/storage.md +++ b/doc/administration/raketasks/storage.md @@ -16,19 +16,19 @@ This task will schedule all your existing projects and attachments associated wi **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:storage:migrate_to_hashed ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:storage:migrate_to_hashed RAILS_ENV=production ``` They both also accept a range as environment variable: -```bash +```shell # to migrate any non migrated project from ID 20 to 50. export ID_FROM=20 export ID_TO=50 @@ -63,19 +63,19 @@ Legacy storage type. For Omnibus installations, run the following: -```bash +```shell sudo gitlab-rake gitlab:storage:rollback_to_legacy ``` For source installations, run the following: -```bash +```shell sudo -u git -H bundle exec rake gitlab:storage:rollback_to_legacy RAILS_ENV=production ``` Both commands accept a range as environment variable: -```bash +```shell # to rollback any migrated project from ID 20 to 50. export ID_FROM=20 export ID_TO=50 @@ -95,13 +95,13 @@ To have a simple summary of projects using **Legacy** storage: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:storage:legacy_projects ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:storage:legacy_projects RAILS_ENV=production ``` @@ -109,13 +109,13 @@ To list projects using **Legacy** storage: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:storage:list_legacy_projects ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:storage:list_legacy_projects RAILS_ENV=production ``` @@ -126,13 +126,13 @@ To have a simple summary of projects using **Hashed** storage: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:storage:hashed_projects ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:storage:hashed_projects RAILS_ENV=production ``` @@ -140,13 +140,13 @@ To list projects using **Hashed** storage: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:storage:list_hashed_projects ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:storage:list_hashed_projects RAILS_ENV=production ``` @@ -156,13 +156,13 @@ To have a simple summary of project attachments using **Legacy** storage: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:storage:legacy_attachments ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:storage:legacy_attachments RAILS_ENV=production ``` @@ -170,13 +170,13 @@ To list project attachments using **Legacy** storage: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:storage:list_legacy_attachments ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:storage:list_legacy_attachments RAILS_ENV=production ``` @@ -186,13 +186,13 @@ To have a simple summary of project attachments using **Hashed** storage: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:storage:hashed_attachments ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:storage:hashed_attachments RAILS_ENV=production ``` @@ -200,13 +200,13 @@ To list project attachments using **Hashed** storage: **Omnibus Installation** -```bash +```shell sudo gitlab-rake gitlab:storage:list_hashed_attachments ``` **Source Installation** -```bash +```shell sudo -u git -H bundle exec rake gitlab:storage:list_hashed_attachments RAILS_ENV=production ``` diff --git a/doc/administration/raketasks/uploads/migrate.md b/doc/administration/raketasks/uploads/migrate.md index aef15e3f388..adef6251a27 100644 --- a/doc/administration/raketasks/uploads/migrate.md +++ b/doc/administration/raketasks/uploads/migrate.md @@ -17,13 +17,13 @@ described in the next section. **Omnibus Installation** -```bash +```shell gitlab-rake "gitlab:uploads:migrate:all" ``` **Source Installation** -```bash +```shell sudo RAILS_ENV=production -u git -H bundle exec rake gitlab:uploads:migrate:all ``` @@ -52,7 +52,7 @@ Variable | Type | Description **Omnibus Installation** -```bash +```shell # gitlab-rake gitlab:uploads:migrate[uploader_class, model_class, mount_point] # Avatars @@ -80,7 +80,7 @@ gitlab-rake "gitlab:uploads:migrate[FileUploader, MergeRequest]" >**Note:** Use `RAILS_ENV=production` for every task. -```bash +```shell # sudo -u git -H bundle exec rake gitlab:uploads:migrate # Avatars @@ -112,13 +112,13 @@ To migrate all uploads created by legacy uploaders, run: **Omnibus Installation** -```bash +```shell gitlab-rake gitlab:uploads:legacy:migrate ``` **Source Installation** -```bash +```shell bundle exec rake gitlab:uploads:legacy:migrate ``` @@ -145,13 +145,13 @@ keeping in mind the task name in this case is `gitlab:uploads:migrate_to_local`. **Omnibus Installation** -```bash +```shell gitlab-rake "gitlab:uploads:migrate_to_local:all" ``` **Source Installation** -```bash +```shell sudo RAILS_ENV=production -u git -H bundle exec rake gitlab:uploads:migrate_to_local:all ``` diff --git a/doc/administration/raketasks/uploads/sanitize.md b/doc/administration/raketasks/uploads/sanitize.md index 98cc1ddcff9..3e9b44a24fb 100644 --- a/doc/administration/raketasks/uploads/sanitize.md +++ b/doc/administration/raketasks/uploads/sanitize.md @@ -7,7 +7,7 @@ You need `exiftool` installed on your system. If you installed GitLab: - Using the Omnibus package, you're all set. - From source, make sure `exiftool` is installed: - ```sh + ```shell # Debian/Ubuntu sudo apt-get install libimage-exiftool-perl @@ -22,7 +22,7 @@ Because EXIF data may contain sensitive information (e.g. GPS location), you can remove EXIF data also from existing images which were uploaded before with the following command: -```bash +```shell sudo RAILS_ENV=production -u git -H bundle exec rake gitlab:uploads:sanitize:remove_exif ``` @@ -46,13 +46,13 @@ each with a separate range of upload IDs (by setting `start_id` and `stop_id`). To run the command without dry mode and remove EXIF data from all uploads, you can use: -```bash +```shell sudo RAILS_ENV=production -u git -H bundle exec rake gitlab:uploads:sanitize:remove_exif[,,false,] 2>&1 | tee exif.log ``` To run the command without dry mode on uploads with ID between 100 and 5000 and pause for 0.1 second, you can use: -```bash +```shell sudo RAILS_ENV=production -u git -H bundle exec rake gitlab:uploads:sanitize:remove_exif[100,5000,false,0.1] 2>&1 | tee exif.log ``` |