summaryrefslogtreecommitdiff
path: root/doc/raketasks
diff options
context:
space:
mode:
authorJohannes Schleifenbaum <johannes@js-webcoding.de>2012-12-02 13:56:04 +0100
committerJohannes Schleifenbaum <johannes@js-webcoding.de>2012-12-03 17:19:33 +0100
commitfddc0c29aa8d63fce45b450902f27f82dfba5231 (patch)
treeccaa20ea741f828b5b9eab5142ab4798f0af141c /doc/raketasks
parent7b97e3044988e41e65e8186f2dadf87e5837b101 (diff)
downloadgitlab-ce-fddc0c29aa8d63fce45b450902f27f82dfba5231.tar.gz
add help page for gitlab specific rake tasks
Diffstat (limited to 'doc/raketasks')
-rw-r--r--doc/raketasks/backup_restore.md82
-rw-r--r--doc/raketasks/features.md36
-rw-r--r--doc/raketasks/maintenance.md82
-rw-r--r--doc/raketasks/user_management.md16
4 files changed, 216 insertions, 0 deletions
diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md
new file mode 100644
index 00000000000..575467b4371
--- /dev/null
+++ b/doc/raketasks/backup_restore.md
@@ -0,0 +1,82 @@
+### Create a backup of the GitLab system
+
+Creates a backup archive of the database and all repositories. This archive will be saved in backup_path (see `config/gitlab.yml`).
+The filename will be `[TIMESTAMP]_gitlab_backup.tar`. This timestamp can be used to restore an specific backup.
+
+```
+bundle exec rake gitlab:app:backup_create
+```
+
+Example output:
+
+```
+Dumping database tables:
+- Dumping table events... [DONE]
+- Dumping table issues... [DONE]
+- Dumping table keys... [DONE]
+- Dumping table merge_requests... [DONE]
+- Dumping table milestones... [DONE]
+- Dumping table namespaces... [DONE]
+- Dumping table notes... [DONE]
+- Dumping table projects... [DONE]
+- Dumping table protected_branches... [DONE]
+- Dumping table schema_migrations... [DONE]
+- Dumping table services... [DONE]
+- Dumping table snippets... [DONE]
+- Dumping table taggings... [DONE]
+- Dumping table tags... [DONE]
+- Dumping table users... [DONE]
+- Dumping table users_projects... [DONE]
+- Dumping table web_hooks... [DONE]
+- Dumping table wikis... [DONE]
+Dumping repositories:
+- Dumping repository abcd... [DONE]
+- Dumping repository gitolite-admin.git... [DONE]
+Creating backup archive: $TIMESTAMP_gitlab_backup.tar [DONE]
+Deleting tmp directories...[DONE]
+Deleting old backups... [SKIPPING]
+```
+
+### Restore a previously created backup
+
+```
+bundle exec rake gitlab:app:backup_restore
+```
+
+Options:
+
+```
+BACKUP=timestamp_of_backup (required if more than one backup exists)
+```
+
+Example output:
+
+```
+Unpacking backup... [DONE]
+Restoring database tables:
+-- create_table("events", {:force=>true})
+ -> 0.2231s
+[...]
+- Loading fixture events...[DONE]
+- Loading fixture issues...[DONE]
+- Loading fixture keys...[SKIPPING]
+- Loading fixture merge_requests...[DONE]
+- Loading fixture milestones...[DONE]
+- Loading fixture namespaces...[DONE]
+- Loading fixture notes...[DONE]
+- Loading fixture projects...[DONE]
+- Loading fixture protected_branches...[SKIPPING]
+- Loading fixture schema_migrations...[DONE]
+- Loading fixture services...[SKIPPING]
+- Loading fixture snippets...[SKIPPING]
+- Loading fixture taggings...[SKIPPING]
+- Loading fixture tags...[SKIPPING]
+- Loading fixture users...[DONE]
+- Loading fixture users_projects...[DONE]
+- Loading fixture web_hooks...[SKIPPING]
+- Loading fixture wikis...[SKIPPING]
+Restoring repositories:
+- Restoring repository abcd... [DONE]
+- Restoring repository gitolite-admin.git... [DONE]
+Deleting tmp directories...[DONE]
+```
diff --git a/doc/raketasks/features.md b/doc/raketasks/features.md
new file mode 100644
index 00000000000..2a66b1caca7
--- /dev/null
+++ b/doc/raketasks/features.md
@@ -0,0 +1,36 @@
+### Enable usernames and namespaces for user projects
+
+This command will enable the namespace feature introduced in v4.0. It will move every project in its namespace folder.
+
+Note:
+
+* Because the **repository location will change**, you will need to **update all your git url's** to point to the new location.
+* Username can be changed at [Profile / Account](/profile/account)
+
+**Example:**
+
+Old path: `git@example.org:myrepo.git`
+New path: `git@example.org:username/myrepo.git` or `git@example.org:groupname/myrepo.git`
+
+```
+bundle exec rake gitlab:activate_namespaces
+```
+
+
+### Enable auto merge
+
+This command will enable the auto merge feature. After this you will be able to **merge a merge request** via GitLab and use the **online editor**.
+
+```
+bundle exec rake gitlab:app:enable_automerge
+```
+
+Example output:
+
+```
+Creating satellite for abcd.git
+[git clone output]
+Creating satellite for abcd2.git
+[git clone output]
+done
+```
diff --git a/doc/raketasks/maintenance.md b/doc/raketasks/maintenance.md
new file mode 100644
index 00000000000..7bbb6571f12
--- /dev/null
+++ b/doc/raketasks/maintenance.md
@@ -0,0 +1,82 @@
+### Setup production application
+
+Runs the following rake tasks:
+
+* db:setup (Create the database, load the schema, and initialize with the seed data)
+* db:seed_fu (Loads seed data for the current environment.)
+* gitlab:app:enable_automerge (see "Features")
+
+```
+bundle exec rake gitlab:app:setup
+```
+
+
+### Check GitLab installation status
+
+[Trouble-Shooting-Guide](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide)
+
+```
+bundle exec rake gitlab:app:status
+```
+
+Example output:
+
+```
+config/database.yml............exists
+config/gitlab.yml............exists
+/home/git/repositories/............exists
+/home/git/repositories/ is writable?............YES
+Can clone gitolite-admin?............YES
+Can git commit?............YES
+UMASK for .gitolite.rc is 0007? ............YES
+/home/git/.gitolite/hooks/common/post-receive exists? ............YES
+
+Validating projects repositories:
+* abcd.....post-receive file ok
+* abcdtest.....post-receive file missing
+
+Finished
+
+```
+
+
+### Rebuild each key at gitolite config
+
+This will send all users ssh public keys to gitolite and grant them access (based on their permission) to their projects.
+
+```
+bundle exec rake gitlab:gitolite:update_keys
+```
+
+
+### Rebuild each project at gitolite config
+
+This makes sure that all projects are present in gitolite and can be accessed.
+
+```
+bundle exec rake gitlab:gitolite:update_repos
+```
+
+### Import bare repositories into GitLab project instance
+
+Notes:
+
+* project owner will be a first admin
+* existing projects will be skipped
+
+How to use:
+
+1. copy your bare repos under git base_path (see `config/gitlab.yml` git_host -> base_path)
+2. run the command below
+
+```
+bundle exec rake gitlab:import:repos RAILS_ENV=production
+```
+
+Example output:
+
+```
+Processing abcd.git
+ * Created abcd (abcd.git)
+[...]
+```
diff --git a/doc/raketasks/user_management.md b/doc/raketasks/user_management.md
new file mode 100644
index 00000000000..e4ca5280b78
--- /dev/null
+++ b/doc/raketasks/user_management.md
@@ -0,0 +1,16 @@
+### Add user to as a developer to all projects
+
+```
+bundle exec rake add_user_to_project_teams[username@domain.tld]
+```
+
+
+### Add all users to all projects
+
+Notes:
+
+* admin users are added as masters
+
+```
+bundle exec rake add_users_to_project_teams
+```