From 8d0bc76487b428ad629f9bdd883cf8af794431a6 Mon Sep 17 00:00:00 2001 From: Marco Cyriacks Date: Fri, 12 Sep 2014 19:52:27 +0200 Subject: Change gitlab/log permissions in installation.md This patch changes default permission of the gitlab/log directory to u+rwX,go-w. This is done to make the directory NOT readable by group and others and to avoid logrotate complaining about it. chmod 755 is not used to avoid setting executable bit on file within the log dir. --- doc/install/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index 1175aff9dd9..c4d9668fde4 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -159,7 +159,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da # Make sure GitLab can write to the log/ and tmp/ directories sudo chown -R git log/ sudo chown -R git tmp/ - sudo chmod -R u+rwX log/ + sudo chmod -R u+rwX,go-w log/ sudo chmod -R u+rwX tmp/ # Create directory for satellites -- cgit v1.2.1 From 430758653ce7e4d32b40648e6263b79c2709bdad Mon Sep 17 00:00:00 2001 From: Jeroen Jacobs Date: Fri, 27 Jun 2014 16:48:30 +0200 Subject: Adds comments to commits in the API --- doc/api/commits.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'doc') diff --git a/doc/api/commits.md b/doc/api/commits.md index 9475ecbaa67..eb8d6a43592 100644 --- a/doc/api/commits.md +++ b/doc/api/commits.md @@ -93,3 +93,66 @@ Parameters: } ] ``` + +## Get the comments of a commit + +Get the comments of a commit in a project. + +``` +GET /projects/:id/repository/commits/:sha/comments +``` + +Parameters: + +- `id` (required) - The ID of a project +- `sha` (required) - The name of a repository branch or tag or if not given the default branch + +```json +[ + { + "note": "this code is really nice", + "author": { + "id": 11, + "username": "admin", + "email": "admin@local.host", + "name": "Administrator", + "state": "active", + "created_at": "2014-03-06T08:17:35.000Z" + } + } +] +``` + +## Post comment to commit + +Adds a comment to a commit. Optionally you can post comments on a specific line of a commit. Therefor both `path`, `line_new` and `line_old` are required. + +``` +POST /projects/:id/repository/commits/:sha/comments +``` + +Parameters: + +- `id` (required) - The ID of a project +- `sha` (required) - The name of a repository branch or tag or if not given the default branch +- `note` (required) - Text of comment +- `path` (optional) - The file path +- `line` (optional) - The line number +- `line_type` (optional) - The line type (new or old) + +```json +{ + "author": { + "id": 1, + "username": "admin", + "email": "admin@local.host", + "name": "Administrator", + "blocked": false, + "created_at": "2012-04-29T08:46:00Z" + }, + "note": "text1", + "path": "example.rb", + "line": 5, + "line_type": "new" +} +``` -- cgit v1.2.1 From 11848febd1170042523907652a36503c57e9fac2 Mon Sep 17 00:00:00 2001 From: Kirill Zaitsev Date: Sun, 5 Oct 2014 17:03:15 +0400 Subject: Add issueable actor --- doc/web_hooks/web_hooks.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md index 31791da8074..f19517c0f18 100644 --- a/doc/web_hooks/web_hooks.md +++ b/doc/web_hooks/web_hooks.md @@ -63,6 +63,11 @@ Triggered when a new issue is created or an existing issue was updated/closed/re ```json { "object_kind": "issue", + "user": { + "name": "Administrator", + "username": "root", + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon" + }, "object_attributes": { "id": 301, "title": "New API: create/update/delete file", @@ -92,6 +97,11 @@ Triggered when a new merge request is created or an existing merge request was u ```json { "object_kind": "merge_request", + "user": { + "name": "Administrator", + "username": "root", + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon" + }, "object_attributes": { "id": 99, "target_branch": "master", -- cgit v1.2.1 From 9c6106c4f68fea96a36d77b9b09685dc9fde0161 Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Wed, 29 Oct 2014 23:58:34 -0700 Subject: clarify that 'template1=#' is part of prompt Similar to https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/database_mysql.md clarify that `template1=#` is part of the prompt. --- doc/install/installation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index ac6535b0c86..f81499bf658 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -126,7 +126,8 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da # Login to PostgreSQL sudo -u postgres psql -d template1 - # Create a user for GitLab. + # Create a user for GitLab + # Do not type the 'template1=#', this is part of the prompt template1=# CREATE USER git CREATEDB; # Create the GitLab production database & grant all privileges on database -- cgit v1.2.1 From 12e751a892b6872cedf9b9463a8e6fb90456f5f1 Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Thu, 30 Oct 2014 00:01:19 -0700 Subject: Quit the database session at end of database setup --- doc/install/installation.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index ac6535b0c86..0184d8e3369 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -137,6 +137,9 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da # Try connecting to the new database with the new user sudo -u git -H psql -d gitlabhq_production + + # Quit the database session + gitlabhq_production> \q ## 5. Redis -- cgit v1.2.1 From bc0cf7458957ad6b2e32ef4176afc1cca2c9c9f7 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Sun, 2 Nov 2014 15:13:30 -0800 Subject: Make GitLab Shell upgrade a natural part of the upgrade process. --- doc/update/upgrader.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/update/upgrader.md b/doc/update/upgrader.md index cf59b0e461c..44e18a9ed42 100644 --- a/doc/update/upgrader.md +++ b/doc/update/upgrader.md @@ -43,28 +43,31 @@ Check if GitLab and its dependencies are configured correctly: If all items are green, then congratulations upgrade is complete! -## 5. Upgrade GitLab Shell (if needed) +## 5. Upgrade GitLab Shell -If the `gitlab:check` task reports an outdated version of `gitlab-shell` you should upgrade it. - -Upgrade it by running the commands below after replacing 2.0.1 with the correct version number: +GitLab Shell might be outdated, running the commands below ensures you're using a compatible version: ``` cd /home/git/gitlab-shell sudo -u git -H git fetch -sudo -u git -H git checkout v2.0.1 +sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` ``` ## One line upgrade command You've read through the entire guide and probably already did all the steps one by one. -Here is a one line command with step 1 to 4 for the next time you upgrade: +Here is a one line command with step 1 to 5 for the next time you upgrade: ```bash -cd /home/git/gitlab; sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production; \ +cd /home/git/gitlab; \ + sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production; \ sudo service gitlab stop; \ if [ -f bin/upgrade.rb ]; then sudo -u git -H ruby bin/upgrade.rb -y; else sudo -u git -H ruby script/upgrade.rb -y; fi; \ + cd /home/git/gitlab-shell; \ + sudo -u git -H git fetch; \ + sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION`; \ + cd /home/git/gitlab; \ sudo service gitlab start; \ sudo service nginx restart; sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production ``` -- cgit v1.2.1 From 2edf212a8be3bb14b844b542df587b6029897fe6 Mon Sep 17 00:00:00 2001 From: Liam Monahan Date: Sat, 1 Nov 2014 19:14:42 -0400 Subject: Expose projects_limit through users API if UserFull. --- doc/api/users.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/api/users.md b/doc/api/users.md index 3fdd3a75e88..20e0d68977e 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -78,7 +78,8 @@ GET /users "is_admin": false, "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg", "can_create_group": true, - "can_create_project": true + "can_create_project": true, + "projects_limit": 100 } ] ``` @@ -140,7 +141,8 @@ Parameters: "color_scheme_id": 2, "is_admin": false, "can_create_group": true, - "can_create_project": true + "can_create_project": true, + "projects_limit": 100 } ``` @@ -240,7 +242,8 @@ GET /user "color_scheme_id": 2, "is_admin": false, "can_create_group": true, - "can_create_project": true + "can_create_project": true, + "projects_limit": 100 } ``` -- cgit v1.2.1 From 667c0a909bde1cf71f21d8ec9768e98b1c489030 Mon Sep 17 00:00:00 2001 From: Drew Blessing Date: Fri, 7 Nov 2014 12:18:00 -0600 Subject: Custom git hook documentation --- doc/README.md | 1 + doc/hooks/custom_hooks.md | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 doc/hooks/custom_hooks.md (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index 7343d5ae273..b9aa12f7675 100644 --- a/doc/README.md +++ b/doc/README.md @@ -16,6 +16,7 @@ - [Install](install/README.md) Requirements, directory structures and manual installation. - [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, LDAP and Twitter. - [Raketasks](raketasks/README.md) Explore what GitLab has in store for you to make administration easier. +- [Custom git hooks](hooks/custom_hooks.md) Custom git hooks (on the filesystem) for when web hooks aren't enough. - [System hooks](system_hooks/system_hooks.md) Let GitLab notify you when certain management tasks need to be carried out. - [Security](security/README.md) Learn what you can do to further secure your GitLab instance. - [Update](update/README.md) Update guides to upgrade your installation. diff --git a/doc/hooks/custom_hooks.md b/doc/hooks/custom_hooks.md new file mode 100644 index 00000000000..00867ead80d --- /dev/null +++ b/doc/hooks/custom_hooks.md @@ -0,0 +1,41 @@ +# Custom Git Hooks + +**Note: Custom git hooks must be configured on the filesystem of the GitLab +server. Only GitLab server administrators will be able to complete these tasks. +Please explore webhooks as an option if you do not have filesystem access.** + +Git natively supports hooks that are executed on different actions. +Examples of server-side git hooks include pre-receive, post-receive, and update. +See +[Git SCM Server-Side Hooks](http://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#Server-Side-Hooks) +for more information about each hook type. + +As of gitlab-shell version 2.2.0 (which requires GitLab 7.5+), GitLab +administrators can add custom git hooks to any GitLab project. + +## Setup + +Normally, git hooks are placed in the repository or project's `hooks` directory. +GitLab creates a symlink from each project's `hooks` directory to the +gitlab-shell `hooks` directory for ease of maintenance between gitlab-shell +upgrades. As such, custom hooks are implemented a little differently. Behavior +is exactly the same once the hook is created, though. Follow these steps to +set up a custom hook. + +1. Pick a project that needs a custom git hook. +1. On the GitLab server, navigate to the project's repository directory. +For a manual install the path is usually +`/home/git/repositories//.git`. For Omnibus installs the path is +usually `/var/opt/gitlab/git-data/repositories//.git`. +1. Create a new directory in this location called `custom_hooks`. +1. Inside the new `custom_hooks` directory, create a file with a name matching +the hook type. For a pre-receive hook the file name should be `pre-receive` with +no extension. +1. Make the hook file executable and make sure it's owned by git. +1. Write the code to make the git hook function as expected. Hooks can be +in any language. Ensure the 'shebang' at the top properly reflects the language +type. For example, if the script is in Ruby the shebang will probably be +`#!/usr/bin/env ruby`. + +That's it! Assuming the hook code is properly implemented the hook will fire +as appropriate. -- cgit v1.2.1 From 07cca8cc0c5bd6913e55c99a0493dc2f92dcdbb5 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 11 Nov 2014 11:47:44 +0200 Subject: Use release tool for monthly releases Signed-off-by: Dmitriy Zaporozhets --- doc/release/monthly.md | 84 +++++++++++++------------------------------------- 1 file changed, 22 insertions(+), 62 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 386c19c0fe0..7354efc3e2e 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -143,35 +143,19 @@ Make sure the code quality indicators are green / good. - [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq) -### **4. Set VERSION** +### **4. Run release tool** -Change version in VERSION to `x.x.0.rc1`. - -### **5. Tag** - -Create an annotated tag that points to the version change commit: +Get release tools ``` -git tag -a vx.x.0.rc1 -m 'Version x.x.0.rc1' +git clone git@dev.gitlab.org:gitlab/release-tools.git +cd release-tools ``` -Tags should be created for both GitLab CE and GitLab EE. Don't forget to push tags to all remotes. - -``` -git push remote_name vx.x.0.rc1 -``` - -### **6. Create stable branches** - -For GitLab EE, append `-ee` to the branch. - -`x-x-stable-ee` +Create release candidate and stable branch: ``` -git checkout master -git pull -git checkout -b x-x-stable -git push x-x-stable +bundle exec rake release["x.x.0.rc1"] ``` Now developers can use master for merging new features. @@ -245,69 +229,45 @@ create an issue about it in order to discuss the next steps after the release. # **22nd - Release CE and EE** -For GitLab EE, append `-ee` to the branches and tags. - -`x-x-stable-ee` - -`v.x.x.0-ee` - -Note: Merge CE into EE if needed. +**Make sure EE `x-x-stable-ee` has latest changes from CE `x-x-stable`** -### **1. Set VERSION to x.x.x and push** -- Change the GITLAB_SHELL_VERSION file in `master` of the CE repository if the version changed. -- Change the GITLAB_SHELL_VERSION file in `master` of the EE repository if the version changed. -- Change the VERSION file in `master` branch of the CE repository and commit and push to origin. -- Change the VERSION file in `master` branch of the EE repository and commit and push to origin. +### **1. Release code** -### **2. Update installation.md** - -Update [installation.md](/doc/install/installation.md) to the newest version in master. - -### **3. Push latest changes from x-x-stable branch to dev.gitlab.org** +Get release tools ``` -git checkout -b x-x-stable -git push origin x-x-stable +git clone git@dev.gitlab.org:gitlab/release-tools.git +cd release-tools ``` -### **4. Build the Omnibus packages** - -Follow the [release doc in the Omnibus repository](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md). -This can happen before tagging because Omnibus uses tags in its own repo and SHA1's to refer to the GitLab codebase. - -### **5. Create annotated tag vx.x.x** - -In `x-x-stable` branch check for the SHA-1 of the commit with VERSION file changed. Tag that commit, +Bump version, create release tag and push to remotes: ``` -git tag -a vx.x.0 -m 'Version x.x.0' xxxxx +bundle exec rake release["x.x.0"] ``` -where `xxxxx` is SHA-1. -### **6. Push the tag and x-x-stable branch to the remotes** +### **2. Update installation.md** -For GitLab CE, push to dev, GitLab.com and GitHub. +Update [installation.md](/doc/install/installation.md) to the newest version in master. -For GitLab EE, push to the subscribers repo. -Make sure the branch is marked 'protected' on each of the remotes you pushed to. +### **3. Build the Omnibus packages** + +Follow the [release doc in the Omnibus repository](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md). +This can happen before tagging because Omnibus uses tags in its own repo and SHA1's to refer to the GitLab codebase. -``` -git push x-x-stable(-ee) -git push vx.x.0 -``` -### **7. Publish packages for new release** +### **4. Publish packages for new release** Update `downloads/index.html` and `downloads/archive/index.html` in `www-gitlab-com` repository. -### **8. Publish blog for new release** +### **5. Publish blog for new release** Merge the [blog merge request](#1-prepare-the-blog-post) in `www-gitlab-com` repository. -### **9. Tweet to blog** +### **6. Tweet to blog** Send out a tweet to share the good news with the world. List the most important features and link to the blog post. -- cgit v1.2.1 From 1d1b21164258c2e2a6e1d782e517871c33ea961d Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 11 Nov 2014 12:01:47 +0200 Subject: Use release tools in patch release Signed-off-by: Dmitriy Zaporozhets --- doc/release/patch.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/release/patch.md b/doc/release/patch.md index 5d2fa053cac..6ed56427e9a 100644 --- a/doc/release/patch.md +++ b/doc/release/patch.md @@ -10,6 +10,8 @@ Otherwise include it in the monthly release and note there was a regression fix ## Release Procedure +### Preparation + 1. Verify that the issue can be reproduced 1. Note in the 'GitLab X.X regressions' that you will create a patch 1. Create an issue on private GitLab development server @@ -17,12 +19,33 @@ Otherwise include it in the monthly release and note there was a regression fix 1. Fix the issue on a feature branch, do this on the private GitLab development server 1. Consider creating and testing workarounds 1. After the branch is merged into master, cherry pick the commit(s) into the current stable branch +1. Make sure that the build has passed and all tests are passing 1. In a separate commit in the stable branch update the CHANGELOG 1. For EE, update the CHANGELOG-EE if it is EE specific fix. Otherwise, merge the stable CE branch and add to CHANGELOG-EE "Merge community edition changes for version X.X.X" -1. In a separate commit in the stable branch update the VERSION -1. Create an annotated tag vX.X.X for CE and another patch release for EE `git tag -a vx.x.x -m 'Version x.x.x'` -1. Make sure that the build has passed and all tests are passing -1. Push the code and the tags to all the CE and EE repositories + +### Bump version + +Get release tools + +``` +git clone git@dev.gitlab.org:gitlab/release-tools.git +cd release-tools +``` + +Bump version in stable branch, create release tag and push to remotes: + +``` +bundle exec rake release["x.x.x"] +``` + +Or if you need to release only EE: + +``` +CE=false be rake release['x.x.x'] +``` + +### Release + 1. Apply the patch to GitLab Cloud and the private GitLab development server 1. [Build new packages with the latest version](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md) 1. Cherry-pick the changelog update back into master -- cgit v1.2.1 From a15dc7b8141e4aa981409bffd2bb6ad311902dfa Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 11 Nov 2014 10:22:05 +0000 Subject: Add tip about EE and CE master synced before release rc1 --- doc/release/monthly.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 7354efc3e2e..fa1a883f4b2 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -145,6 +145,8 @@ Make sure the code quality indicators are green / good. ### **4. Run release tool** +**Make sure EE `master` has latest changes from CE `master`** + Get release tools ``` -- cgit v1.2.1 From d65f2bad6c7f834b708886f1ee8160a67281638d Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Tue, 11 Nov 2014 16:30:14 +0100 Subject: Add documentation about buttons in gmail. --- doc/integration/gitlab_actions.png | Bin 0 -> 17321 bytes doc/integration/gitlab_buttons_in_gmail.md | 11 +++++++++++ 2 files changed, 11 insertions(+) create mode 100644 doc/integration/gitlab_actions.png create mode 100644 doc/integration/gitlab_buttons_in_gmail.md (limited to 'doc') diff --git a/doc/integration/gitlab_actions.png b/doc/integration/gitlab_actions.png new file mode 100644 index 00000000000..b08f54d137b Binary files /dev/null and b/doc/integration/gitlab_actions.png differ diff --git a/doc/integration/gitlab_buttons_in_gmail.md b/doc/integration/gitlab_buttons_in_gmail.md new file mode 100644 index 00000000000..5cfea5a90f8 --- /dev/null +++ b/doc/integration/gitlab_buttons_in_gmail.md @@ -0,0 +1,11 @@ +# GitLab buttons in gmail + +GitLab supports [Google actions in email](https://developers.google.com/gmail/markup/actions/actions-overview). + +If correctly setup, emails that require an action will be marked in Gmail. + +![gitlab_actions](gitlab_actions.png) + +To get this functioning, you need to be registered with Google. +[See how to register with google in this document.](https://developers.google.com/gmail/markup/registering-with-google) + -- cgit v1.2.1 From 116f73b540ba0249e8df1da97fd4189b0327ebce Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 11 Nov 2014 18:48:39 +0200 Subject: Sync master branch before releasing rc Signed-off-by: Dmitriy Zaporozhets --- doc/release/monthly.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index fa1a883f4b2..affe634587d 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -154,6 +154,13 @@ git clone git@dev.gitlab.org:gitlab/release-tools.git cd release-tools ``` +Release candidate creates stable branch from master. +So we need to sync master branch between all CE remotes. Also do same for EE. + +``` +bundle exec rake sync +``` + Create release candidate and stable branch: ``` -- cgit v1.2.1 From 5cf6d5949d6c776e24d3bd5c0b417000f1efc57a Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Wed, 12 Nov 2014 12:54:43 +0100 Subject: Remove the lowest memory requirement of 512MB. --- doc/install/requirements.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index ed194253148..fd59ac8a073 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -50,11 +50,6 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab ### Memory -- 512MB is the absolute minimum but we do not recommend this amount of memory. -You will either need to configure 512MB or 1.5GB of swap space. -With 512MB of swap space you must configure only one unicorn worker. -With one unicorn worker only git over ssh access will work because the git over HTTP access requires two running workers (one worker to receive the user request and one worker for the authorization check). -If you use SSD storage and configure 1.5GB of swap space you can use two Unicorn workers, this will allow HTTP access but it will still be slow. - 1GB RAM + 1GB swap supports up to 100 users - **2GB RAM** is the **recommended** memory size and supports up to 500 users - 4GB RAM supports up to 2,000 users @@ -90,7 +85,7 @@ On a very active server (10,000 active users) the Sidekiq process can use 1GB+ o ## Supported web browsers - Chrome (Latest stable version) -- Firefox (Latest released version and [latest ESR version](https://www.mozilla.org/en-US/firefox/organizations/)) +- Firefox (Latest released version and [latest ESR version](https://www.mozilla.org/en-US/firefox/organizations/)) - Safari 7+ (known problem: required fields in html5 do not work) - Opera (Latest released version) - IE 10+ -- cgit v1.2.1 From e0467e8f58d168900e7282160e1674a2125265cc Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Fri, 14 Nov 2014 02:41:58 -0800 Subject: fix backup rake task --- doc/raketasks/backup_restore.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index b4581e2a07a..d2f0d6e7bc1 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -14,7 +14,7 @@ You can only restore a backup to exactly the same version of GitLab that you cre sudo gitlab-rake gitlab:backup:create # if you've installed GitLab from source or using the cookbook -bundle exec rake gitlab:backup:create RAILS_ENV=production +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production ``` Example output: -- cgit v1.2.1 From de3bef058ee16aae0f29802e39c3af24c5b79790 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 14 Nov 2014 11:47:08 +0100 Subject: Gitlab.com uses special packages, build them first --- doc/release/monthly.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 386c19c0fe0..e0c98fbce76 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -316,7 +316,8 @@ Proposed tweet for CE "GitLab X.X is released! It brings *** " # **1 workday after release - Update GitLab.com** -Update GitLab.com from RC1 to the released package. +- Build a package for gitlab.com based on the official release instead of RC1 +- Deploy the package # **25th - Release GitLab CI** -- cgit v1.2.1 From 5b5446bd761e1d6b07171ba5c6c9b994f797b6a8 Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Sat, 15 Nov 2014 06:25:08 -0800 Subject: remove extra cd command --- doc/update/7.3-to-7.4.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc') diff --git a/doc/update/7.3-to-7.4.md b/doc/update/7.3-to-7.4.md index 3f471500c82..f8a405c195b 100644 --- a/doc/update/7.3-to-7.4.md +++ b/doc/update/7.3-to-7.4.md @@ -35,8 +35,6 @@ sudo -u git -H git checkout 7-4-stable-ee ### 3. Install libs, migrations, etc. ```bash -cd /home/git/gitlab - # MySQL installations (note: the line below states '--without ... postgres') sudo -u git -H bundle install --without development test postgres --deployment -- cgit v1.2.1 From da35baed656a90eb5531955d591152c7142cd0cb Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Mon, 17 Nov 2014 16:56:51 -0500 Subject: Added update guide for updating to 7.5, and pointed installation and updates guides to new version. --- doc/install/installation.md | 10 +- doc/update/6.x-or-7.x-to-7.4.md | 287 ---------------------------------------- doc/update/6.x-or-7.x-to-7.5.md | 287 ++++++++++++++++++++++++++++++++++++++++ doc/update/7.4-to-7.5.md | 187 ++++++++++++++++++++++++++ 4 files changed, 479 insertions(+), 292 deletions(-) delete mode 100644 doc/update/6.x-or-7.x-to-7.4.md create mode 100644 doc/update/6.x-or-7.x-to-7.5.md create mode 100644 doc/update/7.4-to-7.5.md (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index 459a21ae821..5dd9388eece 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -101,8 +101,8 @@ Remove the old Ruby 1.8 if present Download Ruby and compile it: mkdir /tmp/ruby && cd /tmp/ruby - curl -L --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz - cd ruby-2.1.2 + curl -L --progress http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz | tar xz + cd ruby-2.1.5 ./configure --disable-install-rdoc make sudo make install @@ -181,9 +181,9 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da ### Clone the Source # Clone GitLab repository - sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-4-stable gitlab + sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-5-stable gitlab -**Note:** You can change `7-4-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! +**Note:** You can change `7-5-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! ### Configure It @@ -278,7 +278,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da GitLab Shell is an SSH access and repository management software developed specially for GitLab. # Run the installation task for gitlab-shell (replace `REDIS_URL` if needed): - sudo -u git -H bundle exec rake gitlab:shell:install[v2.0.1] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production + sudo -u git -H bundle exec rake gitlab:shell:install[v2.2.0] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production # By default, the gitlab-shell config is generated from your main GitLab config. # You can review (and modify) the gitlab-shell config as follows: diff --git a/doc/update/6.x-or-7.x-to-7.4.md b/doc/update/6.x-or-7.x-to-7.4.md deleted file mode 100644 index dd90ae3bf3d..00000000000 --- a/doc/update/6.x-or-7.x-to-7.4.md +++ /dev/null @@ -1,287 +0,0 @@ -# From 6.x or 7.x to 7.4 - -This allows you to upgrade any version of GitLab from 6.0 and up (including 7.0 and up) to 7.4. - -## Global issue numbers - -As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects. - -## Editable labels - -In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it -possible to edit the label text and color. The characters `?`, `&` and `,` are -no longer allowed however so those will be removed from your tags during the -database migrations for GitLab 7.2. - -## 0. Stop server - - sudo service gitlab stop - -## 1. Backup - -It's useful to make a backup just in case things go south: -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) - -```bash -cd /home/git/gitlab -sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production -``` - -## 2. Update Ruby - -If you are still using Ruby 1.9.3 or below, you will need to update Ruby. -You can check which version you are running with `ruby -v`. - -If you are you running Ruby 2.0.x, you do not need to upgrade ruby, but can consider doing so for performance reasons. - -If you are running Ruby 2.1.1 consider upgrading to 2.1.2, because of the high memory usage of Ruby 2.1.1. - -Install, update dependencies: - -```bash -sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl -``` - -Download and compile Ruby: - -```bash -mkdir /tmp/ruby && cd /tmp/ruby -curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz -cd ruby-2.1.2 -./configure --disable-install-rdoc -make -sudo make install -``` - -Install Bundler: - -```bash -sudo gem install bundler --no-ri --no-rdoc -``` - -## 3. Get latest code - -```bash -cd /home/git/gitlab -sudo -u git -H git fetch --all -sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically -``` - -For GitLab Community Edition: - -```bash -sudo -u git -H git checkout 7-4-stable -``` - -OR - -For GitLab Enterprise Edition: - -```bash -sudo -u git -H git checkout 7-4-stable-ee -``` - -## 4. Install additional packages - -```bash -# Add support for lograte for better log file handling -sudo apt-get install logrotate - -# Install pkg-config and cmake, which is needed for the latest versions of rugged -sudo apt-get install pkg-config cmake -``` - -## 5. Configure Redis to use sockets - - # Configure redis to use sockets - sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig - # Disable Redis listening on TCP by setting 'port' to 0 - sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf - # Enable Redis socket for default Debian / Ubuntu path - echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf - # Be sure redis group can write to the socket, enable only if supported (>= redis 2.4.0). - sudo sed -i '/# unixsocketperm/ s/^# unixsocketperm.*/unixsocketperm 0775/' /etc/redis/redis.conf - # Activate the changes to redis.conf - sudo service redis-server restart - # Add git to the redis group - sudo usermod -aG redis git - - # Configure Redis connection settings - sudo -u git -H cp config/resque.yml.example config/resque.yml - # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration - sudo -u git -H editor config/resque.yml - - # Configure gitlab-shell to use Redis sockets - sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml - -## 6. Update gitlab-shell - -```bash -cd /home/git/gitlab-shell -sudo -u git -H git fetch -sudo -u git -H git checkout v2.0.1 -``` - -## 7. Install libs, migrations, etc. - -```bash -cd /home/git/gitlab - -# MySQL installations (note: the line below states '--without ... postgres') -sudo -u git -H bundle install --without development test postgres --deployment - -# PostgreSQL installations (note: the line below states '--without ... mysql') -sudo -u git -H bundle install --without development test mysql --deployment - -# Run database migrations -sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production - -# Enable internal issue IDs (introduced in GitLab 6.1) -sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production - -# Clean up assets and cache -sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production - -# Close access to gitlab-satellites for others -sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites - -# Update init.d script -sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab -``` - -## 8. Update config files - -TIP: to see what changed in `gitlab.yml.example` in this release use next command: - -``` -git diff 6-0-stable:config/gitlab.yml.example 7-4-stable:config/gitlab.yml.example -``` - -* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-4-stable/config/gitlab.yml.example but with your settings. -* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-4-stable/config/unicorn.rb.example but with your settings. -* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.0.1/config.yml.example but with your settings. -* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-4-stable/lib/support/nginx/gitlab but with your settings. -* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-4-stable/lib/support/nginx/gitlab-ssl but with your settings. -* Copy rack attack middleware config - -```bash -sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb -``` - -* Set up logrotate - -```bash -sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab -``` - -## 9. Start application - - sudo service gitlab start - sudo service nginx restart - -## 10. Check application status - -Check if GitLab and its environment are configured correctly: - - cd /home/git/gitlab - sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production - -To make sure you didn't miss anything run a more thorough check with: - - sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production - -If all items are green, then congratulations upgrade complete! - -## 11. Update OmniAuth configuration - -When using Google omniauth login, changes of the Google account required. -Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/). -More details can be found at the [integration documentation](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/google.md). - -## 12. Optional optimizations for GitLab setups with MySQL databases - -Only applies if running MySQL database created with GitLab 6.7 or earlier. If you are not experiencing any issues you may not need the following instructions however following them will bring your database in line with the latest recommended installation configuration and help avoid future issues. Be sure to follow these directions exactly. These directions should be safe for any MySQL instance but to be sure make a current MySQL database backup beforehand. - -``` -# Stop GitLab -sudo service gitlab stop - -# Secure your MySQL installation (added in GitLab 6.2) -sudo mysql_secure_installation - -# Login to MySQL -mysql -u root -p - -# do not type the 'mysql>', this is part of the prompt - -# Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) -SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; - -# If previous query returned results, copy & run all outputed SQL statements - -# Convert all tables to correct character set -SET foreign_key_checks = 0; -SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; - -# If previous query returned results, copy & run all outputed SQL statements - -# turn foreign key checks back on -SET foreign_key_checks = 1; - -# Find MySQL users -mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%'; - -# If git user exists and gitlab user does not exist -# you are done with the database cleanup tasks -mysql> \q - -# If both users exist skip to Delete gitlab user - -# Create new user for GitLab (changed in GitLab 6.4) -# change $password in the command below to a real password you pick -mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password'; - -# Grant the git user necessary permissions on the database -mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost'; - -# Delete the old gitlab user -mysql> DELETE FROM mysql.user WHERE user='gitlab'; - -# Quit the database session -mysql> \q - -# Try connecting to the new database with the new user -sudo -u git -H mysql -u git -p -D gitlabhq_production - -# Type the password you replaced $password with earlier - -# You should now see a 'mysql>' prompt - -# Quit the database session -mysql> \q - -# Update database configuration details -# See config/database.yml.mysql for latest recommended configuration details -# Remove the reaping_frequency setting line if it exists (removed in GitLab 6.8) -# Set production -> pool: 10 (updated in GitLab 5.3) -# Set production -> username: git -# Set production -> password: the password your replaced $password with earlier -sudo -u git -H editor /home/git/gitlab/config/database.yml -``` - -## Things went south? Revert to previous version (6.0) - -### 1. Revert the code to the previous version - -Follow the [upgrade guide from 5.4 to 6.0](5.4-to-6.0.md), except for the database migration (the backup is already migrated to the previous version). - -### 2. Restore from the backup: - -```bash -cd /home/git/gitlab -sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production -``` - -## Login issues after upgrade? - -If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page) diff --git a/doc/update/6.x-or-7.x-to-7.5.md b/doc/update/6.x-or-7.x-to-7.5.md new file mode 100644 index 00000000000..c9b95c62611 --- /dev/null +++ b/doc/update/6.x-or-7.x-to-7.5.md @@ -0,0 +1,287 @@ +# From 6.x or 7.x to 7.5 + +This allows you to upgrade any version of GitLab from 6.0 and up (including 7.0 and up) to 7.5. + +## Global issue numbers + +As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects. + +## Editable labels + +In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it +possible to edit the label text and color. The characters `?`, `&` and `,` are +no longer allowed however so those will be removed from your tags during the +database migrations for GitLab 7.2. + +## 0. Stop server + + sudo service gitlab stop + +## 1. Backup + +It's useful to make a backup just in case things go south: +(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production +``` + +## 2. Update Ruby + +If you are still using Ruby 1.9.3 or below, you will need to update Ruby. +You can check which version you are running with `ruby -v`. + +If you are you running Ruby 2.0.x, you do not need to upgrade ruby, but can consider doing so for performance reasons. + +If you are running Ruby 2.1.1 consider upgrading to 2.1.5, because of the high memory usage of Ruby 2.1.1. + +Install, update dependencies: + +```bash +sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl +``` + +Download and compile Ruby: + +```bash +mkdir /tmp/ruby && cd /tmp/ruby +curl --progress http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz | tar xz +cd ruby-2.1.5 +./configure --disable-install-rdoc +make +sudo make install +``` + +Install Bundler: + +```bash +sudo gem install bundler --no-ri --no-rdoc +``` + +## 3. Get latest code + +```bash +cd /home/git/gitlab +sudo -u git -H git fetch --all +sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically +``` + +For GitLab Community Edition: + +```bash +sudo -u git -H git checkout 7-5-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 7-5-stable-ee +``` + +## 4. Install additional packages + +```bash +# Add support for lograte for better log file handling +sudo apt-get install logrotate + +# Install pkg-config and cmake, which is needed for the latest versions of rugged +sudo apt-get install pkg-config cmake +``` + +## 5. Configure Redis to use sockets + + # Configure redis to use sockets + sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig + # Disable Redis listening on TCP by setting 'port' to 0 + sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf + # Enable Redis socket for default Debian / Ubuntu path + echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf + # Be sure redis group can write to the socket, enable only if supported (>= redis 2.4.0). + sudo sed -i '/# unixsocketperm/ s/^# unixsocketperm.*/unixsocketperm 0775/' /etc/redis/redis.conf + # Activate the changes to redis.conf + sudo service redis-server restart + # Add git to the redis group + sudo usermod -aG redis git + + # Configure Redis connection settings + sudo -u git -H cp config/resque.yml.example config/resque.yml + # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration + sudo -u git -H editor config/resque.yml + + # Configure gitlab-shell to use Redis sockets + sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml + +## 6. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch +sudo -u git -H git checkout v2.2.0 +``` + +## 7. Install libs, migrations, etc. + +```bash +cd /home/git/gitlab + +# MySQL installations (note: the line below states '--without ... postgres') +sudo -u git -H bundle install --without development test postgres --deployment + +# PostgreSQL installations (note: the line below states '--without ... mysql') +sudo -u git -H bundle install --without development test mysql --deployment + +# Run database migrations +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production + +# Enable internal issue IDs (introduced in GitLab 6.1) +sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production + +# Clean up assets and cache +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production + +# Close access to gitlab-satellites for others +sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites + +# Update init.d script +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab +``` + +## 8. Update config files + +TIP: to see what changed in `gitlab.yml.example` in this release use next command: + +``` +git diff 6-0-stable:config/gitlab.yml.example 7-5-stable:config/gitlab.yml.example +``` + +* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-5-stable/config/gitlab.yml.example but with your settings. +* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-5-stable/config/unicorn.rb.example but with your settings. +* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.2.0/config.yml.example but with your settings. +* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-5-stable/lib/support/nginx/gitlab but with your settings. +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-5-stable/lib/support/nginx/gitlab-ssl but with your settings. +* Copy rack attack middleware config + +```bash +sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb +``` + +* Set up logrotate + +```bash +sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab +``` + +## 9. Start application + + sudo service gitlab start + sudo service nginx restart + +## 10. Check application status + +Check if GitLab and its environment are configured correctly: + + cd /home/git/gitlab + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production + +To make sure you didn't miss anything run a more thorough check with: + + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production + +If all items are green, then congratulations upgrade complete! + +## 11. Update OmniAuth configuration + +When using Google omniauth login, changes of the Google account required. +Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/). +More details can be found at the [integration documentation](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/google.md). + +## 12. Optional optimizations for GitLab setups with MySQL databases + +Only applies if running MySQL database created with GitLab 6.7 or earlier. If you are not experiencing any issues you may not need the following instructions however following them will bring your database in line with the latest recommended installation configuration and help avoid future issues. Be sure to follow these directions exactly. These directions should be safe for any MySQL instance but to be sure make a current MySQL database backup beforehand. + +``` +# Stop GitLab +sudo service gitlab stop + +# Secure your MySQL installation (added in GitLab 6.2) +sudo mysql_secure_installation + +# Login to MySQL +mysql -u root -p + +# do not type the 'mysql>', this is part of the prompt + +# Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) +SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; + +# If previous query returned results, copy & run all outputed SQL statements + +# Convert all tables to correct character set +SET foreign_key_checks = 0; +SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; + +# If previous query returned results, copy & run all outputed SQL statements + +# turn foreign key checks back on +SET foreign_key_checks = 1; + +# Find MySQL users +mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%'; + +# If git user exists and gitlab user does not exist +# you are done with the database cleanup tasks +mysql> \q + +# If both users exist skip to Delete gitlab user + +# Create new user for GitLab (changed in GitLab 6.4) +# change $password in the command below to a real password you pick +mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password'; + +# Grant the git user necessary permissions on the database +mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost'; + +# Delete the old gitlab user +mysql> DELETE FROM mysql.user WHERE user='gitlab'; + +# Quit the database session +mysql> \q + +# Try connecting to the new database with the new user +sudo -u git -H mysql -u git -p -D gitlabhq_production + +# Type the password you replaced $password with earlier + +# You should now see a 'mysql>' prompt + +# Quit the database session +mysql> \q + +# Update database configuration details +# See config/database.yml.mysql for latest recommended configuration details +# Remove the reaping_frequency setting line if it exists (removed in GitLab 6.8) +# Set production -> pool: 10 (updated in GitLab 5.3) +# Set production -> username: git +# Set production -> password: the password your replaced $password with earlier +sudo -u git -H editor /home/git/gitlab/config/database.yml +``` + +## Things went south? Revert to previous version (6.0) + +### 1. Revert the code to the previous version + +Follow the [upgrade guide from 5.4 to 6.0](5.4-to-6.0.md), except for the database migration (the backup is already migrated to the previous version). + +### 2. Restore from the backup: + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production +``` + +## Login issues after upgrade? + +If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page) diff --git a/doc/update/7.4-to-7.5.md b/doc/update/7.4-to-7.5.md new file mode 100644 index 00000000000..737aeb9c1ab --- /dev/null +++ b/doc/update/7.4-to-7.5.md @@ -0,0 +1,187 @@ +# From 7.4 to 7.5 + +### 0. Stop server + + sudo service gitlab stop + +### 1. Backup + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production +``` + +### 2. Get latest code + +```bash +sudo -u git -H git fetch --all +sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically +``` + +For GitLab Community Edition: + +```bash +sudo -u git -H git checkout 7-5-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 7-5-stable-ee +``` + +### 3. Install libs, migrations, etc. + +```bash +cd /home/git/gitlab + +# MySQL installations (note: the line below states '--without ... postgres') +sudo -u git -H bundle install --without development test postgres --deployment + +# PostgreSQL installations (note: the line below states '--without ... mysql') +sudo -u git -H bundle install --without development test mysql --deployment + +# Run database migrations +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production + +# Clean up assets and cache +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production + +# Update init.d script +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab +``` + +### 4. Update config files + +#### New configuration options for gitlab.yml + +There are new configuration options available for gitlab.yml. View them with the command below and apply them to your current gitlab.yml. + +``` +git diff origin/7-4-stable:config/gitlab.yml.example origin/7-5-stable:config/gitlab.yml.example +``` + +#### Change timeout for unicorn + +``` +# set timeout to 60 +sudo -u git -H editor config/unicorn.rb +``` + +#### Change nginx https settings + +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-5-stable/lib/support/nginx/gitlab-ssl but with your setting + +#### MySQL Databases: Update database.yml config file + +* Add `collation: utf8_general_ci` to config/database.yml as seen in [config/database.yml.mysql](config/database.yml.mysql) + + +### 5. Start application + + sudo service gitlab start + sudo service nginx restart + +### 6. Check application status + +Check if GitLab and its environment are configured correctly: + + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production + +To make sure you didn't miss anything run a more thorough check with: + + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production + +If all items are green, then congratulations upgrade is complete! + + +### 7. Optional optimizations for GitLab setups with MySQL databases + +Only applies if running MySQL database created with GitLab 6.7 or earlier. If you are not experiencing any issues you may not need the following instructions however following them will bring your database in line with the latest recommended installation configuration and help avoid future issues. Be sure to follow these directions exactly. These directions should be safe for any MySQL instance but to be sure make a current MySQL database backup beforehand. + +``` +# Stop GitLab +sudo service gitlab stop + +# Secure your MySQL installation (added in GitLab 6.2) +sudo mysql_secure_installation + +# Login to MySQL +mysql -u root -p + +# do not type the 'mysql>', this is part of the prompt + +# Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) +SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; + +# If previous query returned results, copy & run all outputed SQL statements + +# Convert all tables to correct character set +SET foreign_key_checks = 0; +SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; + +# If previous query returned results, copy & run all outputed SQL statements + +# turn foreign key checks back on +SET foreign_key_checks = 1; + +# Find MySQL users +mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%'; + +# If git user exists and gitlab user does not exist +# you are done with the database cleanup tasks +mysql> \q + +# If both users exist skip to Delete gitlab user + +# Create new user for GitLab (changed in GitLab 6.4) +# change $password in the command below to a real password you pick +mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password'; + +# Grant the git user necessary permissions on the database +mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost'; + +# Delete the old gitlab user +mysql> DELETE FROM mysql.user WHERE user='gitlab'; + +# Quit the database session +mysql> \q + +# Try connecting to the new database with the new user +sudo -u git -H mysql -u git -p -D gitlabhq_production + +# Type the password you replaced $password with earlier + +# You should now see a 'mysql>' prompt + +# Quit the database session +mysql> \q + +# Update database configuration details +# See config/database.yml.mysql for latest recommended configuration details +# Remove the reaping_frequency setting line if it exists (removed in GitLab 6.8) +# Set production -> pool: 10 (updated in GitLab 5.3) +# Set production -> username: git +# Set production -> password: the password your replaced $password with earlier +sudo -u git -H editor /home/git/gitlab/config/database.yml + +# Run thorough check +sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production +``` + + +## Things went south? Revert to previous version (7.4) + +### 1. Revert the code to the previous version +Follow the [upgrade guide from 7.3 to 7.4](7.3-to-7.4.md), except for the database migration +(The backup is already migrated to the previous version) + +### 2. Restore from the backup: + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production +``` +If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above. -- cgit v1.2.1 From 1016acc6096849e239d65ae386005b7563f110c6 Mon Sep 17 00:00:00 2001 From: Daniel Serodio Date: Tue, 18 Nov 2014 10:59:04 -0200 Subject: Small improvement to /api/user/keys doc The keys resource includes a create_at attribute --- doc/api/users.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/api/users.md b/doc/api/users.md index 20e0d68977e..b30a31deccc 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -260,12 +260,14 @@ GET /user/keys { "id": 1, "title": "Public key", - "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=" + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=", + "created_at": "2014-08-01T14:47:39.080Z" }, { "id": 3, "title": "Another Public key", - "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=" + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=", + "created_at": "2014-08-01T14:47:39.080Z" } ] ``` @@ -302,7 +304,8 @@ Parameters: { "id": 1, "title": "Public key", - "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=" + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=", + "created_at": "2014-08-01T14:47:39.080Z" } ``` -- cgit v1.2.1 From c4fc734e78f8061e54e3d7374e8db5eb6f555290 Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Thu, 20 Nov 2014 12:18:28 +0100 Subject: add rebuilding of authorized_keys to docs --- doc/raketasks/maintenance.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'doc') diff --git a/doc/raketasks/maintenance.md b/doc/raketasks/maintenance.md index f6bd7565799..c8696861067 100644 --- a/doc/raketasks/maintenance.md +++ b/doc/raketasks/maintenance.md @@ -122,3 +122,26 @@ sudo -u git -H mkdir -p /home/git/gitlab-satellites sudo -u git -H bundle exec rake gitlab:satellites:create RAILS_ENV=production sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites ``` + +## Rebuild authorized_keys file + +In some case it is necessary to rebuild the `authorized_keys` file. + + +For Omnibus-packages +``` +sudo gitlab-rake gitlab:shell:setup +``` + +For installations from source: +``` +sudo -u git -H bundle exec rake gitlab:shell:setup RAILS_ENV=production +``` + +``` +This will rebuild an authorized_keys file. +You will lose any data stored in authorized_keys file. +Do you want to continue (yes/no)? yes + +............................ +``` -- cgit v1.2.1 From a72a919ae5cf8d8984fef50ed3cac141fe17cc66 Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Thu, 20 Nov 2014 12:22:46 +0100 Subject: add correct path to rebuild-keys doc --- doc/raketasks/maintenance.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/raketasks/maintenance.md b/doc/raketasks/maintenance.md index c8696861067..8bef92e55fe 100644 --- a/doc/raketasks/maintenance.md +++ b/doc/raketasks/maintenance.md @@ -128,13 +128,14 @@ sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites In some case it is necessary to rebuild the `authorized_keys` file. -For Omnibus-packages +For Omnibus-packages: ``` sudo gitlab-rake gitlab:shell:setup ``` For installations from source: ``` +cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:shell:setup RAILS_ENV=production ``` -- cgit v1.2.1 From 7c54c63ac14eb8f5ce0e364d709988fcfe4dda64 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Thu, 20 Nov 2014 15:46:04 +0100 Subject: Add CRON=1 backup setting for quiet backups --- doc/raketasks/backup_restore.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index d2f0d6e7bc1..68e8a14f52f 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -203,5 +203,8 @@ Add the following lines at the bottom: ``` # Create a full backup of the GitLab repositories and SQL database every day at 4am -0 4 * * * cd /home/git/gitlab && PATH=/usr/local/bin:/usr/bin:/bin bundle exec rake gitlab:backup:create RAILS_ENV=production +0 4 * * * cd /home/git/gitlab && PATH=/usr/local/bin:/usr/bin:/bin bundle exec rake gitlab:backup:create RAILS_ENV=production CRON=1 ``` + +The `CRON=1` environment setting tells the backup script to suppress all progress output if there are no errors. +This is recommended to reduce cron spam. -- cgit v1.2.1 From 2e0bbe68cb713ec35a6a68c7a54f0ad881dbea58 Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Thu, 20 Nov 2014 15:58:03 +0100 Subject: you have to update gitlab shell for gitlab 7.5 --- doc/update/7.4-to-7.5.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/update/7.4-to-7.5.md b/doc/update/7.4-to-7.5.md index 737aeb9c1ab..c12becc1e14 100644 --- a/doc/update/7.4-to-7.5.md +++ b/doc/update/7.4-to-7.5.md @@ -32,7 +32,15 @@ For GitLab Enterprise Edition: sudo -u git -H git checkout 7-5-stable-ee ``` -### 3. Install libs, migrations, etc. +### 3. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch +sudo -u git -H git checkout v2.2.0 +``` + +### 4. Install libs, migrations, etc. ```bash cd /home/git/gitlab @@ -53,7 +61,7 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab ``` -### 4. Update config files +### 5. Update config files #### New configuration options for gitlab.yml @@ -79,12 +87,12 @@ sudo -u git -H editor config/unicorn.rb * Add `collation: utf8_general_ci` to config/database.yml as seen in [config/database.yml.mysql](config/database.yml.mysql) -### 5. Start application +### 6. Start application sudo service gitlab start sudo service nginx restart -### 6. Check application status +### 7. Check application status Check if GitLab and its environment are configured correctly: @@ -97,7 +105,7 @@ To make sure you didn't miss anything run a more thorough check with: If all items are green, then congratulations upgrade is complete! -### 7. Optional optimizations for GitLab setups with MySQL databases +### 8. Optional optimizations for GitLab setups with MySQL databases Only applies if running MySQL database created with GitLab 6.7 or earlier. If you are not experiencing any issues you may not need the following instructions however following them will bring your database in line with the latest recommended installation configuration and help avoid future issues. Be sure to follow these directions exactly. These directions should be safe for any MySQL instance but to be sure make a current MySQL database backup beforehand. -- cgit v1.2.1 From 4a39b6d9f7390aae4ed06c8a5a2144eabb1ff689 Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Thu, 20 Nov 2014 08:15:58 -0800 Subject: add missing password prompt to mysqldump --- doc/update/mysql_to_postgresql.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/update/mysql_to_postgresql.md b/doc/update/mysql_to_postgresql.md index 695c083d361..229689392b8 100644 --- a/doc/update/mysql_to_postgresql.md +++ b/doc/update/mysql_to_postgresql.md @@ -13,7 +13,7 @@ sudo service gitlab stop git clone https://github.com/gitlabhq/mysql-postgresql-converter.git cd mysql-postgresql-converter -mysqldump --compatible=postgresql --default-character-set=utf8 -r databasename.mysql -u root gitlabhq_production +mysqldump --compatible=postgresql --default-character-set=utf8 -r databasename.mysql -u root gitlabhq_production -p python db_converter.py databasename.mysql databasename.psql # Import the database dump as the application database user @@ -94,7 +94,7 @@ sudo -u git -H mv tmp/backups/TIMESTAMP_gitlab_backup.tar tmp/backups/postgresql # Create a separate database dump with PostgreSQL compatibility cd tmp/backups/postgresql -sudo -u git -H mysqldump --compatible=postgresql --default-character-set=utf8 -r gitlabhq_production.mysql -u root gitlabhq_production +sudo -u git -H mysqldump --compatible=postgresql --default-character-set=utf8 -r gitlabhq_production.mysql -u root gitlabhq_production -p # Clone the database converter sudo -u git -H git clone https://github.com/gitlabhq/mysql-postgresql-converter.git -- cgit v1.2.1 From f68003560d96a9c2b9496e9091c809d1e17402e9 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 21 Nov 2014 09:59:46 +0100 Subject: The blog post will trigger a mail to the list --- doc/release/security.md | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/release/security.md b/doc/release/security.md index 79d23c02ea4..d335407797b 100644 --- a/doc/release/security.md +++ b/doc/release/security.md @@ -18,7 +18,6 @@ Please report suspected security vulnerabilities in private to Date: Sun, 23 Nov 2014 01:08:29 -0800 Subject: remove extra upgrade details, add missing config Update 7.5 update guide: * Remove unnecessary upgrade details (they were completed in 7.4 upgrade and only needed one time) * Add missing Nginx config details --- doc/update/7.4-to-7.5.md | 93 ++---------------------------------------------- 1 file changed, 3 insertions(+), 90 deletions(-) (limited to 'doc') diff --git a/doc/update/7.4-to-7.5.md b/doc/update/7.4-to-7.5.md index c12becc1e14..673eab3c56e 100644 --- a/doc/update/7.4-to-7.5.md +++ b/doc/update/7.4-to-7.5.md @@ -71,21 +71,10 @@ There are new configuration options available for gitlab.yml. View them with the git diff origin/7-4-stable:config/gitlab.yml.example origin/7-5-stable:config/gitlab.yml.example ``` -#### Change timeout for unicorn - -``` -# set timeout to 60 -sudo -u git -H editor config/unicorn.rb -``` - -#### Change nginx https settings - -* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-5-stable/lib/support/nginx/gitlab-ssl but with your setting - -#### MySQL Databases: Update database.yml config file - -* Add `collation: utf8_general_ci` to config/database.yml as seen in [config/database.yml.mysql](config/database.yml.mysql) +#### Change Nginx settings +* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as [`lib/support/nginx/gitlab`](/lib/support/nginx/gitlab) but with your settings +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as [`lib/support/nginx/gitlab-ssl`](/lib/support/nginx/gitlab-ssl) but with your setting ### 6. Start application @@ -104,82 +93,6 @@ To make sure you didn't miss anything run a more thorough check with: If all items are green, then congratulations upgrade is complete! - -### 8. Optional optimizations for GitLab setups with MySQL databases - -Only applies if running MySQL database created with GitLab 6.7 or earlier. If you are not experiencing any issues you may not need the following instructions however following them will bring your database in line with the latest recommended installation configuration and help avoid future issues. Be sure to follow these directions exactly. These directions should be safe for any MySQL instance but to be sure make a current MySQL database backup beforehand. - -``` -# Stop GitLab -sudo service gitlab stop - -# Secure your MySQL installation (added in GitLab 6.2) -sudo mysql_secure_installation - -# Login to MySQL -mysql -u root -p - -# do not type the 'mysql>', this is part of the prompt - -# Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) -SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; - -# If previous query returned results, copy & run all outputed SQL statements - -# Convert all tables to correct character set -SET foreign_key_checks = 0; -SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; - -# If previous query returned results, copy & run all outputed SQL statements - -# turn foreign key checks back on -SET foreign_key_checks = 1; - -# Find MySQL users -mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%'; - -# If git user exists and gitlab user does not exist -# you are done with the database cleanup tasks -mysql> \q - -# If both users exist skip to Delete gitlab user - -# Create new user for GitLab (changed in GitLab 6.4) -# change $password in the command below to a real password you pick -mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password'; - -# Grant the git user necessary permissions on the database -mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost'; - -# Delete the old gitlab user -mysql> DELETE FROM mysql.user WHERE user='gitlab'; - -# Quit the database session -mysql> \q - -# Try connecting to the new database with the new user -sudo -u git -H mysql -u git -p -D gitlabhq_production - -# Type the password you replaced $password with earlier - -# You should now see a 'mysql>' prompt - -# Quit the database session -mysql> \q - -# Update database configuration details -# See config/database.yml.mysql for latest recommended configuration details -# Remove the reaping_frequency setting line if it exists (removed in GitLab 6.8) -# Set production -> pool: 10 (updated in GitLab 5.3) -# Set production -> username: git -# Set production -> password: the password your replaced $password with earlier -sudo -u git -H editor /home/git/gitlab/config/database.yml - -# Run thorough check -sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production -``` - - ## Things went south? Revert to previous version (7.4) ### 1. Revert the code to the previous version -- cgit v1.2.1 From e69db3ba5b386b69998f30536a1a2b3c0e748df9 Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Sun, 23 Nov 2014 01:11:06 -0800 Subject: update order of upgrade guide GitLab needs to be stopped when backup is took. --- doc/release/monthly.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index c50bfc21f8f..b391d8ca6ab 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -91,9 +91,9 @@ List any major changes here, so the user is aware of them before starting to upg - Web server changes - File structure changes -#### 1. Make backup +#### 1. Stop server -#### 2. Stop server +#### 2. Make backup #### 3. Do users need to update dependencies like `git`? -- cgit v1.2.1 From 80db117a339364b7a7c11d44f8fd7f0cf2a2a12b Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Sun, 23 Nov 2014 01:45:44 -0800 Subject: add preliminary 7.6 upgrade guide Add preliminary 7.6 upgrade guide. Makes it easier to add upgrades as changes are made rather than trying to round up everything at RC1. Initial additions: * Nginx changes needed again in 7.6 as they did not make the final 7.5 upgrade guide * Suggest that user sets time zone (added in https://github.com/gitlabhq/gitlabhq/pull/8015 but missed in final 7.5 upgrade guide) Replaces https://github.com/gitlabhq/gitlabhq/pull/8124 --- doc/update/7.5-to-7.6.md | 114 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 doc/update/7.5-to-7.6.md (limited to 'doc') diff --git a/doc/update/7.5-to-7.6.md b/doc/update/7.5-to-7.6.md new file mode 100644 index 00000000000..deee73fe560 --- /dev/null +++ b/doc/update/7.5-to-7.6.md @@ -0,0 +1,114 @@ +# From 7.5 to 7.6 + +**7.6 is not yet released. This is a preliminary upgrade guide.** + +### 0. Stop server + + sudo service gitlab stop + +### 1. Backup + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production +``` + +### 2. Get latest code + +```bash +sudo -u git -H git fetch --all +sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically +``` + +For GitLab Community Edition: + +```bash +sudo -u git -H git checkout 7-6-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 7-6-stable-ee +``` + +### 3. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch +sudo -u git -H git checkout v2.2.0 +``` + +### 4. Install libs, migrations, etc. + +```bash +cd /home/git/gitlab + +# MySQL installations (note: the line below states '--without ... postgres') +sudo -u git -H bundle install --without development test postgres --deployment + +# PostgreSQL installations (note: the line below states '--without ... mysql') +sudo -u git -H bundle install --without development test mysql --deployment + +# Run database migrations +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production + +# Clean up assets and cache +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production + +# Update init.d script +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab +``` + +### 5. Update config files + +#### New configuration options for `gitlab.yml` + +There are new configuration options available for [`gitlab.yml`](config/gitlab.yml.example). View them with the command below and apply them to your current `gitlab.yml`. + +``` +git diff origin/7-5-stable:config/gitlab.yml.example origin/7-6-stable:config/gitlab.yml.example +``` + +#### Change Nginx settings + +* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as [`lib/support/nginx/gitlab`](/lib/support/nginx/gitlab) but with your settings +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as [`lib/support/nginx/gitlab-ssl`](/lib/support/nginx/gitlab-ssl) but with your setting + +#### Setup time zone (optional) + +Consider setting the time zone in `gitlab.yml` otherwise GitLab will default to UTC. If you set a time zone previously in [`application.rb`](config/application.rb) (unlikely), unset it. + +### 6. Start application + + sudo service gitlab start + sudo service nginx restart + +### 7. Check application status + +Check if GitLab and its environment are configured correctly: + + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production + +To make sure you didn't miss anything run a more thorough check with: + + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production + +If all items are green, then congratulations upgrade is complete! + +## Things went south? Revert to previous version (7.5) + +### 1. Revert the code to the previous version +Follow the [upgrade guide from 7.4 to 7.5](7.4-to-7.5.md), except for the database migration +(The backup is already migrated to the previous version) + +### 2. Restore from the backup: + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production +``` +If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above. -- cgit v1.2.1 From 762d8d3271c17f295a45d59701c7354fc9702a3d Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Sun, 23 Nov 2014 02:14:29 -0800 Subject: add details on backing up your SSH host keys Users need to backup SSH host keys if they want to do a complete restore to the same domain and not have users get the `WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!` message. --- doc/raketasks/backup_restore.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index d2f0d6e7bc1..25e71c99dd3 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -137,7 +137,7 @@ with the name of your bucket: Please be informed that a backup does not store your configuration files. If you use an Omnibus package please see the [instructions in the readme to backup your configuration](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#backup-and-restore-omnibus-gitlab-configuration). If you have a cookbook installation there should be a copy of your configuration in Chef. -If you have a manual installation please consider backing up your gitlab.yml file and any SSL keys and certificates. +If you have a manual installation please consider backing up your `gitlab.yml` file, any SSL keys and certificates, and your [SSH host keys](https://superuser.com/questions/532040/copy-ssh-keys-from-one-server-to-another-server/532079#532079). ## Restore a previously created backup -- cgit v1.2.1 From 44e53aefd471081759d9fba160d9a651d520626e Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Sun, 23 Nov 2014 02:28:34 -0800 Subject: start gitlab after mysql tweaks --- doc/update/7.3-to-7.4.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/update/7.3-to-7.4.md b/doc/update/7.3-to-7.4.md index 3f471500c82..f6d6d1e1eea 100644 --- a/doc/update/7.3-to-7.4.md +++ b/doc/update/7.3-to-7.4.md @@ -167,6 +167,10 @@ mysql> \q # Set production -> password: the password your replaced $password with earlier sudo -u git -H editor /home/git/gitlab/config/database.yml +# Start GitLab +sudo service gitlab start +sudo service nginx restart + # Run thorough check sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production ``` -- cgit v1.2.1 From 8e6ff86d3814f017448eb4b82065f8fa7cb526e1 Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Sun, 23 Nov 2014 02:32:23 -0800 Subject: add editor command to update database.yml; cleanup --- doc/update/7.3-to-7.4.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/update/7.3-to-7.4.md b/doc/update/7.3-to-7.4.md index 3f471500c82..6dce5c3ba8d 100644 --- a/doc/update/7.3-to-7.4.md +++ b/doc/update/7.3-to-7.4.md @@ -70,14 +70,17 @@ git diff origin/7-3-stable:config/gitlab.yml.example origin/7-4-stable:config/gi sudo -u git -H editor config/unicorn.rb ``` -#### Change nginx https settings +#### Change Nginx HTTPS settings * HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-4-stable/lib/support/nginx/gitlab-ssl but with your setting #### MySQL Databases: Update database.yml config file -* Add `collation: utf8_general_ci` to config/database.yml as seen in [config/database.yml.mysql](config/database.yml.mysql) +* Add `collation: utf8_general_ci` to `config/database.yml` as seen in [config/database.yml.mysql](/config/database.yml.mysql) +``` +sudo -u git -H editor config/database.yml +``` ### 5. Start application -- cgit v1.2.1 From f4038138fb250bd912d593ca83e867efb4ced186 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Mon, 24 Nov 2014 11:30:07 +0100 Subject: More explicit wording of the documentation. --- doc/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index b9aa12f7675..896224fe930 100644 --- a/doc/README.md +++ b/doc/README.md @@ -2,22 +2,22 @@ ## User documentation -- [API](api/README.md) Explore how you can access GitLab via a simple and powerful API. -- [Markdown](markdown/markdown.md) Learn what you can do with GitLab's advanced formatting system. +- [API](api/README.md) Automate GitLab via a simple and powerful API. +- [Markdown](markdown/markdown.md) GitLab's advanced formatting system. - [Permissions](permissions/permissions.md) Learn what each role in a project (guest/reporter/developer/master/owner) can do. -- [Project Services](project_services/project_services.md) Explore how project services can integrate a project with external services, such as for CI. -- [Public access](public_access/public_access.md) Learn how you can allow public and internal access to a project. +- [Project Services](project_services/project_services.md) Integrate a project with external services, such as CI and chat. +- [Public access](public_access/public_access.md) Learn how you can allow public and internal access to projects. - [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects. - [Web hooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project. -- [Workflow](workflow/README.md) Learn how to use Git and GitLab together. +- [Workflow](workflow/README.md) Learn how to get the maximum out of GitLab. ## Administrator documentation - [Install](install/README.md) Requirements, directory structures and manual installation. - [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, LDAP and Twitter. -- [Raketasks](raketasks/README.md) Explore what GitLab has in store for you to make administration easier. +- [Raketasks](raketasks/README.md) Backups, maintenance, automatic web hook setup and the importing of projects. - [Custom git hooks](hooks/custom_hooks.md) Custom git hooks (on the filesystem) for when web hooks aren't enough. -- [System hooks](system_hooks/system_hooks.md) Let GitLab notify you when certain management tasks need to be carried out. +- [System hooks](system_hooks/system_hooks.md) Notifications when users, projects and keys are changed. - [Security](security/README.md) Learn what you can do to further secure your GitLab instance. - [Update](update/README.md) Update guides to upgrade your installation. - [Welcome message](customization/welcome_message.md) Add a custom welcome message to the sign-in page. -- cgit v1.2.1 From e0c870c0451789318e46ff5cb2b44a8d7d555f4c Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 24 Nov 2014 12:14:07 +0100 Subject: The release manager handles all releases --- doc/release/monthly.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index c50bfc21f8f..e81ee12af6c 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -8,7 +8,9 @@ NOTE: This is a guide for GitLab developers. ### **2. Release Manager** -A release manager is selected that coordinates the entire release of this version. The release manager has to make sure all the steps below are done and delegated where necessary. This person should also make sure this document is kept up to date and issues are created and updated. +A release manager is selected that coordinates all releases the coming month. +The release manager has to make sure all the steps below are done and delegated where necessary. +This person should also make sure this document is kept up to date and issues are created and updated. ### **3. Create an overall issue** -- cgit v1.2.1 From 4e3bf439cba782bf7d3ea326f0f6f5878166f0e2 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 24 Nov 2014 12:14:19 +0100 Subject: Establish ownership of security releases --- doc/release/patch.md | 1 + doc/release/security.md | 2 ++ 2 files changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/release/patch.md b/doc/release/patch.md index 6ed56427e9a..ce5c2170302 100644 --- a/doc/release/patch.md +++ b/doc/release/patch.md @@ -17,6 +17,7 @@ Otherwise include it in the monthly release and note there was a regression fix 1. Create an issue on private GitLab development server 1. Name the issue "Release X.X.X CE and X.X.X EE", this will make searching easier 1. Fix the issue on a feature branch, do this on the private GitLab development server +1. If it is a security issue, then assign it to the release manager and apply a 'security' label 1. Consider creating and testing workarounds 1. After the branch is merged into master, cherry pick the commit(s) into the current stable branch 1. Make sure that the build has passed and all tests are passing diff --git a/doc/release/security.md b/doc/release/security.md index 79d23c02ea4..a7fb57921df 100644 --- a/doc/release/security.md +++ b/doc/release/security.md @@ -14,7 +14,9 @@ Please report suspected security vulnerabilities in private to Date: Mon, 24 Nov 2014 14:59:54 +0100 Subject: Explicitly mention patch releases --- doc/release/monthly.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index e81ee12af6c..64a8bc98344 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -8,7 +8,7 @@ NOTE: This is a guide for GitLab developers. ### **2. Release Manager** -A release manager is selected that coordinates all releases the coming month. +A release manager is selected that coordinates all releases the coming month, including the patch releases for previous releases. The release manager has to make sure all the steps below are done and delegated where necessary. This person should also make sure this document is kept up to date and issues are created and updated. -- cgit v1.2.1 From 6818c96db02546a61730d5cfd799dce9e2a85c16 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Wed, 26 Nov 2014 14:30:14 +0100 Subject: Selecting a branch is dangerous now that we have rc in a branch. --- doc/install/installation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index 5dd9388eece..b8d9133ed75 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -6,9 +6,9 @@ Since a manual installation is a lot of work and error prone we strongly recomme ## Select Version to Install -Make sure you view [this installation guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md) from the branch (version) of GitLab you would like to install. In most cases this should be the highest numbered stable branch (example shown below). - -![Select latest branch](https://i.imgur.com/Lrdxk1k.png) +Make sure you view [this installation guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md) from the branch (version) of GitLab you would like to install. +In most cases this should be the highest numbered production tag (without rc in it). +You can select the tag in the version dropdown in the top left corner of GitLab (below the menu bar). If the highest number stable branch is unclear please check the [GitLab Blog](https://about.gitlab.com/blog/) for installation guide links by version. -- cgit v1.2.1 From 3e60dd7cb510fa00794701925ae0776332c09163 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Wed, 26 Nov 2014 15:49:25 +0100 Subject: Change it earlier as well. --- doc/install/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index b8d9133ed75..263259bc2f9 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -6,7 +6,7 @@ Since a manual installation is a lot of work and error prone we strongly recomme ## Select Version to Install -Make sure you view [this installation guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md) from the branch (version) of GitLab you would like to install. +Make sure you view [this installation guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md) from the tag (version) of GitLab you would like to install. In most cases this should be the highest numbered production tag (without rc in it). You can select the tag in the version dropdown in the top left corner of GitLab (below the menu bar). -- cgit v1.2.1 From b82a205b740840e2a7d0fa3eecf3e361ca73416e Mon Sep 17 00:00:00 2001 From: Marc Radulescu Date: Wed, 26 Nov 2014 18:51:12 +0100 Subject: added office analogy to help understanding of gitlab architecture --- doc/development/architecture.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'doc') diff --git a/doc/development/architecture.md b/doc/development/architecture.md index c4813d22eaa..109b21ab2a5 100644 --- a/doc/development/architecture.md +++ b/doc/development/architecture.md @@ -8,6 +8,38 @@ EE releases are available not long after CE releases. To obtain the GitLab EE th Both EE and CE require an add-on component called gitlab-shell. It is obtained from the [gitlab-shell repository](https://gitlab.com/gitlab-org/gitlab-shell/tree/master). New versions are usually tags but staying on the master branch will give you the latest stable version. New releases are generally around the same time as GitLab CE releases with exception for informal security updates deemed critical. +## Physical office analogy + +You can imagine GitLab as a physical office. + +**The repositories** are the goods GitLab handling. +They can be stored in a warehouse. +This can be either a hard disk, or something more complex, such as a NFS filesystem; + +**NginX** acts like the front-desk. +Users come to NginX and request actions to be done by workers in the office; + +**The database** is a series of metal file cabinets with information on: + - The goods in the warehouse (metadata, issues, merge requests etc); + - The users coming to the front desk (permissions) + +**Redis** is a [communication board with “cubby holes”](http://cache3.asset-cache.net/gc/52392865-mail-lies-in-cubby-holes-in-the-trenton-post-gettyimages.jpg?v=1&c=IWSAsset&k=2&d=OCUJ5gVf7YdJQI2Xhkc2QMDTqXzgg%2Fa7CPCCcA9Ug%2BfL2iMdhkcAYaLLAievbZlwJI9YEbpjb1pB2Fh7Fge3%2FA%3D%3D) that can contain tasks for office workers; + +**Sidekiq** is a worker that primarily handles sending out emails. +It takes tasks from the Redis communication board; + +**A Unicorn worker** is a worker that handles quick/mundane tasks. +They work with the communication board (Redis). +Their job description: + - check permissions by checking the user session stored in a Redis “cubby hole”; + - make tasks for Sidekiq; + - fetch stuff from the warehouse or move things around in there; + +**Gitlab-shell** is a third kind of worker that takes orders from a fax machine (SSH) instead of the front desk (HTTP). +Gitlab-shell communicates with Sidekiq via the “communication board” (Redis), and asks quick questions of the Unicorn workers either directly or via the front desk. + +**GitLab Enterprise Edition (the application)** is the collection of processes and business practices that the office is run by. + ## System Layout When referring to ~git in the pictures it means the home directory of the git user which is typically /home/git. -- cgit v1.2.1 From 8ccaee19792ac10dffd7a86be0835f2ea5674d0e Mon Sep 17 00:00:00 2001 From: Marc Radulescu Date: Wed, 26 Nov 2014 20:54:42 +0100 Subject: replaced hotlink --- doc/development/architecture.md | 2 +- doc/development/cubby_holes.jpg | Bin 0 -> 132815 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 doc/development/cubby_holes.jpg (limited to 'doc') diff --git a/doc/development/architecture.md b/doc/development/architecture.md index 109b21ab2a5..68c813d4339 100644 --- a/doc/development/architecture.md +++ b/doc/development/architecture.md @@ -23,7 +23,7 @@ Users come to NginX and request actions to be done by workers in the office; - The goods in the warehouse (metadata, issues, merge requests etc); - The users coming to the front desk (permissions) -**Redis** is a [communication board with “cubby holes”](http://cache3.asset-cache.net/gc/52392865-mail-lies-in-cubby-holes-in-the-trenton-post-gettyimages.jpg?v=1&c=IWSAsset&k=2&d=OCUJ5gVf7YdJQI2Xhkc2QMDTqXzgg%2Fa7CPCCcA9Ug%2BfL2iMdhkcAYaLLAievbZlwJI9YEbpjb1pB2Fh7Fge3%2FA%3D%3D) that can contain tasks for office workers; +**Redis** is a [communication board with “cubby holes”](https://dev.gitlab.org/gitlab/gitlabhq/blob/master/doc/development/cubby_holes.jpg) that can contain tasks for office workers; **Sidekiq** is a worker that primarily handles sending out emails. It takes tasks from the Redis communication board; diff --git a/doc/development/cubby_holes.jpg b/doc/development/cubby_holes.jpg new file mode 100644 index 00000000000..afbb58bb950 Binary files /dev/null and b/doc/development/cubby_holes.jpg differ -- cgit v1.2.1 From 226819c8d171d3fd6f4c5d87649b460d84de6fa9 Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Wed, 26 Nov 2014 12:19:19 -0800 Subject: add details on protected branches Add some details from https://about.gitlab.com/2014/11/26/keeping-your-code-protected/: Who can: * Force push to non-protected branches * Force push to protected branches * Remove protected branches --- doc/permissions/permissions.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/permissions/permissions.md b/doc/permissions/permissions.md index d561868c8bb..e21384d21dc 100644 --- a/doc/permissions/permissions.md +++ b/doc/permissions/permissions.md @@ -19,6 +19,7 @@ If a user is a GitLab administrator they receive all permissions. | Create new merge request | | | ✓ | ✓ | ✓ | | Create new branches | | | ✓ | ✓ | ✓ | | Push to non-protected branches | | | ✓ | ✓ | ✓ | +| Force push to non-protected branches | | | ✓ | ✓ | ✓ | | Remove non-protected branches | | | ✓ | ✓ | ✓ | | Add tags | | | ✓ | ✓ | ✓ | | Write a wiki | | | ✓ | ✓ | ✓ | @@ -35,6 +36,8 @@ If a user is a GitLab administrator they receive all permissions. | Switch visibility level | | | | | ✓ | | Transfer project to another namespace | | | | | ✓ | | Remove project | | | | | ✓ | +| Force push to protected branches | | | | | | +| Remove protected branches | | | | | | ## Group -- cgit v1.2.1 From c85d4af88921aba31afd39c3403fe2d41381c2ca Mon Sep 17 00:00:00 2001 From: Marc Radulescu Date: Thu, 27 Nov 2014 10:24:19 +0100 Subject: remove unnecessarry image --- doc/development/architecture.md | 2 +- doc/development/cubby_holes.jpg | Bin 132815 -> 0 bytes 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 doc/development/cubby_holes.jpg (limited to 'doc') diff --git a/doc/development/architecture.md b/doc/development/architecture.md index 68c813d4339..209182e7742 100644 --- a/doc/development/architecture.md +++ b/doc/development/architecture.md @@ -23,7 +23,7 @@ Users come to NginX and request actions to be done by workers in the office; - The goods in the warehouse (metadata, issues, merge requests etc); - The users coming to the front desk (permissions) -**Redis** is a [communication board with “cubby holes”](https://dev.gitlab.org/gitlab/gitlabhq/blob/master/doc/development/cubby_holes.jpg) that can contain tasks for office workers; +**Redis** is a communication board with “cubby holes” that can contain tasks for office workers; **Sidekiq** is a worker that primarily handles sending out emails. It takes tasks from the Redis communication board; diff --git a/doc/development/cubby_holes.jpg b/doc/development/cubby_holes.jpg deleted file mode 100644 index afbb58bb950..00000000000 Binary files a/doc/development/cubby_holes.jpg and /dev/null differ -- cgit v1.2.1 From 824ad40699bf4ee22f0dbe53b5ae344c916c0d9f Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sat, 29 Nov 2014 12:01:32 +0200 Subject: Make clear that the upgrader script does not update gitlab-shell. --- doc/update/upgrader.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/update/upgrader.md b/doc/update/upgrader.md index 44e18a9ed42..0a9f242d9ab 100644 --- a/doc/update/upgrader.md +++ b/doc/update/upgrader.md @@ -10,6 +10,8 @@ If you have local changes to your GitLab repository the script will stash them a **GitLab Upgrader is available only for GitLab version 6.4.2 or higher.** +**This script does NOT update gitlab-shell, it needs manual update. See step 5 below.** + ## 0. Backup cd /home/git/gitlab -- cgit v1.2.1 From 64919745544cd09cdb510bf15e9522280d61fdde Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 1 Dec 2014 18:58:37 +0100 Subject: Disable Sidekiq arguments logging by default --- doc/development/README.md | 1 + doc/sidekiq_debugging.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 doc/sidekiq_debugging.md (limited to 'doc') diff --git a/doc/development/README.md b/doc/development/README.md index 20db6662aca..c31e5d7ae97 100644 --- a/doc/development/README.md +++ b/doc/development/README.md @@ -4,3 +4,4 @@ - [Shell commands](shell_commands.md) in the GitLab codebase - [Rake tasks](rake_tasks.md) for development - [CI setup](ci_setup.md) for testing GitLab +- [Sidekiq debugging](sidekiq_debugging.md) diff --git a/doc/sidekiq_debugging.md b/doc/sidekiq_debugging.md new file mode 100644 index 00000000000..cea11e5f126 --- /dev/null +++ b/doc/sidekiq_debugging.md @@ -0,0 +1,14 @@ +# Sidekiq debugging + +## Log arguments to Sidekiq jobs + +If you want to see what arguments are being passed to Sidekiq jobs you can set +the SIDEKIQ_LOG_ARGUMENTS environment variable. + +``` +SIDEKIQ_LOG_ARGUMENTS=1 bundle exec foreman start +``` + +It is not recommend to enable this setting in production because some Sidekiq +jobs (such as sending a password reset email) take secret arguments (for +example the password reset token). -- cgit v1.2.1 From bff0034584f47b64cad2813dc6db9bb571faecce Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Tue, 2 Dec 2014 14:39:58 +0100 Subject: Revert "Remove the lowest memory requirement of 512MB." This reverts commit 5cf6d5949d6c776e24d3bd5c0b417000f1efc57a. --- doc/install/requirements.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index fd59ac8a073..ed194253148 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -50,6 +50,11 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab ### Memory +- 512MB is the absolute minimum but we do not recommend this amount of memory. +You will either need to configure 512MB or 1.5GB of swap space. +With 512MB of swap space you must configure only one unicorn worker. +With one unicorn worker only git over ssh access will work because the git over HTTP access requires two running workers (one worker to receive the user request and one worker for the authorization check). +If you use SSD storage and configure 1.5GB of swap space you can use two Unicorn workers, this will allow HTTP access but it will still be slow. - 1GB RAM + 1GB swap supports up to 100 users - **2GB RAM** is the **recommended** memory size and supports up to 500 users - 4GB RAM supports up to 2,000 users @@ -85,7 +90,7 @@ On a very active server (10,000 active users) the Sidekiq process can use 1GB+ o ## Supported web browsers - Chrome (Latest stable version) -- Firefox (Latest released version and [latest ESR version](https://www.mozilla.org/en-US/firefox/organizations/)) +- Firefox (Latest released version and [latest ESR version](https://www.mozilla.org/en-US/firefox/organizations/)) - Safari 7+ (known problem: required fields in html5 do not work) - Opera (Latest released version) - IE 10+ -- cgit v1.2.1 From 79912d6870ec019fa0100c1ced1c5a2c1f9c3227 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Tue, 2 Dec 2014 14:46:16 +0100 Subject: System with 512MB of RAM can be used but swap size must be increased. --- doc/install/requirements.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index ed194253148..2b60c3560a5 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -51,10 +51,11 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab ### Memory - 512MB is the absolute minimum but we do not recommend this amount of memory. -You will either need to configure 512MB or 1.5GB of swap space. -With 512MB of swap space you must configure only one unicorn worker. +You will need to configure minimum 1.5GB of swap space. +With 1.5GB of swap space you must configure only one unicorn worker. With one unicorn worker only git over ssh access will work because the git over HTTP access requires two running workers (one worker to receive the user request and one worker for the authorization check). If you use SSD storage and configure 1.5GB of swap space you can use two Unicorn workers, this will allow HTTP access but it will still be slow. +Consider installing GitLab on Ubuntu as installation on CentOS could be unsuccessful with this amount of memory. - 1GB RAM + 1GB swap supports up to 100 users - **2GB RAM** is the **recommended** memory size and supports up to 500 users - 4GB RAM supports up to 2,000 users -- cgit v1.2.1 From 106de470c95267dbfef7078839477eb844a11689 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 3 Dec 2014 14:21:00 +0100 Subject: Use clickable checkboxes in issue template --- doc/release/monthly.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 64a8bc98344..4c1dd5af46b 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -20,36 +20,36 @@ Replace the dates with actual dates based on the number of workdays before the r ``` Xth: -* Update the changelog (#LINK) -* Triage the omnibus-gitlab milestone +- [ ] Update the changelog (#LINK) +- [ ] Triage the omnibus-gitlab milestone Xth: -* Merge CE in to EE (#LINK) -* Close the omnibus-gitlab milestone +- [ ] Merge CE in to EE (#LINK) +- [ ] Close the omnibus-gitlab milestone Xth: -* Create x.x.0.rc1 (#LINK) -* Build package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) +- [ ] Create x.x.0.rc1 (#LINK) +- [ ] Build package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) Xth: -* Update GitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package) -* Regression issue and tweet about rc1 (#LINK) -* Start blog post (#LINK) +- [ ] Update GitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package) +- [ ] Regression issue and tweet about rc1 (#LINK) +- [ ] Start blog post (#LINK) Xth: -* Do QA and fix anything coming out of it (#LINK) +- [ ] Do QA and fix anything coming out of it (#LINK) 22nd: -* Release CE and EE (#LINK) +- [ ] Release CE and EE (#LINK) Xth: -* * Deploy to GitLab.com (#LINK) +- [ ] Deploy to GitLab.com (#LINK) ``` -- cgit v1.2.1 From 4ce27042f9db09f80cca071a5d0571e7205441f3 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 3 Dec 2014 14:41:39 +0100 Subject: The second gitlab.com deploy should be easy --- doc/release/monthly.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 4c1dd5af46b..383064b5e6b 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -288,7 +288,7 @@ Proposed tweet for CE "GitLab X.X is released! It brings *** " # **1 workday after release - Update GitLab.com** - Build a package for gitlab.com based on the official release instead of RC1 -- Deploy the package +- Deploy the package (should not need downtime because of the small difference with RC1) # **25th - Release GitLab CI** -- cgit v1.2.1 From a8ce1d88b5f9d85dc78267363bbe5de7f81b1807 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 3 Dec 2014 15:40:12 +0100 Subject: Release CI at the same time as CE and EE --- doc/release/monthly.md | 50 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 16 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 383064b5e6b..9b05fea8c8a 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -20,7 +20,9 @@ Replace the dates with actual dates based on the number of workdays before the r ``` Xth: -- [ ] Update the changelog (#LINK) +- [ ] Update the CE changelog (#LINK) +- [ ] Update the EE changelog (#LINK) +- [ ] Update the CI changelog (#LINK) - [ ] Triage the omnibus-gitlab milestone Xth: @@ -31,12 +33,14 @@ Xth: Xth: - [ ] Create x.x.0.rc1 (#LINK) +- [ ] Create x.x.0-ee.rc1 (#LINK) +- [ ] Create CI y.y.0.rc1 (#LINK) - [ ] Build package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) Xth: - [ ] Update GitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package) -- [ ] Regression issue and tweet about rc1 (#LINK) +- [ ] Regression issues (CE, CI) and tweet about rc1 (#LINK) - [ ] Start blog post (#LINK) Xth: @@ -45,7 +49,7 @@ Xth: 22nd: -- [ ] Release CE and EE (#LINK) +- [ ] Release CE, EE and CI (#LINK) Xth: @@ -57,6 +61,8 @@ Xth: Any changes not yet added to the changelog are added by lead developer and in that merge request the complete team is asked if there is anything missing. +There are three changelogs that need to be updated: CE, EE and CI. + ### **5. Take weekend and vacations into account** Ensure that there is enough time to incorporate the findings of the release candidate, etc. @@ -81,6 +87,7 @@ The RC1 release comes with the task to update the installation and upgrade docs. 1. Create: CE update guide from previous version. Like `7.3-to-7.4.md` 1. Create: CE to EE update guide in EE repository for latest version. 1. Update: `6.x-or-7.x-to-7.x.md` to latest version. +1. Create: CI update guide from previous version It's best to copy paste the previous guide and make changes where necessary. The typical steps are listed below with any points you should specifically look at. @@ -173,6 +180,24 @@ Now developers can use master for merging new features. So you should use stable branch for future code chages related to release. +### 5. Release GitLab CI RC1 + +Add to your local `gitlab-ci/.git/config`: + +``` +[remote "public"] + url = none + pushurl = git@dev.gitlab.org:gitlab/gitlab-ci.git + pushurl = git@gitlab.com:gitlab-org/gitlab-ci.git + pushurl = git@github.com:gitlabhq/gitlab-ci.git +``` + +* Create a stable branch `x-y-stable` +* Bump VERSION to `x.y.0.rc1` +* `git tag -a v$(cat VERSION) -m "Version $(cat VERSION)" +* `git push public x-y-stable v$(cat VERSION)` + + # **4 workdays before release - Release RC1** ### **1. Determine QA person @@ -191,6 +216,7 @@ It is important to do this as soon as possible, so we can catch any errors befor - Start with a complete copy of the [release blog template](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/release_blog_template.md) and fill it out. - Check the changelog of CE and EE for important changes. +- Also check the CI changelog - Create a WIP MR for the blog post - Ask Dmitriy to add screenshots to the WIP MR. - Decide with team who will be the MVP user. @@ -258,6 +284,11 @@ Bump version, create release tag and push to remotes: bundle exec rake release["x.x.0"] ``` +Also perform these steps for GitLab CI: + +- bump version in the stable branch +- create annotated tag +- push the stable branch and the annotated tag to the public repositories ### **2. Update installation.md** @@ -289,16 +320,3 @@ Proposed tweet for CE "GitLab X.X is released! It brings *** " - Build a package for gitlab.com based on the official release instead of RC1 - Deploy the package (should not need downtime because of the small difference with RC1) - -# **25th - Release GitLab CI** - -- Create the update guid `doc/x.x-to-x.x.md`. -- Update CHANGELOG -- Bump version -- Create annotated tags `git tag -a vx.x.0 -m 'Version x.x.0' xxxxx` -- Create stable branch `x-x-stable` -- Create GitHub release post -- Post to blog about release -- Post to twitter - - -- cgit v1.2.1 From cdabe7302571a21fd377505f144c053b59adb738 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 3 Dec 2014 16:30:57 +0100 Subject: Fix EE RC1 tag name --- doc/release/monthly.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 9b05fea8c8a..a95ba2e107b 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -33,7 +33,7 @@ Xth: Xth: - [ ] Create x.x.0.rc1 (#LINK) -- [ ] Create x.x.0-ee.rc1 (#LINK) +- [ ] Create x.x.0.rc1-ee (#LINK) - [ ] Create CI y.y.0.rc1 (#LINK) - [ ] Build package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) -- cgit v1.2.1 From 1aca3718807019315fa2e31c1da58183a9e25f5e Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 3 Dec 2014 16:50:03 +0100 Subject: Add changes suggested by Sytse --- doc/release/monthly.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index a95ba2e107b..0700f24ab76 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -217,6 +217,7 @@ It is important to do this as soon as possible, so we can catch any errors befor - Start with a complete copy of the [release blog template](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/release_blog_template.md) and fill it out. - Check the changelog of CE and EE for important changes. - Also check the CI changelog +- Add a proposed tweet text to the blog post WIP MR description. - Create a WIP MR for the blog post - Ask Dmitriy to add screenshots to the WIP MR. - Decide with team who will be the MVP user. @@ -264,7 +265,7 @@ Create an issue with description of a problem, if it is quick fix fix it yoursel **NOTE** If there is a problem that cannot be fixed in a timely manner, reverting the feature is an option! If the feature is reverted, create an issue about it in order to discuss the next steps after the release. -# **22nd - Release CE and EE** +# **22nd - Release CE, EE and CI** **Make sure EE `x-x-stable-ee` has latest changes from CE `x-x-stable`** -- cgit v1.2.1 From 372cb87f05e73dadb1304a9b8412e32624258e5b Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Thu, 4 Dec 2014 09:47:27 +0100 Subject: Reword the 512 memmory advise. --- doc/install/requirements.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index 2b60c3560a5..660c1adb802 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -50,12 +50,12 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab ### Memory -- 512MB is the absolute minimum but we do not recommend this amount of memory. -You will need to configure minimum 1.5GB of swap space. -With 1.5GB of swap space you must configure only one unicorn worker. -With one unicorn worker only git over ssh access will work because the git over HTTP access requires two running workers (one worker to receive the user request and one worker for the authorization check). -If you use SSD storage and configure 1.5GB of swap space you can use two Unicorn workers, this will allow HTTP access but it will still be slow. -Consider installing GitLab on Ubuntu as installation on CentOS could be unsuccessful with this amount of memory. +- 512MB is the absolute minimum but we strongly **advise against** this amount of memory. +You will need to configure a minimum of 1.5GB of swap space to make the Omnibus package reconfigure run succeed. +If you use a magnetic (non-SSD) swap drive we recommend to configure only one Unicorn worker. +With one Unicorn worker only git over ssh access will work because the git over HTTP access requires two running workers (one worker to receive the user request and one worker for the authorization check). +If you use a SSD drive you can use two Unicorn workers, this will allow HTTP access although it will be slow. +Consider installing GitLab on Ubuntu instead of CentOS because sometimes CentOS gives errors during installation and usage with this amount of memory. - 1GB RAM + 1GB swap supports up to 100 users - **2GB RAM** is the **recommended** memory size and supports up to 500 users - 4GB RAM supports up to 2,000 users -- cgit v1.2.1 From cdc62cffcb86dfd939c119cba2acaf266af39f23 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Thu, 4 Dec 2014 15:22:10 +0100 Subject: Add rake task for google schema whitelisting. --- doc/integration/gitlab_buttons_in_gmail.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc') diff --git a/doc/integration/gitlab_buttons_in_gmail.md b/doc/integration/gitlab_buttons_in_gmail.md index 5cfea5a90f8..0816509c557 100644 --- a/doc/integration/gitlab_buttons_in_gmail.md +++ b/doc/integration/gitlab_buttons_in_gmail.md @@ -9,3 +9,20 @@ If correctly setup, emails that require an action will be marked in Gmail. To get this functioning, you need to be registered with Google. [See how to register with google in this document.](https://developers.google.com/gmail/markup/registering-with-google) +To aid the registering with google, GitLab offers a rake task that will send an email to google whitelisting email address from your GitLab server. + +To check what would be sent to the google email address, run the rake task: + +```bash +bundle exec rake gitlab:mail_google_schema_whitelisting RAILS_ENV=production +``` + +**This will not send the email but give you the output of how the mail will look.** + +Copy the output of the rake task to [google email markup tester](https://www.google.com/webmasters/markup-tester/u/0/) and press "Validate". + +If you receive "No errors detected" message from the tester you can send the email using: + +```bash +bundle exec rake gitlab:mail_google_schema_whitelisting RAILS_ENV=production SEND=true +`` -- cgit v1.2.1 From 704b7237e6c4daa3642c01f8803072fdc3a45eaf Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Thu, 4 Dec 2014 16:54:08 +0100 Subject: Fix notifications for developers that don't read the documentation. --- doc/development/rake_tasks.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/development/rake_tasks.md b/doc/development/rake_tasks.md index 6d9ac161e91..ffa61e66134 100644 --- a/doc/development/rake_tasks.md +++ b/doc/development/rake_tasks.md @@ -1,6 +1,6 @@ # Rake tasks for developers -## Setup db with developer seeds: +## Setup db with developer seeds Note that if your db user does not have advanced privileges you must create the db manually before running this command. @@ -8,6 +8,9 @@ Note that if your db user does not have advanced privileges you must create the bundle exec rake setup ``` +The `setup` task is a alias for `gitlab:setup`. +This tasks calls `db:setup` to create the database, with `add_limits_mysql` it adds limits to the database schema in case of a MySQL database and fianlly it runs `db:seed_fu` to seed the database. + ## Run tests This runs all test suites present in GitLab. -- cgit v1.2.1 From 3dc25ba331c4f5c4708b0fcd8478d943d182d760 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Thu, 4 Dec 2014 21:22:21 +0100 Subject: Remove warning from db seed since it is called by db setup. --- doc/development/rake_tasks.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/development/rake_tasks.md b/doc/development/rake_tasks.md index ffa61e66134..53f8095cb13 100644 --- a/doc/development/rake_tasks.md +++ b/doc/development/rake_tasks.md @@ -9,7 +9,8 @@ bundle exec rake setup ``` The `setup` task is a alias for `gitlab:setup`. -This tasks calls `db:setup` to create the database, with `add_limits_mysql` it adds limits to the database schema in case of a MySQL database and fianlly it runs `db:seed_fu` to seed the database. +This tasks calls `db:setup` to create the database, calls `add_limits_mysql` that adds limits to the database schema in case of a MySQL database and fianlly it calls `db:seed_fu` to seed the database. +Note: `db:setup` calls `db:seed` but this does nothing. ## Run tests -- cgit v1.2.1 From 90a308ea00ece729b15b430a397d22e3b3fe3102 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Fri, 5 Dec 2014 12:34:18 +0100 Subject: Update release docs to deploy to GitLab.com before publishing. --- doc/release/patch.md | 3 ++- doc/release/security.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/release/patch.md b/doc/release/patch.md index ce5c2170302..2bd34b7d822 100644 --- a/doc/release/patch.md +++ b/doc/release/patch.md @@ -18,13 +18,14 @@ Otherwise include it in the monthly release and note there was a regression fix 1. Name the issue "Release X.X.X CE and X.X.X EE", this will make searching easier 1. Fix the issue on a feature branch, do this on the private GitLab development server 1. If it is a security issue, then assign it to the release manager and apply a 'security' label +1. Build the package for GitLab.com and do a deploy 1. Consider creating and testing workarounds 1. After the branch is merged into master, cherry pick the commit(s) into the current stable branch 1. Make sure that the build has passed and all tests are passing 1. In a separate commit in the stable branch update the CHANGELOG 1. For EE, update the CHANGELOG-EE if it is EE specific fix. Otherwise, merge the stable CE branch and add to CHANGELOG-EE "Merge community edition changes for version X.X.X" -### Bump version +### Bump version Get release tools diff --git a/doc/release/security.md b/doc/release/security.md index c24a394ef4a..b67e0f37a04 100644 --- a/doc/release/security.md +++ b/doc/release/security.md @@ -17,6 +17,7 @@ Please report suspected security vulnerabilities in private to Date: Fri, 5 Dec 2014 15:29:45 +0100 Subject: Add snapshot backup tips --- doc/raketasks/backup_restore.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'doc') diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index 68e8a14f52f..79580029f80 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -208,3 +208,26 @@ Add the following lines at the bottom: The `CRON=1` environment setting tells the backup script to suppress all progress output if there are no errors. This is recommended to reduce cron spam. + +## Alternative backup strategies + +If your GitLab server contains a lot of Git repository data you may find the GitLab backup script to be too slow. +In this case you can consider using filesystem snapshots as part of your backup strategy. + +Example: Amazone EBS + +> A GitLab server using omnibus-gitlab hosted on Amazon AWS. +> An EBS drive containing an ext4 filesystem is mounted at `/var/opt/gitlab`. +> In this case you could make an application backup by taking an EBS snapshot. +> The backup includes all repositories, uploads and Postgres data. + +Example: LVM snapshots + Rsync + +> A GitLab server using omnibus-gitlab, with an LVM logical volume mounted at `/var/opt/gitlab`. +> Replicating the `/var/opt/gitlab` directory usign Rsync would not be reliable because too many files would change while Rsync is running. +> Instead of rsync-ing `/var/opt/gitlab`, we create a temporary LVM snapshot, which we mount as a read-only filesystem at `/mnt/gitlab_backup`. +> Now we can have a longer running Rsync job which will create a consistent replica on the remote server. +> The replica includes all repositories, uploads and Postgres data. + +If you are running GitLab on a virtualized server you can possibly also create VM snapshots of the entire GitLab server. +It is not uncommon however for a VM snapshot to require you to power down the server, so this approach is probably of limited practical use. -- cgit v1.2.1 From 369375d0862f16f7a9926374226b1bad028f530c Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Sun, 7 Dec 2014 01:24:03 +0100 Subject: Move sidekiq debug docs to development folder --- doc/development/sidekiq_debugging.md | 14 ++++++++++++++ doc/sidekiq_debugging.md | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 doc/development/sidekiq_debugging.md delete mode 100644 doc/sidekiq_debugging.md (limited to 'doc') diff --git a/doc/development/sidekiq_debugging.md b/doc/development/sidekiq_debugging.md new file mode 100644 index 00000000000..cea11e5f126 --- /dev/null +++ b/doc/development/sidekiq_debugging.md @@ -0,0 +1,14 @@ +# Sidekiq debugging + +## Log arguments to Sidekiq jobs + +If you want to see what arguments are being passed to Sidekiq jobs you can set +the SIDEKIQ_LOG_ARGUMENTS environment variable. + +``` +SIDEKIQ_LOG_ARGUMENTS=1 bundle exec foreman start +``` + +It is not recommend to enable this setting in production because some Sidekiq +jobs (such as sending a password reset email) take secret arguments (for +example the password reset token). diff --git a/doc/sidekiq_debugging.md b/doc/sidekiq_debugging.md deleted file mode 100644 index cea11e5f126..00000000000 --- a/doc/sidekiq_debugging.md +++ /dev/null @@ -1,14 +0,0 @@ -# Sidekiq debugging - -## Log arguments to Sidekiq jobs - -If you want to see what arguments are being passed to Sidekiq jobs you can set -the SIDEKIQ_LOG_ARGUMENTS environment variable. - -``` -SIDEKIQ_LOG_ARGUMENTS=1 bundle exec foreman start -``` - -It is not recommend to enable this setting in production because some Sidekiq -jobs (such as sending a password reset email) take secret arguments (for -example the password reset token). -- cgit v1.2.1 From b7d4184f24000fcdee7ca48fd802e35ac03abb67 Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Mon, 8 Dec 2014 13:51:27 +0100 Subject: advise about unicorn workers --- doc/install/requirements.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index 660c1adb802..af7ac6146ad 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -88,10 +88,18 @@ Sidekiq processes the background jobs with a multithreaded process. This process starts with the entire Rails stack (200MB+) but it can grow over time due to memory leaks. On a very active server (10,000 active users) the Sidekiq process can use 1GB+ of memory. +## Unicorn Workers + +It's possible to increase the amount of unicorn workers. +This will usually help for short waits on databases and caches. + +We recommend using CPU cores + 1 unicorn workers. +For a machine with 2 cores, 3 unicorn workers is ideal. + ## Supported web browsers - Chrome (Latest stable version) -- Firefox (Latest released version and [latest ESR version](https://www.mozilla.org/en-US/firefox/organizations/)) +- Firefox (Latest released version and [latest ESR version](https://www.mozilla.org/en-US/firefox/organizations/)) - Safari 7+ (known problem: required fields in html5 do not work) - Opera (Latest released version) - IE 10+ -- cgit v1.2.1 From f811b695f8c9d7019b5e9f33aae962163e8c0020 Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Mon, 8 Dec 2014 14:21:17 +0100 Subject: memory constrained unicorn workers --- doc/install/requirements.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index af7ac6146ad..28e1fa34d23 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -93,9 +93,11 @@ On a very active server (10,000 active users) the Sidekiq process can use 1GB+ o It's possible to increase the amount of unicorn workers. This will usually help for short waits on databases and caches. -We recommend using CPU cores + 1 unicorn workers. +For most instances we recommend using CPU cores + 1 unicorn workers. For a machine with 2 cores, 3 unicorn workers is ideal. +For memory constrained instances, we recommend using a single unicorn worker. + ## Supported web browsers - Chrome (Latest stable version) -- cgit v1.2.1 From bfe99a1eee8a11900a4f807df265b3e90099ecaa Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Mon, 8 Dec 2014 14:41:45 +0100 Subject: Consolidate unicorn worker advise. --- doc/install/requirements.md | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index 28e1fa34d23..8eabb219b1b 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -38,6 +38,16 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab ## Hardware requirements +### Storage + +The necessary hard drive space largely depends on the size of the repos you want to store in GitLab but as a *rule of thumb* you should have at least twice as much free space as all your repos combined take up. You need twice the storage because [GitLab satellites](structure.md) contain an extra copy of each repo. + +If you want to be flexible about growing your hard drive space in the future consider mounting it using LVM so you can add more hard drives when you need them. + +Apart from a local hard drive you can also mount a volume that supports the network file system (NFS) protocol. This volume might be located on a file server, a network attached storage (NAS) device, a storage area network (SAN) or on an Amazon Web Services (AWS) Elastic Block Store (EBS) volume. + +If you have enough RAM memory and a recent CPU the speed of GitLab is mainly limited by hard drive seek times. Having a fast drive (7200 RPM and up) or a solid state drive (SSD) will improve the responsiveness of GitLab. + ### CPU - 1 core works supports up to 100 users but the application can be a bit slower due to having all workers and background jobs running on the same core @@ -50,12 +60,10 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab ### Memory -- 512MB is the absolute minimum but we strongly **advise against** this amount of memory. -You will need to configure a minimum of 1.5GB of swap space to make the Omnibus package reconfigure run succeed. -If you use a magnetic (non-SSD) swap drive we recommend to configure only one Unicorn worker. -With one Unicorn worker only git over ssh access will work because the git over HTTP access requires two running workers (one worker to receive the user request and one worker for the authorization check). -If you use a SSD drive you can use two Unicorn workers, this will allow HTTP access although it will be slow. -Consider installing GitLab on Ubuntu instead of CentOS because sometimes CentOS gives errors during installation and usage with this amount of memory. +You need at least 2GB of addressable memory (RAM + swap) to install and use GitLab! +With less memory GitLab will give strange errors during the reconfigure run and 500 errors during usage. + +- 512MB RAM + 1.5GB of swap is the absolute minimum but we strongly **advise against** this amount of memory. See the unicorn worker section below for more advise. - 1GB RAM + 1GB swap supports up to 100 users - **2GB RAM** is the **recommended** memory size and supports up to 500 users - 4GB RAM supports up to 2,000 users @@ -66,15 +74,16 @@ Consider installing GitLab on Ubuntu instead of CentOS because sometimes CentOS Notice: The 25 workers of Sidekiq will show up as separate processes in your process overview (such as top or htop) but they share the same RAM allocation since Sidekiq is a multithreaded application. -### Storage - -The necessary hard drive space largely depends on the size of the repos you want to store in GitLab but as a *rule of thumb* you should have at least twice as much free space as all your repos combined take up. You need twice the storage because [GitLab satellites](structure.md) contain an extra copy of each repo. - -If you want to be flexible about growing your hard drive space in the future consider mounting it using LVM so you can add more hard drives when you need them. +## Unicorn Workers -Apart from a local hard drive you can also mount a volume that supports the network file system (NFS) protocol. This volume might be located on a file server, a network attached storage (NAS) device, a storage area network (SAN) or on an Amazon Web Services (AWS) Elastic Block Store (EBS) volume. +It's possible to increase the amount of unicorn workers and tis will usually help for to reduce the response time of the applications. +For most instances we recommend using: CPU cores + 1 = unicorn workers. +So for a machine with 2 cores, 3 unicorn workers is ideal. -If you have enough RAM memory and a recent CPU the speed of GitLab is mainly limited by hard drive seek times. Having a fast drive (7200 RPM and up) or a solid state drive (SSD) will improve the responsiveness of GitLab. +For all machines that have 1GB and up we recommend a minimum of two unicorn workers. +If you have a 512MB machine with a magnetic (non-SSD) swap drive we recommend to configure only one Unicorn worker to prevent excessive swapping. +With one Unicorn worker only git over ssh access will work because the git over HTTP access requires two running workers (one worker to receive the user request and one worker for the authorization check). +If you have a 512MB machine with a SSD drive you can use two Unicorn workers, this will allow HTTP access although it will be slow due to swapping. ## Database @@ -88,16 +97,6 @@ Sidekiq processes the background jobs with a multithreaded process. This process starts with the entire Rails stack (200MB+) but it can grow over time due to memory leaks. On a very active server (10,000 active users) the Sidekiq process can use 1GB+ of memory. -## Unicorn Workers - -It's possible to increase the amount of unicorn workers. -This will usually help for short waits on databases and caches. - -For most instances we recommend using CPU cores + 1 unicorn workers. -For a machine with 2 cores, 3 unicorn workers is ideal. - -For memory constrained instances, we recommend using a single unicorn worker. - ## Supported web browsers - Chrome (Latest stable version) -- cgit v1.2.1 From 8b6a2829ce400dda594500d2a8822dfdb11d8781 Mon Sep 17 00:00:00 2001 From: Scott Stamp Date: Mon, 8 Dec 2014 23:04:34 +0000 Subject: Example callback URL was incorrect (referencing /users/auth/github/callback, not /users/auth/twitter/callback) --- doc/integration/twitter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/integration/twitter.md b/doc/integration/twitter.md index d1b52927d30..b9e501c5ec1 100644 --- a/doc/integration/twitter.md +++ b/doc/integration/twitter.md @@ -13,7 +13,7 @@ To enable the Twitter OmniAuth provider you must register your application with something else descriptive. - Description: Create a description. - Website: The URL to your GitLab installation. 'https://gitlab.example.com' - - Callback URL: 'https://gitlab.example.com/users/auth/github/callback' + - Callback URL: 'https://gitlab.example.com/users/auth/twitter/callback' - Agree to the "Rules of the Road." ![Twitter App Details](twitter_app_details.png) -- cgit v1.2.1 From 82eb0a44d7afa3b6ab77b8f7c9386740496a72e1 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 9 Dec 2014 14:51:15 +0100 Subject: Add security tips about file and paths --- doc/development/shell_commands.md | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'doc') diff --git a/doc/development/shell_commands.md b/doc/development/shell_commands.md index 23c8365c340..1e51ad73e32 100644 --- a/doc/development/shell_commands.md +++ b/doc/development/shell_commands.md @@ -1,5 +1,8 @@ # Guidelines for shell commands in the GitLab codebase +This document contains guidelines for working with processes and files in the GitLab codebase. +These guidelines are meant to make your code more reliable _and_ secure. + ## References - [Google Ruby Security Reviewer's Guide](https://code.google.com/p/ruby-security/wiki/Guide) @@ -109,3 +112,63 @@ logs = IO.popen(%W(git log), chdir: repo_dir).read ``` Note that unlike `Gitlab::Popen.popen`, `IO.popen` does not capture standard error. + +## Avoid user input at the start of path strings + +Various methods for opening and reading files in Ruby can be used to read the +standard output of a process instead of a file. The following two commands do +roughly the same: + +``` +`touch /tmp/pawned-by-backticks` +File.read('|touch /tmp/pawned-by-file-read') +``` + +The key is to open a 'file' whose name starts with a `|`. +Affected methods include Kernel#open, File::read, File::open, IO::open and IO::read. + +You can protect against this behavior of 'open' and 'read' by ensuring that an +attacker cannot control the start of the filename string you are opening. For +instance, the following is sufficient to protect against accidentally starting +a shell command with `|`: + +``` +# we assume repo_path is not controlled by the attacker (user) +path = File.join(repo_path, user_input) +# path cannot start with '|' now. +File.read(path) +``` + +## Guard against path traversal + +Path traversal is a security where the program (GitLab) tries to restrict user +access to a certain directory on disk, but the user manages to open a file +outside that directory by taking advantage of the `../` path notation. + +``` +# Suppose the user gave us a path and they are trying to trick us +user_input = '../other-repo.git/other-file' + +# We look up the repo path somewhere +repo_path = 'repositories/user-repo.git' + +# The intention of the code below is to open a file under repo_path, but +# because the user used '..' she can 'break out' into +# 'repositories/other-repo.git' +full_path = File.join(repo_path, user_input) +File.open(full_path) do # Oops! +``` + +A good way to protect against this is to compare the full path with its +'absolute path' according to Ruby's `File.absolute_path`. + +``` +full_path = File.join(repo_path, user_input) +if full_path != File.absolute_path(full_path) + raise "Invalid path: #{full_path.inspect}" +end + +File.open(full_path) do # Etc. +``` + +A check like this could have avoided CVE-2013-4583. -- cgit v1.2.1 From d11e048d7fea208a89dab80712925eaf34f69627 Mon Sep 17 00:00:00 2001 From: Ryunosuke SATO Date: Sun, 14 Dec 2014 23:47:13 +0900 Subject: Add missing webhook doc for tag event --- doc/web_hooks/web_hooks.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'doc') diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md index f19517c0f18..e17d21b990d 100644 --- a/doc/web_hooks/web_hooks.md +++ b/doc/web_hooks/web_hooks.md @@ -54,6 +54,29 @@ Triggered when you push to the repository except when pushing tags. } ``` +## Tag events + +Triggered when you create (or delete) tags to the repository. + +**Request body:** + +```json +{ + "ref": "refs/tags/v1.0.0", + "before": "0000000000000000000000000000000000000000", + "after": "82b3d5ae55f7080f1e6022629cdb57bfae7cccc7", + "user_id": 1, + "user_name": "John Smith", + "project_id": 1, + "repository": { + "name": "jsmith", + "url": "ssh://git@example.com/jsmith/example.git", + "description": "", + "homepage": "http://example.com/jsmith/example" + } +} +``` + ## Issues events Triggered when a new issue is created or an existing issue was updated/closed/reopened. -- cgit v1.2.1 From 83de96ae3a5acbbaf8b94a04b6c160e6819d91a2 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Mon, 15 Dec 2014 14:01:55 +0200 Subject: add kerberos dependency --- doc/install/installation.md | 2 +- doc/update/7.5-to-7.6.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index 263259bc2f9..f55a0e73199 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -54,7 +54,7 @@ up-to-date and install it. Install the required packages (needed to compile Ruby and native extensions to Ruby gems): - sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate python-docutils pkg-config cmake + sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate python-docutils pkg-config cmake libkrb5-dev Make sure you have the right version of Git installed diff --git a/doc/update/7.5-to-7.6.md b/doc/update/7.5-to-7.6.md index deee73fe560..a5d76c341af 100644 --- a/doc/update/7.5-to-7.6.md +++ b/doc/update/7.5-to-7.6.md @@ -45,6 +45,8 @@ sudo -u git -H git checkout v2.2.0 ### 4. Install libs, migrations, etc. ```bash +sudo apt-get install libkrb5-dev + cd /home/git/gitlab # MySQL installations (note: the line below states '--without ... postgres') -- cgit v1.2.1 From 71789468d306c7974fcf27442c83d7fc131e94fa Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 15 Dec 2014 13:43:36 +0100 Subject: Add documentation for the Sidekiq MemoryKiller --- doc/operations/README.md | 3 +++ doc/operations/sidekiq_memory_killer.md | 38 +++++++++++++++++++++++++++++++++ doc/operations/sidekiq_restarter.md | 10 +++++++++ 3 files changed, 51 insertions(+) create mode 100644 doc/operations/README.md create mode 100644 doc/operations/sidekiq_memory_killer.md create mode 100644 doc/operations/sidekiq_restarter.md (limited to 'doc') diff --git a/doc/operations/README.md b/doc/operations/README.md new file mode 100644 index 00000000000..31b1b583b0c --- /dev/null +++ b/doc/operations/README.md @@ -0,0 +1,3 @@ +# GitLab operations + +- [Sidekiq MemoryKiller](sidekiq_memory_killer.md) diff --git a/doc/operations/sidekiq_memory_killer.md b/doc/operations/sidekiq_memory_killer.md new file mode 100644 index 00000000000..867b01b0d5a --- /dev/null +++ b/doc/operations/sidekiq_memory_killer.md @@ -0,0 +1,38 @@ +# Sidekiq MemoryKiller + +The GitLab Rails application code suffers from memory leaks. For web requests +this problem is made manageable using +[unicorn-worker-killer](https://github.com/kzk/unicorn-worker-killer) which +restarts Unicorn worker processes in between requests when needed. The Sidekiq +MemoryKiller applies the same approach to the Sidekiq processes used by GitLab +to process background jobs. + +Unlike unicorn-worker-killer, which is enabled by default for all GitLab +installations since GitLab 6.4, the Sidekiq MemoryKiller is enabled by default +_only_ for Omnibus packages. The reason for this is that the MemoryKiller +relies on Runit to restart Sidekiq after a memory-induced shutdown and GitLab +installations from source do not all use Runit or an equivalent. + +With the default settings, the MemoryKiller will cause a Sidekiq restart no +more often than once every 15 minutes, with the restart causing about one +minute of delay for incoming background jobs. + +## Configuring the MemoryKiller + +The MemoryKiller is controlled using environment variables. + +- `SIDEKIQ_MEMORY_KILLER_MAX_RSS`: if this variable is set, and its value is + greater than 0, then after each Sidekiq job, the MemoryKiller will check the + RSS of the Sidekiq process that executed the job. If the RSS of the Sidekiq + process (expressed in kilobytes) exceeds SIDEKIQ_MEMORY_KILLER_MAX_RSS, a + delayed shutdown is triggered. The default value for Omnibus packages is set + [in the omnibus-gitlab + repository](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/attributes/default.rb). +- `SIDEKIQ_MEMORY_KILLER_GRACE_TIME`: defaults 900 seconds (15 minutes). When + a shutdown is triggered, the Sidekiq process will keep working normally for + another 15 minutes. +- `SIDEKIQ_MEMORY_KILLER_SHUTDOWN_WAIT`: defaults to 30 seconds. When the grace + time has expired, the MemoryKiller tells Sidekiq to stop accepting new jobs. + Existing jobs get 30 seconds to finish. After that, the MemoryKiller tells + Sidekiq to shut down, and an external supervision mechanism (e.g. Runit) must + restart Sidekiq. diff --git a/doc/operations/sidekiq_restarter.md b/doc/operations/sidekiq_restarter.md new file mode 100644 index 00000000000..ab28c9def18 --- /dev/null +++ b/doc/operations/sidekiq_restarter.md @@ -0,0 +1,10 @@ +# Sidekiq MemoryKiller + +The GitLab Rails application code suffers from memory leaks. For web requests +this problem is made manageable using +[unicorn-worker-killer](https://github.com/kzk/unicorn-worker-killer) which +restarts Unicorn worker processes in between requests when needed. The Sidekiq +MemoryKiller applies the same approach to the Sidekiq processes used by GitLab +to process background jobs. + + -- cgit v1.2.1 From e61e7a17b433cfe88910d21d00be90d909ca83bc Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 15 Dec 2014 13:44:47 +0100 Subject: Remove unfinished file with the wrong name --- doc/operations/sidekiq_restarter.md | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 doc/operations/sidekiq_restarter.md (limited to 'doc') diff --git a/doc/operations/sidekiq_restarter.md b/doc/operations/sidekiq_restarter.md deleted file mode 100644 index ab28c9def18..00000000000 --- a/doc/operations/sidekiq_restarter.md +++ /dev/null @@ -1,10 +0,0 @@ -# Sidekiq MemoryKiller - -The GitLab Rails application code suffers from memory leaks. For web requests -this problem is made manageable using -[unicorn-worker-killer](https://github.com/kzk/unicorn-worker-killer) which -restarts Unicorn worker processes in between requests when needed. The Sidekiq -MemoryKiller applies the same approach to the Sidekiq processes used by GitLab -to process background jobs. - - -- cgit v1.2.1 From d117927131351e319db947e83ef4b9ec228d5030 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 15 Dec 2014 15:17:10 +0100 Subject: Add link to 'operations' README --- doc/README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index 896224fe930..3c8f8ad3d03 100644 --- a/doc/README.md +++ b/doc/README.md @@ -23,6 +23,7 @@ - [Welcome message](customization/welcome_message.md) Add a custom welcome message to the sign-in page. - [Issue closing](customization/issue_closing.md) Customize how to close an issue from commit messages. - [Libravatar](customization/libravatar.md) Use Libravatar for user avatars. +- [Operations](operations/README.md) Keeping GitLab up and running ## Contributor documentation -- cgit v1.2.1 From 98e64610b2b5ad8340d763d3fd370bc11d0ad700 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Wed, 17 Dec 2014 08:27:03 +0100 Subject: Move development information to the GitLab Development Kit. --- doc/install/installation.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index 263259bc2f9..c856bfc9693 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -383,15 +383,17 @@ NOTE: Supply `SANITIZE=true` environment variable to `gitlab:check` to omit proj ### Initial Login -Visit YOUR_SERVER in your web browser for your first GitLab login. The setup has created an admin account for you. You can use it to log in: +Visit YOUR_SERVER in your web browser for your first GitLab login. The setup has created a default admin account for you. You can use it to log in: root 5iveL!fe -**Important Note:** Please go over to your profile page and immediately change the password, so nobody can access your GitLab by using this login information later on. +**Important Note:** Please login to the server before exposing it to the public internet. On login you'll be prompted to change the password. **Enjoy!** +You can use `sudo service gitlab start` and `sudo service gitlab stop` to start and stop GitLab. + ## Advanced Setup Tips ### Using HTTPS -- cgit v1.2.1 From 918245094c05d2dfaf566a06e4e4b47cd1e15a27 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Wed, 17 Dec 2014 18:00:43 -0500 Subject: Added update guide for updating to 7.6 --- doc/install/installation.md | 6 +- doc/update/6.x-or-7.x-to-7.5.md | 287 ---------------------------------------- doc/update/6.x-or-7.x-to-7.6.md | 287 ++++++++++++++++++++++++++++++++++++++++ doc/update/7.5-to-7.6.md | 6 +- 4 files changed, 292 insertions(+), 294 deletions(-) delete mode 100644 doc/update/6.x-or-7.x-to-7.5.md create mode 100644 doc/update/6.x-or-7.x-to-7.6.md (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index 539e1c396e4..aa04116779e 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -181,9 +181,9 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da ### Clone the Source # Clone GitLab repository - sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-5-stable gitlab + sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-6-stable gitlab -**Note:** You can change `7-5-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! +**Note:** You can change `7-6-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! ### Configure It @@ -278,7 +278,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da GitLab Shell is an SSH access and repository management software developed specially for GitLab. # Run the installation task for gitlab-shell (replace `REDIS_URL` if needed): - sudo -u git -H bundle exec rake gitlab:shell:install[v2.2.0] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production + sudo -u git -H bundle exec rake gitlab:shell:install[v2.4.0] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production # By default, the gitlab-shell config is generated from your main GitLab config. # You can review (and modify) the gitlab-shell config as follows: diff --git a/doc/update/6.x-or-7.x-to-7.5.md b/doc/update/6.x-or-7.x-to-7.5.md deleted file mode 100644 index c9b95c62611..00000000000 --- a/doc/update/6.x-or-7.x-to-7.5.md +++ /dev/null @@ -1,287 +0,0 @@ -# From 6.x or 7.x to 7.5 - -This allows you to upgrade any version of GitLab from 6.0 and up (including 7.0 and up) to 7.5. - -## Global issue numbers - -As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects. - -## Editable labels - -In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it -possible to edit the label text and color. The characters `?`, `&` and `,` are -no longer allowed however so those will be removed from your tags during the -database migrations for GitLab 7.2. - -## 0. Stop server - - sudo service gitlab stop - -## 1. Backup - -It's useful to make a backup just in case things go south: -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) - -```bash -cd /home/git/gitlab -sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production -``` - -## 2. Update Ruby - -If you are still using Ruby 1.9.3 or below, you will need to update Ruby. -You can check which version you are running with `ruby -v`. - -If you are you running Ruby 2.0.x, you do not need to upgrade ruby, but can consider doing so for performance reasons. - -If you are running Ruby 2.1.1 consider upgrading to 2.1.5, because of the high memory usage of Ruby 2.1.1. - -Install, update dependencies: - -```bash -sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl -``` - -Download and compile Ruby: - -```bash -mkdir /tmp/ruby && cd /tmp/ruby -curl --progress http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz | tar xz -cd ruby-2.1.5 -./configure --disable-install-rdoc -make -sudo make install -``` - -Install Bundler: - -```bash -sudo gem install bundler --no-ri --no-rdoc -``` - -## 3. Get latest code - -```bash -cd /home/git/gitlab -sudo -u git -H git fetch --all -sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically -``` - -For GitLab Community Edition: - -```bash -sudo -u git -H git checkout 7-5-stable -``` - -OR - -For GitLab Enterprise Edition: - -```bash -sudo -u git -H git checkout 7-5-stable-ee -``` - -## 4. Install additional packages - -```bash -# Add support for lograte for better log file handling -sudo apt-get install logrotate - -# Install pkg-config and cmake, which is needed for the latest versions of rugged -sudo apt-get install pkg-config cmake -``` - -## 5. Configure Redis to use sockets - - # Configure redis to use sockets - sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig - # Disable Redis listening on TCP by setting 'port' to 0 - sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf - # Enable Redis socket for default Debian / Ubuntu path - echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf - # Be sure redis group can write to the socket, enable only if supported (>= redis 2.4.0). - sudo sed -i '/# unixsocketperm/ s/^# unixsocketperm.*/unixsocketperm 0775/' /etc/redis/redis.conf - # Activate the changes to redis.conf - sudo service redis-server restart - # Add git to the redis group - sudo usermod -aG redis git - - # Configure Redis connection settings - sudo -u git -H cp config/resque.yml.example config/resque.yml - # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration - sudo -u git -H editor config/resque.yml - - # Configure gitlab-shell to use Redis sockets - sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml - -## 6. Update gitlab-shell - -```bash -cd /home/git/gitlab-shell -sudo -u git -H git fetch -sudo -u git -H git checkout v2.2.0 -``` - -## 7. Install libs, migrations, etc. - -```bash -cd /home/git/gitlab - -# MySQL installations (note: the line below states '--without ... postgres') -sudo -u git -H bundle install --without development test postgres --deployment - -# PostgreSQL installations (note: the line below states '--without ... mysql') -sudo -u git -H bundle install --without development test mysql --deployment - -# Run database migrations -sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production - -# Enable internal issue IDs (introduced in GitLab 6.1) -sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production - -# Clean up assets and cache -sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production - -# Close access to gitlab-satellites for others -sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites - -# Update init.d script -sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab -``` - -## 8. Update config files - -TIP: to see what changed in `gitlab.yml.example` in this release use next command: - -``` -git diff 6-0-stable:config/gitlab.yml.example 7-5-stable:config/gitlab.yml.example -``` - -* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-5-stable/config/gitlab.yml.example but with your settings. -* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-5-stable/config/unicorn.rb.example but with your settings. -* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.2.0/config.yml.example but with your settings. -* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-5-stable/lib/support/nginx/gitlab but with your settings. -* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-5-stable/lib/support/nginx/gitlab-ssl but with your settings. -* Copy rack attack middleware config - -```bash -sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb -``` - -* Set up logrotate - -```bash -sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab -``` - -## 9. Start application - - sudo service gitlab start - sudo service nginx restart - -## 10. Check application status - -Check if GitLab and its environment are configured correctly: - - cd /home/git/gitlab - sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production - -To make sure you didn't miss anything run a more thorough check with: - - sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production - -If all items are green, then congratulations upgrade complete! - -## 11. Update OmniAuth configuration - -When using Google omniauth login, changes of the Google account required. -Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/). -More details can be found at the [integration documentation](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/google.md). - -## 12. Optional optimizations for GitLab setups with MySQL databases - -Only applies if running MySQL database created with GitLab 6.7 or earlier. If you are not experiencing any issues you may not need the following instructions however following them will bring your database in line with the latest recommended installation configuration and help avoid future issues. Be sure to follow these directions exactly. These directions should be safe for any MySQL instance but to be sure make a current MySQL database backup beforehand. - -``` -# Stop GitLab -sudo service gitlab stop - -# Secure your MySQL installation (added in GitLab 6.2) -sudo mysql_secure_installation - -# Login to MySQL -mysql -u root -p - -# do not type the 'mysql>', this is part of the prompt - -# Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) -SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; - -# If previous query returned results, copy & run all outputed SQL statements - -# Convert all tables to correct character set -SET foreign_key_checks = 0; -SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; - -# If previous query returned results, copy & run all outputed SQL statements - -# turn foreign key checks back on -SET foreign_key_checks = 1; - -# Find MySQL users -mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%'; - -# If git user exists and gitlab user does not exist -# you are done with the database cleanup tasks -mysql> \q - -# If both users exist skip to Delete gitlab user - -# Create new user for GitLab (changed in GitLab 6.4) -# change $password in the command below to a real password you pick -mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password'; - -# Grant the git user necessary permissions on the database -mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost'; - -# Delete the old gitlab user -mysql> DELETE FROM mysql.user WHERE user='gitlab'; - -# Quit the database session -mysql> \q - -# Try connecting to the new database with the new user -sudo -u git -H mysql -u git -p -D gitlabhq_production - -# Type the password you replaced $password with earlier - -# You should now see a 'mysql>' prompt - -# Quit the database session -mysql> \q - -# Update database configuration details -# See config/database.yml.mysql for latest recommended configuration details -# Remove the reaping_frequency setting line if it exists (removed in GitLab 6.8) -# Set production -> pool: 10 (updated in GitLab 5.3) -# Set production -> username: git -# Set production -> password: the password your replaced $password with earlier -sudo -u git -H editor /home/git/gitlab/config/database.yml -``` - -## Things went south? Revert to previous version (6.0) - -### 1. Revert the code to the previous version - -Follow the [upgrade guide from 5.4 to 6.0](5.4-to-6.0.md), except for the database migration (the backup is already migrated to the previous version). - -### 2. Restore from the backup: - -```bash -cd /home/git/gitlab -sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production -``` - -## Login issues after upgrade? - -If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page) diff --git a/doc/update/6.x-or-7.x-to-7.6.md b/doc/update/6.x-or-7.x-to-7.6.md new file mode 100644 index 00000000000..80a7b082261 --- /dev/null +++ b/doc/update/6.x-or-7.x-to-7.6.md @@ -0,0 +1,287 @@ +# From 6.x or 7.x to 7.5 + +This allows you to upgrade any version of GitLab from 6.0 and up (including 7.0 and up) to 7.5. + +## Global issue numbers + +As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects. + +## Editable labels + +In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it +possible to edit the label text and color. The characters `?`, `&` and `,` are +no longer allowed however so those will be removed from your tags during the +database migrations for GitLab 7.2. + +## 0. Stop server + + sudo service gitlab stop + +## 1. Backup + +It's useful to make a backup just in case things go south: +(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production +``` + +## 2. Update Ruby + +If you are still using Ruby 1.9.3 or below, you will need to update Ruby. +You can check which version you are running with `ruby -v`. + +If you are you running Ruby 2.0.x, you do not need to upgrade ruby, but can consider doing so for performance reasons. + +If you are running Ruby 2.1.1 consider upgrading to 2.1.5, because of the high memory usage of Ruby 2.1.1. + +Install, update dependencies: + +```bash +sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl +``` + +Download and compile Ruby: + +```bash +mkdir /tmp/ruby && cd /tmp/ruby +curl --progress http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz | tar xz +cd ruby-2.1.5 +./configure --disable-install-rdoc +make +sudo make install +``` + +Install Bundler: + +```bash +sudo gem install bundler --no-ri --no-rdoc +``` + +## 3. Get latest code + +```bash +cd /home/git/gitlab +sudo -u git -H git fetch --all +sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically +``` + +For GitLab Community Edition: + +```bash +sudo -u git -H git checkout 7-6-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 7-6-stable-ee +``` + +## 4. Install additional packages + +```bash +# Add support for lograte for better log file handling +sudo apt-get install logrotate + +# Install pkg-config and cmake, which is needed for the latest versions of rugged +sudo apt-get install pkg-config cmake +``` + +## 5. Configure Redis to use sockets + + # Configure redis to use sockets + sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig + # Disable Redis listening on TCP by setting 'port' to 0 + sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf + # Enable Redis socket for default Debian / Ubuntu path + echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf + # Be sure redis group can write to the socket, enable only if supported (>= redis 2.4.0). + sudo sed -i '/# unixsocketperm/ s/^# unixsocketperm.*/unixsocketperm 0775/' /etc/redis/redis.conf + # Activate the changes to redis.conf + sudo service redis-server restart + # Add git to the redis group + sudo usermod -aG redis git + + # Configure Redis connection settings + sudo -u git -H cp config/resque.yml.example config/resque.yml + # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration + sudo -u git -H editor config/resque.yml + + # Configure gitlab-shell to use Redis sockets + sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml + +## 6. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch +sudo -u git -H git checkout v2.4.0 +``` + +## 7. Install libs, migrations, etc. + +```bash +cd /home/git/gitlab + +# MySQL installations (note: the line below states '--without ... postgres') +sudo -u git -H bundle install --without development test postgres --deployment + +# PostgreSQL installations (note: the line below states '--without ... mysql') +sudo -u git -H bundle install --without development test mysql --deployment + +# Run database migrations +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production + +# Enable internal issue IDs (introduced in GitLab 6.1) +sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production + +# Clean up assets and cache +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production + +# Close access to gitlab-satellites for others +sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites + +# Update init.d script +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab +``` + +## 8. Update config files + +TIP: to see what changed in `gitlab.yml.example` in this release use next command: + +``` +git diff 6-0-stable:config/gitlab.yml.example 7-6-stable:config/gitlab.yml.example +``` + +* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-6-stable/config/gitlab.yml.example but with your settings. +* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-6-stable/config/unicorn.rb.example but with your settings. +* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.4.0/config.yml.example but with your settings. +* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-6-stable/lib/support/nginx/gitlab but with your settings. +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-6-stable/lib/support/nginx/gitlab-ssl but with your settings. +* Copy rack attack middleware config + +```bash +sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb +``` + +* Set up logrotate + +```bash +sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab +``` + +## 9. Start application + + sudo service gitlab start + sudo service nginx restart + +## 10. Check application status + +Check if GitLab and its environment are configured correctly: + + cd /home/git/gitlab + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production + +To make sure you didn't miss anything run a more thorough check with: + + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production + +If all items are green, then congratulations upgrade complete! + +## 11. Update OmniAuth configuration + +When using Google omniauth login, changes of the Google account required. +Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/). +More details can be found at the [integration documentation](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/google.md). + +## 12. Optional optimizations for GitLab setups with MySQL databases + +Only applies if running MySQL database created with GitLab 6.7 or earlier. If you are not experiencing any issues you may not need the following instructions however following them will bring your database in line with the latest recommended installation configuration and help avoid future issues. Be sure to follow these directions exactly. These directions should be safe for any MySQL instance but to be sure make a current MySQL database backup beforehand. + +``` +# Stop GitLab +sudo service gitlab stop + +# Secure your MySQL installation (added in GitLab 6.2) +sudo mysql_secure_installation + +# Login to MySQL +mysql -u root -p + +# do not type the 'mysql>', this is part of the prompt + +# Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) +SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; + +# If previous query returned results, copy & run all outputed SQL statements + +# Convert all tables to correct character set +SET foreign_key_checks = 0; +SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; + +# If previous query returned results, copy & run all outputed SQL statements + +# turn foreign key checks back on +SET foreign_key_checks = 1; + +# Find MySQL users +mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%'; + +# If git user exists and gitlab user does not exist +# you are done with the database cleanup tasks +mysql> \q + +# If both users exist skip to Delete gitlab user + +# Create new user for GitLab (changed in GitLab 6.4) +# change $password in the command below to a real password you pick +mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password'; + +# Grant the git user necessary permissions on the database +mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost'; + +# Delete the old gitlab user +mysql> DELETE FROM mysql.user WHERE user='gitlab'; + +# Quit the database session +mysql> \q + +# Try connecting to the new database with the new user +sudo -u git -H mysql -u git -p -D gitlabhq_production + +# Type the password you replaced $password with earlier + +# You should now see a 'mysql>' prompt + +# Quit the database session +mysql> \q + +# Update database configuration details +# See config/database.yml.mysql for latest recommended configuration details +# Remove the reaping_frequency setting line if it exists (removed in GitLab 6.8) +# Set production -> pool: 10 (updated in GitLab 5.3) +# Set production -> username: git +# Set production -> password: the password your replaced $password with earlier +sudo -u git -H editor /home/git/gitlab/config/database.yml +``` + +## Things went south? Revert to previous version (6.0) + +### 1. Revert the code to the previous version + +Follow the [upgrade guide from 5.4 to 6.0](5.4-to-6.0.md), except for the database migration (the backup is already migrated to the previous version). + +### 2. Restore from the backup: + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production +``` + +## Login issues after upgrade? + +If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page) diff --git a/doc/update/7.5-to-7.6.md b/doc/update/7.5-to-7.6.md index a5d76c341af..11058c211ca 100644 --- a/doc/update/7.5-to-7.6.md +++ b/doc/update/7.5-to-7.6.md @@ -1,7 +1,5 @@ # From 7.5 to 7.6 -**7.6 is not yet released. This is a preliminary upgrade guide.** - ### 0. Stop server sudo service gitlab stop @@ -39,7 +37,7 @@ sudo -u git -H git checkout 7-6-stable-ee ```bash cd /home/git/gitlab-shell sudo -u git -H git fetch -sudo -u git -H git checkout v2.2.0 +sudo -u git -H git checkout v2.4.0 ``` ### 4. Install libs, migrations, etc. @@ -72,7 +70,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab There are new configuration options available for [`gitlab.yml`](config/gitlab.yml.example). View them with the command below and apply them to your current `gitlab.yml`. ``` -git diff origin/7-5-stable:config/gitlab.yml.example origin/7-6-stable:config/gitlab.yml.example +git diff origin/7-6-stable:config/gitlab.yml.example origin/7-6-stable:config/gitlab.yml.example ``` #### Change Nginx settings -- cgit v1.2.1 From 7813363fd79d758980d30354aea0d0d21af92612 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Wed, 17 Dec 2014 18:02:58 -0500 Subject: Fixed version reference --- doc/update/6.x-or-7.x-to-7.6.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/update/6.x-or-7.x-to-7.6.md b/doc/update/6.x-or-7.x-to-7.6.md index 80a7b082261..883a654dcd8 100644 --- a/doc/update/6.x-or-7.x-to-7.6.md +++ b/doc/update/6.x-or-7.x-to-7.6.md @@ -1,6 +1,6 @@ -# From 6.x or 7.x to 7.5 +# From 6.x or 7.x to 7.6 -This allows you to upgrade any version of GitLab from 6.0 and up (including 7.0 and up) to 7.5. +This allows you to upgrade any version of GitLab from 6.0 and up (including 7.0 and up) to 7.6. ## Global issue numbers -- cgit v1.2.1 From a55feb14f162a0b3b11a7c21fd4149ca8c105bc4 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Thu, 18 Dec 2014 09:22:34 +0100 Subject: Fix Rake tasks doc README: add top level h1 and link to missing to features.md. --- doc/raketasks/README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/raketasks/README.md b/doc/raketasks/README.md index 9e2f697bca6..770b7a70fe0 100644 --- a/doc/raketasks/README.md +++ b/doc/raketasks/README.md @@ -1,5 +1,8 @@ +# Rake tasks + - [Backup restore](backup_restore.md) - [Cleanup](cleanup.md) +- [Features](features.md) - [Maintenance](maintenance.md) and self-checks - [User management](user_management.md) - [Web hooks](web_hooks.md) -- cgit v1.2.1 From 6d747cfd3a41d6e2f396855ef7f29f400ea3f4a8 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Thu, 18 Dec 2014 09:50:20 -0500 Subject: Added link to the configuration sample for OmniAuth providers when using Omnibus. --- doc/integration/omniauth.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/integration/omniauth.md b/doc/integration/omniauth.md index 00adae58dfa..15b4fb622af 100644 --- a/doc/integration/omniauth.md +++ b/doc/integration/omniauth.md @@ -7,6 +7,7 @@ OmniAuth does not prevent standard GitLab authentication or LDAP (if configured) - [Initial OmniAuth Configuration](#initial-omniauth-configuration) - [Supported Providers](#supported-providers) - [Enable OmniAuth for an Existing User](#enable-omniauth-for-an-existing-user) +- [OmniAuth configuration sample when using Omnibus GitLab](https://gitlab.com/gitlab-org/omnibus-gitlab/tree/master#omniauth-google-twitter-github-login) ## Initial OmniAuth Configuration -- cgit v1.2.1 From 1e22b494e2618e004ad816ed92b8aca70fa037e5 Mon Sep 17 00:00:00 2001 From: Xavier Perseguers Date: Fri, 19 Dec 2014 13:49:33 +0100 Subject: [BUGFIX] Invalid branch in comparison --- doc/update/7.5-to-7.6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/7.5-to-7.6.md b/doc/update/7.5-to-7.6.md index 11058c211ca..35cd437fdc4 100644 --- a/doc/update/7.5-to-7.6.md +++ b/doc/update/7.5-to-7.6.md @@ -70,7 +70,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab There are new configuration options available for [`gitlab.yml`](config/gitlab.yml.example). View them with the command below and apply them to your current `gitlab.yml`. ``` -git diff origin/7-6-stable:config/gitlab.yml.example origin/7-6-stable:config/gitlab.yml.example +git diff origin/7-5-stable:config/gitlab.yml.example origin/7-6-stable:config/gitlab.yml.example ``` #### Change Nginx settings -- cgit v1.2.1 From e99ea1146aa15c712113bfb33322be8754d1696d Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Mon, 22 Dec 2014 20:58:22 +0100 Subject: Clear responsibility to mention the team. --- doc/release/monthly.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 0700f24ab76..b6f7e8c3b15 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -224,8 +224,8 @@ It is important to do this as soon as possible, so we can catch any errors befor - Create WIP MR for adding MVP to MVP page on website - Add a note if there are security fixes: This release fixes an important security issue and we advise everyone to upgrade as soon as possible. - Create a merge request on [GitLab.com](https://gitlab.com/gitlab-com/www-gitlab-com/tree/master) -- Assign to one reviewer who will fix spelling issues by editing the branch (can use the online editor) -- After the reviewer is finished the whole team will be mentioned to give their suggestions via line comments +- Assign to one reviewer who will fix spelling issues by editing the branch (either with a git client or by using the online editor) +- Comment to the reviewer: '@person Please mention the whole team as soon as you are done (3 workdays before release at the latest)' ### **4. Create a regressions issue** -- cgit v1.2.1 From e8818da3055d057134e0e26b872c06e3dd9268ff Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Tue, 23 Dec 2014 08:37:26 +0100 Subject: Shorter tweet so there is space for a hashtag. --- doc/release/monthly.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 0700f24ab76..7e50da6d174 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -315,7 +315,9 @@ Merge the [blog merge request](#1-prepare-the-blog-post) in `www-gitlab-com` rep Send out a tweet to share the good news with the world. List the most important features and link to the blog post. -Proposed tweet for CE "GitLab X.X is released! It brings *** " +Proposed tweet "Release of GitLab X.X & CI Y.Y! FEATURE, FEATURE and FEATURE #gitlab" + +Consider creating a post on Hacker News. # **1 workday after release - Update GitLab.com** -- cgit v1.2.1 From 9c7a7d4349f707200e7e71582fd83065dcfaf591 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Tue, 23 Dec 2014 09:23:19 +0100 Subject: Add libkrb5-dev dependency. --- doc/update/upgrader.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/upgrader.md b/doc/update/upgrader.md index 0a9f242d9ab..3c9eefc2c81 100644 --- a/doc/update/upgrader.md +++ b/doc/update/upgrader.md @@ -23,7 +23,7 @@ If you have local changes to your GitLab repository the script will stash them a ## 2. Run GitLab upgrade tool -Note: GitLab 7.2 adds `pkg-config` and `cmake` as dependency. Please check the dependencies in the [installation guide.](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#1-packages-dependencies) +Note: GitLab 7.6 adds `libkrb5-dev` as a dependency while 7.2 adds `pkg-config` and `cmake` as dependency. Please check the dependencies in the [installation guide.](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#1-packages-dependencies) # Starting with GitLab version 7.0 upgrader script has been moved to bin directory cd /home/git/gitlab -- cgit v1.2.1 From b5d0f90e3047676f4e129ed4cd2732b6c5a7a3eb Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Tue, 23 Dec 2014 09:48:43 +0100 Subject: Warn people about not exposing at a time they can still do something about it. --- doc/install/installation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index aa04116779e..d987e11040b 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -294,9 +294,9 @@ GitLab Shell is an SSH access and repository management software developed speci # When done you see 'Administrator account created:' -**Note:** You can set the Administrator password by supplying it in environmental variable `GITLAB_ROOT_PASSWORD`, eg.: +**Note:** You can set the Administrator/root password by supplying it in environmental variable `GITLAB_ROOT_PASSWORD` as seen below. If you don't set the password (and it is set to the default one) please wait with exposing GitLab to the public internet until the installation is done and you've logged into the server the first time. During the first login you'll be forced to change the default password. - sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=newpassword + sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=yourpassword ### Install Init Script @@ -388,7 +388,7 @@ Visit YOUR_SERVER in your web browser for your first GitLab login. The setup has root 5iveL!fe -**Important Note:** Please login to the server before exposing it to the public internet. On login you'll be prompted to change the password. +**Important Note:** On login you'll be prompted to change the password. **Enjoy!** -- cgit v1.2.1 From e2c9a486d73bc796fae678bc1fa6ec3c4d0e46ca Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Tue, 23 Dec 2014 10:11:56 +0100 Subject: Note that it is default on Ubuntu. --- doc/update/upgrader.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/upgrader.md b/doc/update/upgrader.md index 3c9eefc2c81..5016ee4baad 100644 --- a/doc/update/upgrader.md +++ b/doc/update/upgrader.md @@ -23,7 +23,7 @@ If you have local changes to your GitLab repository the script will stash them a ## 2. Run GitLab upgrade tool -Note: GitLab 7.6 adds `libkrb5-dev` as a dependency while 7.2 adds `pkg-config` and `cmake` as dependency. Please check the dependencies in the [installation guide.](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#1-packages-dependencies) +Note: GitLab 7.6 adds `libkrb5-dev` as a dependency (installed by default on Ubuntu and OSX) while 7.2 adds `pkg-config` and `cmake` as dependency. Please check the dependencies in the [installation guide.](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#1-packages-dependencies) # Starting with GitLab version 7.0 upgrader script has been moved to bin directory cd /home/git/gitlab -- cgit v1.2.1 From 6f4332725d0d5feb1062055c6050eef85cfd2aa2 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Tue, 23 Dec 2014 13:39:31 +0100 Subject: Release manager should doublecheck the everyone has been mentioned in the blog post. --- doc/release/monthly.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 98817eeb027..ea7865b4b2b 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -238,7 +238,7 @@ The release manager will comment here about the plans for patch releases. Assign the issue to the release manager and /cc all the core-team members active on the issue tracker. If there are any known bugs in the release add them immediately. -### **4. Tweet** +### **5. Tweet** Tweet about the RC release: @@ -246,6 +246,10 @@ Tweet about the RC release: # **1 workdays before release - Preparation** +### **0. Doublecheck blog post** + +Doublecheck the everyone has been mentioned in the blog post. + ### **1. Pre QA merge** Merge CE into EE before doing the QA. -- cgit v1.2.1 From 1fa19401e969f79cbd737c55e63249ca9355791c Mon Sep 17 00:00:00 2001 From: Jason Lippert Date: Mon, 8 Dec 2014 16:54:09 -0500 Subject: Teamcity interaction using 8.1 rest api --- doc/project_services/project_services.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/project_services/project_services.md b/doc/project_services/project_services.md index 20a69a211dd..ec46af5fe3b 100644 --- a/doc/project_services/project_services.md +++ b/doc/project_services/project_services.md @@ -16,3 +16,4 @@ __Project integrations with external services for continuous integration and mor - PivotalTracker - Pushover - Slack +- TeamCity \ No newline at end of file -- cgit v1.2.1 From 4386c210a17e071822126bccfedf0e19fbf1eb0a Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Tue, 23 Dec 2014 17:28:09 -0500 Subject: Updated the monthly release steps --- doc/release/monthly.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index ea7865b4b2b..b31fd885404 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -200,7 +200,7 @@ Add to your local `gitlab-ci/.git/config`: # **4 workdays before release - Release RC1** -### **1. Determine QA person +### **1. Determine QA person** Notify person of QA day. @@ -215,6 +215,7 @@ It is important to do this as soon as possible, so we can catch any errors befor ### **3. Prepare the blog post** - Start with a complete copy of the [release blog template](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/release_blog_template.md) and fill it out. +- Make sure the blog post contains information about the GitLab CI release. - Check the changelog of CE and EE for important changes. - Also check the CI changelog - Add a proposed tweet text to the blog post WIP MR description. @@ -269,7 +270,7 @@ Create an issue with description of a problem, if it is quick fix fix it yoursel **NOTE** If there is a problem that cannot be fixed in a timely manner, reverting the feature is an option! If the feature is reverted, create an issue about it in order to discuss the next steps after the release. -# **22nd - Release CE, EE and CI** +# **Workday before release - Create Omnibus tags and build packages** **Make sure EE `x-x-stable-ee` has latest changes from CE `x-x-stable`** @@ -306,15 +307,17 @@ Follow the [release doc in the Omnibus repository](https://gitlab.com/gitlab-org This can happen before tagging because Omnibus uses tags in its own repo and SHA1's to refer to the GitLab codebase. -### **4. Publish packages for new release** +# **22nd - Release CE, EE and CI** + +### **1. Publish packages for new release** Update `downloads/index.html` and `downloads/archive/index.html` in `www-gitlab-com` repository. -### **5. Publish blog for new release** +### **2. Publish blog for new release** Merge the [blog merge request](#1-prepare-the-blog-post) in `www-gitlab-com` repository. -### **6. Tweet to blog** +### **3. Tweet to blog** Send out a tweet to share the good news with the world. List the most important features and link to the blog post. -- cgit v1.2.1 From 1fbc01024123c44740e1c94cab5a74faf2856a21 Mon Sep 17 00:00:00 2001 From: uran Date: Tue, 2 Sep 2014 18:12:13 +0300 Subject: Implemented notes (body) patching in API. --- doc/api/notes.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api/notes.md b/doc/api/notes.md index b5256ac803e..c22e493562a 100644 --- a/doc/api/notes.md +++ b/doc/api/notes.md @@ -78,6 +78,21 @@ Parameters: - `issue_id` (required) - The ID of an issue - `body` (required) - The content of a note +### Modify existing issue note + +Modify existing note of an issue. + +``` +PUT /projects/:id/issues/:issue_id/notes/:note_id +``` + +Parameters: + +- `id` (required) - The ID of a project +- `issue_id` (required) - The ID of an issue +- `note_id` (required) - The ID of a note +- `body` (required) - The content of a note + ## Snippets ### List all snippet notes @@ -137,7 +152,22 @@ POST /projects/:id/snippets/:snippet_id/notes Parameters: - `id` (required) - The ID of a project -- `snippet_id` (required) - The ID of an snippet +- `snippet_id` (required) - The ID of a snippet +- `body` (required) - The content of a note + +### Modify existing snippet note + +Modify existing note of a snippet. + +``` +PUT /projects/:id/snippets/:snippet_id/notes/:note_id +``` + +Parameters: + +- `id` (required) - The ID of a project +- `snippet_id` (required) - The ID of a snippet +- `note_id` (required) - The ID of a note - `body` (required) - The content of a note ## Merge Requests @@ -199,3 +229,18 @@ Parameters: - `id` (required) - The ID of a project - `merge_request_id` (required) - The ID of a merge request - `body` (required) - The content of a note + +### Modify existing merge request note + +Modify existing note of a merge request. + +``` +PUT /projects/:id/merge_requests/:merge_request_id/notes/:note_id +``` + +Parameters: + +- `id` (required) - The ID of a project +- `merge_request_id` (required) - The ID of a merge request +- `note_id` (required) - The ID of a note +- `body` (required) - The content of a note -- cgit v1.2.1 From 05a6115bc8f9ae3e3b41a155334adb6f73d5a0cc Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Sat, 27 Dec 2014 21:43:43 +0100 Subject: doc workflow markdown style - add h1 to README - move h1 in workflow.md to h2 since the top image acts as h1 - typos --- doc/workflow/README.md | 2 ++ doc/workflow/gitlab_flow.md | 42 +++++++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 21 deletions(-) (limited to 'doc') diff --git a/doc/workflow/README.md b/doc/workflow/README.md index c26d85e9955..f0e0f51b1ac 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -1,3 +1,5 @@ +# Workflow + - [Workflow](workflow.md) - [Project Features](project_features.md) - [Authorization for merge requests](authorization_for_merge_requests.md) diff --git a/doc/workflow/gitlab_flow.md b/doc/workflow/gitlab_flow.md index f8fd7c97e2a..1dbff60cbfd 100644 --- a/doc/workflow/gitlab_flow.md +++ b/doc/workflow/gitlab_flow.md @@ -1,6 +1,6 @@ ![GitLab Flow](gitlab_flow.png) -# Introduction +## Introduction Version management with git makes branching and merging much easier than older versioning systems such as SVN. This allows a wide variety of branching strategies and workflows. @@ -29,9 +29,9 @@ People have a hard time figuring out which branch they should develop on or depl Frequently the reaction to this problem is to adopt a standardized pattern such as [git flow](http://nvie.com/posts/a-successful-git-branching-model/) and [GitHub flow](http://scottchacon.com/2011/08/31/github-flow.html) We think there is still room for improvement and will detail a set of practices we call GitLab flow. -# Git flow and its problems +## Git flow and its problems -[![Git Flow timeline by Vincent Driessen, used with persmission](gitdashflow.png) +[![Git Flow timeline by Vincent Driessen, used with permission](gitdashflow.png) Git flow was one of the first proposals to use git branches and it has gotten a lot of attention. It advocates a master branch and a separate develop branch as well as supporting branches for features, releases and hotfixes. @@ -50,7 +50,7 @@ Frequently developers make a mistake and for example changes are only merged int The root cause of these errors is that git flow is too complex for most of the use cases. And doing releases doesn't automatically mean also doing hotfixes. -# GitHub flow as a simpler alternative +## GitHub flow as a simpler alternative ![Master branch with feature branches merged in](github_flow.png) @@ -62,13 +62,13 @@ Merging everything into the master branch and deploying often means you minimize But this flow still leaves a lot of questions unanswered regarding deployments, environments, releases and integrations with issues. With GitLab flow we offer additional guidance for these questions. -# Production branch with GitLab flow +## Production branch with GitLab flow ![Master branch and production branch with arrow that indicate deployments](production_branch.png) GitHub flow does assume you are able to deploy to production every time you merge a feature branch. This is possible for SaaS applications but are many cases where this is not possible. -One would be a situation where you are not in control of the exact release moment, for example an iOS application that needs to pass AppStore validation. +One would be a situation where you are not in control of the exact release moment, for example an iOS application that needs to pass App Store validation. Another example is when you have deployment windows (workdays from 10am to 4pm when the operations team is at full capacity) but you also merge code at other times. In these cases you can make a production branch that reflects the deployed code. You can deploy a new version by merging in master to the production branch. @@ -78,7 +78,7 @@ This time is pretty accurate if you automatically deploy your production branch. If you need a more exact time you can have your deployment script create a tag on each deployment. This flow prevents the overhead of releasing, tagging and merging that is common to git flow. -# Environment branches with GitLab flow +## Environment branches with GitLab flow ![Multiple branches with the code cascading from one to another](environment_branches.png) @@ -93,7 +93,7 @@ If master is good to go (it should be if you a practicing [continuous delivery]( If this is not possible because more manual testing is required you can send merge requests from the feature branch to the downstream branches. An 'extreme' version of environment branches are setting up an environment for each feature branch as done by [Teatro](http://teatro.io/). -# Release branches with GitLab flow +## Release branches with GitLab flow ![Master and multiple release branches that vary in length with cherrypicks from master](release_branches.png) @@ -109,7 +109,7 @@ Every time a bug-fix is included in a release branch the patch version is raised Some projects also have a stable branch that points to the same commit as the latest released branch. In this flow it is not common to have a production branch (or git flow master branch). -# Merge/pull requests with GitLab flow +## Merge/pull requests with GitLab flow ![Merge request with line comments](mr_inline_comments.png) @@ -134,7 +134,7 @@ If the assigned person does not feel comfortable they can close the merge reques In GitLab it is common to protect the long-lived branches (e.g. the master branch) so that normal developers [can't modify these protected branches](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/permissions/permissions.md). So if you want to merge it into a protected branch you assign it to someone with master authorizations. -# Issues with GitLab flow +## Issues with GitLab flow ![Merge request with the branch name 15-require-a-password-to-change-it and assignee field shown](merge_request.png) @@ -168,7 +168,7 @@ In this case it is no problem to reuse the same branch name since it was deleted At any time there is at most one branch for every issue. It is possible that one feature branch solves more than one issue. -# Linking and closing issues from merge requests +## Linking and closing issues from merge requests ![Merge request showing the linked issues that will be closed](close_issue_mr.png) @@ -181,7 +181,7 @@ If you only want to make the reference without closing the issue you can also ju If you have an issue that spans across multiple repositories, the best thing is to create an issue for each repository and link all issues to a parent issue. -# Squashing commits with rebase +## Squashing commits with rebase ![Vim screen showing the rebase view](rebase.png) @@ -189,7 +189,7 @@ With git you can use an interactive rebase (rebase -i) to squash multiple commit This functionality is useful if you made a couple of commits for small changes during development and want to replace them with a single commit or if you want to make the order more logical. However you should never rebase commits you have pushed to a remote server. Somebody can have referred to the commits or cherry-picked them. -When you rebase you change the identifier (SHA1) of the commit and this is confusing. +When you rebase you change the identifier (SHA-1) of the commit and this is confusing. If you do that the same change will be known under multiple identifiers and this can cause much confusion. If people already reviewed your code it will be hard for them to review only the improvements you made since then if you have rebased everything into one commit. @@ -207,7 +207,7 @@ If you revert a merge and you change your mind, revert the revert instead of mer Being able to revert a merge is a good reason always to create a merge commit when you merge manually with the `--no-ff` option. Git management software will always create a merge commit when you accept a merge request. -# Do not order commits with rebase +## Do not order commits with rebase ![List of sequential merge commits](merge_commits.png) @@ -231,8 +231,8 @@ The last reason for creating merge commits is having long lived branches that yo Martin Fowler, in [his article about feature branches](http://martinfowler.com/bliki/FeatureBranch.html) talks about this Continuous Integration (CI). At GitLab we are guilty of confusing CI with branch testing. Quoting Martin Fowler: "I've heard people say they are doing CI because they are running builds, perhaps using a CI server, on every branch with every commit. That's continuous building, and a Good Thing, but there's no integration, so it's not CI.". -The solution to prevent many merge commits is to keep your feature branches shortlived, the vast majority should take less than one day of work. -If your feature branches commenly take more than a day of work, look into ways to create smaller units of work and/or use [feature toggles](http://martinfowler.com/bliki/FeatureToggle.html). +The solution to prevent many merge commits is to keep your feature branches short-lived, the vast majority should take less than one day of work. +If your feature branches commonly take more than a day of work, look into ways to create smaller units of work and/or use [feature toggles](http://martinfowler.com/bliki/FeatureToggle.html). As for the long running branches that take more than one day there are two strategies. In a CI strategy you can merge in master at the start of the day to prevent painful merges at a later time. In a synchronization point strategy you only merge in from well defined points in time, for example a tagged release. @@ -244,7 +244,7 @@ Developing software happen in small messy steps and it is OK to have your histor You can use tools to view the network graphs of commits and understand the messy history that created your code. If you rebase code the history is incorrect, and there is no way for tools to remedy this because they can't deal with changing commit identifiers. -# Voting on merge requests +## Voting on merge requests ![Voting slider in GitLab](voting_slider.png) @@ -252,7 +252,7 @@ It is common to voice approval or disapproval by using +1 or -1 emoticons. In GitLab the +1 and -1 are aggregated and shown at the top of the merge request. As a rule of thumb anything that doesn't have two times more +1's than -1's is suspect and should not be merged yet. -# Pushing and removing branches +## Pushing and removing branches ![Remove checkbox for branch in merge requests](remove_checkbox.png) @@ -266,7 +266,7 @@ This ensures that the branch overview in the repository management software show This also ensures that when someone reopens the issue a new branch with the same name can be used without problem. When you reopen an issue you need to create a new merge request. -# Committing often and with the right message +## Committing often and with the right message ![Good and bad commit message](good_commit.png) @@ -282,7 +282,7 @@ Some words that are bad commit messages because they don't contain munch informa The word fix or fixes is also a red flag, unless it comes after the commit sentence and references an issue number. To see more information about the formatting of commit messages please see this great [blog post by Tim Pope](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). -# Testing before merging +## Testing before merging ![Merge requests showing the test states, red, yellow and green](ci_mr.png) @@ -299,7 +299,7 @@ If there are no merge conflicts and the feature branches are short lived the ris If there are merge conflicts you merge the master branch into the feature branch and the CI server will rerun the tests. If you have long lived feature branches that last for more than a few days you should make your issues smaller. -# Merging in other code +## Merging in other code ![Shell output showing git pull output](git_pull.png) -- cgit v1.2.1 From 43c2d5a2687bd45bb1f8e3f8390a7b558afb75a0 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Mon, 29 Dec 2014 10:44:08 +0100 Subject: Add documentation about protected branches. --- doc/permissions/permissions.md | 1 + doc/workflow/README.md | 1 + doc/workflow/protected_branches.md | 33 +++++++++++++++++++++ .../protected_branches/protected_branches1.png | Bin 0 -> 170113 bytes .../protected_branches/protected_branches2.png | Bin 0 -> 25851 bytes 5 files changed, 35 insertions(+) create mode 100644 doc/workflow/protected_branches.md create mode 100644 doc/workflow/protected_branches/protected_branches1.png create mode 100644 doc/workflow/protected_branches/protected_branches2.png (limited to 'doc') diff --git a/doc/permissions/permissions.md b/doc/permissions/permissions.md index e21384d21dc..8e64b43929a 100644 --- a/doc/permissions/permissions.md +++ b/doc/permissions/permissions.md @@ -29,6 +29,7 @@ If a user is a GitLab administrator they receive all permissions. | Add new team members | | | | ✓ | ✓ | | Push to protected branches | | | | ✓ | ✓ | | Enable/disable branch protection | | | | ✓ | ✓ | +| Turn on/off prot. branch push for devs| | | | ✓ | ✓ | | Rewrite/remove git tags | | | | ✓ | ✓ | | Edit project | | | | ✓ | ✓ | | Add deploy keys to project | | | | ✓ | ✓ | diff --git a/doc/workflow/README.md b/doc/workflow/README.md index f0e0f51b1ac..8ef51b50b9d 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -8,3 +8,4 @@ - [GitLab Flow](gitlab_flow.md) - [Notifications](notifications.md) - [Migrating from SVN to GitLab](migrating_from_svn.md) +- [Protected branches](protected_branches.md) diff --git a/doc/workflow/protected_branches.md b/doc/workflow/protected_branches.md new file mode 100644 index 00000000000..805f7f8d35c --- /dev/null +++ b/doc/workflow/protected_branches.md @@ -0,0 +1,33 @@ +# Protected branches + +Permission in GitLab are fundamentally defined around the idea of having read or write permission to the repository and branches. + +To prevent people from messing with history or pushing code without review, we've created protected branches. + +A protected branch does three simple things: + +* it prevents pushes from everybody except users with Master permission +* it prevents anyone from force pushing to the branch +* it prevents anyone from deleting the branch + +You can make any branch a protected branch. GitLab makes the master branch a protected branch by default. + +To protect a branch, user needs to have at least a Master permission level, see [permissions document](permissions/permissions.md). + +![protected branches page](protected_branches/protected_branches1.png) + +Navigate to project settings page and select `protected branches`. From the `Branch` dropdown menu select the branch you want to protect. + +Some workflows, like [GitLab workflow](gitlab_flow.md), require all users with write access to submit a Merge request in order to get the code into a protected branch. + +Since Masters and Owners can already push to protected branches, that means Developers cannot push to protected branch and need to submit a Merge request. + +However, there are workflows where that is not needed and only protecting from force pushes and branch removal is useful. + +For those workflows, you can allow everyone with write access to push to a protected branch by selecting `Developers can push` check box. + +On already protected branches you can also allow developers to push to the repository by selecting the `Developers can push` check box. + +![Developers can push](protected_branches/protected_branches2.png) + + diff --git a/doc/workflow/protected_branches/protected_branches1.png b/doc/workflow/protected_branches/protected_branches1.png new file mode 100644 index 00000000000..5c2a3de5f70 Binary files /dev/null and b/doc/workflow/protected_branches/protected_branches1.png differ diff --git a/doc/workflow/protected_branches/protected_branches2.png b/doc/workflow/protected_branches/protected_branches2.png new file mode 100644 index 00000000000..2dca3541365 Binary files /dev/null and b/doc/workflow/protected_branches/protected_branches2.png differ -- cgit v1.2.1 From 675704f4bb990cb8d2451adb2f81baf1e34e1f40 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Mon, 29 Dec 2014 11:29:06 +0100 Subject: permission.md align table, rm double empty line --- doc/permissions/permissions.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/permissions/permissions.md b/doc/permissions/permissions.md index e21384d21dc..912db9d76f6 100644 --- a/doc/permissions/permissions.md +++ b/doc/permissions/permissions.md @@ -8,7 +8,6 @@ If a user is a GitLab administrator they receive all permissions. ## Project - | Action | Guest | Reporter | Developer | Master | Owner | |---------------------------------------|---------|------------|-------------|----------|--------| | Create new issue | ✓ | ✓ | ✓ | ✓ | ✓ | @@ -37,7 +36,7 @@ If a user is a GitLab administrator they receive all permissions. | Transfer project to another namespace | | | | | ✓ | | Remove project | | | | | ✓ | | Force push to protected branches | | | | | | -| Remove protected branches | | | | | | +| Remove protected branches | | | | | | ## Group -- cgit v1.2.1 From 6b507219465e50ceff726535f92b75fa9567906d Mon Sep 17 00:00:00 2001 From: Stephan van Leeuwen Date: Fri, 19 Dec 2014 13:27:27 +0100 Subject: Updated projects api to allow ordering Added support for order_by and sort parameters, to sort the projects by the specified values. Updated projects api documentation including the order_by and sort parameters --- doc/api/projects.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/api/projects.md b/doc/api/projects.md index 0055e2e476f..22d3c828a4b 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -11,6 +11,8 @@ GET /projects Parameters: - `archived` (optional) - if passed, limit by archived status +- `order_by` (optional) - Return requests ordered by `id`, `name`, `created_at` or `last_activity_at` fields +- `sort` (optional) - Return requests sorted in `asc` or `desc` order ```json [ @@ -628,6 +630,8 @@ GET /projects/search/:query Parameters: -- query (required) - A string contained in the project name -- per_page (optional) - number of projects to return per page -- page (optional) - the page to retrieve +- `query` (required) - A string contained in the project name +- `per_page` (optional) - number of projects to return per page +- `page` (optional) - the page to retrieve +- `order_by` (optional) - Return requests ordered by `id`, `name`, `created_at` or `last_activity_at` fields +- `sort` (optional) - Return requests sorted in `asc` or `desc` order -- cgit v1.2.1 From 2660e83c97c46b7303a71b1110c693fbfbc9662c Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 30 Dec 2014 11:30:56 +0200 Subject: Add group filtering by name for API Signed-off-by: Dmitriy Zaporozhets --- doc/api/groups.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/api/groups.md b/doc/api/groups.md index 6b379b02d28..8aae4f6b1bb 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -19,6 +19,8 @@ GET /groups ] ``` +You can search for groups by name or path with: `/groups?search=Rails` + ## Details of a group Get all details of a group. -- cgit v1.2.1 From 9993a0e356788e6327b92ec481800ce8bf86dce0 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 5 Jan 2015 12:44:42 +0200 Subject: Use plural instead of refering explicitly to male/female. --- doc/permissions/permissions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/permissions/permissions.md b/doc/permissions/permissions.md index d70cbb28074..c9928e11b2e 100644 --- a/doc/permissions/permissions.md +++ b/doc/permissions/permissions.md @@ -49,4 +49,4 @@ If a user is a GitLab administrator they receive all permissions. | Manage group members | | | | | ✓ | | Remove group | | | | | ✓ | -Any user can remove himself from a group, unless he is the last Owner of the group. +Any user can remove themselves from a group, unless they are the last Owner of the group. -- cgit v1.2.1 From a33d2f865388cc83526509ad3f9084222cce6b77 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 6 Jan 2015 11:50:05 +0100 Subject: Document Redis session cleanup --- doc/operations/README.md | 1 + doc/operations/cleaning_up_redis_sessions.md | 52 ++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 doc/operations/cleaning_up_redis_sessions.md (limited to 'doc') diff --git a/doc/operations/README.md b/doc/operations/README.md index 31b1b583b0c..f1456c6c8e2 100644 --- a/doc/operations/README.md +++ b/doc/operations/README.md @@ -1,3 +1,4 @@ # GitLab operations - [Sidekiq MemoryKiller](sidekiq_memory_killer.md) +- [Cleaning up Redis sessions](cleaning_up_redis_sessions.md) diff --git a/doc/operations/cleaning_up_redis_sessions.md b/doc/operations/cleaning_up_redis_sessions.md new file mode 100644 index 00000000000..93521e976d5 --- /dev/null +++ b/doc/operations/cleaning_up_redis_sessions.md @@ -0,0 +1,52 @@ +# Cleaning up stale Redis sessions + +Since version 6.2, GitLab stores web user sessions as key-value pairs in Redis. +Prior to GitLab 7.3, user sessions did not automatically expire from Redis. If +you have been running a large GitLab server (thousands of users) since before +GitLab 7.3 we recommend cleaning up stale sessions to compact the Redis +database after you upgrade to GitLab 7.3. You can also perform a cleanup while +still running GitLab 7.2 or older, but in that case new stale sessions will +start building up again after you clean up. + +In GitLab versions prior to 7.3.0, the session keys in Redis are 16-byte +hexadecimal values such as '976aa289e2189b17d7ef525a6702ace9'. Starting with +GitLab 7.3.0, the keys are +prefixed with 'session:gitlab:', so they would look like +'session:gitlab:976aa289e2189b17d7ef525a6702ace9'. Below we describe how to +remove the keys in the old format. + +First we define a shell function with the proper Redis connection details. + +``` +rcli() { + # This example works for Omnibus installations of GitLab 7.3 or newer. For an + # installation from source you will have to change the socket path and the + # path to redis-cli. + sudo /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket "$@" +} + +# test the new shell function; the response should be PONG +rcli ping +``` + +Now we do a search to see if there are any session keys in the old format for +us to clean up. + +``` +# returns the number of old-format session keys in Redis +rcli keys '*' | grep '^[a-f0-9]\{32\}$' | wc -l +``` + +If the number is larger than zero, you can proceed to expire the keys from +Redis. If the number is zero there is nothing to clean up. + +``` +# Tell Redis to expire each matched key after 600 seconds. +rcli keys '*' | grep '^[a-f0-9]\{32\}$' | awk '{ print "expire", $0, 600 }' | rcli +# This will print '(integer) 1' for each key that gets expired. +``` + +Over the next 15 minutes (10 minutes expiry time plus 5 minutes Redis +background save interval) your Redis database will be compacted. If you are +still using GitLab 7.2, users who are not clicking around in GitLab during the +10 minute expiry window will be signed out of GitLab. -- cgit v1.2.1 From 3c19929c757e5ff45f5afa3713002ee1862c0b75 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 9 Jan 2015 12:29:48 -0800 Subject: Cleanup and refactor release doc. Follow issue as a todo list --- doc/release/howto_rc1.md | 126 +++++++++++++++++++++++ doc/release/monthly.md | 263 ++++++++++++----------------------------------- 2 files changed, 190 insertions(+), 199 deletions(-) create mode 100644 doc/release/howto_rc1.md (limited to 'doc') diff --git a/doc/release/howto_rc1.md b/doc/release/howto_rc1.md new file mode 100644 index 00000000000..2bfc23951ec --- /dev/null +++ b/doc/release/howto_rc1.md @@ -0,0 +1,126 @@ +# How to create RC1 + +The RC1 release comes with the task to update the installation and upgrade docs. Be mindful that there might already be merge requests for this on GitLab or GitHub. + +### **1. Update the installation guide** + +1. Check if it references the correct branch `x-x-stable` (doesn't exist yet, but that is okay) +1. Check the [GitLab Shell version](/lib/tasks/gitlab/check.rake#L782) +1. Check the [Git version](/lib/tasks/gitlab/check.rake#L794) +1. There might be other changes. Ask around. + +### **2. Create update guides** + +1. Create: CE update guide from previous version. Like `7.3-to-7.4.md` +1. Create: CE to EE update guide in EE repository for latest version. +1. Update: `6.x-or-7.x-to-7.x.md` to latest version. +1. Create: CI update guide from previous version + +It's best to copy paste the previous guide and make changes where necessary. +The typical steps are listed below with any points you should specifically look at. + +#### 0. Any major changes? + +List any major changes here, so the user is aware of them before starting to upgrade. For instance: + +- Database updates +- Web server changes +- File structure changes + +#### 1. Stop server + +#### 2. Make backup + +#### 3. Do users need to update dependencies like `git`? + +- Check if the [GitLab Shell version](/lib/tasks/gitlab/check.rake#L782) changed since the last release. + +- Check if the [Git version](/lib/tasks/gitlab/check.rake#L794) changed since the last release. + +#### 4. Get latest code + +#### 5. Does GitLab shell need to be updated? + +#### 6. Install libs, migrations, etc. + +#### 7. Any config files updated since last release? + +Check if any of these changed since last release: + +- [lib/support/nginx/gitlab](/lib/support/nginx/gitlab) +- [lib/support/nginx/gitlab-ssl](/lib/support/nginx/gitlab-ssl) +- +- [config/gitlab.yml.example](/config/gitlab.yml.example) +- [config/unicorn.rb.example](/config/unicorn.rb.example) +- [config/database.yml.mysql](/config/database.yml.mysql) +- [config/database.yml.postgresql](/config/database.yml.postgresql) +- [config/initializers/rack_attack.rb.example](/config/initializers/rack_attack.rb.example) +- [config/resque.yml.example](/config/resque.yml.example) + +#### 8. Need to update init script? + +Check if the `init.d/gitlab` script changed since last release: [lib/support/init.d/gitlab](/lib/support/init.d/gitlab) + +#### 9. Start application + +#### 10. Check application status + +### **3. Code quality indicators** + +Make sure the code quality indicators are green / good. + +- [![Build status](http://ci.gitlab.org/projects/1/status.png?ref=master)](http://ci.gitlab.org/projects/1?ref=master) on ci.gitlab.org (master branch) + +- [![Build Status](https://semaphoreapp.com/api/v1/projects/2f1a5809-418b-4cc2-a1f4-819607579fe7/243338/badge.png)](https://semaphoreapp.com/gitlabhq/gitlabhq) (master branch) + +- [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.png)](https://codeclimate.com/github/gitlabhq/gitlabhq) + +- [![Dependency Status](https://gemnasium.com/gitlabhq/gitlabhq.png)](https://gemnasium.com/gitlabhq/gitlabhq) this button can be yellow (small updates are available) but must not be red (a security fix or an important update is available) + +- [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq) + +### 4. Run release tool for CE and EE + +**Make sure EE `master` has latest changes from CE `master`** + +Get release tools + +``` +git clone git@dev.gitlab.org:gitlab/release-tools.git +cd release-tools +``` + +Release candidate creates stable branch from master. +So we need to sync master branch between all CE remotes. Also do same for EE. + +``` +bundle exec rake sync +``` + +Create release candidate and stable branch: + +``` +bundle exec rake release["x.x.0.rc1"] +``` + +Now developers can use master for merging new features. +So you should use stable branch for future code chages related to release. + + +### 5. Release GitLab CI RC1 + +Add to your local `gitlab-ci/.git/config`: + +``` +[remote "public"] + url = none + pushurl = git@dev.gitlab.org:gitlab/gitlab-ci.git + pushurl = git@gitlab.com:gitlab-org/gitlab-ci.git + pushurl = git@github.com:gitlabhq/gitlab-ci.git +``` + +* Create a stable branch `x-y-stable` +* Bump VERSION to `x.y.0.rc1` +* `git tag -a v$(cat VERSION) -m "Version $(cat VERSION)" +* `git push public x-y-stable v$(cat VERSION)` + diff --git a/doc/release/monthly.md b/doc/release/monthly.md index b31fd885404..810f992cafb 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -2,209 +2,90 @@ NOTE: This is a guide for GitLab developers. -# **7 workdays before release - Code Freeze & Release Manager** +It starts 7 days before release. Current release manager must choose next release manager. +New release manager should create overall issue at GitLab -### **1. Stop merging in code, except for important bug fixes** -### **2. Release Manager** +## Release Manager A release manager is selected that coordinates all releases the coming month, including the patch releases for previous releases. The release manager has to make sure all the steps below are done and delegated where necessary. This person should also make sure this document is kept up to date and issues are created and updated. -### **3. Create an overall issue** +## Take weekend and vacations into account + +Ensure that there is enough time to incorporate the findings of the release candidate, etc. + +## Create an overall issue and follow it Create issue for GitLab CE project(internal). Name it "Release x.x.x" for easier searching. Replace the dates with actual dates based on the number of workdays before the release. +All steps from issue template are explained below ``` -Xth: +Xth: (7 working days befor 22th) +- [ ] Code freeze - [ ] Update the CE changelog (#LINK) - [ ] Update the EE changelog (#LINK) - [ ] Update the CI changelog (#LINK) - [ ] Triage the omnibus-gitlab milestone -Xth: +Xth: (6 working days befor 22th) -- [ ] Merge CE in to EE (#LINK) -- [ ] Close the omnibus-gitlab milestone +- [ ] Merge CE master in to EE master via merge request (#LINK) +- [ ] Create CE, EE, CI RC1 versions (#LINK) -Xth: +Xth: (5 working days befor 22th) -- [ ] Create x.x.0.rc1 (#LINK) -- [ ] Create x.x.0.rc1-ee (#LINK) -- [ ] Create CI y.y.0.rc1 (#LINK) -- [ ] Build package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) +- [ ] Close the omnibus-gitlab milestone +- [ ] Build rc1 package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) -Xth: +Xth: (4 working days befor 22th) - [ ] Update GitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package) -- [ ] Regression issues (CE, CI) and tweet about rc1 (#LINK) +- [ ] Create regression issues (CE, CI) (#LINK) +- [ ] Tweet about rc1 (#LINK) - [ ] Start blog post (#LINK) +- [ ] Determine QA person and notify him -Xth: +Xth: (2 working days befor 22th) +- [ ] Merge CE stable branch into EE stable branch - [ ] Do QA and fix anything coming out of it (#LINK) +Xth: (1 working day befor 22th) + +- [ ] Create CE, EE, CI stable versions (#LINK) +- [ ] Create Omnibus tags and build packages + 22nd: - [ ] Release CE, EE and CI (#LINK) -Xth: +Xth: (1 working day after 22th) - [ ] Deploy to GitLab.com (#LINK) ``` -### **4. Update changelog** - -Any changes not yet added to the changelog are added by lead developer and in that merge request the complete team is asked if there is anything missing. - -There are three changelogs that need to be updated: CE, EE and CI. - -### **5. Take weekend and vacations into account** - -Ensure that there is enough time to incorporate the findings of the release candidate, etc. - -# **6 workdays before release- Merge the CE into EE** - -Do this via a merge request. - -# **5 workdays before release - Create RC1** - -The RC1 release comes with the task to update the installation and upgrade docs. Be mindful that there might already be merge requests for this on GitLab or GitHub. - -### **1. Update the installation guide** - -1. Check if it references the correct branch `x-x-stable` (doesn't exist yet, but that is okay) -1. Check the [GitLab Shell version](/lib/tasks/gitlab/check.rake#L782) -1. Check the [Git version](/lib/tasks/gitlab/check.rake#L794) -1. There might be other changes. Ask around. - -### **2. Create update guides** - -1. Create: CE update guide from previous version. Like `7.3-to-7.4.md` -1. Create: CE to EE update guide in EE repository for latest version. -1. Update: `6.x-or-7.x-to-7.x.md` to latest version. -1. Create: CI update guide from previous version - -It's best to copy paste the previous guide and make changes where necessary. -The typical steps are listed below with any points you should specifically look at. - -#### 0. Any major changes? - -List any major changes here, so the user is aware of them before starting to upgrade. For instance: - -- Database updates -- Web server changes -- File structure changes - -#### 1. Stop server - -#### 2. Make backup +- - - -#### 3. Do users need to update dependencies like `git`? +## Code Freeze -- Check if the [GitLab Shell version](/lib/tasks/gitlab/check.rake#L782) changed since the last release. - -- Check if the [Git version](/lib/tasks/gitlab/check.rake#L794) changed since the last release. - -#### 4. Get latest code - -#### 5. Does GitLab shell need to be updated? - -#### 6. Install libs, migrations, etc. - -#### 7. Any config files updated since last release? - -Check if any of these changed since last release: - -- [lib/support/nginx/gitlab](/lib/support/nginx/gitlab) -- [lib/support/nginx/gitlab-ssl](/lib/support/nginx/gitlab-ssl) -- -- [config/gitlab.yml.example](/config/gitlab.yml.example) -- [config/unicorn.rb.example](/config/unicorn.rb.example) -- [config/database.yml.mysql](/config/database.yml.mysql) -- [config/database.yml.postgresql](/config/database.yml.postgresql) -- [config/initializers/rack_attack.rb.example](/config/initializers/rack_attack.rb.example) -- [config/resque.yml.example](/config/resque.yml.example) - -#### 8. Need to update init script? - -Check if the `init.d/gitlab` script changed since last release: [lib/support/init.d/gitlab](/lib/support/init.d/gitlab) - -#### 9. Start application - -#### 10. Check application status - -### **3. Code quality indicators** - -Make sure the code quality indicators are green / good. - -- [![Build status](http://ci.gitlab.org/projects/1/status.png?ref=master)](http://ci.gitlab.org/projects/1?ref=master) on ci.gitlab.org (master branch) - -- [![Build Status](https://semaphoreapp.com/api/v1/projects/2f1a5809-418b-4cc2-a1f4-819607579fe7/243338/badge.png)](https://semaphoreapp.com/gitlabhq/gitlabhq) (master branch) - -- [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.png)](https://codeclimate.com/github/gitlabhq/gitlabhq) - -- [![Dependency Status](https://gemnasium.com/gitlabhq/gitlabhq.png)](https://gemnasium.com/gitlabhq/gitlabhq) this button can be yellow (small updates are available) but must not be red (a security fix or an important update is available) - -- [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq) - -### **4. Run release tool** - -**Make sure EE `master` has latest changes from CE `master`** - -Get release tools - -``` -git clone git@dev.gitlab.org:gitlab/release-tools.git -cd release-tools -``` +Stop merging code in master, except for important bug fixes -Release candidate creates stable branch from master. -So we need to sync master branch between all CE remotes. Also do same for EE. - -``` -bundle exec rake sync -``` - -Create release candidate and stable branch: - -``` -bundle exec rake release["x.x.0.rc1"] -``` - -Now developers can use master for merging new features. -So you should use stable branch for future code chages related to release. - - -### 5. Release GitLab CI RC1 - -Add to your local `gitlab-ci/.git/config`: - -``` -[remote "public"] - url = none - pushurl = git@dev.gitlab.org:gitlab/gitlab-ci.git - pushurl = git@gitlab.com:gitlab-org/gitlab-ci.git - pushurl = git@github.com:gitlabhq/gitlab-ci.git -``` - -* Create a stable branch `x-y-stable` -* Bump VERSION to `x.y.0.rc1` -* `git tag -a v$(cat VERSION) -m "Version $(cat VERSION)" -* `git push public x-y-stable v$(cat VERSION)` +## Update changelog +Any changes not yet added to the changelog are added by lead developer and in that merge request the complete team is asked if there is anything missing. -# **4 workdays before release - Release RC1** +There are three changelogs that need to be updated: CE, EE and CI. -### **1. Determine QA person** +## Create RC1 (CE, EE, CI) -Notify person of QA day. +[Follow this How-to guide](howto_rc1.md) to create RC1. -### **2. Update GitLab.com** +## Update GitLab.com with RC1 Merge the RC1 EE code into GitLab.com. Once the build is green, create a package. @@ -212,23 +93,7 @@ If there are big database migrations consider testing them with the production d Try to deploy in the morning. It is important to do this as soon as possible, so we can catch any errors before we release the full version. -### **3. Prepare the blog post** - -- Start with a complete copy of the [release blog template](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/release_blog_template.md) and fill it out. -- Make sure the blog post contains information about the GitLab CI release. -- Check the changelog of CE and EE for important changes. -- Also check the CI changelog -- Add a proposed tweet text to the blog post WIP MR description. -- Create a WIP MR for the blog post -- Ask Dmitriy to add screenshots to the WIP MR. -- Decide with team who will be the MVP user. -- Create WIP MR for adding MVP to MVP page on website -- Add a note if there are security fixes: This release fixes an important security issue and we advise everyone to upgrade as soon as possible. -- Create a merge request on [GitLab.com](https://gitlab.com/gitlab-com/www-gitlab-com/tree/master) -- Assign to one reviewer who will fix spelling issues by editing the branch (either with a git client or by using the online editor) -- Comment to the reviewer: '@person Please mention the whole team as soon as you are done (3 workdays before release at the latest)' - -### **4. Create a regressions issue** +## Create a regressions issue On [the GitLab CE issue tracker on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/issues/) create an issue titled "GitLab X.X regressions" add the following text: @@ -239,23 +104,29 @@ The release manager will comment here about the plans for patch releases. Assign the issue to the release manager and /cc all the core-team members active on the issue tracker. If there are any known bugs in the release add them immediately. -### **5. Tweet** +## Tweet about RC1 Tweet about the RC release: > GitLab x.x.0.rc1 is out. This release candidate is only suitable for testing. Please link regressions issues from LINK_TO_REGRESSION_ISSUE -# **1 workdays before release - Preparation** - -### **0. Doublecheck blog post** - -Doublecheck the everyone has been mentioned in the blog post. - -### **1. Pre QA merge** +## Prepare the blog post -Merge CE into EE before doing the QA. +- Start with a complete copy of the [release blog template](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/release_blog_template.md) and fill it out. +- Make sure the blog post contains information about the GitLab CI release. +- Check the changelog of CE and EE for important changes. +- Also check the CI changelog +- Add a proposed tweet text to the blog post WIP MR description. +- Create a WIP MR for the blog post +- Ask Dmitriy to add screenshots to the WIP MR. +- Decide with team who will be the MVP user. +- Create WIP MR for adding MVP to MVP page on website +- Add a note if there are security fixes: This release fixes an important security issue and we advise everyone to upgrade as soon as possible. +- Create a merge request on [GitLab.com](https://gitlab.com/gitlab-com/www-gitlab-com/tree/master) +- Assign to one reviewer who will fix spelling issues by editing the branch (either with a git client or by using the online editor) +- Comment to the reviewer: '@person Please mention the whole team as soon as you are done (3 workdays before release at the latest)' -### **2. QA** +## QA Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X QA" in order to keep track of the progress. @@ -263,19 +134,14 @@ Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gi **NOTE** Upgrader can only be tested when tags are pushed to all repositories. Do not forget to confirm it is working before releasing. Note that in the issue. -### **3. Fix anything coming out of the QA** +#### Fix anything coming out of the QA Create an issue with description of a problem, if it is quick fix fix it yourself otherwise contact the team for advice. **NOTE** If there is a problem that cannot be fixed in a timely manner, reverting the feature is an option! If the feature is reverted, create an issue about it in order to discuss the next steps after the release. -# **Workday before release - Create Omnibus tags and build packages** - -**Make sure EE `x-x-stable-ee` has latest changes from CE `x-x-stable`** - - -### **1. Release code** +## Create CE, EE, CI stable versions Get release tools @@ -296,28 +162,27 @@ Also perform these steps for GitLab CI: - create annotated tag - push the stable branch and the annotated tag to the public repositories -### **2. Update installation.md** - Update [installation.md](/doc/install/installation.md) to the newest version in master. -### **3. Build the Omnibus packages** +## Create Omnibus tags and build packages Follow the [release doc in the Omnibus repository](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md). This can happen before tagging because Omnibus uses tags in its own repo and SHA1's to refer to the GitLab codebase. -# **22nd - Release CE, EE and CI** +## Release CE, EE and CI -### **1. Publish packages for new release** +### 1. Publish packages for new release Update `downloads/index.html` and `downloads/archive/index.html` in `www-gitlab-com` repository. -### **2. Publish blog for new release** +### 2. Publish blog for new release +Doublecheck the everyone has been mentioned in the blog post. Merge the [blog merge request](#1-prepare-the-blog-post) in `www-gitlab-com` repository. -### **3. Tweet to blog** +### 3. Tweet to blog Send out a tweet to share the good news with the world. List the most important features and link to the blog post. @@ -326,7 +191,7 @@ Proposed tweet "Release of GitLab X.X & CI Y.Y! FEATURE, FEATURE and FEATURE
  • Date: Sat, 10 Jan 2015 02:12:00 +0000 Subject: Improve monthly.md with fixes proposed from @sytse --- doc/release/monthly.md | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 810f992cafb..917dc7f6934 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -14,7 +14,9 @@ This person should also make sure this document is kept up to date and issues ar ## Take weekend and vacations into account -Ensure that there is enough time to incorporate the findings of the release candidate, etc. +The time is measured in weekdays to compensate for weekends. +Do things on time to prevent problems due to rush jobs or too little testing time. +Make sure that you take into account vacations of maintainers. ## Create an overall issue and follow it @@ -35,24 +37,29 @@ Xth: (6 working days befor 22th) - [ ] Merge CE master in to EE master via merge request (#LINK) - [ ] Create CE, EE, CI RC1 versions (#LINK) +- [ ] Determine QA person and notify this person Xth: (5 working days befor 22th) +- [ ] Do QA and fix anything coming out of it (#LINK) - [ ] Close the omnibus-gitlab milestone -- [ ] Build rc1 package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) Xth: (4 working days befor 22th) +- [ ] Build rc1 package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) - [ ] Update GitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package) + +Xth: (3 working days befor 22th) + - [ ] Create regression issues (CE, CI) (#LINK) - [ ] Tweet about rc1 (#LINK) -- [ ] Start blog post (#LINK) -- [ ] Determine QA person and notify him +- [ ] Prepare the blog post (#LINK) + Xth: (2 working days befor 22th) - [ ] Merge CE stable branch into EE stable branch -- [ ] Do QA and fix anything coming out of it (#LINK) +- [ ] Check that everyone is mentioned on the blog post (the reviewer should have done this one working day ago) Xth: (1 working day befor 22th) @@ -85,6 +92,21 @@ There are three changelogs that need to be updated: CE, EE and CI. [Follow this How-to guide](howto_rc1.md) to create RC1. +## QA + +Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X QA" in order to keep track of the progress. + +Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gitlab.org/gitlab/gitlab-ee/blob/master/doc/release/manual_testing.md). + +**NOTE** Upgrader can only be tested when tags are pushed to all repositories. Do not forget to confirm it is working before releasing. Note that in the issue. + +#### Fix anything coming out of the QA + +Create an issue with description of a problem, if it is quick fix fix it yourself otherwise contact the team for advice. + +**NOTE** If there is a problem that cannot be fixed in a timely manner, reverting the feature is an option! If the feature is reverted, +create an issue about it in order to discuss the next steps after the release. + ## Update GitLab.com with RC1 Merge the RC1 EE code into GitLab.com. @@ -126,21 +148,6 @@ Tweet about the RC release: - Assign to one reviewer who will fix spelling issues by editing the branch (either with a git client or by using the online editor) - Comment to the reviewer: '@person Please mention the whole team as soon as you are done (3 workdays before release at the latest)' -## QA - -Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X QA" in order to keep track of the progress. - -Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gitlab.org/gitlab/gitlab-ee/blob/master/doc/release/manual_testing.md). - -**NOTE** Upgrader can only be tested when tags are pushed to all repositories. Do not forget to confirm it is working before releasing. Note that in the issue. - -#### Fix anything coming out of the QA - -Create an issue with description of a problem, if it is quick fix fix it yourself otherwise contact the team for advice. - -**NOTE** If there is a problem that cannot be fixed in a timely manner, reverting the feature is an option! If the feature is reverted, -create an issue about it in order to discuss the next steps after the release. - ## Create CE, EE, CI stable versions Get release tools @@ -193,5 +200,4 @@ Consider creating a post on Hacker News. ## Update GitLab.com with stable version -- Build a package for gitlab.com based on the official release instead of RC1 - Deploy the package (should not need downtime because of the small difference with RC1) -- cgit v1.2.1 From b9dd52dd14a98b69db0537fa3431fe6a01a3284d Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 10 Jan 2015 02:13:09 +0000 Subject: Improve monthly.md with fixes proposed from Sytse --- doc/release/monthly.md | 48 +++++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 917dc7f6934..810f992cafb 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -14,9 +14,7 @@ This person should also make sure this document is kept up to date and issues ar ## Take weekend and vacations into account -The time is measured in weekdays to compensate for weekends. -Do things on time to prevent problems due to rush jobs or too little testing time. -Make sure that you take into account vacations of maintainers. +Ensure that there is enough time to incorporate the findings of the release candidate, etc. ## Create an overall issue and follow it @@ -37,29 +35,24 @@ Xth: (6 working days befor 22th) - [ ] Merge CE master in to EE master via merge request (#LINK) - [ ] Create CE, EE, CI RC1 versions (#LINK) -- [ ] Determine QA person and notify this person Xth: (5 working days befor 22th) -- [ ] Do QA and fix anything coming out of it (#LINK) - [ ] Close the omnibus-gitlab milestone +- [ ] Build rc1 package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) Xth: (4 working days befor 22th) -- [ ] Build rc1 package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) - [ ] Update GitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package) - -Xth: (3 working days befor 22th) - - [ ] Create regression issues (CE, CI) (#LINK) - [ ] Tweet about rc1 (#LINK) -- [ ] Prepare the blog post (#LINK) - +- [ ] Start blog post (#LINK) +- [ ] Determine QA person and notify him Xth: (2 working days befor 22th) - [ ] Merge CE stable branch into EE stable branch -- [ ] Check that everyone is mentioned on the blog post (the reviewer should have done this one working day ago) +- [ ] Do QA and fix anything coming out of it (#LINK) Xth: (1 working day befor 22th) @@ -92,21 +85,6 @@ There are three changelogs that need to be updated: CE, EE and CI. [Follow this How-to guide](howto_rc1.md) to create RC1. -## QA - -Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X QA" in order to keep track of the progress. - -Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gitlab.org/gitlab/gitlab-ee/blob/master/doc/release/manual_testing.md). - -**NOTE** Upgrader can only be tested when tags are pushed to all repositories. Do not forget to confirm it is working before releasing. Note that in the issue. - -#### Fix anything coming out of the QA - -Create an issue with description of a problem, if it is quick fix fix it yourself otherwise contact the team for advice. - -**NOTE** If there is a problem that cannot be fixed in a timely manner, reverting the feature is an option! If the feature is reverted, -create an issue about it in order to discuss the next steps after the release. - ## Update GitLab.com with RC1 Merge the RC1 EE code into GitLab.com. @@ -148,6 +126,21 @@ Tweet about the RC release: - Assign to one reviewer who will fix spelling issues by editing the branch (either with a git client or by using the online editor) - Comment to the reviewer: '@person Please mention the whole team as soon as you are done (3 workdays before release at the latest)' +## QA + +Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X QA" in order to keep track of the progress. + +Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gitlab.org/gitlab/gitlab-ee/blob/master/doc/release/manual_testing.md). + +**NOTE** Upgrader can only be tested when tags are pushed to all repositories. Do not forget to confirm it is working before releasing. Note that in the issue. + +#### Fix anything coming out of the QA + +Create an issue with description of a problem, if it is quick fix fix it yourself otherwise contact the team for advice. + +**NOTE** If there is a problem that cannot be fixed in a timely manner, reverting the feature is an option! If the feature is reverted, +create an issue about it in order to discuss the next steps after the release. + ## Create CE, EE, CI stable versions Get release tools @@ -200,4 +193,5 @@ Consider creating a post on Hacker News. ## Update GitLab.com with stable version +- Build a package for gitlab.com based on the official release instead of RC1 - Deploy the package (should not need downtime because of the small difference with RC1) -- cgit v1.2.1 From c736968695d2b2e0bd3be16fda2287e02966d9b2 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 10 Jan 2015 02:14:45 +0000 Subject: Improve monthly.md with fixes proposed from Sytse --- doc/release/monthly.md | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 810f992cafb..917dc7f6934 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -14,7 +14,9 @@ This person should also make sure this document is kept up to date and issues ar ## Take weekend and vacations into account -Ensure that there is enough time to incorporate the findings of the release candidate, etc. +The time is measured in weekdays to compensate for weekends. +Do things on time to prevent problems due to rush jobs or too little testing time. +Make sure that you take into account vacations of maintainers. ## Create an overall issue and follow it @@ -35,24 +37,29 @@ Xth: (6 working days befor 22th) - [ ] Merge CE master in to EE master via merge request (#LINK) - [ ] Create CE, EE, CI RC1 versions (#LINK) +- [ ] Determine QA person and notify this person Xth: (5 working days befor 22th) +- [ ] Do QA and fix anything coming out of it (#LINK) - [ ] Close the omnibus-gitlab milestone -- [ ] Build rc1 package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) Xth: (4 working days befor 22th) +- [ ] Build rc1 package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) - [ ] Update GitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package) + +Xth: (3 working days befor 22th) + - [ ] Create regression issues (CE, CI) (#LINK) - [ ] Tweet about rc1 (#LINK) -- [ ] Start blog post (#LINK) -- [ ] Determine QA person and notify him +- [ ] Prepare the blog post (#LINK) + Xth: (2 working days befor 22th) - [ ] Merge CE stable branch into EE stable branch -- [ ] Do QA and fix anything coming out of it (#LINK) +- [ ] Check that everyone is mentioned on the blog post (the reviewer should have done this one working day ago) Xth: (1 working day befor 22th) @@ -85,6 +92,21 @@ There are three changelogs that need to be updated: CE, EE and CI. [Follow this How-to guide](howto_rc1.md) to create RC1. +## QA + +Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X QA" in order to keep track of the progress. + +Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gitlab.org/gitlab/gitlab-ee/blob/master/doc/release/manual_testing.md). + +**NOTE** Upgrader can only be tested when tags are pushed to all repositories. Do not forget to confirm it is working before releasing. Note that in the issue. + +#### Fix anything coming out of the QA + +Create an issue with description of a problem, if it is quick fix fix it yourself otherwise contact the team for advice. + +**NOTE** If there is a problem that cannot be fixed in a timely manner, reverting the feature is an option! If the feature is reverted, +create an issue about it in order to discuss the next steps after the release. + ## Update GitLab.com with RC1 Merge the RC1 EE code into GitLab.com. @@ -126,21 +148,6 @@ Tweet about the RC release: - Assign to one reviewer who will fix spelling issues by editing the branch (either with a git client or by using the online editor) - Comment to the reviewer: '@person Please mention the whole team as soon as you are done (3 workdays before release at the latest)' -## QA - -Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X QA" in order to keep track of the progress. - -Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gitlab.org/gitlab/gitlab-ee/blob/master/doc/release/manual_testing.md). - -**NOTE** Upgrader can only be tested when tags are pushed to all repositories. Do not forget to confirm it is working before releasing. Note that in the issue. - -#### Fix anything coming out of the QA - -Create an issue with description of a problem, if it is quick fix fix it yourself otherwise contact the team for advice. - -**NOTE** If there is a problem that cannot be fixed in a timely manner, reverting the feature is an option! If the feature is reverted, -create an issue about it in order to discuss the next steps after the release. - ## Create CE, EE, CI stable versions Get release tools @@ -193,5 +200,4 @@ Consider creating a post on Hacker News. ## Update GitLab.com with stable version -- Build a package for gitlab.com based on the official release instead of RC1 - Deploy the package (should not need downtime because of the small difference with RC1) -- cgit v1.2.1 From 2e3749cdccfd2eb2e596980e16b88a604e97834e Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 11 Jan 2015 01:32:42 +0000 Subject: Replace befor with before --- doc/release/monthly.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 917dc7f6934..20a9392747c 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -25,7 +25,7 @@ Replace the dates with actual dates based on the number of workdays before the r All steps from issue template are explained below ``` -Xth: (7 working days befor 22th) +Xth: (7 working days before 22th) - [ ] Code freeze - [ ] Update the CE changelog (#LINK) @@ -33,35 +33,35 @@ Xth: (7 working days befor 22th) - [ ] Update the CI changelog (#LINK) - [ ] Triage the omnibus-gitlab milestone -Xth: (6 working days befor 22th) +Xth: (6 working days before 22th) - [ ] Merge CE master in to EE master via merge request (#LINK) - [ ] Create CE, EE, CI RC1 versions (#LINK) - [ ] Determine QA person and notify this person -Xth: (5 working days befor 22th) +Xth: (5 working days before 22th) - [ ] Do QA and fix anything coming out of it (#LINK) - [ ] Close the omnibus-gitlab milestone -Xth: (4 working days befor 22th) +Xth: (4 working days before 22th) - [ ] Build rc1 package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) - [ ] Update GitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package) -Xth: (3 working days befor 22th) +Xth: (3 working days before 22th) - [ ] Create regression issues (CE, CI) (#LINK) - [ ] Tweet about rc1 (#LINK) - [ ] Prepare the blog post (#LINK) -Xth: (2 working days befor 22th) +Xth: (2 working days before 22th) - [ ] Merge CE stable branch into EE stable branch - [ ] Check that everyone is mentioned on the blog post (the reviewer should have done this one working day ago) -Xth: (1 working day befor 22th) +Xth: (1 working day before 22th) - [ ] Create CE, EE, CI stable versions (#LINK) - [ ] Create Omnibus tags and build packages -- cgit v1.2.1 From 1c3c8a9c55457a3147d5da7431505ecf87f70007 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 11 Jan 2015 01:34:35 +0000 Subject: Make ordered lists for release doc --- doc/release/monthly.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 20a9392747c..c0f66964a9a 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -134,19 +134,19 @@ Tweet about the RC release: ## Prepare the blog post -- Start with a complete copy of the [release blog template](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/release_blog_template.md) and fill it out. -- Make sure the blog post contains information about the GitLab CI release. -- Check the changelog of CE and EE for important changes. -- Also check the CI changelog -- Add a proposed tweet text to the blog post WIP MR description. -- Create a WIP MR for the blog post -- Ask Dmitriy to add screenshots to the WIP MR. -- Decide with team who will be the MVP user. -- Create WIP MR for adding MVP to MVP page on website -- Add a note if there are security fixes: This release fixes an important security issue and we advise everyone to upgrade as soon as possible. -- Create a merge request on [GitLab.com](https://gitlab.com/gitlab-com/www-gitlab-com/tree/master) -- Assign to one reviewer who will fix spelling issues by editing the branch (either with a git client or by using the online editor) -- Comment to the reviewer: '@person Please mention the whole team as soon as you are done (3 workdays before release at the latest)' +1. Start with a complete copy of the [release blog template](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/release_blog_template.md) and fill it out. +1. Make sure the blog post contains information about the GitLab CI release. +1. Check the changelog of CE and EE for important changes. +1. Also check the CI changelog +1. Add a proposed tweet text to the blog post WIP MR description. +1. Create a WIP MR for the blog post +1. Ask Dmitriy to add screenshots to the WIP MR. +1. Decide with team who will be the MVP user. +1. Create WIP MR for adding MVP to MVP page on website +1. Add a note if there are security fixes: This release fixes an important security issue and we advise everyone to upgrade as soon as possible. +1. Create a merge request on [GitLab.com](https://gitlab.com/gitlab-com/www-gitlab-com/tree/master) +1. Assign to one reviewer who will fix spelling issues by editing the branch (either with a git client or by using the online editor) +1. Comment to the reviewer: '@person Please mention the whole team as soon as you are done (3 workdays before release at the latest)' ## Create CE, EE, CI stable versions @@ -165,9 +165,9 @@ bundle exec rake release["x.x.0"] Also perform these steps for GitLab CI: -- bump version in the stable branch -- create annotated tag -- push the stable branch and the annotated tag to the public repositories +1. bump version in the stable branch +1. create annotated tag +1. push the stable branch and the annotated tag to the public repositories Update [installation.md](/doc/install/installation.md) to the newest version in master. @@ -180,16 +180,16 @@ This can happen before tagging because Omnibus uses tags in its own repo and SHA ## Release CE, EE and CI -### 1. Publish packages for new release +__1. Publish packages for new release__ Update `downloads/index.html` and `downloads/archive/index.html` in `www-gitlab-com` repository. -### 2. Publish blog for new release +__2. Publish blog for new release__ Doublecheck the everyone has been mentioned in the blog post. Merge the [blog merge request](#1-prepare-the-blog-post) in `www-gitlab-com` repository. -### 3. Tweet to blog +__3. Tweet to blog__ Send out a tweet to share the good news with the world. List the most important features and link to the blog post. -- cgit v1.2.1 From 37163d7c750c4e517dd0cc08707e690bb6a23730 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Sat, 10 Jan 2015 19:28:50 -0800 Subject: Small spelling improvements. --- doc/release/monthly.md | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index c0f66964a9a..42a7e96ec35 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -1,10 +1,11 @@ # Monthly Release -NOTE: This is a guide for GitLab developers. - -It starts 7 days before release. Current release manager must choose next release manager. -New release manager should create overall issue at GitLab +NOTE: This is a guide used by the GitLab B.V. developers. +It starts 7 working days before the release. +The release manager doesn't have to perform all the work but must ensure someone is assigned. +The current release manager must schedule the appointment of the next release manager. +The new release manager should create overall issue to track the progress. ## Release Manager @@ -12,11 +13,12 @@ A release manager is selected that coordinates all releases the coming month, in The release manager has to make sure all the steps below are done and delegated where necessary. This person should also make sure this document is kept up to date and issues are created and updated. -## Take weekend and vacations into account +## Take vacations into account The time is measured in weekdays to compensate for weekends. -Do things on time to prevent problems due to rush jobs or too little testing time. -Make sure that you take into account vacations of maintainers. +Do everything on time to prevent problems due to rush jobs or too little testing time. +Make sure that you take into account any vacations of maintainers. +If the release is falling behind immediately warn the team. ## Create an overall issue and follow it @@ -25,7 +27,7 @@ Replace the dates with actual dates based on the number of workdays before the r All steps from issue template are explained below ``` -Xth: (7 working days before 22th) +Xth: (7 working days before the 22nd) - [ ] Code freeze - [ ] Update the CE changelog (#LINK) @@ -33,35 +35,34 @@ Xth: (7 working days before 22th) - [ ] Update the CI changelog (#LINK) - [ ] Triage the omnibus-gitlab milestone -Xth: (6 working days before 22th) +Xth: (6 working days before the 22nd) - [ ] Merge CE master in to EE master via merge request (#LINK) - [ ] Create CE, EE, CI RC1 versions (#LINK) - [ ] Determine QA person and notify this person -Xth: (5 working days before 22th) +Xth: (5 working days before the 22nd) - [ ] Do QA and fix anything coming out of it (#LINK) - [ ] Close the omnibus-gitlab milestone -Xth: (4 working days before 22th) +Xth: (4 working days before the 22nd) - [ ] Build rc1 package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) - [ ] Update GitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package) -Xth: (3 working days before 22th) +Xth: (3 working days before the 22nd) - [ ] Create regression issues (CE, CI) (#LINK) - [ ] Tweet about rc1 (#LINK) - [ ] Prepare the blog post (#LINK) - -Xth: (2 working days before 22th) +Xth: (2 working days before the 22nd) - [ ] Merge CE stable branch into EE stable branch - [ ] Check that everyone is mentioned on the blog post (the reviewer should have done this one working day ago) -Xth: (1 working day before 22th) +Xth: (1 working day before the 22nd) - [ ] Create CE, EE, CI stable versions (#LINK) - [ ] Create Omnibus tags and build packages @@ -70,9 +71,9 @@ Xth: (1 working day before 22th) - [ ] Release CE, EE and CI (#LINK) -Xth: (1 working day after 22th) +Xth: (1 working day after the 22nd) -- [ ] Deploy to GitLab.com (#LINK) +- [ ] Update GitLab.com with the stable version (#LINK) ``` @@ -198,6 +199,6 @@ Proposed tweet "Release of GitLab X.X & CI Y.Y! FEATURE, FEATURE and FEATURE
  • Date: Mon, 12 Jan 2015 11:08:53 +0100 Subject: Add search filter option on project api for authorized projects. --- doc/api/projects.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/api/projects.md b/doc/api/projects.md index 22d3c828a4b..027a8ec2e7f 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -13,6 +13,7 @@ Parameters: - `archived` (optional) - if passed, limit by archived status - `order_by` (optional) - Return requests ordered by `id`, `name`, `created_at` or `last_activity_at` fields - `sort` (optional) - Return requests sorted in `asc` or `desc` order +- `search` (optional) - Return list of authorized projects according to a search criteria ```json [ -- cgit v1.2.1 From 0be1a45b9f4296016e758a5e650f516262fae640 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Mon, 12 Jan 2015 22:19:22 -0500 Subject: Updated monthly.md add instructions about the handling of the CHANGELOG Added DISCLAIMER to CHANGELOG --- doc/release/monthly.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 42a7e96ec35..7e2e4f41d6e 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -85,14 +85,26 @@ Stop merging code in master, except for important bug fixes ## Update changelog -Any changes not yet added to the changelog are added by lead developer and in that merge request the complete team is asked if there is anything missing. +Any changes not yet added to the changelog are added by lead developer and in that merge request the complete team is +asked if there is anything missing. There are three changelogs that need to be updated: CE, EE and CI. +Remove the DISCLAIMER text in the stable branches. + ## Create RC1 (CE, EE, CI) [Follow this How-to guide](howto_rc1.md) to create RC1. +## Prepare CHANGELOG for next release + +Once the stable branches have been created, update the CHANGELOG in `master` with the upcoming version and add 70 empty +lines to it. We do this in order to avoid merge conflicts when merging the CHANGELOG. + +Make sure that the CHANGELOG im master contains the following disclaimer message: + +> DISCLAIMER: The upcoming release contains empty lines to reduce the number of merge conflicts, scroll down to see past releases. + ## QA Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X QA" in order to keep track of the progress. -- cgit v1.2.1 From e588328674f1c0c956b924c9ec78391d209150cd Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Mon, 12 Jan 2015 22:26:51 -0500 Subject: Fixed wording in message. --- doc/release/monthly.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 7e2e4f41d6e..175112b90c6 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -90,7 +90,7 @@ asked if there is anything missing. There are three changelogs that need to be updated: CE, EE and CI. -Remove the DISCLAIMER text in the stable branches. +Remove the Note text in the stable branches. ## Create RC1 (CE, EE, CI) @@ -103,7 +103,7 @@ lines to it. We do this in order to avoid merge conflicts when merging the CHANG Make sure that the CHANGELOG im master contains the following disclaimer message: -> DISCLAIMER: The upcoming release contains empty lines to reduce the number of merge conflicts, scroll down to see past releases. +> Note: The upcoming release contains empty lines to reduce the number of merge conflicts, scroll down to see past releases. ## QA -- cgit v1.2.1 From f07b165ab7b0834eadbe05da81fc167dcc23d59d Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Mon, 12 Jan 2015 15:30:34 -0800 Subject: OAuth API documentation update --- doc/api/README.md | 18 ++++++++++ doc/api/oauth2.md | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 doc/api/oauth2.md (limited to 'doc') diff --git a/doc/api/README.md b/doc/api/README.md index ffe250df3ff..8f919f5257d 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -51,6 +51,24 @@ curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" "http://example.com/api/v3/p The API uses JSON to serialize data. You don't need to specify `.json` at the end of API URL. +## Authentication with OAuth2 token + +Instead of the private_token you can transmit the OAuth2 access token as a header or as a parameter. + +### OAuth2 token (as a parameter) + +``` +curl https://localhost:3000/api/v3/user?access_token=OAUTH-TOKEN +``` + +### OAuth2 token (as a header) + +``` +curl -H "Authorization: Bearer OAUTH-TOKEN" https://localhost:3000/api/v3/user +``` + +Read more about [OAuth2 in GitLab](oauth2.md). + ## Status codes The API is designed to return different status codes according to context and action. In this way if a request results in an error the caller is able to get insight into what went wrong, e.g. status code `400 Bad Request` is returned if a required attribute is missing from the request. The following list gives an overview of how the API functions generally behave. diff --git a/doc/api/oauth2.md b/doc/api/oauth2.md new file mode 100644 index 00000000000..b2dbba9bdeb --- /dev/null +++ b/doc/api/oauth2.md @@ -0,0 +1,99 @@ +# OAuth2 authentication + +OAuth2 is a protocol that enables us to get access to private details of user's account without getting its password. + +Before using the OAuth2 you should create an application in user's account. Each application getting unique App ID and App Secret parameters. You should not share them. + +This functianolity is based on [doorkeeper gem](https://github.com/doorkeeper-gem/doorkeeper) + +## Web Application Flow + +This flow is using for authentication from third-party web sites and probably is most used. +It basically consists of an exchange of an authorization token for an access token. For more detailed info, check out the [RFC spec here](http://tools.ietf.org/html/rfc6749#section-4.1) + +This flow consists from 3 steps. + +### 1. Registering the client + +Creat an application in user's account profile. + +### 2. Requesting authorization + +To request the authorization token, you should visit the `/oauth/authorize` endpoint. You can do that by visiting manually the URL: + +``` +http://localhost:3000/oauth/authorize?client_id=APP_ID&redirect_uri=REDIRECT_URI&response_type=code +``` + +Where REDIRECT_URI is the URL in your app where users will be sent after authorization. + +### 3. Requesting the access token + +To request the access token, you should use the returned code and exchange it for an access token. To do that you can use any HTTP client. In this case, I used rest-client: + +``` +parameters = 'client_id=APP_ID&client_secret=APP_SECRET&code=RETURNED_CODE&grant_type=AUTHORIZATION_CODE&redirect_uri=REDIRECT_URI' +RestClient.post 'http://localhost:3000/oauth/token', parameters + +# The response will be +{ + "access_token": "de6780bc506a0446309bd9362820ba8aed28aa506c71eedbe1c5c4f9dd350e54", + "token_type": "bearer", + "expires_in": 7200, + "refresh_token": "8257e65c97202ed1726cf9571600918f3bffb2544b26e00a61df9897668c33a1" +} +``` + +You can now make requests to the API with the access token returned. + +### Use the access token to access the API + +The access token allows you to make requests to the API on a behalf of a user. + +``` +GET https://localhost:3000/api/v3/user?access_token=OAUTH-TOKEN +``` + +Or you can put the token to the Authorization header: + +``` +curl -H "Authorization: Bearer OAUTH-TOKEN" https://localhost:3000/api/v3/user +``` + +## Resource Owner Password Credentials + +In this flow, a token is requested in exchange for the resource owner credentials (username and password). +The credentials should only be used when there is a high degree of trust between the resource owner and the client (e.g. the +client is part of the device operating system or a highly privileged application), and when other authorization grant types are not +available (such as an authorization code). + +Even though this grant type requires direct client access to the resource owner credentials, the resource owner credentials are used +for a single request and are exchanged for an access token. This grant type can eliminate the need for the client to store the +resource owner credentials for future use, by exchanging the credentials with a long-lived access token or refresh token. +You can do POST request to `/oauth/token` with parameters: + +``` +{ + "grant_type" : "password", + "username" : "user@example.com", + "password" : "sekret" +} +``` + +Then, you'll receive the access token back in the response: + +``` +{ + "access_token": "1f0af717251950dbd4d73154fdf0a474a5c5119adad999683f5b450c460726aa", + "token_type": "bearer", + "expires_in": 7200 +} +``` + +For testing you can use the oauth2 ruby gem: + +``` +client = OAuth2::Client.new('the_client_id', 'the_client_secret', :site => "http://example.com") +access_token = client.password.get_token('user@example.com', 'sekret') +puts access_token.token +``` \ No newline at end of file -- cgit v1.2.1 From a7dddd1bcab578ce0e28069da256face8039a2da Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 14 Jan 2015 17:34:39 -0800 Subject: Create update doc for 7.7 --- doc/update/7.6-to-7.7.md | 114 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 doc/update/7.6-to-7.7.md (limited to 'doc') diff --git a/doc/update/7.6-to-7.7.md b/doc/update/7.6-to-7.7.md new file mode 100644 index 00000000000..a5a30f925c7 --- /dev/null +++ b/doc/update/7.6-to-7.7.md @@ -0,0 +1,114 @@ +# From 7.6 to 7.7 + +### 0. Stop server + + sudo service gitlab stop + +### 1. Backup + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production +``` + +### 2. Get latest code + +```bash +sudo -u git -H git fetch --all +sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically +``` + +For GitLab Community Edition: + +```bash +sudo -u git -H git checkout 7-7-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 7-7-stable-ee +``` + +### 3. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch +sudo -u git -H git checkout v2.4.0 +``` + +### 4. Install libs, migrations, etc. + +```bash +sudo apt-get install libkrb5-dev + +cd /home/git/gitlab + +# MySQL installations (note: the line below states '--without ... postgres') +sudo -u git -H bundle install --without development test postgres --deployment + +# PostgreSQL installations (note: the line below states '--without ... mysql') +sudo -u git -H bundle install --without development test mysql --deployment + +# Run database migrations +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production + +# Clean up assets and cache +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production + +# Update init.d script +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab +``` + +### 5. Update config files + +#### New configuration options for `gitlab.yml` + +There are new configuration options available for [`gitlab.yml`](config/gitlab.yml.example). View them with the command below and apply them to your current `gitlab.yml`. + +``` +git diff origin/7-6-stable:config/gitlab.yml.example origin/7-7-stable:config/gitlab.yml.example +``` + +#### Change Nginx settings + +* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as [`lib/support/nginx/gitlab`](/lib/support/nginx/gitlab) but with your settings +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as [`lib/support/nginx/gitlab-ssl`](/lib/support/nginx/gitlab-ssl) but with your setting + +#### Setup time zone (optional) + +Consider setting the time zone in `gitlab.yml` otherwise GitLab will default to UTC. If you set a time zone previously in [`application.rb`](config/application.rb) (unlikely), unset it. + +### 6. Start application + + sudo service gitlab start + sudo service nginx restart + +### 7. Check application status + +Check if GitLab and its environment are configured correctly: + + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production + +To make sure you didn't miss anything run a more thorough check with: + + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production + +If all items are green, then congratulations upgrade is complete! + +## Things went south? Revert to previous version (7.6) + +### 1. Revert the code to the previous version +Follow the [upgrade guide from 7.5 to 7.6](7.5-to-7.6.md), except for the database migration +(The backup is already migrated to the previous version) + +### 2. Restore from the backup: + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production +``` +If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above. -- cgit v1.2.1 From 973449b56748f7e65384ea9f66d72ed9226e0b08 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 14 Jan 2015 17:40:35 -0800 Subject: Update guides for CE --- doc/update/6.x-or-7.x-to-7.6.md | 287 ---------------------------------------- doc/update/6.x-or-7.x-to-7.7.md | 287 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 287 insertions(+), 287 deletions(-) delete mode 100644 doc/update/6.x-or-7.x-to-7.6.md create mode 100644 doc/update/6.x-or-7.x-to-7.7.md (limited to 'doc') diff --git a/doc/update/6.x-or-7.x-to-7.6.md b/doc/update/6.x-or-7.x-to-7.6.md deleted file mode 100644 index 883a654dcd8..00000000000 --- a/doc/update/6.x-or-7.x-to-7.6.md +++ /dev/null @@ -1,287 +0,0 @@ -# From 6.x or 7.x to 7.6 - -This allows you to upgrade any version of GitLab from 6.0 and up (including 7.0 and up) to 7.6. - -## Global issue numbers - -As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects. - -## Editable labels - -In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it -possible to edit the label text and color. The characters `?`, `&` and `,` are -no longer allowed however so those will be removed from your tags during the -database migrations for GitLab 7.2. - -## 0. Stop server - - sudo service gitlab stop - -## 1. Backup - -It's useful to make a backup just in case things go south: -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) - -```bash -cd /home/git/gitlab -sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production -``` - -## 2. Update Ruby - -If you are still using Ruby 1.9.3 or below, you will need to update Ruby. -You can check which version you are running with `ruby -v`. - -If you are you running Ruby 2.0.x, you do not need to upgrade ruby, but can consider doing so for performance reasons. - -If you are running Ruby 2.1.1 consider upgrading to 2.1.5, because of the high memory usage of Ruby 2.1.1. - -Install, update dependencies: - -```bash -sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl -``` - -Download and compile Ruby: - -```bash -mkdir /tmp/ruby && cd /tmp/ruby -curl --progress http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz | tar xz -cd ruby-2.1.5 -./configure --disable-install-rdoc -make -sudo make install -``` - -Install Bundler: - -```bash -sudo gem install bundler --no-ri --no-rdoc -``` - -## 3. Get latest code - -```bash -cd /home/git/gitlab -sudo -u git -H git fetch --all -sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically -``` - -For GitLab Community Edition: - -```bash -sudo -u git -H git checkout 7-6-stable -``` - -OR - -For GitLab Enterprise Edition: - -```bash -sudo -u git -H git checkout 7-6-stable-ee -``` - -## 4. Install additional packages - -```bash -# Add support for lograte for better log file handling -sudo apt-get install logrotate - -# Install pkg-config and cmake, which is needed for the latest versions of rugged -sudo apt-get install pkg-config cmake -``` - -## 5. Configure Redis to use sockets - - # Configure redis to use sockets - sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig - # Disable Redis listening on TCP by setting 'port' to 0 - sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf - # Enable Redis socket for default Debian / Ubuntu path - echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf - # Be sure redis group can write to the socket, enable only if supported (>= redis 2.4.0). - sudo sed -i '/# unixsocketperm/ s/^# unixsocketperm.*/unixsocketperm 0775/' /etc/redis/redis.conf - # Activate the changes to redis.conf - sudo service redis-server restart - # Add git to the redis group - sudo usermod -aG redis git - - # Configure Redis connection settings - sudo -u git -H cp config/resque.yml.example config/resque.yml - # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration - sudo -u git -H editor config/resque.yml - - # Configure gitlab-shell to use Redis sockets - sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml - -## 6. Update gitlab-shell - -```bash -cd /home/git/gitlab-shell -sudo -u git -H git fetch -sudo -u git -H git checkout v2.4.0 -``` - -## 7. Install libs, migrations, etc. - -```bash -cd /home/git/gitlab - -# MySQL installations (note: the line below states '--without ... postgres') -sudo -u git -H bundle install --without development test postgres --deployment - -# PostgreSQL installations (note: the line below states '--without ... mysql') -sudo -u git -H bundle install --without development test mysql --deployment - -# Run database migrations -sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production - -# Enable internal issue IDs (introduced in GitLab 6.1) -sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production - -# Clean up assets and cache -sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production - -# Close access to gitlab-satellites for others -sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites - -# Update init.d script -sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab -``` - -## 8. Update config files - -TIP: to see what changed in `gitlab.yml.example` in this release use next command: - -``` -git diff 6-0-stable:config/gitlab.yml.example 7-6-stable:config/gitlab.yml.example -``` - -* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-6-stable/config/gitlab.yml.example but with your settings. -* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-6-stable/config/unicorn.rb.example but with your settings. -* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.4.0/config.yml.example but with your settings. -* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-6-stable/lib/support/nginx/gitlab but with your settings. -* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-6-stable/lib/support/nginx/gitlab-ssl but with your settings. -* Copy rack attack middleware config - -```bash -sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb -``` - -* Set up logrotate - -```bash -sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab -``` - -## 9. Start application - - sudo service gitlab start - sudo service nginx restart - -## 10. Check application status - -Check if GitLab and its environment are configured correctly: - - cd /home/git/gitlab - sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production - -To make sure you didn't miss anything run a more thorough check with: - - sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production - -If all items are green, then congratulations upgrade complete! - -## 11. Update OmniAuth configuration - -When using Google omniauth login, changes of the Google account required. -Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/). -More details can be found at the [integration documentation](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/google.md). - -## 12. Optional optimizations for GitLab setups with MySQL databases - -Only applies if running MySQL database created with GitLab 6.7 or earlier. If you are not experiencing any issues you may not need the following instructions however following them will bring your database in line with the latest recommended installation configuration and help avoid future issues. Be sure to follow these directions exactly. These directions should be safe for any MySQL instance but to be sure make a current MySQL database backup beforehand. - -``` -# Stop GitLab -sudo service gitlab stop - -# Secure your MySQL installation (added in GitLab 6.2) -sudo mysql_secure_installation - -# Login to MySQL -mysql -u root -p - -# do not type the 'mysql>', this is part of the prompt - -# Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) -SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; - -# If previous query returned results, copy & run all outputed SQL statements - -# Convert all tables to correct character set -SET foreign_key_checks = 0; -SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; - -# If previous query returned results, copy & run all outputed SQL statements - -# turn foreign key checks back on -SET foreign_key_checks = 1; - -# Find MySQL users -mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%'; - -# If git user exists and gitlab user does not exist -# you are done with the database cleanup tasks -mysql> \q - -# If both users exist skip to Delete gitlab user - -# Create new user for GitLab (changed in GitLab 6.4) -# change $password in the command below to a real password you pick -mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password'; - -# Grant the git user necessary permissions on the database -mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost'; - -# Delete the old gitlab user -mysql> DELETE FROM mysql.user WHERE user='gitlab'; - -# Quit the database session -mysql> \q - -# Try connecting to the new database with the new user -sudo -u git -H mysql -u git -p -D gitlabhq_production - -# Type the password you replaced $password with earlier - -# You should now see a 'mysql>' prompt - -# Quit the database session -mysql> \q - -# Update database configuration details -# See config/database.yml.mysql for latest recommended configuration details -# Remove the reaping_frequency setting line if it exists (removed in GitLab 6.8) -# Set production -> pool: 10 (updated in GitLab 5.3) -# Set production -> username: git -# Set production -> password: the password your replaced $password with earlier -sudo -u git -H editor /home/git/gitlab/config/database.yml -``` - -## Things went south? Revert to previous version (6.0) - -### 1. Revert the code to the previous version - -Follow the [upgrade guide from 5.4 to 6.0](5.4-to-6.0.md), except for the database migration (the backup is already migrated to the previous version). - -### 2. Restore from the backup: - -```bash -cd /home/git/gitlab -sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production -``` - -## Login issues after upgrade? - -If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page) diff --git a/doc/update/6.x-or-7.x-to-7.7.md b/doc/update/6.x-or-7.x-to-7.7.md new file mode 100644 index 00000000000..81cc9d379e2 --- /dev/null +++ b/doc/update/6.x-or-7.x-to-7.7.md @@ -0,0 +1,287 @@ +# From 6.x or 7.x to 7.7 + +This allows you to upgrade any version of GitLab from 6.0 and up (including 7.0 and up) to 7.7. + +## Global issue numbers + +As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects. + +## Editable labels + +In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it +possible to edit the label text and color. The characters `?`, `&` and `,` are +no longer allowed however so those will be removed from your tags during the +database migrations for GitLab 7.2. + +## 0. Stop server + + sudo service gitlab stop + +## 1. Backup + +It's useful to make a backup just in case things go south: +(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production +``` + +## 2. Update Ruby + +If you are still using Ruby 1.9.3 or below, you will need to update Ruby. +You can check which version you are running with `ruby -v`. + +If you are you running Ruby 2.0.x, you do not need to upgrade ruby, but can consider doing so for performance reasons. + +If you are running Ruby 2.1.1 consider upgrading to 2.1.5, because of the high memory usage of Ruby 2.1.1. + +Install, update dependencies: + +```bash +sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl +``` + +Download and compile Ruby: + +```bash +mkdir /tmp/ruby && cd /tmp/ruby +curl --progress http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz | tar xz +cd ruby-2.1.5 +./configure --disable-install-rdoc +make +sudo make install +``` + +Install Bundler: + +```bash +sudo gem install bundler --no-ri --no-rdoc +``` + +## 3. Get latest code + +```bash +cd /home/git/gitlab +sudo -u git -H git fetch --all +sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically +``` + +For GitLab Community Edition: + +```bash +sudo -u git -H git checkout 7-7-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 7-7-stable-ee +``` + +## 4. Install additional packages + +```bash +# Add support for lograte for better log file handling +sudo apt-get install logrotate + +# Install pkg-config and cmake, which is needed for the latest versions of rugged +sudo apt-get install pkg-config cmake +``` + +## 5. Configure Redis to use sockets + + # Configure redis to use sockets + sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig + # Disable Redis listening on TCP by setting 'port' to 0 + sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf + # Enable Redis socket for default Debian / Ubuntu path + echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf + # Be sure redis group can write to the socket, enable only if supported (>= redis 2.4.0). + sudo sed -i '/# unixsocketperm/ s/^# unixsocketperm.*/unixsocketperm 0775/' /etc/redis/redis.conf + # Activate the changes to redis.conf + sudo service redis-server restart + # Add git to the redis group + sudo usermod -aG redis git + + # Configure Redis connection settings + sudo -u git -H cp config/resque.yml.example config/resque.yml + # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration + sudo -u git -H editor config/resque.yml + + # Configure gitlab-shell to use Redis sockets + sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml + +## 6. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch +sudo -u git -H git checkout v2.4.0 +``` + +## 7. Install libs, migrations, etc. + +```bash +cd /home/git/gitlab + +# MySQL installations (note: the line below states '--without ... postgres') +sudo -u git -H bundle install --without development test postgres --deployment + +# PostgreSQL installations (note: the line below states '--without ... mysql') +sudo -u git -H bundle install --without development test mysql --deployment + +# Run database migrations +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production + +# Enable internal issue IDs (introduced in GitLab 6.1) +sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production + +# Clean up assets and cache +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production + +# Close access to gitlab-satellites for others +sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites + +# Update init.d script +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab +``` + +## 8. Update config files + +TIP: to see what changed in `gitlab.yml.example` in this release use next command: + +``` +git diff 6-0-stable:config/gitlab.yml.example 7-7-stable:config/gitlab.yml.example +``` + +* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-7-stable/config/gitlab.yml.example but with your settings. +* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-7-stable/config/unicorn.rb.example but with your settings. +* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.4.0/config.yml.example but with your settings. +* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-7-stable/lib/support/nginx/gitlab but with your settings. +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-7-stable/lib/support/nginx/gitlab-ssl but with your settings. +* Copy rack attack middleware config + +```bash +sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb +``` + +* Set up logrotate + +```bash +sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab +``` + +## 9. Start application + + sudo service gitlab start + sudo service nginx restart + +## 10. Check application status + +Check if GitLab and its environment are configured correctly: + + cd /home/git/gitlab + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production + +To make sure you didn't miss anything run a more thorough check with: + + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production + +If all items are green, then congratulations upgrade complete! + +## 11. Update OmniAuth configuration + +When using Google omniauth login, changes of the Google account required. +Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/). +More details can be found at the [integration documentation](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/google.md). + +## 12. Optional optimizations for GitLab setups with MySQL databases + +Only applies if running MySQL database created with GitLab 6.7 or earlier. If you are not experiencing any issues you may not need the following instructions however following them will bring your database in line with the latest recommended installation configuration and help avoid future issues. Be sure to follow these directions exactly. These directions should be safe for any MySQL instance but to be sure make a current MySQL database backup beforehand. + +``` +# Stop GitLab +sudo service gitlab stop + +# Secure your MySQL installation (added in GitLab 6.2) +sudo mysql_secure_installation + +# Login to MySQL +mysql -u root -p + +# do not type the 'mysql>', this is part of the prompt + +# Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) +SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; + +# If previous query returned results, copy & run all outputed SQL statements + +# Convert all tables to correct character set +SET foreign_key_checks = 0; +SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; + +# If previous query returned results, copy & run all outputed SQL statements + +# turn foreign key checks back on +SET foreign_key_checks = 1; + +# Find MySQL users +mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%'; + +# If git user exists and gitlab user does not exist +# you are done with the database cleanup tasks +mysql> \q + +# If both users exist skip to Delete gitlab user + +# Create new user for GitLab (changed in GitLab 6.4) +# change $password in the command below to a real password you pick +mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password'; + +# Grant the git user necessary permissions on the database +mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost'; + +# Delete the old gitlab user +mysql> DELETE FROM mysql.user WHERE user='gitlab'; + +# Quit the database session +mysql> \q + +# Try connecting to the new database with the new user +sudo -u git -H mysql -u git -p -D gitlabhq_production + +# Type the password you replaced $password with earlier + +# You should now see a 'mysql>' prompt + +# Quit the database session +mysql> \q + +# Update database configuration details +# See config/database.yml.mysql for latest recommended configuration details +# Remove the reaping_frequency setting line if it exists (removed in GitLab 6.8) +# Set production -> pool: 10 (updated in GitLab 5.3) +# Set production -> username: git +# Set production -> password: the password your replaced $password with earlier +sudo -u git -H editor /home/git/gitlab/config/database.yml +``` + +## Things went south? Revert to previous version (6.0) + +### 1. Revert the code to the previous version + +Follow the [upgrade guide from 5.4 to 6.0](5.4-to-6.0.md), except for the database migration (the backup is already migrated to the previous version). + +### 2. Restore from the backup: + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production +``` + +## Login issues after upgrade? + +If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page) -- cgit v1.2.1 From 8e36070cce9ba4b414397674d1f236c33f2689cc Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 14 Jan 2015 17:44:59 -0800 Subject: Remove bold text --- doc/release/howto_rc1.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/release/howto_rc1.md b/doc/release/howto_rc1.md index 2bfc23951ec..1b55eea5362 100644 --- a/doc/release/howto_rc1.md +++ b/doc/release/howto_rc1.md @@ -2,14 +2,14 @@ The RC1 release comes with the task to update the installation and upgrade docs. Be mindful that there might already be merge requests for this on GitLab or GitHub. -### **1. Update the installation guide** +### 1. Update the installation guide 1. Check if it references the correct branch `x-x-stable` (doesn't exist yet, but that is okay) 1. Check the [GitLab Shell version](/lib/tasks/gitlab/check.rake#L782) 1. Check the [Git version](/lib/tasks/gitlab/check.rake#L794) 1. There might be other changes. Ask around. -### **2. Create update guides** +### 2. Create update guides 1. Create: CE update guide from previous version. Like `7.3-to-7.4.md` 1. Create: CE to EE update guide in EE repository for latest version. @@ -65,7 +65,7 @@ Check if the `init.d/gitlab` script changed since last release: [lib/support/ini #### 10. Check application status -### **3. Code quality indicators** +### 3. Code quality indicators Make sure the code quality indicators are green / good. -- cgit v1.2.1 From 41353b63626a4d5eae3570015bfba72748364f35 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 15 Jan 2015 02:07:42 +0000 Subject: Fix code block in rc1 doc --- doc/release/howto_rc1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/release/howto_rc1.md b/doc/release/howto_rc1.md index 1b55eea5362..25923d16f34 100644 --- a/doc/release/howto_rc1.md +++ b/doc/release/howto_rc1.md @@ -121,6 +121,6 @@ Add to your local `gitlab-ci/.git/config`: * Create a stable branch `x-y-stable` * Bump VERSION to `x.y.0.rc1` -* `git tag -a v$(cat VERSION) -m "Version $(cat VERSION)" +* `git tag -a v$(cat VERSION) -m "Version $(cat VERSION)"` * `git push public x-y-stable v$(cat VERSION)` -- cgit v1.2.1 From 67b42e26cf955cf6dc240fd77935a47fbfac6694 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 15 Jan 2015 17:23:22 -0800 Subject: Fix shell version in manual installation doc --- doc/install/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index d987e11040b..b080e8f062b 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -278,7 +278,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da GitLab Shell is an SSH access and repository management software developed specially for GitLab. # Run the installation task for gitlab-shell (replace `REDIS_URL` if needed): - sudo -u git -H bundle exec rake gitlab:shell:install[v2.4.0] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production + sudo -u git -H bundle exec rake gitlab:shell:install[v2.4.1] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production # By default, the gitlab-shell config is generated from your main GitLab config. # You can review (and modify) the gitlab-shell config as follows: -- cgit v1.2.1 From ad18fcd0e61d2d6826a8e478345c3cd9b59049c5 Mon Sep 17 00:00:00 2001 From: Daniel Serodio Date: Wed, 17 Dec 2014 11:11:24 -0200 Subject: Document the `description` attribute of groups API --- doc/api/groups.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api/groups.md b/doc/api/groups.md index 8aae4f6b1bb..e6893d71774 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -14,7 +14,8 @@ GET /groups "id": 1, "name": "Foobar Group", "path": "foo-bar", - "owner_id": 18 + "owner_id": 18, + "description": "An interesting group" } ] ``` @@ -45,6 +46,7 @@ Parameters: - `name` (required) - The name of the group - `path` (required) - The path of the group +- `description` (optional) - The group's description ## Transfer project to group -- cgit v1.2.1 From 99647a1b706246bd59d016bb8223d4e1de45724e Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Fri, 16 Jan 2015 19:36:44 -0800 Subject: Update import.md documentation to specify correct directory ownership and permissions. --- doc/raketasks/import.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/raketasks/import.md b/doc/raketasks/import.md index bb229e8acbb..32fe4dc8d0a 100644 --- a/doc/raketasks/import.md +++ b/doc/raketasks/import.md @@ -16,12 +16,22 @@ it in the `/etc/gitlab/gitlab.rb` file. - For manual installations, it is usually located at: `/home/git/repositories` or you can see where your repositories are located by looking at `config/gitlab.yml` under the `gitlab_shell => repos_path` entry. +New folder needs to have git user ownership and read/write/execute access for git user and its group: + +``` +$ mkdir new_group +$ chown git:git new_group +$ chmod 770 new_group +``` + ### Copy your bare repositories inside this newly created folder: ``` $ cp -r /old/git/foo.git/ /home/git/repositories/new_group/ ``` +`foo.git` needs to be owned by the git user and git users group. + ### Run the command below depending on your type of installation: #### Omnibus Installation -- cgit v1.2.1 From 5ee99290bedb6f20ee9648d64029c383c1abb05c Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Sun, 18 Jan 2015 13:04:58 +0100 Subject: Update gitlab-shell in docs to 2.4.1 --- doc/update/6.x-or-7.x-to-7.7.md | 2 +- doc/update/7.6-to-7.7.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/update/6.x-or-7.x-to-7.7.md b/doc/update/6.x-or-7.x-to-7.7.md index 81cc9d379e2..6501a8d2148 100644 --- a/doc/update/6.x-or-7.x-to-7.7.md +++ b/doc/update/6.x-or-7.x-to-7.7.md @@ -119,7 +119,7 @@ sudo apt-get install pkg-config cmake ```bash cd /home/git/gitlab-shell sudo -u git -H git fetch -sudo -u git -H git checkout v2.4.0 +sudo -u git -H git checkout v2.4.1 ``` ## 7. Install libs, migrations, etc. diff --git a/doc/update/7.6-to-7.7.md b/doc/update/7.6-to-7.7.md index a5a30f925c7..90f15afcb62 100644 --- a/doc/update/7.6-to-7.7.md +++ b/doc/update/7.6-to-7.7.md @@ -37,7 +37,7 @@ sudo -u git -H git checkout 7-7-stable-ee ```bash cd /home/git/gitlab-shell sudo -u git -H git fetch -sudo -u git -H git checkout v2.4.0 +sudo -u git -H git checkout v2.4.1 ``` ### 4. Install libs, migrations, etc. -- cgit v1.2.1 From 5bd463c1d2a10be21344e80084072927e0f2081e Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sun, 18 Jan 2015 13:42:20 +0100 Subject: Add description to merge request The description can be provided when creating or updating a merge request. Signed-off-by: Loic Dachary --- doc/api/merge_requests.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 14884e53915..053fc9346be 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -109,6 +109,7 @@ Parameters: - `target_branch` (required) - The target branch - `assignee_id` (optional) - Assignee user ID - `title` (required) - Title of MR +- `description` (optional) - Description of MR - `target_project_id` (optional) - The target project (numeric id) ```json @@ -160,6 +161,7 @@ Parameters: - `target_branch` - The target branch - `assignee_id` - Assignee user ID - `title` - Title of MR +- `description` - Description of MR - `state_event` - New state (close|reopen|merge) ```json @@ -169,6 +171,7 @@ Parameters: "source_branch": "test1", "project_id": 3, "title": "test1", + "description": "description1", "state": "opened", "upvotes": 0, "downvotes": 0, -- cgit v1.2.1 From d5ae521cf798a4c553fcf836b51a28b65cd46da7 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Mon, 19 Jan 2015 12:19:21 -0800 Subject: update documentation regarding github_importer --- doc/integration/github.md | 2 +- doc/integration/github_app.png | Bin 75607 -> 75297 bytes doc/update/7.6-to-7.7.md | 5 +++++ 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/integration/github.md b/doc/integration/github.md index 714593d8266..a586334b98d 100644 --- a/doc/integration/github.md +++ b/doc/integration/github.md @@ -14,7 +14,7 @@ To enable the GitHub OmniAuth provider you must register your application with G - Application name: This can be anything. Consider something like "\'s GitLab" or "\'s GitLab" or something else descriptive. - Homepage URL: The URL to your GitLab installation. 'https://gitlab.company.com' - Application description: Fill this in if you wish. - - Authorization callback URL: 'https://gitlab.company.com/users/auth/github/callback' + - Authorization callback URL: 'https://gitlab.company.com/' 1. Select "Register application". 1. You should now see a Client ID and Client Secret near the top right of the page (see screenshot). Keep this page open as you continue configuration. ![GitHub app](github_app.png) diff --git a/doc/integration/github_app.png b/doc/integration/github_app.png index c0873b2e20d..d890345ced9 100644 Binary files a/doc/integration/github_app.png and b/doc/integration/github_app.png differ diff --git a/doc/update/7.6-to-7.7.md b/doc/update/7.6-to-7.7.md index 90f15afcb62..067f264d49d 100644 --- a/doc/update/7.6-to-7.7.md +++ b/doc/update/7.6-to-7.7.md @@ -99,6 +99,11 @@ To make sure you didn't miss anything run a more thorough check with: If all items are green, then congratulations upgrade is complete! +### 8. GitHub settings (if applicable) + +If you are using GitHub as an OAuth provider for authentication, you should change the callback url so that it +only contains a root url (ex. `https://gitlab.my-company-com/`) + ## Things went south? Revert to previous version (7.6) ### 1. Revert the code to the previous version -- cgit v1.2.1 From b63e6e5abca5e538a2500a54c6be1a030ed3b0f8 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Mon, 19 Jan 2015 14:14:00 -0800 Subject: fix url in update doc --- doc/update/7.6-to-7.7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/7.6-to-7.7.md b/doc/update/7.6-to-7.7.md index 067f264d49d..18cff26f1a0 100644 --- a/doc/update/7.6-to-7.7.md +++ b/doc/update/7.6-to-7.7.md @@ -102,7 +102,7 @@ If all items are green, then congratulations upgrade is complete! ### 8. GitHub settings (if applicable) If you are using GitHub as an OAuth provider for authentication, you should change the callback url so that it -only contains a root url (ex. `https://gitlab.my-company-com/`) +only contains a root url (ex. `https://example.com/`) ## Things went south? Revert to previous version (7.6) -- cgit v1.2.1 From fe1e3db5a3cf0495970b5fb38d1bf0945bc11c5a Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Mon, 19 Jan 2015 14:18:31 -0800 Subject: fix url in update doc --- doc/update/7.6-to-7.7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/7.6-to-7.7.md b/doc/update/7.6-to-7.7.md index 18cff26f1a0..51084576f33 100644 --- a/doc/update/7.6-to-7.7.md +++ b/doc/update/7.6-to-7.7.md @@ -102,7 +102,7 @@ If all items are green, then congratulations upgrade is complete! ### 8. GitHub settings (if applicable) If you are using GitHub as an OAuth provider for authentication, you should change the callback url so that it -only contains a root url (ex. `https://example.com/`) +only contains a root url (ex. `https://gitlab.example.com/`) ## Things went south? Revert to previous version (7.6) -- cgit v1.2.1 From c92de64bdb057922ca6f243f36502bbf160b9ffc Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Mon, 19 Jan 2015 21:08:04 -0800 Subject: GitHub importer description --- doc/workflow/README.md | 1 + doc/workflow/github_importer/importer.png | Bin 0 -> 39335 bytes doc/workflow/github_importer/new_project_page.png | Bin 0 -> 46276 bytes doc/workflow/import_projects_from_github.md | 13 +++++++++++++ 4 files changed, 14 insertions(+) create mode 100644 doc/workflow/github_importer/importer.png create mode 100644 doc/workflow/github_importer/new_project_page.png create mode 100644 doc/workflow/import_projects_from_github.md (limited to 'doc') diff --git a/doc/workflow/README.md b/doc/workflow/README.md index 8ef51b50b9d..1fe63274c29 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -8,4 +8,5 @@ - [GitLab Flow](gitlab_flow.md) - [Notifications](notifications.md) - [Migrating from SVN to GitLab](migrating_from_svn.md) +- [Project importing from GitHub to GitLab](import_projects_from_github.md) - [Protected branches](protected_branches.md) diff --git a/doc/workflow/github_importer/importer.png b/doc/workflow/github_importer/importer.png new file mode 100644 index 00000000000..57636717571 Binary files /dev/null and b/doc/workflow/github_importer/importer.png differ diff --git a/doc/workflow/github_importer/new_project_page.png b/doc/workflow/github_importer/new_project_page.png new file mode 100644 index 00000000000..002f22d81d7 Binary files /dev/null and b/doc/workflow/github_importer/new_project_page.png differ diff --git a/doc/workflow/import_projects_from_github.md b/doc/workflow/import_projects_from_github.md new file mode 100644 index 00000000000..8644b4ffc73 --- /dev/null +++ b/doc/workflow/import_projects_from_github.md @@ -0,0 +1,13 @@ +# Project importing from GitHub to GitLab + +You can import your existing GitHub projects to GitLab. But keep in mind that it is possible only if +GitHub support is enabled on your GitLab instance. You can read more about GitHub support [here](http://doc.gitlab.com/ce/integration/github.html) +To get to the importer page you need to go to "New project" page. + +![New project page](github_importer/new_project_page.png) + +Click on the "Import project from GitHub" link and you will be redirected to GitHub for permission to access your projects. After accepting, you'll be automatically redirected to the importer. + +![Importer page](github_importer/importer.png) + +To import a project, you can simple click "Add". The importer will import your repository and issues. Once the importer is done, a new GitLab project will be created with your imported data. \ No newline at end of file -- cgit v1.2.1 From 4ffdb83e713b1ffa9578c02d31cfd0d9afe56ca7 Mon Sep 17 00:00:00 2001 From: jubianchi Date: Sun, 18 Jan 2015 01:34:34 +0100 Subject: Add action property to merge request hook --- doc/web_hooks/web_hooks.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md index e17d21b990d..e3399e5f1b8 100644 --- a/doc/web_hooks/web_hooks.md +++ b/doc/web_hooks/web_hooks.md @@ -166,7 +166,9 @@ Triggered when a new merge request is created or an existing merge request was u "name": "GitLab dev user", "email": "gitlabdev@dv6700.(none)" } - } + }, + "url": "http://example.com/diaspora/merge_requests/1", + "action": "open" } } ``` -- cgit v1.2.1 From bfa8d573c5ff4088f53b97b923fc06f554e82266 Mon Sep 17 00:00:00 2001 From: Rens van der Heijden Date: Wed, 21 Jan 2015 09:50:17 +0100 Subject: Added a note saying inline HTML is disabled by default --- doc/markdown/markdown.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index edb7a975503..7842fdc8f49 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -420,6 +420,8 @@ Quote break. You can also use raw HTML in your Markdown, and it'll mostly work pretty well. +Note that inline HTML is disabled in the default Gitlab configuration, although it is [possible](https://github.com/gitlabhq/gitlabhq/pull/8007/commits) for the system administrator to enable it. + ```no-highlight
    Definition list
    -- cgit v1.2.1 From c68742ed560b0bbf84c9fe6f6707cf47e9ed792c Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 21 Jan 2015 15:14:46 +0100 Subject: Make omnibus the default in repo import docs --- doc/raketasks/import.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/raketasks/import.md b/doc/raketasks/import.md index 32fe4dc8d0a..dbce6aae895 100644 --- a/doc/raketasks/import.md +++ b/doc/raketasks/import.md @@ -19,15 +19,20 @@ your repositories are located by looking at `config/gitlab.yml` under the `gitla New folder needs to have git user ownership and read/write/execute access for git user and its group: ``` -$ mkdir new_group -$ chown git:git new_group -$ chmod 770 new_group +# Replace /var/opt/gitlab/git-data with /home/git if you are using an +# installation from source. +sudo -u git mkdir /var/opt/gitlab/git-data/repositories/new_group ``` ### Copy your bare repositories inside this newly created folder: ``` -$ cp -r /old/git/foo.git/ /home/git/repositories/new_group/ +# Replace /var/opt/gitlab/git-data with /home/git if you are using an +# installation from source. +sudo cp -r /old/git/foo.git /var/opt/gitlab/git-data/repositories/new_group/ + +# Do this once when you are done copying git repositories +sudo chown -R git:git /var/opt/gitlab/git-data/repositories/new_group/ ``` `foo.git` needs to be owned by the git user and git users group. -- cgit v1.2.1 From 201b2f1099c6c1a963455d54bacbe473c7e27f95 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Wed, 21 Jan 2015 18:57:54 +0100 Subject: Add return value example to ssh key creation Signed-off-by: Loic Dachary --- doc/api/users.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/api/users.md b/doc/api/users.md index b30a31deccc..dd158f124de 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -322,6 +322,15 @@ Parameters: - `title` (required) - new SSH Key's title - `key` (required) - new SSH key +```json +{ + "created_at": "2015-01-21T17:44:33.512Z", + "key": "ssh-dss AAAAB3NzaC1kc3MAAACBAMLrhYgI3atfrSD6KDas1b/3n6R/HP+bLaHHX6oh+L1vg31mdUqK0Ac/NjZoQunavoyzqdPYhFz9zzOezCrZKjuJDS3NRK9rspvjgM0xYR4d47oNZbdZbwkI4cTv/gcMlquRy0OvpfIvJtjtaJWMwTLtM5VhRusRuUlpH99UUVeXAAAAFQCVyX+92hBEjInEKL0v13c/egDCTQAAAIEAvFdWGq0ccOPbw4f/F8LpZqvWDydAcpXHV3thwb7WkFfppvm4SZte0zds1FJ+Hr8Xzzc5zMHe6J4Nlay/rP4ewmIW7iFKNBEYb/yWa+ceLrs+TfR672TaAgO6o7iSRofEq5YLdwgrwkMmIawa21FrZ2D9SPao/IwvENzk/xcHu7YAAACAQFXQH6HQnxOrw4dqf0NqeKy1tfIPxYYUZhPJfo9O0AmBW2S36pD2l14kS89fvz6Y1g8gN/FwFnRncMzlLY/hX70FSc/3hKBSbH6C6j8hwlgFKfizav21eS358JJz93leOakJZnGb8XlWvz1UJbwCsnR2VEY8Dz90uIk1l/UqHkA= loic@call", + "title": "ABC", + "id": 4 +} +``` + ## Add SSH key for user Create new key owned by specified user. Available only for admin -- cgit v1.2.1 From d9b946fb3edb3288b6ae39c8882b287639a75cbb Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Wed, 21 Jan 2015 19:08:15 +0100 Subject: Document ssh key creation error Add the error code returned in the headers as well as an example of the JSON informative message returned in the body. Signed-off-by: Loic Dachary --- doc/api/users.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc') diff --git a/doc/api/users.md b/doc/api/users.md index dd158f124de..71fa62bdd65 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -331,6 +331,22 @@ Parameters: } ``` +Will return created key with status `201 Created` on success. If an +error occurs a `400 Bad Request` is returned with a message explaining the error: + +```json +{ + "message": { + "fingerprint": [ + "has already been taken" + ], + "key": [ + "has already been taken" + ] + } +} +``` + ## Add SSH key for user Create new key owned by specified user. Available only for admin -- cgit v1.2.1 From e03f1af00a513a15085a69374a84a2f2df4689d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Rosen=C3=B6gger?= <123haynes@gmail.com> Date: Wed, 21 Jan 2015 23:59:30 +0100 Subject: Fix the test and add documentation for the "per-milestone issues API call" --- doc/api/milestones.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/api/milestones.md b/doc/api/milestones.md index 2f525327504..d48b3bcce8a 100644 --- a/doc/api/milestones.md +++ b/doc/api/milestones.md @@ -72,3 +72,16 @@ Parameters: - `description` (optional) - The description of a milestone - `due_date` (optional) - The due date of the milestone - `state_event` (optional) - The state event of the milestone (close|activate) + +## Get all issues assigned to a single milestone + +Gets all issues assigned to a single project milestone. + +``` +GET /projects/:id/milestones/:milestone_id/issues +``` + +Parameters: + +- `id` (required) - The ID of a project +- `milestone_id` (required) - The ID of a project milestone -- cgit v1.2.1 From a63187f28b18e2feea16681b313166a982254e4e Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Thu, 22 Jan 2015 15:53:16 +0100 Subject: Don't create zombies with IO.popen The previous recommend incantation would leave the process we read from hanging around, even though it had finished. That gives you a 'defunct'/'zombie' process. --- doc/development/shell_commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/development/shell_commands.md b/doc/development/shell_commands.md index 1e51ad73e32..42f17e19536 100644 --- a/doc/development/shell_commands.md +++ b/doc/development/shell_commands.md @@ -108,7 +108,7 @@ In other repositories, such as gitlab-shell you can also use `IO.popen`. ```ruby # Safe IO.popen example -logs = IO.popen(%W(git log), chdir: repo_dir).read +logs = IO.popen(%W(git log), chdir: repo_dir) { |p| p.read } ``` Note that unlike `Gitlab::Popen.popen`, `IO.popen` does not capture standard error. -- cgit v1.2.1 From 7dd5656a5b352dd5df5dabeeebdb21d7ffd9ef03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=20M=C3=A4enp=C3=A4=C3=A4?= Date: Wed, 15 Oct 2014 09:57:35 +0300 Subject: Implement edit via API for projects --- doc/api/projects.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'doc') diff --git a/doc/api/projects.md b/doc/api/projects.md index 027a8ec2e7f..d7804689c25 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -287,6 +287,31 @@ Parameters: - `visibility_level` (optional) - `import_url` (optional) +### Edit project + +Updates an existing project + +``` +PUT /projects/:id +``` + +Parameters: + +- `id` (required) - The ID of a project +- `name` (optional) - project name +- `path` (optional) - repository name for project +- `description` (optional) - short project description +- `default_branch` (optional) +- `issues_enabled` (optional) +- `merge_requests_enabled` (optional) +- `wiki_enabled` (optional) +- `snippets_enabled` (optional) +- `public` (optional) - if `true` same as setting visibility_level = 20 +- `visibility_level` (optional) + +On success, method returns 200 with the updated project. If parameters are +invalid, 400 is returned. + ### Fork project Forks a project into the user namespace of the authenticated user. -- cgit v1.2.1 From abbb29b30c55fb44edd4f1eb0b87a8ce4a72a05d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Rosen=C3=B6gger?= Date: Thu, 22 Jan 2015 20:27:11 +0100 Subject: Update ssh doc with commands to copy the public key to the clipboard --- doc/ssh/ssh.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ssh/ssh.md b/doc/ssh/ssh.md index d466c1bde72..f9ee627f1f5 100644 --- a/doc/ssh/ssh.md +++ b/doc/ssh/ssh.md @@ -18,4 +18,21 @@ Use the code below to show your public key. cat ~/.ssh/id_rsa.pub ``` -Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with `ssh-` and ending with your username and host. +Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with `ssh-` and ending with your username and host. + +Use code below to copy your public key to the clipboard. Depending on your OS you'll need to use a different command: + +**Windows:** +```bash +clip < ~/.ssh/id_rsa.pub +``` + +**Mac:** +```bash +pbcopy < ~/.ssh/id_rsa.pub +``` + +**Linux (requires xclip):** +```bash +xclip -sel clip < ~/.ssh/id_rsa.pub +``` -- cgit v1.2.1 From 061ac7923670083cf7237a32867b2f8ce86a1c83 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Fri, 23 Jan 2015 11:18:10 -0800 Subject: Rename workflow to feature branch flow and add better desciption of workflow category. --- doc/README.md | 2 +- doc/workflow/README.md | 2 +- doc/workflow/workflow.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index 3c8f8ad3d03..8c6d13e8506 100644 --- a/doc/README.md +++ b/doc/README.md @@ -9,7 +9,7 @@ - [Public access](public_access/public_access.md) Learn how you can allow public and internal access to projects. - [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects. - [Web hooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project. -- [Workflow](workflow/README.md) Learn how to get the maximum out of GitLab. +- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN. ## Administrator documentation diff --git a/doc/workflow/README.md b/doc/workflow/README.md index 1fe63274c29..33176aaba44 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -1,6 +1,6 @@ # Workflow -- [Workflow](workflow.md) +- [Feature branch workflow](workflow.md) - [Project Features](project_features.md) - [Authorization for merge requests](authorization_for_merge_requests.md) - [Groups](groups.md) diff --git a/doc/workflow/workflow.md b/doc/workflow/workflow.md index ab29cfb670b..f70e41df842 100644 --- a/doc/workflow/workflow.md +++ b/doc/workflow/workflow.md @@ -1,4 +1,4 @@ -# Workflow +# Feature branch workflow 1. Clone project: -- cgit v1.2.1 From addb2555841510bb48bc0fb9f1a90d80a7ed87fe Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 26 Jan 2015 17:03:04 +0100 Subject: Separate out the instructions for source installs --- doc/raketasks/import.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/raketasks/import.md b/doc/raketasks/import.md index dbce6aae895..9a10c8d6850 100644 --- a/doc/raketasks/import.md +++ b/doc/raketasks/import.md @@ -19,16 +19,15 @@ your repositories are located by looking at `config/gitlab.yml` under the `gitla New folder needs to have git user ownership and read/write/execute access for git user and its group: ``` -# Replace /var/opt/gitlab/git-data with /home/git if you are using an -# installation from source. sudo -u git mkdir /var/opt/gitlab/git-data/repositories/new_group ``` +If you are using an installation from source, replace `/var/opt/gitlab/git-data` +with `/home/git`. + ### Copy your bare repositories inside this newly created folder: ``` -# Replace /var/opt/gitlab/git-data with /home/git if you are using an -# installation from source. sudo cp -r /old/git/foo.git /var/opt/gitlab/git-data/repositories/new_group/ # Do this once when you are done copying git repositories @@ -37,6 +36,9 @@ sudo chown -R git:git /var/opt/gitlab/git-data/repositories/new_group/ `foo.git` needs to be owned by the git user and git users group. +If you are using an installation from source, replace `/var/opt/gitlab/git-data` +with `/home/git`. + ### Run the command below depending on your type of installation: #### Omnibus Installation -- cgit v1.2.1 From 93bc2d5202e5802bd31419d05232b62355516a53 Mon Sep 17 00:00:00 2001 From: Boyan Tabakov Date: Thu, 21 Aug 2014 13:53:32 +0300 Subject: Added support for firing system hooks on group create/destroy and adding/removing users to group. Added tests and updated docs. Also adding 'user_id' field in the hooks for adding/removing user from team. --- doc/system_hooks/system_hooks.md | 63 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/system_hooks/system_hooks.md b/doc/system_hooks/system_hooks.md index 54e6e3a9e3f..41c2732ef77 100644 --- a/doc/system_hooks/system_hooks.md +++ b/doc/system_hooks/system_hooks.md @@ -1,6 +1,6 @@ # System hooks -Your GitLab instance can perform HTTP POST requests on the following events: `project_create`, `project_destroy`, `user_add_to_team`, `user_remove_from_team`, `user_create`, `user_destroy`, `key_create` and `key_destroy`. +Your GitLab instance can perform HTTP POST requests on the following events: `project_create`, `project_destroy`, `user_add_to_team`, `user_remove_from_team`, `user_create`, `user_destroy`, `key_create`, `key_destroy`, `group_create`, `group_destroy`, `user_add_to_group` and `user_remove_from_group`. System hooks can be used, e.g. for logging or changing information in a LDAP server. @@ -50,6 +50,7 @@ System hooks can be used, e.g. for logging or changing information in a LDAP ser "project_path": "storecloud", "user_email": "johnsmith@gmail.com", "user_name": "John Smith", + "user_id": 41, "project_visibility": "private", } ``` @@ -66,6 +67,7 @@ System hooks can be used, e.g. for logging or changing information in a LDAP ser "project_path": "storecloud", "user_email": "johnsmith@gmail.com", "user_name": "John Smith", + "user_id": 41, "project_visibility": "private", } ``` @@ -117,3 +119,62 @@ System hooks can be used, e.g. for logging or changing information in a LDAP ser "id": 4 } ``` + +**Group created:** + +```json +{ + "created_at": "2012-07-21T07:30:54Z", + "event_name": "group_create", + "name": "StormCloud", + "owner_email": "johnsmith@gmail.com", + "owner_name": "John Smith", + "path": "stormcloud", + "group_id": 78 +} +``` + +**Group removed:** + +```json +{ + "created_at": "2012-07-21T07:30:54Z", + "event_name": "group_destroy", + "name": "StoreCloud", + "owner_email": "johnsmith@gmail.com", + "owner_name": "John Smith", + "path": "storecloud", + "group_id": 78 +} +``` + +**New Group Member:** + +```json +{ + "created_at": "2012-07-21T07:30:56Z", + "event_name": "user_add_to_group", + "group_access": "Master", + "group_id": 78, + "group_name": "StoreCloud", + "group_path": "storecloud", + "user_email": "johnsmith@gmail.com", + "user_name": "John Smith", + "user_id": 41 +} +``` +**Group Member Removed:** + +```json +{ + "created_at": "2012-07-21T07:30:56Z", + "event_name": "user_remove_from_group", + "group_access": "Master", + "group_id": 78, + "group_name": "StoreCloud", + "group_path": "storecloud", + "user_email": "johnsmith@gmail.com", + "user_name": "John Smith", + "user_id": 41 +} +``` -- cgit v1.2.1 From bf44938cc0b9c3023dd486fc23e7ddbf6be8b573 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Wed, 28 Jan 2015 08:50:31 +0200 Subject: Drop comments on cookbook installing from source now that it uses Omnibus. --- doc/raketasks/backup_restore.md | 6 +++--- doc/raketasks/cleanup.md | 4 ++-- doc/raketasks/maintenance.md | 4 ++-- doc/raketasks/user_management.md | 8 ++++---- doc/raketasks/web_hooks.md | 12 ++++++------ 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'doc') diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index f9d2f5dc4eb..50cd0d08b5a 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -13,7 +13,7 @@ You can only restore a backup to exactly the same version of GitLab that you cre # use this command if you've installed GitLab with the Omnibus package sudo gitlab-rake gitlab:backup:create -# if you've installed GitLab from source or using the cookbook +# if you've installed GitLab from source sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production ``` @@ -147,7 +147,7 @@ You can only restore a backup to exactly the same version of GitLab that you cre # Omnibus package installation sudo gitlab-rake gitlab:backup:restore -# installation from source or cookbook +# installation from source bundle exec rake gitlab:backup:restore RAILS_ENV=production ``` @@ -192,7 +192,7 @@ Deleting tmp directories...[DONE] For Omnibus package installations, see https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#scheduling-a-backup . -For installation from source or cookbook: +For installation from source: ``` 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 9e48f56c951..96d67f7b5d6 100644 --- a/doc/raketasks/cleanup.md +++ b/doc/raketasks/cleanup.md @@ -8,7 +8,7 @@ Remove namespaces(dirs) from `/home/git/repositories` if they don't exist in Git # omnibus-gitlab sudo gitlab-rake gitlab:cleanup:dirs -# installation from source or cookbook +# installation from source bundle exec rake gitlab:cleanup:dirs RAILS_ENV=production ``` @@ -18,6 +18,6 @@ Remove repositories (global only for now) from `/home/git/repositories` if they # omnibus-gitlab sudo gitlab-rake gitlab:cleanup:repos -# installation from source or cookbook +# installation from source bundle exec rake gitlab:cleanup:repos RAILS_ENV=production ``` diff --git a/doc/raketasks/maintenance.md b/doc/raketasks/maintenance.md index 8bef92e55fe..c31ef9f5ef6 100644 --- a/doc/raketasks/maintenance.md +++ b/doc/raketasks/maintenance.md @@ -8,7 +8,7 @@ This command gathers information about your GitLab installation and the System i # omnibus-gitlab sudo gitlab-rake gitlab:env:info -# installation from source or cookbook +# installation from source bundle exec rake gitlab:env:info RAILS_ENV=production ``` @@ -59,7 +59,7 @@ You may also have a look at our [Trouble Shooting Guide](https://github.com/gitl # omnibus-gitlab sudo gitlab-rake gitlab:check -# installation from source or cookbook +# installation from source bundle exec rake gitlab:check RAILS_ENV=production ``` diff --git a/doc/raketasks/user_management.md b/doc/raketasks/user_management.md index 3c67753ad28..80b01ca4043 100644 --- a/doc/raketasks/user_management.md +++ b/doc/raketasks/user_management.md @@ -6,7 +6,7 @@ # omnibus-gitlab sudo gitlab-rake gitlab:import:user_to_projects[username@domain.tld] -# installation from source or cookbook +# installation from source bundle exec rake gitlab:import:user_to_projects[username@domain.tld] RAILS_ENV=production ``` @@ -20,7 +20,7 @@ Notes: # omnibus-gitlab sudo gitlab-rake gitlab:import:all_users_to_all_projects -# installation from source or cookbook +# installation from source bundle exec rake gitlab:import:all_users_to_all_projects RAILS_ENV=production ``` @@ -30,7 +30,7 @@ bundle exec rake gitlab:import:all_users_to_all_projects RAILS_ENV=production # omnibus-gitlab sudo gitlab-rake gitlab:import:user_to_groups[username@domain.tld] -# installation from source or cookbook +# installation from source bundle exec rake gitlab:import:user_to_groups[username@domain.tld] RAILS_ENV=production ``` @@ -44,6 +44,6 @@ Notes: # omnibus-gitlab sudo gitlab-rake gitlab:import:all_users_to_all_groups -# installation from source or cookbook +# installation from source bundle exec rake gitlab:import:all_users_to_all_groups RAILS_ENV=production ``` diff --git a/doc/raketasks/web_hooks.md b/doc/raketasks/web_hooks.md index e1a58835d88..5a8b94af9b4 100644 --- a/doc/raketasks/web_hooks.md +++ b/doc/raketasks/web_hooks.md @@ -4,42 +4,42 @@ # omnibus-gitlab sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" - # source installations or cookbook + # source installations bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" RAILS_ENV=production ## 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 + # source installations bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme RAILS_ENV=production ## 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 + # source installations bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" RAILS_ENV=production ## 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 + # source installations bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme RAILS_ENV=production ## List **ALL** web hooks: # omnibus-gitlab sudo gitlab-rake gitlab:web_hook:list - # source installations or cookbook + # source installations bundle exec rake gitlab:web_hook:list RAILS_ENV=production ## List the web hooks from projects in a given **NAMESPACE**: # omnibus-gitlab sudo gitlab-rake gitlab:web_hook:list NAMESPACE=/ - # source installations or cookbook + # source installations bundle exec rake gitlab:web_hook:list NAMESPACE=/ RAILS_ENV=production > Note: `/` is the global namespace. -- cgit v1.2.1 From e0e6574ff7ae42e50afcf11bde4889f1e849ff48 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Wed, 28 Jan 2015 09:07:27 +0200 Subject: Add assets precompile and redis clear cache to maintenance tasks. --- doc/raketasks/maintenance.md | 74 +++++++++++++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 22 deletions(-) (limited to 'doc') diff --git a/doc/raketasks/maintenance.md b/doc/raketasks/maintenance.md index 8bef92e55fe..6f921bcdae5 100644 --- a/doc/raketasks/maintenance.md +++ b/doc/raketasks/maintenance.md @@ -16,30 +16,31 @@ Example output: ``` System information -System: Debian 6.0.7 -Current User: git -Using RVM: no -Ruby Version: 2.0.0-p481 -Gem Version: 1.8.23 -Bundler Version:1.3.5 -Rake Version: 10.0.4 +System: Debian 7.8 +Current User: git +Using RVM: no +Ruby Version: 2.1.5p273 +Gem Version: 2.4.3 +Bundler Version: 1.7.6 +Rake Version: 10.3.2 +Sidekiq Version: 2.17.8 GitLab information -Version: 5.1.0.beta2 -Revision: 4da8b37 -Directory: /home/git/gitlab -DB Adapter: mysql2 -URL: http://example.com -HTTP Clone URL: http://example.com/some-project.git -SSH Clone URL: git@example.com:some-project.git -Using LDAP: no -Using Omniauth: no +Version: 7.7.1 +Revision: 41ab9e1 +Directory: /home/git/gitlab +DB Adapter: postgresql +URL: https://gitlab.example.com +HTTP Clone URL: https://gitlab.example.com/some-project.git +SSH Clone URL: git@gitlab.example.com:some-project.git +Using LDAP: no +Using Omniauth: no GitLab Shell -Version: 1.2.0 -Repositories: /home/git/repositories/ -Hooks: /home/git/gitlab-shell/hooks/ -Git: /usr/bin/git +Version: 2.4.1 +Repositories: /home/git/repositories/ +Hooks: /home/git/gitlab-shell/hooks/ +Git: /usr/bin/git ``` ## Check GitLab configuration @@ -127,7 +128,6 @@ sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites In some case it is necessary to rebuild the `authorized_keys` file. - For Omnibus-packages: ``` sudo gitlab-rake gitlab:shell:setup @@ -143,6 +143,36 @@ sudo -u git -H bundle exec rake gitlab:shell:setup RAILS_ENV=production This will rebuild an authorized_keys file. You will lose any data stored in authorized_keys file. Do you want to continue (yes/no)? yes +``` + +## Clear redis cache + +If for some reason the dashboard shows wrong information you might want to +clear Redis' cache. + +For Omnibus-packages: +``` +sudo gitlab-rake cache:clear +``` + +For installations from source: +``` +cd /home/git/gitlab +sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production +``` + +## Precompile the assets -............................ +Sometimes during version upgrades you might end up with some wrong CSS or +missing some icons. In that case, try to precompile the assets again. + +For Omnibus-packages: +``` +sudo gitlab-rake assets:precompile +``` + +For installations from source: +``` +cd /home/git/gitlab +sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production ``` -- cgit v1.2.1 From 43da3f0929521615fe77d1dcb85318a8128bb7e8 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 28 Jan 2015 11:09:11 +0100 Subject: Point out common LDAP port/method combinations --- doc/integration/ldap.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/integration/ldap.md b/doc/integration/ldap.md index 56b0d826adb..6172a61d005 100644 --- a/doc/integration/ldap.md +++ b/doc/integration/ldap.md @@ -76,6 +76,9 @@ main: # 'main' is the GitLab 'provider ID' of this LDAP server EOS ``` +If you are getting 'Connection Refused' errors when trying to connect to the LDAP server please double-check the LDAP `port` and `method` settings used by GitLab. +Common combinations are `method: 'plain'` and `port: 389`, OR `method: 'ssl'` and `port: 636`. + If you are using a GitLab installation from source you can find the LDAP settings in `/home/git/gitlab/config/gitlab.yml`: ``` -- cgit v1.2.1 From 087c4cbc3cba2cce1c25773af304833d217976fc Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 28 Jan 2015 11:08:44 +0100 Subject: Make 'plain', port 389 the default for LDAP --- doc/integration/ldap.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/integration/ldap.md b/doc/integration/ldap.md index 6172a61d005..125ce31b521 100644 --- a/doc/integration/ldap.md +++ b/doc/integration/ldap.md @@ -29,9 +29,9 @@ main: # 'main' is the GitLab 'provider ID' of this LDAP server label: 'LDAP' host: '_your_ldap_server' - port: 636 + port: 389 uid: 'sAMAccountName' - method: 'ssl' # "tls" or "ssl" or "plain" + method: 'plain' # "tls" or "ssl" or "plain" bind_dn: '_the_full_dn_of_the_user_you_will_bind_with' password: '_the_password_of_the_bind_user' -- cgit v1.2.1 From 1a1d7085fa02e1ef681b10e15c2f144cc5224a9d Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 30 Jan 2015 16:03:27 +0100 Subject: Mention libkrb5-dev dependency --- doc/update/6.x-or-7.x-to-7.7.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/update/6.x-or-7.x-to-7.7.md b/doc/update/6.x-or-7.x-to-7.7.md index 6501a8d2148..0cbea5d5997 100644 --- a/doc/update/6.x-or-7.x-to-7.7.md +++ b/doc/update/6.x-or-7.x-to-7.7.md @@ -89,6 +89,9 @@ sudo apt-get install logrotate # Install pkg-config and cmake, which is needed for the latest versions of rugged sudo apt-get install pkg-config cmake + +# Install Kerberos header files, which are needed for GitLab EE Kerberos support +sudo apt-get install libkrb5-dev ``` ## 5. Configure Redis to use sockets -- cgit v1.2.1 From e6e337088bbb4736983119928b6b6b451bd3ef20 Mon Sep 17 00:00:00 2001 From: Ewan Edwards Date: Fri, 30 Jan 2015 10:24:45 -0800 Subject: Make all non-config/non-operational mentions of URL consistently capitalized. Make the plural version consistently "URLs". Fix an instance where the article "the" before URL was missing. --- doc/api/README.md | 4 ++-- doc/api/services.md | 2 +- doc/customization/libravatar.md | 12 ++++++------ doc/integration/shibboleth.md | 4 ++-- doc/integration/slack.md | 2 +- doc/markdown/markdown.md | 10 +++++----- doc/raketasks/features.md | 2 +- doc/update/4.2-to-5.0.md | 4 ++-- doc/update/5.4-to-6.0.md | 2 +- doc/update/7.6-to-7.7.md | 4 ++-- 10 files changed, 23 insertions(+), 23 deletions(-) (limited to 'doc') diff --git a/doc/api/README.md b/doc/api/README.md index 8f919f5257d..8cbba8598d5 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -97,7 +97,7 @@ Return values: ## Sudo -All API requests support performing an api call as if you were another user, if your private token is for an administration account. You need to pass `sudo` parameter by url or header with an id or username of the user you want to perform the operation as. If passed as header, the header name must be "SUDO" (capitals). +All API requests support performing an api call as if you were another user, if your private token is for an administration account. You need to pass `sudo` parameter by URL or header with an id or username of the user you want to perform the operation as. If passed as header, the header name must be "SUDO" (capitals). If a non administrative `private_token` is provided then an error message will be returned with status code 403: @@ -142,7 +142,7 @@ When listing resources you can pass the following parameters: - `page` (default: `1`) - page number - `per_page` (default: `20`, max: `100`) - number of items to list per page -[Link headers](http://www.w3.org/wiki/LinkHeader) are send back with each response. These have `rel` prev/next/first/last and contain the relevant URL. Please use these instead of generating your own urls. +[Link headers](http://www.w3.org/wiki/LinkHeader) are send back with each response. These have `rel` prev/next/first/last and contain the relevant URL. Please use these instead of generating your own URLs. ## id vs iid diff --git a/doc/api/services.md b/doc/api/services.md index ab9f9c00c67..93534d5502e 100644 --- a/doc/api/services.md +++ b/doc/api/services.md @@ -13,7 +13,7 @@ PUT /projects/:id/services/gitlab-ci Parameters: - `token` (required) - CI project token -- `project_url` (required) - CI project url +- `project_url` (required) - CI project URL ### Delete GitLab CI service diff --git a/doc/customization/libravatar.md b/doc/customization/libravatar.md index 4dffd3027a9..ee57fdc6590 100644 --- a/doc/customization/libravatar.md +++ b/doc/customization/libravatar.md @@ -16,7 +16,7 @@ the configuration options as follows: ```yml gravatar: enabled: true - # gravatar urls: possible placeholders: %{hash} %{size} %{email} + # gravatar URLs: possible placeholders: %{hash} %{size} %{email} plain_url: "http://cdn.libravatar.org/avatar/%{hash}?s=%{size}&d=identicon" ``` @@ -25,14 +25,14 @@ the configuration options as follows: ```yml gravatar: enabled: true - # gravatar urls: possible placeholders: %{hash} %{size} %{email} + # gravatar URLs: possible placeholders: %{hash} %{size} %{email} ssl_url: "https://seccdn.libravatar.org/avatar/%{hash}?s=%{size}&d=identicon" ``` ## Self-hosted -If you are [running your own libravatar service](http://wiki.libravatar.org/running_your_own/) the url will be different in the configuration -but the important part is to provide the same placeholders so GitLab can parse the url correctly. +If you are [running your own libravatar service](http://wiki.libravatar.org/running_your_own/) the URL will be different in the configuration +but the important part is to provide the same placeholders so GitLab can parse the URL correctly. For example, you host a service on `http://libravatar.example.com` the `plain_url` you need to supply in `gitlab.yml` is @@ -65,5 +65,5 @@ Run `sudo gitlab-ctl reconfigure` for changes to take effect. [Libravatar supports different sets](http://wiki.libravatar.org/api/) of `missing images` for emails not found on the Libravatar service. -In order to use a different set other than `identicon`, replace `&d=identicon` portion of the url with another supported set. -For example, you can use `retro` set in which case url would look like: `plain_url: "http://cdn.libravatar.org/avatar/%{hash}?s=%{size}&d=retro"` +In order to use a different set other than `identicon`, replace `&d=identicon` portion of the URL with another supported set. +For example, you can use `retro` set in which case the URL would look like: `plain_url: "http://cdn.libravatar.org/avatar/%{hash}?s=%{size}&d=retro"` diff --git a/doc/integration/shibboleth.md b/doc/integration/shibboleth.md index 78317a5c0f2..1b03197b6c7 100644 --- a/doc/integration/shibboleth.md +++ b/doc/integration/shibboleth.md @@ -14,7 +14,7 @@ Check https://wiki.shibboleth.net/ for more info. Following changes are needed to enable shibboleth: -protect omniauth-shibboleth callback url: +protect omniauth-shibboleth callback URL: ``` AuthType shibboleth @@ -32,7 +32,7 @@ protect omniauth-shibboleth callback url: SetHandler shib ``` -exclude shibboleth urls from rewriting, add "RewriteCond %{REQUEST_URI} !/Shibboleth.sso" and "RewriteCond %{REQUEST_URI} !/shibboleth-sp", config should look like this: +exclude shibboleth URLs from rewriting, add "RewriteCond %{REQUEST_URI} !/Shibboleth.sso" and "RewriteCond %{REQUEST_URI} !/shibboleth-sp", config should look like this: ``` #apache equivalent of nginx try files RewriteEngine on diff --git a/doc/integration/slack.md b/doc/integration/slack.md index f2e73f272ef..2fd22c513ad 100644 --- a/doc/integration/slack.md +++ b/doc/integration/slack.md @@ -35,7 +35,7 @@ After Slack is ready we need to setup GitLab. Here are the steps to achieve this 1. Fill in your Slack details - Mark it as active - - Paste in the webhook url you got from Slack + - Paste in the webhook URL you got from Slack Have fun :) diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index edb7a975503..7b79cd5d98b 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -250,17 +250,17 @@ The IDs are generated from the content of the header according to the following For example: ``` -###### ..Ab_c-d. e [anchor](url) ![alt text](url).. +###### ..Ab_c-d. e [anchor](URL) ![alt text](URL).. ``` which renders as: -###### ..Ab_c-d. e [anchor](url) ![alt text](url).. +###### ..Ab_c-d. e [anchor](URL) ![alt text](URL).. will first be converted by step 1) into a string like: ``` -..Ab_c-d. e <a href="url">anchor</a> <img src="url" alt="alt text"/>.. +..Ab_c-d. e <a href="URL">anchor</a> <img src="URL" alt="alt text"/>.. ``` After removing the tags in step 2) we get: @@ -277,8 +277,8 @@ ab_c-d-e-anchor Note in particular how: -- for markdown anchors `[text](url)`, only the `text` is used -- markdown images `![alt](url)` are completely ignored +- for markdown anchors `[text](URL)`, only the `text` is used +- markdown images `![alt](URL)` are completely ignored ## Emphasis diff --git a/doc/raketasks/features.md b/doc/raketasks/features.md index 99b3d5525b0..f9a46193547 100644 --- a/doc/raketasks/features.md +++ b/doc/raketasks/features.md @@ -6,7 +6,7 @@ This command will enable the namespaces feature introduced in v4.0. It will move Note: -- Because the **repository location will change**, you will need to **update all your git url's** to point to the new location. +- Because the **repository location will change**, you will need to **update all your git URLs** to point to the new location. - Username can be changed at [Profile / Account](/profile/account) **Example:** diff --git a/doc/update/4.2-to-5.0.md b/doc/update/4.2-to-5.0.md index cde679598f7..7974ae47ff4 100644 --- a/doc/update/4.2-to-5.0.md +++ b/doc/update/4.2-to-5.0.md @@ -41,8 +41,8 @@ git checkout v1.1.0 # copy config cp config.yml.example config.yml -# change url to GitLab instance -# ! make sure url end with '/' like 'https://gitlab.example/' +# change URL to GitLab instance +# ! make sure the URL ends with '/' like 'https://gitlab.example/' vim config.yml # rewrite hooks diff --git a/doc/update/5.4-to-6.0.md b/doc/update/5.4-to-6.0.md index 7bf7bce6aa0..ba8f8e39584 100644 --- a/doc/update/5.4-to-6.0.md +++ b/doc/update/5.4-to-6.0.md @@ -10,7 +10,7 @@ GitLab 6.0 is affected by critical security vulnerabilities CVE-2013-4490 and CV The root (global) namespace for projects is deprecated. -So you need to move all your global projects under groups or users manually before update or they will be automatically moved to the project owner namespace during the update. When a project is moved all its members will receive an email with instructions how to update their git remote url. Please make sure you disable sending email when you do a test of the upgrade. +So you need to move all your global projects under groups or users manually before update or they will be automatically moved to the project owner namespace during the update. When a project is moved all its members will receive an email with instructions how to update their git remote URL. Please make sure you disable sending email when you do a test of the upgrade. ### Teams diff --git a/doc/update/7.6-to-7.7.md b/doc/update/7.6-to-7.7.md index 51084576f33..8f4fd197b72 100644 --- a/doc/update/7.6-to-7.7.md +++ b/doc/update/7.6-to-7.7.md @@ -101,8 +101,8 @@ If all items are green, then congratulations upgrade is complete! ### 8. GitHub settings (if applicable) -If you are using GitHub as an OAuth provider for authentication, you should change the callback url so that it -only contains a root url (ex. `https://gitlab.example.com/`) +If you are using GitHub as an OAuth provider for authentication, you should change the callback URL so that it +only contains a root URL (ex. `https://gitlab.example.com/`) ## Things went south? Revert to previous version (7.6) -- cgit v1.2.1 From 561a7153082ef6cad7ec244d7881b8ddd35b9f8c Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Mon, 2 Feb 2015 10:00:05 -0800 Subject: add clear documentation on searching between groups --- doc/api/groups.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api/groups.md b/doc/api/groups.md index e6893d71774..9217c7a7f24 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -20,7 +20,7 @@ GET /groups ] ``` -You can search for groups by name or path with: `/groups?search=Rails` +You can search for groups by name or path, see below. ## Details of a group @@ -73,6 +73,26 @@ Parameters: - `id` (required) - The ID of a user group +## Search for group + +Get all groups that match your string in their name or path. + +``` +GET /groups?search=foobar +``` + +```json +[ + { + "id": 1, + "name": "Foobar Group", + "path": "foo-bar", + "owner_id": 18, + "description": "An interesting group" + } +] +``` + ## Group members **Group access levels** -- cgit v1.2.1 From 7ba97ab4a53eba8d28d028a04e20e6ead1cd9f52 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 2 Feb 2015 16:43:51 -0800 Subject: Web editor documnetation --- doc/workflow/README.md | 1 + doc/workflow/web_editor.md | 23 +++++++++++++++++++++++ doc/workflow/web_editor/edit_file.png | Bin 0 -> 99624 bytes doc/workflow/web_editor/empty_project.png | Bin 0 -> 122296 bytes doc/workflow/web_editor/new_file.png | Bin 0 -> 100516 bytes doc/workflow/web_editor/show_file.png | Bin 0 -> 111479 bytes 6 files changed, 24 insertions(+) create mode 100644 doc/workflow/web_editor.md create mode 100644 doc/workflow/web_editor/edit_file.png create mode 100644 doc/workflow/web_editor/empty_project.png create mode 100644 doc/workflow/web_editor/new_file.png create mode 100644 doc/workflow/web_editor/show_file.png (limited to 'doc') diff --git a/doc/workflow/README.md b/doc/workflow/README.md index 33176aaba44..3c0007d8198 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -10,3 +10,4 @@ - [Migrating from SVN to GitLab](migrating_from_svn.md) - [Project importing from GitHub to GitLab](import_projects_from_github.md) - [Protected branches](protected_branches.md) +- [Web Editor](web_editor.md) diff --git a/doc/workflow/web_editor.md b/doc/workflow/web_editor.md new file mode 100644 index 00000000000..c83715deff7 --- /dev/null +++ b/doc/workflow/web_editor.md @@ -0,0 +1,23 @@ +# GitLab Web Editor + +In GitLab you can create new files and edit existing one using our web editor. +Its really useful if you dont have access to command line or you want to make a quick small fix. +You can access to web editor in several ways depends on context. +Lets start from newly created project. +Click on `Add a file` button to start web editor for creating first file. + +![web editor 1](web_editor/empty_project.png) + +Fill in file name, content, commit message and press commit button. +After this file will be saved to repository. + +![web editor 2](web_editor/new_file.png) + +You can edit any text file in repository by pressing edit button when browsing file. + +![web editor 3](web_editor/show_file.png) + +Edit of file is pretty same as creating new file. +Except you can see preview of your changes to file in separate tab + +![web editor 3](web_editor/edit_file.png) diff --git a/doc/workflow/web_editor/edit_file.png b/doc/workflow/web_editor/edit_file.png new file mode 100644 index 00000000000..1522c50b62f Binary files /dev/null and b/doc/workflow/web_editor/edit_file.png differ diff --git a/doc/workflow/web_editor/empty_project.png b/doc/workflow/web_editor/empty_project.png new file mode 100644 index 00000000000..6a049f6beaf Binary files /dev/null and b/doc/workflow/web_editor/empty_project.png differ diff --git a/doc/workflow/web_editor/new_file.png b/doc/workflow/web_editor/new_file.png new file mode 100644 index 00000000000..80941f37cea Binary files /dev/null and b/doc/workflow/web_editor/new_file.png differ diff --git a/doc/workflow/web_editor/show_file.png b/doc/workflow/web_editor/show_file.png new file mode 100644 index 00000000000..9cafcb55109 Binary files /dev/null and b/doc/workflow/web_editor/show_file.png differ -- cgit v1.2.1 From 0e896aa9e90be3cb7765239860a9970996685998 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Tue, 3 Feb 2015 11:44:55 +0100 Subject: Update gitlab-shell to 2.4.2 for 7.7 install/update guide closes #8718, closes #8721 --- doc/install/installation.md | 2 +- doc/update/7.6-to-7.7.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index b080e8f062b..bfdebaf8466 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -278,7 +278,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da GitLab Shell is an SSH access and repository management software developed specially for GitLab. # Run the installation task for gitlab-shell (replace `REDIS_URL` if needed): - sudo -u git -H bundle exec rake gitlab:shell:install[v2.4.1] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production + sudo -u git -H bundle exec rake gitlab:shell:install[v2.4.2] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production # By default, the gitlab-shell config is generated from your main GitLab config. # You can review (and modify) the gitlab-shell config as follows: diff --git a/doc/update/7.6-to-7.7.md b/doc/update/7.6-to-7.7.md index 51084576f33..831958d0b8b 100644 --- a/doc/update/7.6-to-7.7.md +++ b/doc/update/7.6-to-7.7.md @@ -37,7 +37,7 @@ sudo -u git -H git checkout 7-7-stable-ee ```bash cd /home/git/gitlab-shell sudo -u git -H git fetch -sudo -u git -H git checkout v2.4.1 +sudo -u git -H git checkout v2.4.2 ``` ### 4. Install libs, migrations, etc. -- cgit v1.2.1 From 4e97f26649a7756bef843fca74e3c58eadd117e1 Mon Sep 17 00:00:00 2001 From: jubianchi Date: Fri, 30 Jan 2015 10:46:08 +0100 Subject: Acces groups with their path in API --- doc/api/groups.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/api/groups.md b/doc/api/groups.md index 9217c7a7f24..9f01b550641 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -32,7 +32,7 @@ GET /groups/:id Parameters: -- `id` (required) - The ID of a group +- `id` (required) - The ID or path of a group ## New group @@ -58,7 +58,7 @@ POST /groups/:id/projects/:project_id Parameters: -- `id` (required) - The ID of a group +- `id` (required) - The ID or path of a group - `project_id` (required) - The ID of a project ## Remove group @@ -71,7 +71,7 @@ DELETE /groups/:id Parameters: -- `id` (required) - The ID of a user group +- `id` (required) - The ID or path of a user group ## Search for group @@ -148,7 +148,7 @@ POST /groups/:id/members Parameters: -- `id` (required) - The ID of a group +- `id` (required) - The ID or path of a group - `user_id` (required) - The ID of a user to add - `access_level` (required) - Project access level @@ -162,5 +162,5 @@ DELETE /groups/:id/members/:user_id Parameters: -- `id` (required) - The ID of a user group +- `id` (required) - The ID or path of a user group - `user_id` (required) - The ID of a group member -- cgit v1.2.1 From 68fbf1423fddcb7d49e408d05105ca6911e91122 Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Tue, 3 Feb 2015 11:05:20 -0800 Subject: improve english documentation --- doc/workflow/web_editor.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/workflow/web_editor.md b/doc/workflow/web_editor.md index c83715deff7..bcadf5e8c0d 100644 --- a/doc/workflow/web_editor.md +++ b/doc/workflow/web_editor.md @@ -1,23 +1,26 @@ # GitLab Web Editor -In GitLab you can create new files and edit existing one using our web editor. -Its really useful if you dont have access to command line or you want to make a quick small fix. -You can access to web editor in several ways depends on context. -Lets start from newly created project. -Click on `Add a file` button to start web editor for creating first file. +In GitLab you can create new files and edit existing files using our web editor. +This is especially useful if you don't have access to a command line or you just want to do a quick fix. +You can easily access the web editor, depending on the context. +Let's start from newly created project. + +Click on `Add a file` +to create the first file and open it in the web editor. ![web editor 1](web_editor/empty_project.png) -Fill in file name, content, commit message and press commit button. -After this file will be saved to repository. +Fill in a file name, some content, a commit message and press the commit button. +The file will be saved to the repository. ![web editor 2](web_editor/new_file.png) -You can edit any text file in repository by pressing edit button when browsing file. +You can edit any text file in a repository by pressing the edit button, when +viewing the file. ![web editor 3](web_editor/show_file.png) -Edit of file is pretty same as creating new file. -Except you can see preview of your changes to file in separate tab +Editing a file is almost the same as creating a new file, +with as addition the ability to preview your changes in a separate tab. ![web editor 3](web_editor/edit_file.png) -- cgit v1.2.1 From ad6c372eeee5d112ad199dd4e487df584976445d Mon Sep 17 00:00:00 2001 From: Ewan Edwards Date: Tue, 3 Feb 2015 15:18:40 -0800 Subject: Fix a number of discovered typos, capitalization of developer and product names, plus a couple of instances of bad Markdown markup. --- doc/api/issues.md | 2 +- doc/api/oauth2.md | 6 +++--- doc/api/projects.md | 2 +- doc/api/services.md | 14 +++++++------- doc/development/architecture.md | 10 +++++----- doc/development/ci_setup.md | 2 +- doc/install/requirements.md | 2 +- doc/integration/README.md | 2 +- doc/integration/external-issue-tracker.md | 2 +- doc/integration/gitlab_buttons_in_gmail.md | 4 ++-- doc/integration/shibboleth.md | 8 ++++---- doc/markdown/markdown.md | 6 +++--- doc/project_services/project_services.md | 10 +++++----- doc/raketasks/backup_restore.md | 8 ++++---- doc/release/howto_rc1.md | 2 +- doc/release/monthly.md | 2 +- doc/security/information_exclusivity.md | 2 +- doc/system_hooks/system_hooks.md | 8 ++++---- doc/update/2.6-to-3.0.md | 14 +++++++------- doc/update/4.2-to-5.0.md | 6 +++--- doc/update/5.1-to-6.0.md | 2 +- doc/update/6.1-to-6.2.md | 2 +- doc/update/6.x-or-7.x-to-7.7.md | 6 +++--- doc/update/7.3-to-7.4.md | 4 ++-- doc/update/README.md | 2 +- doc/workflow/gitlab_flow.md | 8 ++++---- doc/workflow/migrating_from_svn.md | 2 +- doc/workflow/notifications.md | 6 +++--- 28 files changed, 72 insertions(+), 72 deletions(-) (limited to 'doc') diff --git a/doc/api/issues.md b/doc/api/issues.md index ceeb683a6bf..8d073c46d33 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -56,7 +56,7 @@ Parameters: "title": "v1.0", "description": "", "due_date": "2012-07-20", - "state": "reopenend", + "state": "reopened", "updated_at": "2012-07-04T13:42:48Z", "created_at": "2012-07-04T13:42:48Z" }, diff --git a/doc/api/oauth2.md b/doc/api/oauth2.md index b2dbba9bdeb..7bb391054ce 100644 --- a/doc/api/oauth2.md +++ b/doc/api/oauth2.md @@ -4,7 +4,7 @@ OAuth2 is a protocol that enables us to get access to private details of user's Before using the OAuth2 you should create an application in user's account. Each application getting unique App ID and App Secret parameters. You should not share them. -This functianolity is based on [doorkeeper gem](https://github.com/doorkeeper-gem/doorkeeper) +This functionality is based on [doorkeeper gem](https://github.com/doorkeeper-gem/doorkeeper) ## Web Application Flow @@ -15,7 +15,7 @@ This flow consists from 3 steps. ### 1. Registering the client -Creat an application in user's account profile. +Create an application in user's account profile. ### 2. Requesting authorization @@ -96,4 +96,4 @@ For testing you can use the oauth2 ruby gem: client = OAuth2::Client.new('the_client_id', 'the_client_secret', :site => "http://example.com") access_token = client.password.get_token('user@example.com', 'sekret') puts access_token.token -``` \ No newline at end of file +``` diff --git a/doc/api/projects.md b/doc/api/projects.md index d7804689c25..559d35d316a 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -541,7 +541,7 @@ Parameters: } ], "tree": "c68537c6534a02cc2b176ca1549f4ffa190b58ee", - "message": "give caolan credit where it's due (up top)", + "message": "give Caolan credit where it's due (up top)", "author": { "name": "Jeremy Ashkenas", "email": "jashkenas@example.com" diff --git a/doc/api/services.md b/doc/api/services.md index 93534d5502e..cbf767d1b25 100644 --- a/doc/api/services.md +++ b/doc/api/services.md @@ -23,23 +23,23 @@ Delete GitLab CI service settings for a project. DELETE /projects/:id/services/gitlab-ci ``` -## Hipchat +## HipChat -### Edit Hipchat service +### Edit HipChat service -Set Hipchat service for project. +Set HipChat service for project. ``` PUT /projects/:id/services/hipchat ``` Parameters: -- `token` (required) - Hipchat token -- `room` (required) - Hipchat room name +- `token` (required) - HipChat token +- `room` (required) - HipChat room name -### Delete Hipchat service +### Delete HipChat service -Delete Hipchat service for a project. +Delete HipChat service for a project. ``` DELETE /projects/:id/services/hipchat diff --git a/doc/development/architecture.md b/doc/development/architecture.md index 209182e7742..714cc016004 100644 --- a/doc/development/architecture.md +++ b/doc/development/architecture.md @@ -16,8 +16,8 @@ You can imagine GitLab as a physical office. They can be stored in a warehouse. This can be either a hard disk, or something more complex, such as a NFS filesystem; -**NginX** acts like the front-desk. -Users come to NginX and request actions to be done by workers in the office; +**Nginx** acts like the front-desk. +Users come to Nginx and request actions to be done by workers in the office; **The database** is a series of metal file cabinets with information on: - The goods in the warehouse (metadata, issues, merge requests etc); @@ -70,7 +70,7 @@ To summarize here's the [directory structure of the `git` user home directory](. ps aux | grep '^git' -GitLab has several components to operate. As a system user (i.e. any user that is not the `git` user) it requires a persistent database (MySQL/PostreSQL) and redis database. It also uses Apache httpd or nginx to proxypass Unicorn. As the `git` user it starts Sidekiq and Unicorn (a simple ruby HTTP server running on port `8080` by default). Under the GitLab user there are normally 4 processes: `unicorn_rails master` (1 process), `unicorn_rails worker` (2 processes), `sidekiq` (1 process). +GitLab has several components to operate. As a system user (i.e. any user that is not the `git` user) it requires a persistent database (MySQL/PostreSQL) and redis database. It also uses Apache httpd or Nginx to proxypass Unicorn. As the `git` user it starts Sidekiq and Unicorn (a simple ruby HTTP server running on port `8080` by default). Under the GitLab user there are normally 4 processes: `unicorn_rails master` (1 process), `unicorn_rails worker` (2 processes), `sidekiq` (1 process). ### Repository access @@ -146,13 +146,13 @@ nginx Apache httpd -- [Explanation of apache logs](http://httpd.apache.org/docs/2.2/logs.html). +- [Explanation of Apache logs](http://httpd.apache.org/docs/2.2/logs.html). - `/var/log/apache2/` contains error and output logs (on Ubuntu). - `/var/log/httpd/` contains error and output logs (on RHEL). redis -- `/var/log/redis/redis.log` there are also logrotated logs there. +- `/var/log/redis/redis.log` there are also log-rotated logs there. PostgreSQL diff --git a/doc/development/ci_setup.md b/doc/development/ci_setup.md index ee16aedafe7..f417667754e 100644 --- a/doc/development/ci_setup.md +++ b/doc/development/ci_setup.md @@ -26,7 +26,7 @@ We use [these build scripts](https://gitlab.com/gitlab-org/gitlab-ci/blob/master # Build configuration on [Semaphore](https://semaphoreapp.com/gitlabhq/gitlabhq/) for testing the [GitHub.com repo](https://github.com/gitlabhq/gitlabhq) - Language: Ruby -- Ruby verion: 2.1.2 +- Ruby version: 2.1.2 - database.yml: pg Build commands diff --git a/doc/install/requirements.md b/doc/install/requirements.md index 8eabb219b1b..2cf9e82fd21 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -7,7 +7,7 @@ - Ubuntu - Debian - CentOS -- RedHat Enterprise Linux (please use the CentOS packages and instructions) +- Red Hat Enterprise Linux (please use the CentOS packages and instructions) - Scientific Linux (please use the CentOS packages and instructions) - Oracle Linux (please use the CentOS packages and instructions) diff --git a/doc/integration/README.md b/doc/integration/README.md index 357ed038314..0087167bb84 100644 --- a/doc/integration/README.md +++ b/doc/integration/README.md @@ -13,7 +13,7 @@ Jenkins support is [available in GitLab EE](http://doc.gitlab.com/ee/integration ## Project services -Integration with services such as Campfire, Flowdock, Gemnasium, HipChat, PivotalTracker and Slack are available in the from of a Project Service. +Integration with services such as Campfire, Flowdock, Gemnasium, HipChat, Pivotal Tracker, and Slack are available in the form of a Project Service. You can find these within GitLab in the Services page under Project Settings if you are at least a master on the project. Project Services are a bit like plugins in that they allow a lot of freedom in adding functionality to GitLab, for example there is also a service that can send an email every time someone pushes new commits. Because GitLab is open source we can ship with the code and tests for all plugins. diff --git a/doc/integration/external-issue-tracker.md b/doc/integration/external-issue-tracker.md index 87af94512ed..ba4df9f8fe0 100644 --- a/doc/integration/external-issue-tracker.md +++ b/doc/integration/external-issue-tracker.md @@ -6,7 +6,7 @@ GitLab has a great issue tracker but you can also use an external issue tracker - clicking 'New issue' on the project dashboard creates a new JIRA issue; - To reference JIRA issue PROJECT-1234 in comments, use syntax PROJECT-1234. Commit messages get turned into HTML links to the corresponding JIRA issue. -![jira screenshot](jira-integration-points.png) +![Jira screenshot](jira-integration-points.png) You can configure the integration in the gitlab.yml configuration file. diff --git a/doc/integration/gitlab_buttons_in_gmail.md b/doc/integration/gitlab_buttons_in_gmail.md index 0816509c557..a9885cef109 100644 --- a/doc/integration/gitlab_buttons_in_gmail.md +++ b/doc/integration/gitlab_buttons_in_gmail.md @@ -1,4 +1,4 @@ -# GitLab buttons in gmail +# GitLab buttons in Gmail GitLab supports [Google actions in email](https://developers.google.com/gmail/markup/actions/actions-overview). @@ -25,4 +25,4 @@ If you receive "No errors detected" message from the tester you can send the ema ```bash bundle exec rake gitlab:mail_google_schema_whitelisting RAILS_ENV=production SEND=true -`` +``` diff --git a/doc/integration/shibboleth.md b/doc/integration/shibboleth.md index 1b03197b6c7..ea11f1afeab 100644 --- a/doc/integration/shibboleth.md +++ b/doc/integration/shibboleth.md @@ -2,7 +2,7 @@ This documentation is for enabling shibboleth with gitlab-omnibus package. -In order to enable Shibboleth support in gitlab we need to use Apache instead of Nginx (It may be possible to use Nginx, however I did not found way to easily configure nginx that is bundled in gitlab-omnibus package). Apache uses mod_shib2 module for shibboleth authentication and can pass attributes as headers to omniauth-shibboleth provider. +In order to enable Shibboleth support in gitlab we need to use Apache instead of Nginx (It may be possible to use Nginx, however I did not found way to easily configure Nginx that is bundled in gitlab-omnibus package). Apache uses mod_shib2 module for shibboleth authentication and can pass attributes as headers to omniauth-shibboleth provider. To enable the Shibboleth OmniAuth provider you must: @@ -10,7 +10,7 @@ To enable the Shibboleth OmniAuth provider you must: 1. Configure Apache shibboleth module. Installation and configuration of module it self is out of scope of this document. Check https://wiki.shibboleth.net/ for more info. -1. You can find Apache config in gitlab-reciepes (https://github.com/gitlabhq/gitlab-recipes/blob/master/web-server/apache/gitlab-ssl.conf) +1. You can find Apache config in gitlab-recipes (https://github.com/gitlabhq/gitlab-recipes/blob/master/web-server/apache/gitlab-ssl.conf) Following changes are needed to enable shibboleth: @@ -34,7 +34,7 @@ protect omniauth-shibboleth callback URL: ``` exclude shibboleth URLs from rewriting, add "RewriteCond %{REQUEST_URI} !/Shibboleth.sso" and "RewriteCond %{REQUEST_URI} !/shibboleth-sp", config should look like this: ``` - #apache equivalent of nginx try files + # Apache equivalent of Nginx try files RewriteEngine on RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !/Shibboleth.sso @@ -50,7 +50,7 @@ File it should look like this: external_url 'https://gitlab.example.com' gitlab_rails['internal_api_url'] = 'https://gitlab.example.com' -# disable nginx +# disable Nginx nginx['enable'] = false gitlab_rails['omniauth_allow_single_sign_on'] = true diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index 7b79cd5d98b..2568245e9c2 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -6,7 +6,7 @@ * [Newlines](#newlines) * [Multiple underscores in words](#multiple-underscores-in-words) -* [URL autolinking](#url-autolinking) +* [URL auto-linking](#url-autolinking) * [Code and Syntax Highlighting](#code-and-syntax-highlighting) * [Emoji](#emoji) * [Special GitLab references](#special-gitlab-references) @@ -40,7 +40,7 @@ You can use GFM in - milestones - wiki pages -You can also use other rich text files in GitLab. You might have to install a depency to do so. Please see the [github-markup gem readme](https://github.com/gitlabhq/markup#markups) for more information. +You can also use other rich text files in GitLab. You might have to install a dependency to do so. Please see the [github-markup gem readme](https://github.com/gitlabhq/markup#markups) for more information. ## Newlines @@ -68,7 +68,7 @@ It is not reasonable to italicize just _part_ of a word, especially when you're perform_complicated_task do_this_and_do_that_and_another_thing -## URL autolinking +## URL auto-linking GFM will autolink standard URLs you copy and paste into your text. So if you want to link to a URL (instead of a textural link), you can simply put the URL in verbatim and it will be turned into a link to that URL. diff --git a/doc/project_services/project_services.md b/doc/project_services/project_services.md index ec46af5fe3b..93a57485cfd 100644 --- a/doc/project_services/project_services.md +++ b/doc/project_services/project_services.md @@ -4,16 +4,16 @@ __Project integrations with external services for continuous integration and mor ## Services -- Assemblia -- [Atlassian Bamboo CI](bamboo.md) An Atlassian product for continous integration. +- Assembla +- [Atlassian Bamboo CI](bamboo.md) An Atlassian product for continuous integration. - Build box - Campfire - Emails on push - Flowdock - Gemnasium - GitLab CI -- Hipchat -- PivotalTracker +- HipChat +- Pivotal Tracker - Pushover - Slack -- TeamCity \ No newline at end of file +- TeamCity diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index f9d2f5dc4eb..d40d74b1e34 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -214,19 +214,19 @@ This is recommended to reduce cron spam. If your GitLab server contains a lot of Git repository data you may find the GitLab backup script to be too slow. In this case you can consider using filesystem snapshots as part of your backup strategy. -Example: Amazone EBS +Example: Amazon EBS > A GitLab server using omnibus-gitlab hosted on Amazon AWS. > An EBS drive containing an ext4 filesystem is mounted at `/var/opt/gitlab`. > In this case you could make an application backup by taking an EBS snapshot. > The backup includes all repositories, uploads and Postgres data. -Example: LVM snapshots + Rsync +Example: LVM snapshots + rsync > A GitLab server using omnibus-gitlab, with an LVM logical volume mounted at `/var/opt/gitlab`. -> Replicating the `/var/opt/gitlab` directory usign Rsync would not be reliable because too many files would change while Rsync is running. +> Replicating the `/var/opt/gitlab` directory using rsync would not be reliable because too many files would change while rsync is running. > Instead of rsync-ing `/var/opt/gitlab`, we create a temporary LVM snapshot, which we mount as a read-only filesystem at `/mnt/gitlab_backup`. -> Now we can have a longer running Rsync job which will create a consistent replica on the remote server. +> Now we can have a longer running rsync job which will create a consistent replica on the remote server. > The replica includes all repositories, uploads and Postgres data. If you are running GitLab on a virtualized server you can possibly also create VM snapshots of the entire GitLab server. diff --git a/doc/release/howto_rc1.md b/doc/release/howto_rc1.md index 25923d16f34..e8e8c8a821d 100644 --- a/doc/release/howto_rc1.md +++ b/doc/release/howto_rc1.md @@ -104,7 +104,7 @@ bundle exec rake release["x.x.0.rc1"] ``` Now developers can use master for merging new features. -So you should use stable branch for future code chages related to release. +So you should use stable branch for future code changes related to release. ### 5. Release GitLab CI RC1 diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 175112b90c6..4297bc7e2b7 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -207,7 +207,7 @@ __3. Tweet to blog__ Send out a tweet to share the good news with the world. List the most important features and link to the blog post. -Proposed tweet "Release of GitLab X.X & CI Y.Y! FEATURE, FEATURE and FEATURE #gitlab" +Proposed tweet "Release of GitLab X.X & CI Y.Y! FEATURE, FEATURE and FEATURE <link-to-blog-post> #gitlab" Consider creating a post on Hacker News. diff --git a/doc/security/information_exclusivity.md b/doc/security/information_exclusivity.md index 127166ae2e7..f8e7fc3fd0e 100644 --- a/doc/security/information_exclusivity.md +++ b/doc/security/information_exclusivity.md @@ -4,6 +4,6 @@ Git is a distributed version control system (DVCS). This means that everyone that works with the source code has a local copy of the complete repository. In GitLab every project member that is not a guest (so reporters, developers and masters) can clone the repository to get a local copy. After obtaining this local copy the user can upload the full repository anywhere, including another project under their control or another server. -The consequense is that you can't build access controls that prevent the intentional sharing of source code by users that have access to the source code. +The consequence is that you can't build access controls that prevent the intentional sharing of source code by users that have access to the source code. This is an inherent feature of a DVCS and all git management systems have this limitation. Obviously you can take steps to prevent unintentional sharing and information destruction, this is why only some people are allowed to invite others and nobody can force push a protected branch. diff --git a/doc/system_hooks/system_hooks.md b/doc/system_hooks/system_hooks.md index 41c2732ef77..f9b6d37d840 100644 --- a/doc/system_hooks/system_hooks.md +++ b/doc/system_hooks/system_hooks.md @@ -15,8 +15,8 @@ System hooks can be used, e.g. for logging or changing information in a LDAP ser "name": "StoreCloud", "owner_email": "johnsmith@gmail.com", "owner_name": "John Smith", - "path": "stormcloud", - "path_with_namespace": "jsmith/stormcloud", + "path": "storecloud", + "path_with_namespace": "jsmith/storecloud", "project_id": 74, "project_visibility": "private", } @@ -126,10 +126,10 @@ System hooks can be used, e.g. for logging or changing information in a LDAP ser { "created_at": "2012-07-21T07:30:54Z", "event_name": "group_create", - "name": "StormCloud", + "name": "StoreCloud", "owner_email": "johnsmith@gmail.com", "owner_name": "John Smith", - "path": "stormcloud", + "path": "storecloud", "group_id": 78 } ``` diff --git a/doc/update/2.6-to-3.0.md b/doc/update/2.6-to-3.0.md index 6aabbe095dc..2044b659468 100644 --- a/doc/update/2.6-to-3.0.md +++ b/doc/update/2.6-to-3.0.md @@ -22,29 +22,29 @@ sudo -u gitlab bundle exec rake db:migrate RAILS_ENV=production # !!! Config should be replaced with a new one. Check it after replace cp config/gitlab.yml.example config/gitlab.yml -# update gitolite hooks +# update Gitolite hooks -# GITOLITE v2: +# Gitolite v2: sudo cp ./lib/hooks/post-receive /home/git/share/gitolite/hooks/common/post-receive sudo chown git:git /home/git/share/gitolite/hooks/common/post-receive -# GITOLITE v3: +# Gitolite v3: sudo cp ./lib/hooks/post-receive /home/git/.gitolite/hooks/common/post-receive sudo chown git:git /home/git/.gitolite/hooks/common/post-receive # set valid path to hooks in gitlab.yml in git_host section # like this git_host: - # gitolite 2 + # Gitolite 2 hooks_path: /home/git/share/gitolite/hooks - # gitolite 3 + # Gitolite 3 hooks_path: /home/git/.gitolite/hooks/ -# Make some changes to gitolite config +# Make some changes to Gitolite config # For more information visit https://github.com/gitlabhq/gitlabhq/pull/1719 -# gitolite v2 +# Gitolite v2 sudo -u git -H sed -i 's/\(GL_GITCONFIG_KEYS\s*=>*\s*\).\{2\}/\\1"\.\*"/g' /home/git/.gitolite.rc # gitlite v3 diff --git a/doc/update/4.2-to-5.0.md b/doc/update/4.2-to-5.0.md index 7974ae47ff4..0a929591dec 100644 --- a/doc/update/4.2-to-5.0.md +++ b/doc/update/4.2-to-5.0.md @@ -111,7 +111,7 @@ sudo chmod -R u+rwX /home/git/gitlab/tmp/pids ``` -## 6. Update init.d script and nginx config +## 6. Update init.d script and Nginx config ```bash # init.d @@ -123,7 +123,7 @@ sudo chmod +x /etc/init.d/gitlab sudo -u git -H cp /home/git/gitlab/config/unicorn.rb /home/git/gitlab/config/unicorn.rb.old sudo -u git -H cp /home/git/gitlab/config/unicorn.rb.example /home/git/gitlab/config/unicorn.rb -#nginx +# Nginx # Replace path from '/home/gitlab/' to '/home/git/' sudo vim /etc/nginx/sites-enabled/gitlab sudo service nginx restart @@ -137,7 +137,7 @@ sudo service gitlab start # check if unicorn and sidekiq started # If not try to logout, also check replaced path from '/home/gitlab/' to '/home/git/' -# in nginx, unicorn, init.d etc +# in Nginx, unicorn, init.d etc ps aux | grep unicorn ps aux | grep sidekiq diff --git a/doc/update/5.1-to-6.0.md b/doc/update/5.1-to-6.0.md index a76b371e6d6..ef412b45695 100644 --- a/doc/update/5.1-to-6.0.md +++ b/doc/update/5.1-to-6.0.md @@ -40,7 +40,7 @@ sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production The migrations in this update are very sensitive to incomplete or inconsistent data. If you have a long-running GitLab installation and some of the previous upgrades did not work out 100% correct this may bite you now. The following can help you have a more smooth upgrade. -### Find projets with invalid project names +### Find projects with invalid project names #### MySQL Login to MySQL: diff --git a/doc/update/6.1-to-6.2.md b/doc/update/6.1-to-6.2.md index efa6e43124c..11b124cf263 100644 --- a/doc/update/6.1-to-6.2.md +++ b/doc/update/6.1-to-6.2.md @@ -35,7 +35,7 @@ sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulner ## 4. Install additional packages ```bash -# Add support for lograte for better log file handling +# Add support for logrotate for better log file handling sudo apt-get install logrotate ``` diff --git a/doc/update/6.x-or-7.x-to-7.7.md b/doc/update/6.x-or-7.x-to-7.7.md index 6501a8d2148..30395c68d98 100644 --- a/doc/update/6.x-or-7.x-to-7.7.md +++ b/doc/update/6.x-or-7.x-to-7.7.md @@ -84,7 +84,7 @@ sudo -u git -H git checkout 7-7-stable-ee ## 4. Install additional packages ```bash -# Add support for lograte for better log file handling +# Add support for logrotate for better log file handling sudo apt-get install logrotate # Install pkg-config and cmake, which is needed for the latest versions of rugged @@ -217,13 +217,13 @@ mysql -u root -p # Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; -# If previous query returned results, copy & run all outputed SQL statements +# If previous query returned results, copy & run all shown SQL statements # Convert all tables to correct character set SET foreign_key_checks = 0; SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; -# If previous query returned results, copy & run all outputed SQL statements +# If previous query returned results, copy & run all shown SQL statements # turn foreign key checks back on SET foreign_key_checks = 1; diff --git a/doc/update/7.3-to-7.4.md b/doc/update/7.3-to-7.4.md index 2466050ea4c..62bd98832c2 100644 --- a/doc/update/7.3-to-7.4.md +++ b/doc/update/7.3-to-7.4.md @@ -114,13 +114,13 @@ mysql -u root -p # Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; -# If previous query returned results, copy & run all outputed SQL statements +# If previous query returned results, copy & run all shown SQL statements # Convert all tables to correct character set SET foreign_key_checks = 0; SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; -# If previous query returned results, copy & run all outputed SQL statements +# If previous query returned results, copy & run all shown SQL statements # turn foreign key checks back on SET foreign_key_checks = 1; diff --git a/doc/update/README.md b/doc/update/README.md index 30e9137d7b7..5380ddbd030 100644 --- a/doc/update/README.md +++ b/doc/update/README.md @@ -13,4 +13,4 @@ Depending on the installation method and your GitLab version, there are multiple ## Miscellaneous -- [MySQL to PostgreSQL](mysql_to_postgresql.md) guides you through migrating your database from MySQL to PostrgreSQL. +- [MySQL to PostgreSQL](mysql_to_postgresql.md) guides you through migrating your database from MySQL to PostgreSQL. diff --git a/doc/workflow/gitlab_flow.md b/doc/workflow/gitlab_flow.md index 1dbff60cbfd..0e87dc74217 100644 --- a/doc/workflow/gitlab_flow.md +++ b/doc/workflow/gitlab_flow.md @@ -43,7 +43,7 @@ Since most tools automatically make the master branch the default one and displa The second problem of git flow is the complexity introduced by the hotfix and release branches. These branches can be a good idea for some organizations but are overkill for the vast majority of them. Nowadays most organizations practice continuous delivery which means that your default branch can be deployed. -This means that hotfixed and release branches can be prevented including all the ceremony they introduce. +This means that hotfix and release branches can be prevented including all the ceremony they introduce. An example of this ceremony is the merging back of release branches. Though specialized tools do exist to solve this, they require documentation and add complexity. Frequently developers make a mistake and for example changes are only merged into master and not into the develop branch. @@ -95,12 +95,12 @@ An 'extreme' version of environment branches are setting up an environment for e ## Release branches with GitLab flow -![Master and multiple release branches that vary in length with cherrypicks from master](release_branches.png) +![Master and multiple release branches that vary in length with cherry-picks from master](release_branches.png) Only in case you need to release software to the outside world you need to work with release branches. In this case, each branch contains a minor version (2-3-stable, 2-4-stable, etc.). The stable branch uses master as a starting point and is created as late as possible. -By branching as late as possible you minimize the time you have to apply bugfixes to multiple branches. +By branching as late as possible you minimize the time you have to apply bug fixes to multiple branches. After a release branch is announced, only serious bug fixes are included in the release branch. If possible these bug fixes are first merged into master and then cherry-picked into the release branch. This way you can't forget to cherry-pick them into master and encounter the same bug on subsequent releases. @@ -177,7 +177,7 @@ In GitLab this creates a comment in the issue that the merge requests mentions t And the merge request shows the linked issues. These issues are closed once code is merged into the default branch. -If you only want to make the reference without closing the issue you can also just mention it: "Ducktyping is preferred. #12". +If you only want to make the reference without closing the issue you can also just mention it: "Duck typing is preferred. #12". If you have an issue that spans across multiple repositories, the best thing is to create an issue for each repository and link all issues to a parent issue. diff --git a/doc/workflow/migrating_from_svn.md b/doc/workflow/migrating_from_svn.md index 207e3641802..485db4834e9 100644 --- a/doc/workflow/migrating_from_svn.md +++ b/doc/workflow/migrating_from_svn.md @@ -3,7 +3,7 @@ SVN stands for Subversion and is a version control system (VCS). Git is a distributed version control system. -There are some major differences between the two, for more information consult your favourite search engine. +There are some major differences between the two, for more information consult your favorite search engine. Git has tools for migrating SVN repositories to git, namely `git svn`. You can read more about this at [git documentation pages](http://git-scm.com/book/en/Git-and-Other-Systems-Git-and-Subversion). diff --git a/doc/workflow/notifications.md b/doc/workflow/notifications.md index 3c3ce162df5..17215de677e 100644 --- a/doc/workflow/notifications.md +++ b/doc/workflow/notifications.md @@ -24,14 +24,14 @@ Each of these settings have levels of notification: #### Global Settings Global Settings are at the bottom of the hierarchy. -Any setting set here will be overriden by a setting at the group or a project level. +Any setting set here will be overridden by a setting at the group or a project level. Group or Project settings can use `global` notification setting which will then use anything that is set at Global Settings. #### Group Settings -Group Settings are taking presedence over Global Settings but are on a level below Project Settings. +Group Settings are taking precedence over Global Settings but are on a level below Project Settings. This means that you can set a different level of notifications per group while still being able to have a finer level setting per project. Organization like this is suitable for users that belong to different groups but don't have the @@ -39,7 +39,7 @@ same need for being notified for every group they are member of. #### Project Settings -Project Settings are at the top level and any setting placed at this level will take presedence of any +Project Settings are at the top level and any setting placed at this level will take precedence of any other setting. This is suitable for users that have different needs for notifications per project basis. -- cgit v1.2.1 From b60d06eb2c91a61b91a214dac0f0f526b146f8d7 Mon Sep 17 00:00:00 2001 From: Jeroen van Baarsen Date: Mon, 2 Feb 2015 22:08:10 +0100 Subject: Added a way to retrieve MR files Signed-off-by: Jeroen van Baarsen --- doc/api/merge_requests.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 053fc9346be..acae55d07ef 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -94,6 +94,76 @@ Parameters: } ``` +## Get single MR changes + +Shows information about the merge request including its files and changes + +``` +GET /projects/:id/merge_request/:merge_request_id/changes +``` + +Parameters: + +- `id` (required) - The ID of a project +- `merge_request_id` (required) - The ID of MR + +```json +{ + "id": 21, + "iid": 1, + "project_id": 4, + "title": "Blanditiis beatae suscipit hic assumenda et molestias nisi asperiores repellat et.", + "description": "Qui voluptatibus placeat ipsa alias quasi. Deleniti rem ut sint. Optio velit qui distinctio.", + "state": "reopened", + "created_at": "2015-02-02T19:49:39.159Z", + "updated_at": "2015-02-02T20:08:49.959Z", + "target_branch": "secret_token", + "source_branch": "version-1-9", + "upvotes": 0, + "downvotes": 0, + "author": { + "name": "Chad Hamill", + "username": "jarrett", + "id": 5, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/b95567800f828948baf5f4160ebb2473?s=40&d=identicon" + }, + "assignee": { + "name": "Administrator", + "username": "root", + "id": 1, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40&d=identicon" + }, + "source_project_id": 4, + "target_project_id": 4, + "labels": [ ], + "milestone": { + "id": 5, + "iid": 1, + "project_id": 4, + "title": "v2.0", + "description": "Assumenda aut placeat expedita exercitationem labore sunt enim earum.", + "state": "closed", + "created_at": "2015-02-02T19:49:26.013Z", + "updated_at": "2015-02-02T19:49:26.013Z", + "due_date": null + }, + "files": [ + { + "old_path": "VERSION", + "new_path": "VERSION", + "a_mode": "100644", + "b_mode": "100644", + "diff": "--- a/VERSION\ +++ b/VERSION\ @@ -1 +1 @@\ -1.9.7\ +1.9.8", + "new_file": false, + "renamed_file": false, + "deleted_file": false + } + ] +} +``` + ## Create MR Creates a new merge request. -- cgit v1.2.1 From 7aa3f6053efd9c1e2db962f7146a13bdf3d147c9 Mon Sep 17 00:00:00 2001 From: Ewan Edwards Date: Wed, 4 Feb 2015 08:23:24 -0800 Subject: Consolidate the SSH topics into a single file, since the two available topics are quite short. Also correct some missing words, punctuation. --- doc/ssh/README.md | 73 ++++++++++++++++++++++++++++++++++++++++++++++++-- doc/ssh/deploy_keys.md | 9 ------- doc/ssh/ssh.md | 38 -------------------------- 3 files changed, 71 insertions(+), 49 deletions(-) delete mode 100644 doc/ssh/deploy_keys.md delete mode 100644 doc/ssh/ssh.md (limited to 'doc') diff --git a/doc/ssh/README.md b/doc/ssh/README.md index c87fffd7d2c..6fe23dfa2a6 100644 --- a/doc/ssh/README.md +++ b/doc/ssh/README.md @@ -1,4 +1,73 @@ # SSH -- [Deploy keys](deploy_keys.md) -- [SSH](ssh.md) +## SSH keys + +An SSH key allows you to establish a secure connection between your +computer and GitLab. + +Before generating an SSH key, check if your system already has one by +running `cat ~/.ssh/id_rsa.pub`. If you see a long string starting with +`ssh-rsa` or `ssh-dsa`, you can skip the ssh-keygen step. + +To generate a new SSH key, just open your terminal and use code below. The +ssh-keygen command prompts you for a location and filename to store the key +pair and for a password. When prompted for the location and filename, you +can press enter to use the default. + +It is a best practice to use a password for an SSH key, but it is not +required and you can skip creating a password by pressing enter. Note that +the password you choose here can't be altered or retrieved. + +```bash +ssh-keygen -t rsa -C "$your_email" +``` + +Use the code below to show your public key. + +```bash +cat ~/.ssh/id_rsa.pub +``` + +Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your +user profile. Please copy the complete key starting with `ssh-` and ending +with your username and host. + +Use code below to copy your public key to the clipboard. Depending on your +OS you'll need to use a different command: + +**Windows:** +```bash +clip < ~/.ssh/id_rsa.pub +``` + +**Mac:** +```bash +pbcopy < ~/.ssh/id_rsa.pub +``` + +**Linux (requires xclip):** +```bash +xclip -sel clip < ~/.ssh/id_rsa.pub +``` + +## Deploy keys + +Deploy keys allow read-only access to multiple projects with a single SSH +key. + +This is really useful for cloning repositories to your Continuous +Integration (CI) server. By using deploy keys, you don't have to setup a +dummy user account. + +If you are a project master or owner, you can add a deploy key in the +project settings under the section 'Deploy Keys'. Press the 'New Deploy +Key' button and upload a public SSH key. After this, the machine that uses +the corresponding private key has read-only access to the project. + +You can't add the same deploy key twice with the 'New Deploy Key' option. +If you want to add the same key to another project, please enable it in the +list that says 'Deploy keys from projects available to you'. All the deploy +keys of all the projects you have access to are available. This project +access can happen through being a direct member of the projecti, or through +a group. See `def accessible_deploy_keys` in `app/models/user.rb` for more +information. diff --git a/doc/ssh/deploy_keys.md b/doc/ssh/deploy_keys.md deleted file mode 100644 index dcca8bdc61a..00000000000 --- a/doc/ssh/deploy_keys.md +++ /dev/null @@ -1,9 +0,0 @@ -# Deploy keys - -Deploy keys allow read-only access one or multiple projects with a single SSH key. - -This is really useful for cloning repositories to your Continuous Integration (CI) server. By using a deploy keys you don't have to setup a dummy user account. - -If you are a project master or owner you can add a deploy key in the project settings under the section Deploy Keys. Press the 'New Deploy Key' button and upload a public ssh key. After this the machine that uses the corresponding private key has read-only access to the project. - -You can't add the same deploy key twice with the 'New Deploy Key' option. If you want to add the same key to another project please enable it in the list that says 'Deploy keys from projects available to you'. All the deploy keys of all the projects you have access to are available. This project access can happen through being a direct member of the project or through a group. See `def accessible_deploy_keys` in `app/models/user.rb` for more information. diff --git a/doc/ssh/ssh.md b/doc/ssh/ssh.md deleted file mode 100644 index f9ee627f1f5..00000000000 --- a/doc/ssh/ssh.md +++ /dev/null @@ -1,38 +0,0 @@ -# SSH keys - -SSH key allows you to establish a secure connection between your computer and GitLab - -Before generating an SSH key, check if your system already has one by running `cat ~/.ssh/id_rsa.pub` If your see a long string starting with `ssh-rsa` or `ssh-dsa`, you can skip the ssh-keygen step. - -To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. When prompted for the location and filename you can press enter to use the default. -It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter. -Note that the password you choose here can't be altered or retrieved. - -```bash -ssh-keygen -t rsa -C "$your_email" -``` - -Use the code below to show your public key. - -```bash -cat ~/.ssh/id_rsa.pub -``` - -Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with `ssh-` and ending with your username and host. - -Use code below to copy your public key to the clipboard. Depending on your OS you'll need to use a different command: - -**Windows:** -```bash -clip < ~/.ssh/id_rsa.pub -``` - -**Mac:** -```bash -pbcopy < ~/.ssh/id_rsa.pub -``` - -**Linux (requires xclip):** -```bash -xclip -sel clip < ~/.ssh/id_rsa.pub -``` -- cgit v1.2.1 From 9910b7ff99c3d7f89f512c1915ce40ed0c1696e3 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 4 Feb 2015 17:10:39 +0100 Subject: Allow groups to be mentioned. Resolves #1673. --- doc/markdown/markdown.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index 7b79cd5d98b..b9b9ca17678 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -170,7 +170,7 @@ GFM will turn that reference into a link so you can navigate between them easily GFM will recognize the following: -- @foo : for team members +- @foo : for specific team members or groups - @all : for the whole team - #123 : for issues - !123 : for merge requests -- cgit v1.2.1 From f73cb6ff74ea954799af247376aa2fc9bf89efbc Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Sun, 9 Nov 2014 03:53:07 -0800 Subject: note about latest details being on master branch [ci skip] --- doc/update/2.6-to-3.0.md | 1 + doc/update/2.9-to-3.0.md | 1 + doc/update/3.0-to-3.1.md | 1 + doc/update/3.1-to-4.0.md | 1 + doc/update/4.0-to-4.1.md | 1 + doc/update/4.1-to-4.2.md | 1 + doc/update/4.2-to-5.0.md | 1 + doc/update/5.0-to-5.1.md | 1 + doc/update/5.1-to-5.2.md | 1 + doc/update/5.1-to-5.4.md | 1 + doc/update/5.1-to-6.0.md | 1 + doc/update/5.2-to-5.3.md | 1 + doc/update/5.3-to-5.4.md | 1 + doc/update/5.4-to-6.0.md | 1 + doc/update/6.0-to-6.1.md | 1 + doc/update/6.1-to-6.2.md | 1 + doc/update/6.2-to-6.3.md | 1 + doc/update/6.3-to-6.4.md | 1 + doc/update/6.4-to-6.5.md | 1 + doc/update/6.5-to-6.6.md | 1 + doc/update/6.6-to-6.7.md | 1 + doc/update/6.7-to-6.8.md | 1 + doc/update/6.8-to-6.9.md | 1 + doc/update/6.9-to-7.0.md | 1 + doc/update/6.x-or-7.x-to-7.7.md | 3 ++- doc/update/7.0-to-7.1.md | 1 + doc/update/7.1-to-7.2.md | 1 + doc/update/7.2-to-7.3.md | 1 + doc/update/7.3-to-7.4.md | 1 + doc/update/mysql_to_postgresql.md | 1 + doc/update/patch_versions.md | 1 + doc/update/upgrader.md | 1 + 32 files changed, 33 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/2.6-to-3.0.md b/doc/update/2.6-to-3.0.md index 2044b659468..4827ef9501a 100644 --- a/doc/update/2.6-to-3.0.md +++ b/doc/update/2.6-to-3.0.md @@ -1,4 +1,5 @@ # From 2.6 to 3.0 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/2.6-to-3.0.md) for the most up to date instructions.* ## 1. Stop server & resque diff --git a/doc/update/2.9-to-3.0.md b/doc/update/2.9-to-3.0.md index 8af86b0dc98..f4a997a8c5e 100644 --- a/doc/update/2.9-to-3.0.md +++ b/doc/update/2.9-to-3.0.md @@ -1,4 +1,5 @@ # From 2.9 to 3.0 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/2.9-to-3.0.md) for the most up to date instructions.* ## 1. Stop server & resque diff --git a/doc/update/3.0-to-3.1.md b/doc/update/3.0-to-3.1.md index 3206df3499b..a30485c42f7 100644 --- a/doc/update/3.0-to-3.1.md +++ b/doc/update/3.0-to-3.1.md @@ -1,4 +1,5 @@ # From 3.0 to 3.1 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/3.0-to-3.1.md) for the most up to date instructions.* **IMPORTANT!** diff --git a/doc/update/3.1-to-4.0.md b/doc/update/3.1-to-4.0.md index 165f4e6a308..f1ef4df4744 100644 --- a/doc/update/3.1-to-4.0.md +++ b/doc/update/3.1-to-4.0.md @@ -1,4 +1,5 @@ # From 3.1 to 4.0 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/3.1-to-4.0.md) for the most up to date instructions.* ## Important changes diff --git a/doc/update/4.0-to-4.1.md b/doc/update/4.0-to-4.1.md index 4149ed6b08d..d89d5235917 100644 --- a/doc/update/4.0-to-4.1.md +++ b/doc/update/4.0-to-4.1.md @@ -1,4 +1,5 @@ # From 4.0 to 4.1 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/4.0-to-4.1.md) for the most up to date instructions.* ## Important changes diff --git a/doc/update/4.1-to-4.2.md b/doc/update/4.1-to-4.2.md index 5ee8e8781e9..6fe4412ff90 100644 --- a/doc/update/4.1-to-4.2.md +++ b/doc/update/4.1-to-4.2.md @@ -1,4 +1,5 @@ # From 4.1 to 4.2 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/4.1-to-4.2.md) for the most up to date instructions.* ## 1. Stop server & Resque diff --git a/doc/update/4.2-to-5.0.md b/doc/update/4.2-to-5.0.md index 0a929591dec..f9faf65f952 100644 --- a/doc/update/4.2-to-5.0.md +++ b/doc/update/4.2-to-5.0.md @@ -1,4 +1,5 @@ # From 4.2 to 5.0 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/4.2-to-5.0.md) for the most up to date instructions.* ## Warning diff --git a/doc/update/5.0-to-5.1.md b/doc/update/5.0-to-5.1.md index 0e597abb1a9..9fbd1f88515 100644 --- a/doc/update/5.0-to-5.1.md +++ b/doc/update/5.0-to-5.1.md @@ -1,4 +1,5 @@ # From 5.0 to 5.1 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/5.0-to-5.1.md) for the most up to date instructions.* ## Warning diff --git a/doc/update/5.1-to-5.2.md b/doc/update/5.1-to-5.2.md index 6ef559ac9f9..cf9c4e4f770 100644 --- a/doc/update/5.1-to-5.2.md +++ b/doc/update/5.1-to-5.2.md @@ -1,4 +1,5 @@ # From 5.1 to 5.2 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/5.1-to-5.2.md) for the most up to date instructions.* ## Warning diff --git a/doc/update/5.1-to-5.4.md b/doc/update/5.1-to-5.4.md index 8ec56b266ca..97a98ede070 100644 --- a/doc/update/5.1-to-5.4.md +++ b/doc/update/5.1-to-5.4.md @@ -1,4 +1,5 @@ # From 5.1 to 5.4 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/5.1-to-5.4.md) for the most up to date instructions.* Also works starting from 5.2. diff --git a/doc/update/5.1-to-6.0.md b/doc/update/5.1-to-6.0.md index ef412b45695..a3fdd92bd2f 100644 --- a/doc/update/5.1-to-6.0.md +++ b/doc/update/5.1-to-6.0.md @@ -1,4 +1,5 @@ # From 5.1 to 6.0 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/5.1-to-6.0.md) for the most up to date instructions.* ## Warning diff --git a/doc/update/5.2-to-5.3.md b/doc/update/5.2-to-5.3.md index 61ddf135641..27613aeda07 100644 --- a/doc/update/5.2-to-5.3.md +++ b/doc/update/5.2-to-5.3.md @@ -1,4 +1,5 @@ # From 5.2 to 5.3 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/5.2-to-5.3.md) for the most up to date instructions.* ## Warning diff --git a/doc/update/5.3-to-5.4.md b/doc/update/5.3-to-5.4.md index 8a0d43e3e64..577b9a585ff 100644 --- a/doc/update/5.3-to-5.4.md +++ b/doc/update/5.3-to-5.4.md @@ -1,4 +1,5 @@ # From 5.3 to 5.4 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/5.3-to-5.4.md) for the most up to date instructions.* ## 0. Backup diff --git a/doc/update/5.4-to-6.0.md b/doc/update/5.4-to-6.0.md index ba8f8e39584..d18c3fe8586 100644 --- a/doc/update/5.4-to-6.0.md +++ b/doc/update/5.4-to-6.0.md @@ -1,4 +1,5 @@ # From 5.4 to 6.0 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/5.4-to-6.0.md) for the most up to date instructions.* ## Warning diff --git a/doc/update/6.0-to-6.1.md b/doc/update/6.0-to-6.1.md index 9d67a3bcb96..c5eba1c01c4 100644 --- a/doc/update/6.0-to-6.1.md +++ b/doc/update/6.0-to-6.1.md @@ -1,4 +1,5 @@ # From 6.0 to 6.1 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.0-to-6.1.md) for the most up to date instructions.* ## Warning diff --git a/doc/update/6.1-to-6.2.md b/doc/update/6.1-to-6.2.md index 11b124cf263..a534528108a 100644 --- a/doc/update/6.1-to-6.2.md +++ b/doc/update/6.1-to-6.2.md @@ -1,4 +1,5 @@ # From 6.1 to 6.2 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.1-to-6.2.md) for the most up to date instructions.* **You should update to 6.1 before installing 6.2 so all the necessary conversions are run.** diff --git a/doc/update/6.2-to-6.3.md b/doc/update/6.2-to-6.3.md index e9b3bdd2f54..b08ebde0808 100644 --- a/doc/update/6.2-to-6.3.md +++ b/doc/update/6.2-to-6.3.md @@ -1,4 +1,5 @@ # From 6.2 to 6.3 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.2-to-6.3.md) for the most up to date instructions.* **Requires version: 6.1 or 6.2.** diff --git a/doc/update/6.3-to-6.4.md b/doc/update/6.3-to-6.4.md index 96c2895981d..951d92dfeb5 100644 --- a/doc/update/6.3-to-6.4.md +++ b/doc/update/6.3-to-6.4.md @@ -1,4 +1,5 @@ # From 6.3 to 6.4 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.3-to-6.4.md) for the most up to date instructions.* ## 0. Backup diff --git a/doc/update/6.4-to-6.5.md b/doc/update/6.4-to-6.5.md index 1624296fc3f..0dae9a9fe59 100644 --- a/doc/update/6.4-to-6.5.md +++ b/doc/update/6.4-to-6.5.md @@ -1,4 +1,5 @@ # From 6.4 to 6.5 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.4-to-6.5.md) for the most up to date instructions.* ## 0. Backup diff --git a/doc/update/6.5-to-6.6.md b/doc/update/6.5-to-6.6.md index 544eee17fec..c24e83eb006 100644 --- a/doc/update/6.5-to-6.6.md +++ b/doc/update/6.5-to-6.6.md @@ -1,4 +1,5 @@ # From 6.5 to 6.6 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.5-to-6.6.md) for the most up to date instructions.* ## 0. Backup diff --git a/doc/update/6.6-to-6.7.md b/doc/update/6.6-to-6.7.md index 77ac4d0bfa6..5622a7001ed 100644 --- a/doc/update/6.6-to-6.7.md +++ b/doc/update/6.6-to-6.7.md @@ -1,4 +1,5 @@ # From 6.6 to 6.7 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.6-to-6.7.md) for the most up to date instructions.* ## 0. Backup diff --git a/doc/update/6.7-to-6.8.md b/doc/update/6.7-to-6.8.md index 16f3439c998..4fb90639f16 100644 --- a/doc/update/6.7-to-6.8.md +++ b/doc/update/6.7-to-6.8.md @@ -1,4 +1,5 @@ # From 6.7 to 6.8 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.7-to-6.8.md) for the most up to date instructions.* ## 0. Backup diff --git a/doc/update/6.8-to-6.9.md b/doc/update/6.8-to-6.9.md index 9efb384ff59..b9b8b63f652 100644 --- a/doc/update/6.8-to-6.9.md +++ b/doc/update/6.8-to-6.9.md @@ -1,4 +1,5 @@ # From 6.8 to 6.9 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.8-to-6.9.md) for the most up to date instructions.* ### 0. Backup diff --git a/doc/update/6.9-to-7.0.md b/doc/update/6.9-to-7.0.md index 1f3421a799b..236430b5951 100644 --- a/doc/update/6.9-to-7.0.md +++ b/doc/update/6.9-to-7.0.md @@ -1,4 +1,5 @@ # From 6.9 to 7.0 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.9-to-7.0.md) for the most up to date instructions.* ### 0. Backup diff --git a/doc/update/6.x-or-7.x-to-7.7.md b/doc/update/6.x-or-7.x-to-7.7.md index e9a0d3d4c65..8280cf2f38f 100644 --- a/doc/update/6.x-or-7.x-to-7.7.md +++ b/doc/update/6.x-or-7.x-to-7.7.md @@ -1,4 +1,5 @@ # From 6.x or 7.x to 7.7 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.x-or-7.x-to-7.4.md) for the most up to date instructions.* This allows you to upgrade any version of GitLab from 6.0 and up (including 7.0 and up) to 7.7. @@ -199,7 +200,7 @@ If all items are green, then congratulations upgrade complete! When using Google omniauth login, changes of the Google account required. Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/). -More details can be found at the [integration documentation](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/google.md). +More details can be found at the [integration documentation](../../../master/doc/integration/google.md). ## 12. Optional optimizations for GitLab setups with MySQL databases diff --git a/doc/update/7.0-to-7.1.md b/doc/update/7.0-to-7.1.md index 82bb5708734..a4e9be9946e 100644 --- a/doc/update/7.0-to-7.1.md +++ b/doc/update/7.0-to-7.1.md @@ -1,4 +1,5 @@ # From 7.0 to 7.1 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/7.0-to-7.1.md) for the most up to date instructions.* ### 0. Backup diff --git a/doc/update/7.1-to-7.2.md b/doc/update/7.1-to-7.2.md index 699111f0143..88cb63d7d41 100644 --- a/doc/update/7.1-to-7.2.md +++ b/doc/update/7.1-to-7.2.md @@ -1,4 +1,5 @@ # From 7.1 to 7.2 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/7.1-to-7.2.md) for the most up to date instructions.* ## Editable labels diff --git a/doc/update/7.2-to-7.3.md b/doc/update/7.2-to-7.3.md index ebdd4ff60fa..18f77d6396e 100644 --- a/doc/update/7.2-to-7.3.md +++ b/doc/update/7.2-to-7.3.md @@ -1,4 +1,5 @@ # From 7.2 to 7.3 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/7.2-to-7.3.md) for the most up to date instructions.* ### 0. Backup diff --git a/doc/update/7.3-to-7.4.md b/doc/update/7.3-to-7.4.md index 085cb80a97f..53e739c06fb 100644 --- a/doc/update/7.3-to-7.4.md +++ b/doc/update/7.3-to-7.4.md @@ -1,4 +1,5 @@ # From 7.3 to 7.4 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/7.3-to-7.4.md) for the most up to date instructions.* ### 0. Stop server diff --git a/doc/update/mysql_to_postgresql.md b/doc/update/mysql_to_postgresql.md index 229689392b8..6af940cca36 100644 --- a/doc/update/mysql_to_postgresql.md +++ b/doc/update/mysql_to_postgresql.md @@ -1,4 +1,5 @@ # Migrating GitLab from MySQL to Postgres +*Make sure you view this [guide from the `master` branch](../../../master/doc/update/mysql_to_postgresql.md) for the most up to date instructions.* If you are replacing MySQL with Postgres while keeping GitLab on the same server all you need to do is to export from MySQL, import into Postgres and rebuild the indexes as described below. If you are also moving GitLab to another server, or if you are switching to omnibus-gitlab, you may want to use a GitLab backup file. The second part of this documents explains the procedure to do this. diff --git a/doc/update/patch_versions.md b/doc/update/patch_versions.md index 629c46ad030..ad302492556 100644 --- a/doc/update/patch_versions.md +++ b/doc/update/patch_versions.md @@ -1,4 +1,5 @@ # Universal update guide for patch versions +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/patch_versions.md) for the most up to date instructions.* For example from 6.2.0 to 6.2.1, also see the [semantic versioning specification](http://semver.org/). diff --git a/doc/update/upgrader.md b/doc/update/upgrader.md index 5016ee4baad..4ed35b2b562 100644 --- a/doc/update/upgrader.md +++ b/doc/update/upgrader.md @@ -1,4 +1,5 @@ # GitLab Upgrader +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/upgrader.md) for the most up to date instructions.* GitLab Upgrader - a ruby script that allows you easily upgrade GitLab to latest minor version. -- cgit v1.2.1 From 5194214e3a2f97accf0c8119b4cb39fd4fcef5db Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Tue, 27 Jan 2015 15:37:19 -0800 Subject: GitLab integration. Importer --- doc/integration/gitlab.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 doc/integration/gitlab.md (limited to 'doc') diff --git a/doc/integration/gitlab.md b/doc/integration/gitlab.md new file mode 100644 index 00000000000..47f187b021c --- /dev/null +++ b/doc/integration/gitlab.md @@ -0,0 +1,54 @@ +# GitLab OAuth2 OmniAuth Provider + +To enable the GitLab OmniAuth provider you must register your application with GitLab. GitLab will generate a client ID and secret key for you to use. + +1. Sign in to GitLab. + +1. Navigate to your settings. + +1. Select "Applications" in the left menu. + +1. Select "New application". + +1. Provide the required details. + - Name: This can be anything. Consider something like "\'s GitLab" or "\'s GitLab" or something else descriptive. + - Redirect URI: + + ``` + http://gitlab.example.com/importers/gitlab/callback + http://gitlab.example.com/users/auth/gitlab/callback + ``` + + The first link is required for the importer and second for the authorization. + +1. Select "Submit". + +1. You should now see a Application ID and Secret. Keep this page open as you continue configuration. + +1. On your GitLab server, open the configuration file. + + ```sh + cd /home/git/gitlab + + sudo -u git -H editor config/gitlab.yml + ``` + +1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details. + +1. Under `providers:` uncomment (or add) lines that look like the following: + + ``` + - { name: 'gitlab', app_id: 'YOUR APP ID', + app_secret: 'YOUR APP SECRET', + args: { scope: 'api' } } + ``` + +1. Change 'YOUR APP ID' to the Application ID from the GitLab application page. + +1. Change 'YOUR APP SECRET' to the secret from the GitLab application page. + +1. Save the configuration file. + +1. Restart GitLab for the changes to take effect. + +On the sign in page there should now be a GitLab icon below the regular sign in form. Click the icon to begin the authentication process. GitLab will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to your GitLab instance and will be signed in. -- cgit v1.2.1 From 33349dd54928a0b074b4ae3ebfabf214799fc085 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Mon, 2 Feb 2015 17:01:07 -0800 Subject: GitLab.com integration: refactoring --- doc/integration/gitlab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/integration/gitlab.md b/doc/integration/gitlab.md index 47f187b021c..b3b1d897225 100644 --- a/doc/integration/gitlab.md +++ b/doc/integration/gitlab.md @@ -15,7 +15,7 @@ To enable the GitLab OmniAuth provider you must register your application with G - Redirect URI: ``` - http://gitlab.example.com/importers/gitlab/callback + http://gitlab.example.com/import/gitlab/callback http://gitlab.example.com/users/auth/gitlab/callback ``` -- cgit v1.2.1 From bdfb349ff70f0fde6d4dc7b4317c3bc7ead580a4 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 5 Feb 2015 22:00:54 -0800 Subject: Refactor and improve sorting objects in API for projects, issues and merge requests --- doc/api/issues.md | 4 ++++ doc/api/merge_requests.md | 8 +++++--- doc/api/projects.md | 18 ++++++++++++++++-- 3 files changed, 25 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/api/issues.md b/doc/api/issues.md index 8d073c46d33..5a2f6a4c229 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -18,6 +18,8 @@ Parameters: - `state` (optional) - Return `all` issues or just those that are `opened` or `closed` - `labels` (optional) - Comma-separated list of label names +- `order_by` (optional) - Return requests ordered by `created_at` or `updated_at` fields. Default is `created_at` +- `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` ```json [ @@ -105,6 +107,8 @@ Parameters: - `state` (optional) - Return `all` issues or just those that are `opened` or `closed` - `labels` (optional) - Comma-separated list of label names - `milestone` (optional) - Milestone title +- `order_by` (optional) - Return requests ordered by `created_at` or `updated_at` fields. Default is `created_at` +- `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` ## Single issue diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index acae55d07ef..1f3fd26a241 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -2,7 +2,9 @@ ## List merge requests -Get all merge requests for this project. The `state` parameter can be used to get only merge requests with a given state (`opened`, `closed`, or `merged`) or all of them (`all`). The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests. +Get all merge requests for this project. +The `state` parameter can be used to get only merge requests with a given state (`opened`, `closed`, or `merged`) or all of them (`all`). +The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests. ``` GET /projects/:id/merge_requests @@ -14,8 +16,8 @@ Parameters: - `id` (required) - The ID of a project - `state` (optional) - Return `all` requests or just those that are `merged`, `opened` or `closed` -- `order_by` (optional) - Return requests ordered by `created_at` or `updated_at` fields -- `sort` (optional) - Return requests sorted in `asc` or `desc` order +- `order_by` (optional) - Return requests ordered by `created_at` or `updated_at` fields. Default is `created_at` +- `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` ```json [ diff --git a/doc/api/projects.md b/doc/api/projects.md index 559d35d316a..454f6fa2e91 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -11,8 +11,8 @@ GET /projects Parameters: - `archived` (optional) - if passed, limit by archived status -- `order_by` (optional) - Return requests ordered by `id`, `name`, `created_at` or `last_activity_at` fields -- `sort` (optional) - Return requests sorted in `asc` or `desc` order +- `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` +- `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` - `search` (optional) - Return list of authorized projects according to a search criteria ```json @@ -98,6 +98,13 @@ Get a list of projects which are owned by the authenticated user. GET /projects/owned ``` +Parameters: + +- `archived` (optional) - if passed, limit by archived status +- `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` +- `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` +- `search` (optional) - Return list of authorized projects according to a search criteria + ### List ALL projects Get a list of all GitLab projects (admin only). @@ -106,6 +113,13 @@ Get a list of all GitLab projects (admin only). GET /projects/all ``` +Parameters: + +- `archived` (optional) - if passed, limit by archived status +- `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` +- `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` +- `search` (optional) - Return list of authorized projects according to a search criteria + ### Get single project Get a specific project, identified by project ID or NAMESPACE/PROJECT_NAME, which is owned by the authenticated user. -- cgit v1.2.1 From 4ed70669ad1aea1ad1636c5091707ccf1fc7f2e7 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Sat, 7 Feb 2015 01:17:23 +0100 Subject: Add doc on "Web Hooks and insecure internal web services". --- doc/security/README.md | 1 + doc/security/webhooks.md | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 doc/security/webhooks.md (limited to 'doc') diff --git a/doc/security/README.md b/doc/security/README.md index f88375f2afd..49dfa6eec76 100644 --- a/doc/security/README.md +++ b/doc/security/README.md @@ -2,4 +2,5 @@ - [Password length limits](password_length_limits.md) - [Rack attack](rack_attack.md) +- [Web Hooks and insecure internal web services](webhooks.md) - [Information exclusivity](information_exclusivity.md) diff --git a/doc/security/webhooks.md b/doc/security/webhooks.md new file mode 100644 index 00000000000..1e9d33e87c3 --- /dev/null +++ b/doc/security/webhooks.md @@ -0,0 +1,13 @@ +# Web Hooks and insecure internal web services + +If you have non-GitLab web services running on your GitLab server or within its local network, these may be vulnerable to exploitation via Web Hooks. + +With [Web Hooks](../web_hooks/web_hooks.md), you and your project masters and owners can set up URLs to be triggered when specific things happen to projects. Normally, these requests are sent to external web services specifically set up for this purpose, that process the request and its attached data in some appropriate way. + +Things get hairy, however, when a Web Hook is set up with a URL that doesn't point to an external, but to an internal service, that may do something completely unintended when the web hook is triggered and the POST request is sent. + +Because Web Hook requests are made by the GitLab server itself, these have complete access to everything running on the server (http://localhost:123) or within the server's local network (http://192.168.1.12:345), even if these services are otherwise protected and inaccessible from the outside world. + +If a web service does not require authentication, Web Hooks can be used to trigger destructive commands by getting the GitLab server to make POST requests to endpoints like "http://localhost:123/some-resource/delete". + +To prevent this type of exploitation from happening, make sure that you are aware of every web service GitLab could potentially have access to, and that all of these are set up to require authentication for every potentially destructive command. Enabling authentication but leaving a default password is not enough. \ No newline at end of file -- cgit v1.2.1 From c93f4662d87058efaec2c2912bd10f8cc5572b3d Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 9 Feb 2015 10:30:06 -0800 Subject: Extract update guide to separate doc to prevent mess --- doc/release/howto_rc1.md | 54 +------------------------------------ doc/release/howto_update_guides.md | 55 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 53 deletions(-) create mode 100644 doc/release/howto_update_guides.md (limited to 'doc') diff --git a/doc/release/howto_rc1.md b/doc/release/howto_rc1.md index e8e8c8a821d..c4156d25d5f 100644 --- a/doc/release/howto_rc1.md +++ b/doc/release/howto_rc1.md @@ -11,59 +11,7 @@ The RC1 release comes with the task to update the installation and upgrade docs. ### 2. Create update guides -1. Create: CE update guide from previous version. Like `7.3-to-7.4.md` -1. Create: CE to EE update guide in EE repository for latest version. -1. Update: `6.x-or-7.x-to-7.x.md` to latest version. -1. Create: CI update guide from previous version - -It's best to copy paste the previous guide and make changes where necessary. -The typical steps are listed below with any points you should specifically look at. - -#### 0. Any major changes? - -List any major changes here, so the user is aware of them before starting to upgrade. For instance: - -- Database updates -- Web server changes -- File structure changes - -#### 1. Stop server - -#### 2. Make backup - -#### 3. Do users need to update dependencies like `git`? - -- Check if the [GitLab Shell version](/lib/tasks/gitlab/check.rake#L782) changed since the last release. - -- Check if the [Git version](/lib/tasks/gitlab/check.rake#L794) changed since the last release. - -#### 4. Get latest code - -#### 5. Does GitLab shell need to be updated? - -#### 6. Install libs, migrations, etc. - -#### 7. Any config files updated since last release? - -Check if any of these changed since last release: - -- [lib/support/nginx/gitlab](/lib/support/nginx/gitlab) -- [lib/support/nginx/gitlab-ssl](/lib/support/nginx/gitlab-ssl) -- -- [config/gitlab.yml.example](/config/gitlab.yml.example) -- [config/unicorn.rb.example](/config/unicorn.rb.example) -- [config/database.yml.mysql](/config/database.yml.mysql) -- [config/database.yml.postgresql](/config/database.yml.postgresql) -- [config/initializers/rack_attack.rb.example](/config/initializers/rack_attack.rb.example) -- [config/resque.yml.example](/config/resque.yml.example) - -#### 8. Need to update init script? - -Check if the `init.d/gitlab` script changed since last release: [lib/support/init.d/gitlab](/lib/support/init.d/gitlab) - -#### 9. Start application - -#### 10. Check application status +[Follow this guide](howto_update_guides.md) to create update guides. ### 3. Code quality indicators diff --git a/doc/release/howto_update_guides.md b/doc/release/howto_update_guides.md new file mode 100644 index 00000000000..23d0959c33d --- /dev/null +++ b/doc/release/howto_update_guides.md @@ -0,0 +1,55 @@ +# Create update guides + +1. Create: CE update guide from previous version. Like `7.3-to-7.4.md` +1. Create: CE to EE update guide in EE repository for latest version. +1. Update: `6.x-or-7.x-to-7.x.md` to latest version. +1. Create: CI update guide from previous version + +It's best to copy paste the previous guide and make changes where necessary. +The typical steps are listed below with any points you should specifically look at. + +#### 0. Any major changes? + +List any major changes here, so the user is aware of them before starting to upgrade. For instance: + +- Database updates +- Web server changes +- File structure changes + +#### 1. Stop server + +#### 2. Make backup + +#### 3. Do users need to update dependencies like `git`? + +- Check if the [GitLab Shell version](/lib/tasks/gitlab/check.rake#L782) changed since the last release. + +- Check if the [Git version](/lib/tasks/gitlab/check.rake#L794) changed since the last release. + +#### 4. Get latest code + +#### 5. Does GitLab shell need to be updated? + +#### 6. Install libs, migrations, etc. + +#### 7. Any config files updated since last release? + +Check if any of these changed since last release: + +- [lib/support/nginx/gitlab](/lib/support/nginx/gitlab) +- [lib/support/nginx/gitlab-ssl](/lib/support/nginx/gitlab-ssl) +- +- [config/gitlab.yml.example](/config/gitlab.yml.example) +- [config/unicorn.rb.example](/config/unicorn.rb.example) +- [config/database.yml.mysql](/config/database.yml.mysql) +- [config/database.yml.postgresql](/config/database.yml.postgresql) +- [config/initializers/rack_attack.rb.example](/config/initializers/rack_attack.rb.example) +- [config/resque.yml.example](/config/resque.yml.example) + +#### 8. Need to update init script? + +Check if the `init.d/gitlab` script changed since last release: [lib/support/init.d/gitlab](/lib/support/init.d/gitlab) + +#### 9. Start application + +#### 10. Check application status -- cgit v1.2.1 From 026494029efebd411d597b3cc4c73f59f908012a Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 9 Feb 2015 10:32:56 -0800 Subject: Update GitLab.com when packages are done. No need to wait 2 days for it --- doc/release/monthly.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 4297bc7e2b7..12376d36a9a 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -66,15 +66,12 @@ Xth: (1 working day before the 22nd) - [ ] Create CE, EE, CI stable versions (#LINK) - [ ] Create Omnibus tags and build packages +- [ ] Update GitLab.com with the stable version (#LINK) 22nd: - [ ] Release CE, EE and CI (#LINK) -Xth: (1 working day after the 22nd) - -- [ ] Update GitLab.com with the stable version (#LINK) - ``` - - - -- cgit v1.2.1 From 43890ed1dc0d6b4b3cf29116391f52246b4f6eae Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 9 Feb 2015 10:46:38 -0800 Subject: Update patch release document --- doc/release/patch.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/release/patch.md b/doc/release/patch.md index 2bd34b7d822..d8bb4aef0e2 100644 --- a/doc/release/patch.md +++ b/doc/release/patch.md @@ -18,12 +18,13 @@ Otherwise include it in the monthly release and note there was a regression fix 1. Name the issue "Release X.X.X CE and X.X.X EE", this will make searching easier 1. Fix the issue on a feature branch, do this on the private GitLab development server 1. If it is a security issue, then assign it to the release manager and apply a 'security' label -1. Build the package for GitLab.com and do a deploy 1. Consider creating and testing workarounds 1. After the branch is merged into master, cherry pick the commit(s) into the current stable branch 1. Make sure that the build has passed and all tests are passing -1. In a separate commit in the stable branch update the CHANGELOG +1. In a separate commit in the master branch update the CHANGELOG 1. For EE, update the CHANGELOG-EE if it is EE specific fix. Otherwise, merge the stable CE branch and add to CHANGELOG-EE "Merge community edition changes for version X.X.X" +1. Merge CE stable branch into EE stable branch + ### Bump version @@ -48,9 +49,8 @@ CE=false be rake release['x.x.x'] ### Release -1. Apply the patch to GitLab Cloud and the private GitLab development server 1. [Build new packages with the latest version](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md) -1. Cherry-pick the changelog update back into master +1. Apply the patch to GitLab.com and the private GitLab development server 1. Create and publish a blog post -1. Send tweets about the release from `@gitlabhq`, tweet should include the most important feature that the release is addressing and link to the blog post +1. Send tweets about the release from `@gitlab`, tweet should include the most important feature that the release is addressing and link to the blog post 1. Note in the 'GitLab X.X regressions' issue that the patch was published (CE only) -- cgit v1.2.1 From 93bd185efe1d3e981a727df609b8aed521ad0f1c Mon Sep 17 00:00:00 2001 From: Ewan Edwards Date: Wed, 11 Feb 2015 08:49:37 -0800 Subject: Fix two broken links in the installation section. --- doc/install/installation.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index bfdebaf8466..bd81073c7eb 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -22,7 +22,9 @@ This is the official installation guide to set up a production server. To set up The following steps have been known to work. Please **use caution when you deviate** from this guide. Make sure you don't violate any assumptions GitLab makes about its environment. For example many people run into permission problems because they changed the location of directories or run services as the wrong user. -If you find a bug/error in this guide please **submit a merge request** following the [contributing guide](../../CONTRIBUTING.md). +If you find a bug/error in this guide please **submit a merge request** +following the +[contributing guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md). ## Overview @@ -457,4 +459,4 @@ You can configure LDAP authentication in `config/gitlab.yml`. Please restart Git ### Using Custom Omniauth Providers -See the [omniauth integration document](doc/integration/omniauth.md) +See the [omniauth integration document](../integration/omniauth.md) -- cgit v1.2.1 From e8335a65e38bab5262be17ce31aaa03bd2af36c1 Mon Sep 17 00:00:00 2001 From: Alexander Ambrose Date: Wed, 11 Feb 2015 17:06:20 -0500 Subject: Change emoji cheat sheet link to Amazon S3 The emoji cheat sheet link was changed. Commit changes the url to the updated link and fixes issue #8554. --- doc/markdown/markdown.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index abef79b0751..1096ea9656c 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -148,7 +148,7 @@ But let's throw in a tag. If you are new to this, don't be :fearful_face:. You can easily join the emoji :family:. All you need to do is to look up on the supported codes. - Consult the [Emoji Cheat Sheet](https://www.dropbox.com/s/b9xaqb977s6d8w1/cheat_sheet.pdf) for a list of all supported emoji codes. :thumbsup: + Consult the [Emoji Cheat Sheet](https://s3.amazonaws.com/emoji-cheatsheet/cheat_sheet.pdf) for a list of all supported emoji codes. :thumbsup: Sometimes you want to be a :ninja: and add some :glowing_star: to your :speech_balloon:. Well we have a gift for you: @@ -158,7 +158,7 @@ You can use it to point out a :bug: or warn about :speak_no_evil_monkey: patches If you are new to this, don't be :fearful_face:. You can easily join the emoji :family:. All you need to do is to look up on the supported codes. -Consult the [Emoji Cheat Sheet](https://www.dropbox.com/s/b9xaqb977s6d8w1/cheat_sheet.pdf) for a list of all supported emoji codes. :thumbsup: +Consult the [Emoji Cheat Sheet](https://s3.amazonaws.com/emoji-cheatsheet/cheat_sheet.pdf) for a list of all supported emoji codes. :thumbsup: ## Special GitLab References -- cgit v1.2.1 From b0dacc8eb06615cf5d0afb1fc8d799dd64325846 Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Tue, 20 Jan 2015 20:34:09 -0700 Subject: Edit group members via API Add an API endpoint to update the access level of an existing group member. --- doc/api/groups.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/api/groups.md b/doc/api/groups.md index 9f01b550641..3c1858e697d 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -152,6 +152,20 @@ Parameters: - `user_id` (required) - The ID of a user to add - `access_level` (required) - Project access level +### Edit group team member + +Updates a group team member to a specified access level. + +``` +PUT /groups/:id/members/:user_id +``` + +Parameters: + +- `id` (required) - The ID of a group +- `user_id` (required) - The ID of a group member +- `access_level` (required) - Project access level + ### Remove user team member Removes user from user team. -- cgit v1.2.1 From 4377ba1c360cf6f4d15e3b5ad2a7ed7bc41f795e Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 12 Feb 2015 20:34:34 +0100 Subject: Use gitattribute merge=union to reduce CHANGELOG merge conflicts. --- doc/release/monthly.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 12376d36a9a..c9e6d3426bc 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -87,20 +87,13 @@ asked if there is anything missing. There are three changelogs that need to be updated: CE, EE and CI. -Remove the Note text in the stable branches. - ## Create RC1 (CE, EE, CI) [Follow this How-to guide](howto_rc1.md) to create RC1. ## Prepare CHANGELOG for next release -Once the stable branches have been created, update the CHANGELOG in `master` with the upcoming version and add 70 empty -lines to it. We do this in order to avoid merge conflicts when merging the CHANGELOG. - -Make sure that the CHANGELOG im master contains the following disclaimer message: - -> Note: The upcoming release contains empty lines to reduce the number of merge conflicts, scroll down to see past releases. +Once the stable branches have been created, update the CHANGELOG in `master` with the upcoming version. ## QA -- cgit v1.2.1 From eccf695640680050127c830887631d241dc7c8be Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Thu, 12 Feb 2015 17:06:55 -0800 Subject: Explained in the integration documentation how to enable external issue tracker --- doc/integration/external-issue-tracker.md | 35 +++++++++++++++++++++++---- doc/integration/redmine_configuration.png | Bin 0 -> 118752 bytes doc/integration/redmine_service_template.png | Bin 0 -> 198077 bytes 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 doc/integration/redmine_configuration.png create mode 100644 doc/integration/redmine_service_template.png (limited to 'doc') diff --git a/doc/integration/external-issue-tracker.md b/doc/integration/external-issue-tracker.md index ba4df9f8fe0..a4f67daa563 100644 --- a/doc/integration/external-issue-tracker.md +++ b/doc/integration/external-issue-tracker.md @@ -1,13 +1,38 @@ # External issue tracker -GitLab has a great issue tracker but you can also use an external issue tracker such as JIRA, Bugzilla or Redmine. This is something that you can turn on per GitLab project. If for example you configure JIRA it provides the following functionality: +GitLab has a great issue tracker but you can also use an external issue tracker such as Jira, Bugzilla or Redmine. This is something that you can turn on per GitLab project. If for example you configure Jira it provides the following functionality: -- the 'Issues' link on the GitLab project pages takes you to the appropriate JIRA issue index; -- clicking 'New issue' on the project dashboard creates a new JIRA issue; -- To reference JIRA issue PROJECT-1234 in comments, use syntax PROJECT-1234. Commit messages get turned into HTML links to the corresponding JIRA issue. +- the 'Issues' link on the GitLab project pages takes you to the appropriate Jira issue index; +- clicking 'New issue' on the project dashboard creates a new Jira issue; +- To reference Jira issue PROJECT-1234 in comments, use syntax PROJECT-1234. Commit messages get turned into HTML links to the corresponding Jira issue. ![Jira screenshot](jira-integration-points.png) -You can configure the integration in the gitlab.yml configuration file. +## Configuration + +### Project Service + +External issue tracker can be enabled per project basis. As an example, we will configure `Redmine` for project named gitlab-ci. + +Fill in the required details on the page: + +![redmine configuration](redmine_configuration.png) + +* `description` A name for the issue tracker (to differentiate between instances, for example). +* `project_url` The URL to the project in Redmine which is being linked to this GitLab project. +* `issues_url` The URL to the issue in Redmine project that is linked to this GitLab project. Note that the `issues_url` requires `:id` in the url. This id GitLab uses as a placeholder to replace the issue number. +* `new_issue_url` This is the URL to create a new issue in Redmine for the project linked to this GitLab project. + + +### Service Template + +Since external issue tracker needs some project specific details, it is required to enable issue tracker per project level. +GitLab makes this easier by allowing admin to add a service template which will allow GitLab project user with permissions to edit details for its project. + +In GitLab Admin section, navigate to `Service Templates` and choose the service template you want to create: + +![redmine service template](redmine_service_template.png) + +After the template is created, the template details will be pre-filled on the project service page. Support to add your commits to the Jira ticket automatically is [available in GitLab EE](http://doc.gitlab.com/ee/integration/jira.html). diff --git a/doc/integration/redmine_configuration.png b/doc/integration/redmine_configuration.png new file mode 100644 index 00000000000..6b145363229 Binary files /dev/null and b/doc/integration/redmine_configuration.png differ diff --git a/doc/integration/redmine_service_template.png b/doc/integration/redmine_service_template.png new file mode 100644 index 00000000000..1159eb5b964 Binary files /dev/null and b/doc/integration/redmine_service_template.png differ -- cgit v1.2.1 From 25ff20677e898a3977f4e46baed75626a3987029 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Fri, 13 Feb 2015 14:58:54 +0200 Subject: log documentation --- doc/README.md | 1 + doc/logs/logs.md | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 doc/logs/logs.md (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index 8c6d13e8506..79d4f5273ee 100644 --- a/doc/README.md +++ b/doc/README.md @@ -24,6 +24,7 @@ - [Issue closing](customization/issue_closing.md) Customize how to close an issue from commit messages. - [Libravatar](customization/libravatar.md) Use Libravatar for user avatars. - [Operations](operations/README.md) Keeping GitLab up and running +- [Log system](logs/logs.md) Log system ## Contributor documentation diff --git a/doc/logs/logs.md b/doc/logs/logs.md new file mode 100644 index 00000000000..07302894dd4 --- /dev/null +++ b/doc/logs/logs.md @@ -0,0 +1,100 @@ +## Log system +GitLab has advanced log system so everything is logging and you can analize your instance using various system log files. +These log files are typically plain text in a standard log file format. This guide talks about how to read and use these system log files. + +#### production.log +This file lives in `/var/log/gitlab/gitlab-rails/production.log` for omnibus package or in `/home/git/gitlab/logs/production.log` for installations from the source. + +This file contains information about all performed requests. You can see url and type of request, IP address and what exactly parts of code were involved to service this particular request. Also you can see all SQL request that have been performed and how much time it took. +This task is more useful for GitLab contributors and developers. Use part of this log file when you are going to report bug. + +``` +Started GET "/gitlabhq/yaml_db/tree/master" for 168.111.56.1 at 2015-02-12 19:34:53 +0200 +Processing by Projects::TreeController#show as HTML + Parameters: {"project_id"=>"gitlabhq/yaml_db", "id"=>"master"} + + ... [CUT OUT] + + amespaces"."created_at" DESC, "namespaces"."id" DESC LIMIT 1 [["id", 26]] + CACHE (0.0ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = 'Project' AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $1 AND "members"."source_type" = $2 AND "members"."user_id" = 1 ORDER BY "members"."created_at" DESC, "members"."id" DESC LIMIT 1 [["source_id", 18], ["source_type", "Project"]] + CACHE (0.0ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = 'Project' AND "members". +  (1.4ms) SELECT COUNT(*) FROM "merge_requests" WHERE "merge_requests"."target_project_id" = $1 AND ("merge_requests"."state" IN ('opened','reopened')) [["target_project_id", 18]] + Rendered layouts/nav/_project.html.haml (28.0ms) + Rendered layouts/_collapse_button.html.haml (0.2ms) + Rendered layouts/_flash.html.haml (0.1ms) + Rendered layouts/_page.html.haml (32.9ms) +Completed 200 OK in 166ms (Views: 117.4ms | ActiveRecord: 27.2ms) +``` +In this example we can see that server processed HTTP request with url `/gitlabhq/yaml_db/tree/master` from IP 168.111.56.1 at 2015-02-12 19:34:53 +0200. Also we can see that request was processed by Projects::TreeController. + +#### application.log +This file lives in `/var/log/gitlab/gitlab-rails/application.log` for omnibus package or in `/home/git/gitlab/logs/application.log` for installations from the source. + +This log file helps you discover events happening in your instance such as user creation, project removing and so on. + +``` +October 06, 2014 11:56: User "Administrator" (admin@example.com) was created +October 06, 2014 11:56: Documentcloud created a new project "Documentcloud / Underscore" +October 06, 2014 11:56: Gitlab Org created a new project "Gitlab Org / Gitlab Ce" +October 07, 2014 11:25: User "Claudie Hodkiewicz" (nasir_stehr@olson.co.uk) was removed +October 07, 2014 11:25: Project "project133" was removed +``` +#### githost.log +This file lives in `/var/log/gitlab/gitlab-rails/githost.log` for omnibus package or in `/home/git/gitlab/logs/githost.log` for installations from the source. + +The GitLab has to interact with git repositories but in some rare cases something can go wrong and in this case you will know what exactly happened. This log file contains all failed requests from GitLab to git repository. In majority of cases this file will be useful for developers only. +``` +December 03, 2014 13:20 -> ERROR -> Command failed [1]: /usr/bin/git --git-dir=/Users/vsizov/gitlab-development-kit/gitlab/tmp/tests/gitlab-satellites/group184/gitlabhq/.git --work-tree=/Users/vsizov/gitlab-development-kit/gitlab/tmp/tests/gitlab-satellites/group184/gitlabhq merge --no-ff -mMerge branch 'feature_conflict' into 'feature' source/feature_conflict + +error: failed to push some refs to '/Users/vsizov/gitlab-development-kit/repositories/gitlabhq/gitlab_git.git' +``` + +#### satellites.log +This file lives in `/var/log/gitlab/gitlab-rails/satellites.log` for omnibus package or in `/home/git/gitlab/logs/satellites.log` for installations from the source. + +In some cases GitLab should perform write actions to git repository, for example when it is needed to merge the merge request or edit a file with online editor. If something went wrong you can look into this file to find out what exactly happened. +``` +October 07, 2014 11:36: Failed to create satellite for Chesley Weimann III / project1817 +October 07, 2014 11:36: PID: 1872: git clone /Users/vsizov/gitlab-development-kit/gitlab/tmp/tests/repositories/conrad6841/gitlabhq.git /Users/vsizov/gitlab-development-kit/gitlab/tmp/tests/gitlab-satellites/conrad6841/gitlabhq +October 07, 2014 11:36: PID: 1872: -> fatal: repository '/Users/vsizov/gitlab-development-kit/gitlab/tmp/tests/repositories/conrad6841/gitlabhq.git' does not exist +``` + +#### sidekiq.log +This file lives in `/var/log/gitlab/gitlab-rails/sidekiq.log` for omnibus package or in `/home/git/gitlab/logs/sidekiq.log` for installations from the source. + +GitLab uses background jobs for processing tasks which can take a long time. All information about processing these jobs are writing down to this file. +``` +2014-06-10T07:55:20Z 2037 TID-tm504 ERROR: /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/1.9.1/gems/redis-3.0.7/lib/redis/client.rb:228:in `read' +2014-06-10T18:18:26Z 14299 TID-55uqo INFO: Booting Sidekiq 3.0.0 with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"} +``` + +#### gitlab-shell.log +This file lives in `/var/log/gitlab/gitlab-shell/gitlab-shell.log` for omnibus package or in `/home/git/gitlab-shell/logs/sidekiq.log` for installations from the source. + +gitlab-shell is using by Gitlab for executing git commands and provide ssh access to git repositories. + +``` +I, [2015-02-13T06:17:00.671315 #9291] INFO -- : Adding project root/example.git at . +I, [2015-02-13T06:17:00.679433 #9291] INFO -- : Moving existing hooks directory and simlinking global hooks directory for /var/opt/gitlab/git-data/repositories/root/example.git. +``` + +#### unicorn_stderr.log +This file lives in `/var/log/gitlab/unicorn/unicorn_stderr.log` for omnibus package or in `/home/git/gitlab/logs/unicorn_stderr.log` for installations from the source. + +Unicorn is a high-performance forking Web server which is used for serving GitLab application. You can look at this log, for example, if your application does not respond. This log cantains all information about state of unicorn processes at any given time. + +``` +I, [2015-02-13T06:14:46.680381 #9047] INFO -- : Refreshing Gem list +I, [2015-02-13T06:14:56.931002 #9047] INFO -- : listening on addr=127.0.0.1:8080 fd=12 +I, [2015-02-13T06:14:56.931381 #9047] INFO -- : listening on addr=/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket fd=13 +I, [2015-02-13T06:14:56.936638 #9047] INFO -- : master process ready +I, [2015-02-13T06:14:56.946504 #9092] INFO -- : worker=0 spawned pid=9092 +I, [2015-02-13T06:14:56.946943 #9092] INFO -- : worker=0 ready +I, [2015-02-13T06:14:56.947892 #9094] INFO -- : worker=1 spawned pid=9094 +I, [2015-02-13T06:14:56.948181 #9094] INFO -- : worker=1 ready +W, [2015-02-13T07:16:01.312916 #9094] WARN -- : #: worker (pid: 9094) exceeds memory limit (320626688 bytes > 247066940 bytes) +W, [2015-02-13T07:16:01.313000 #9094] WARN -- : Unicorn::WorkerKiller send SIGQUIT (pid: 9094) alive: 3621 sec (trial 1) +I, [2015-02-13T07:16:01.530733 #9047] INFO -- : reaped # worker=1 +I, [2015-02-13T07:16:01.534501 #13379] INFO -- : worker=1 spawned pid=13379 +I, [2015-02-13T07:16:01.534848 #13379] INFO -- : worker=1 ready +``` -- cgit v1.2.1 From 01c6806f804d9b76042229e11077190975eb8bf0 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Fri, 13 Feb 2015 08:56:25 -0800 Subject: Text changes recommended by Job. --- doc/integration/external-issue-tracker.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/integration/external-issue-tracker.md b/doc/integration/external-issue-tracker.md index a4f67daa563..53d6898b6e8 100644 --- a/doc/integration/external-issue-tracker.md +++ b/doc/integration/external-issue-tracker.md @@ -1,6 +1,6 @@ # External issue tracker -GitLab has a great issue tracker but you can also use an external issue tracker such as Jira, Bugzilla or Redmine. This is something that you can turn on per GitLab project. If for example you configure Jira it provides the following functionality: +GitLab has a great issue tracker but you can also use an external issue tracker such as Jira, Bugzilla or Redmine. You can configure issue trackers per GitLab project. For instance, if you configure Jira it allows you to do the following: - the 'Issues' link on the GitLab project pages takes you to the appropriate Jira issue index; - clicking 'New issue' on the project dashboard creates a new Jira issue; @@ -12,7 +12,7 @@ GitLab has a great issue tracker but you can also use an external issue tracker ### Project Service -External issue tracker can be enabled per project basis. As an example, we will configure `Redmine` for project named gitlab-ci. +You can enable an external issue tracker per project. As an example, we will configure `Redmine` for project named gitlab-ci. Fill in the required details on the page: @@ -20,14 +20,14 @@ Fill in the required details on the page: * `description` A name for the issue tracker (to differentiate between instances, for example). * `project_url` The URL to the project in Redmine which is being linked to this GitLab project. -* `issues_url` The URL to the issue in Redmine project that is linked to this GitLab project. Note that the `issues_url` requires `:id` in the url. This id GitLab uses as a placeholder to replace the issue number. +* `issues_url` The URL to the issue in Redmine project that is linked to this GitLab project. Note that the `issues_url` requires `:id` in the url. This id is used by GitLab as a placeholder to replace the issue number. * `new_issue_url` This is the URL to create a new issue in Redmine for the project linked to this GitLab project. ### Service Template -Since external issue tracker needs some project specific details, it is required to enable issue tracker per project level. -GitLab makes this easier by allowing admin to add a service template which will allow GitLab project user with permissions to edit details for its project. +It is necessary to configure the external issue tracker per project, because project specific details are needed for the integration with GitLab. +The admin can add a service template that sets a default for each project. This makes it much easier to configure individual projects. In GitLab Admin section, navigate to `Service Templates` and choose the service template you want to create: -- cgit v1.2.1 From d9b32f20c6847e45200c38cc4476c3b825434f4f Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Fri, 13 Feb 2015 18:17:08 +0200 Subject: OAuth2 provider documentation --- doc/integration/README.md | 3 +- doc/integration/oauth_provider.md | 31 +++++++++++++++++++++ .../oauth_provider/admin_application.png | Bin 0 -> 55533 bytes .../oauth_provider/application_form.png | Bin 0 -> 25075 bytes .../oauth_provider/authorized_application.png | Bin 0 -> 17260 bytes .../oauth_provider/user_wide_applications.png | Bin 0 -> 46238 bytes 6 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 doc/integration/oauth_provider.md create mode 100644 doc/integration/oauth_provider/admin_application.png create mode 100644 doc/integration/oauth_provider/application_form.png create mode 100644 doc/integration/oauth_provider/authorized_application.png create mode 100644 doc/integration/oauth_provider/user_wide_applications.png (limited to 'doc') diff --git a/doc/integration/README.md b/doc/integration/README.md index 0087167bb84..1fc8ab997ec 100644 --- a/doc/integration/README.md +++ b/doc/integration/README.md @@ -6,8 +6,9 @@ See the documentation below for details on how to configure these services. - [External issue tracker](external-issue-tracker.md) Redmine, JIRA, etc. - [LDAP](ldap.md) Set up sign in via LDAP -- [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, and Google via OAuth. +- [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, GitLab, and Google via OAuth. - [Slack](slack.md) Integrate with the Slack chat service +- [OAuth2 provider](oauth_provider.md) OAuth2 application creation Jenkins support is [available in GitLab EE](http://doc.gitlab.com/ee/integration/jenkins.html). diff --git a/doc/integration/oauth_provider.md b/doc/integration/oauth_provider.md new file mode 100644 index 00000000000..5fdb74a43df --- /dev/null +++ b/doc/integration/oauth_provider.md @@ -0,0 +1,31 @@ +## GitLab as OAuth2 provider +OAuth2 provides client applications a 'secure delegated access' to server resources on behalf of a resource owner. Or you can allow users to sign in to your application with their GitLab.com account. +In fact OAuth allows to issue access token to third-party clients by an authorization server, +with the approval of the resource owner, or end-user. +Mostly, OAuth2 is using for SSO (Single sign-on). But you can find a lot of different usages for this functionality. +For example, our feature 'GitLab Importer' is using OAuth protocol to give an access to repositories without sharing user credentials to GitLab.com account. +Also GitLab.com application can be used for authentication to your GitLab instance if needed [GitLab OmniAuth](gitlab.md). + +GitLab has two ways to add new OAuth2 application to an instance, you can add application as regular user and through admin area. So GitLab actually can have an instance-wide and a user-wide applications. There is no defferences between them except the different permission levels. + +### Adding application through profile +Go to your profile section 'Application' and press button 'New Application' + +![applications](oauth_provider/user_wide_applications.png) + +After this you will see application form, where "Name" is arbitrary name, "Redirect URI" is URL in your app where users will be sent after authorization on GitLab.com. + +![application_form](oauth_provider/application_form.png) + +### Authorized application +Every application you authorized will be shown in your "Authorized application" sections. + +![authorized_application](oauth_provider/authorized_application.png) + +At any time you can revoke access just clicking button "Revoke" + +### OAuth applications in admin area + +If you want to create application that does not belong to certain user you can create it from admin area + +![admin_application](oauth_provider/admin_application.png) \ No newline at end of file diff --git a/doc/integration/oauth_provider/admin_application.png b/doc/integration/oauth_provider/admin_application.png new file mode 100644 index 00000000000..a5f34512aa8 Binary files /dev/null and b/doc/integration/oauth_provider/admin_application.png differ diff --git a/doc/integration/oauth_provider/application_form.png b/doc/integration/oauth_provider/application_form.png new file mode 100644 index 00000000000..ae135db2627 Binary files /dev/null and b/doc/integration/oauth_provider/application_form.png differ diff --git a/doc/integration/oauth_provider/authorized_application.png b/doc/integration/oauth_provider/authorized_application.png new file mode 100644 index 00000000000..d3ce05be9cc Binary files /dev/null and b/doc/integration/oauth_provider/authorized_application.png differ diff --git a/doc/integration/oauth_provider/user_wide_applications.png b/doc/integration/oauth_provider/user_wide_applications.png new file mode 100644 index 00000000000..719e1974068 Binary files /dev/null and b/doc/integration/oauth_provider/user_wide_applications.png differ -- cgit v1.2.1 From 78124d97836ebdfbb45c5567b9f2775889fd9718 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Fri, 13 Feb 2015 20:13:47 +0200 Subject: GitLab.com importer: documentation --- doc/integration/omniauth.md | 1 + doc/workflow/README.md | 1 + doc/workflow/gitlab_importer/importer.png | Bin 0 -> 40778 bytes doc/workflow/gitlab_importer/new_project_page.png | Bin 0 -> 72663 bytes doc/workflow/import_projects_from_gitlab_com.md | 18 ++++++++++++++++++ 5 files changed, 20 insertions(+) create mode 100644 doc/workflow/gitlab_importer/importer.png create mode 100644 doc/workflow/gitlab_importer/new_project_page.png create mode 100644 doc/workflow/import_projects_from_gitlab_com.md (limited to 'doc') diff --git a/doc/integration/omniauth.md b/doc/integration/omniauth.md index 15b4fb622af..7911cd3e84d 100644 --- a/doc/integration/omniauth.md +++ b/doc/integration/omniauth.md @@ -76,6 +76,7 @@ Before configuring individual OmniAuth providers there are a few global settings ## Supported Providers - [GitHub](github.md) +- [GitLab](gitlab.md) - [Google](google.md) - [Shibboleth](shibboleth.md) - [Twitter](twitter.md) diff --git a/doc/workflow/README.md b/doc/workflow/README.md index 3c0007d8198..6e70235f5b8 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -9,5 +9,6 @@ - [Notifications](notifications.md) - [Migrating from SVN to GitLab](migrating_from_svn.md) - [Project importing from GitHub to GitLab](import_projects_from_github.md) +- [Project importing from GitLab.com to your private GitLab instance](import_projects_from_gitlab_com.md) - [Protected branches](protected_branches.md) - [Web Editor](web_editor.md) diff --git a/doc/workflow/gitlab_importer/importer.png b/doc/workflow/gitlab_importer/importer.png new file mode 100644 index 00000000000..d2a286d8cac Binary files /dev/null and b/doc/workflow/gitlab_importer/importer.png differ diff --git a/doc/workflow/gitlab_importer/new_project_page.png b/doc/workflow/gitlab_importer/new_project_page.png new file mode 100644 index 00000000000..5e239208e1e Binary files /dev/null and b/doc/workflow/gitlab_importer/new_project_page.png differ diff --git a/doc/workflow/import_projects_from_gitlab_com.md b/doc/workflow/import_projects_from_gitlab_com.md new file mode 100644 index 00000000000..f4c4e955d46 --- /dev/null +++ b/doc/workflow/import_projects_from_gitlab_com.md @@ -0,0 +1,18 @@ +# Project importing from GitLab.com to your private GitLab instance + +You can import your existing GitLab.com projects to your GitLab instance. But keep in mind that it is possible only if +GitLab support is enabled on your GitLab instance. +You can read more about Gitlab support [here](http://doc.gitlab.com/ce/integration/gitlab.html) +To get to the importer page you need to go to "New project" page. + +![New project page](gitlab_importer/new_project_page.png) + +Click on the "Import projects from Gitlab.com" link and you will be redirected to GitLab.com +for permission to access your projects. After accepting, you'll be automatically redirected to the importer. + + +![Importer page](gitlab_importer/importer.png) + + +To import a project, you can simple click "Import". The importer will import your repository and issues. +Once the importer is done, a new GitLab project will be created with your imported data. \ No newline at end of file -- cgit v1.2.1 From d76c5824bc05640d276be96f7853f2d266fd6750 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Fri, 13 Feb 2015 14:49:19 -0800 Subject: Update oauth documenatation with examples for omnibus package and installations from source. --- doc/integration/github.md | 38 +++++++++++++++++---- doc/integration/gitlab.md | 45 +++++++++++++++++++------ doc/integration/google.md | 39 +++++++++++++++++----- doc/integration/omniauth.md | 78 ++++++++++++++++++++----------------------- doc/integration/shibboleth.md | 14 ++++---- doc/integration/twitter.md | 35 +++++++++++++++---- 6 files changed, 168 insertions(+), 81 deletions(-) (limited to 'doc') diff --git a/doc/integration/github.md b/doc/integration/github.md index a586334b98d..c9c27859c5e 100644 --- a/doc/integration/github.md +++ b/doc/integration/github.md @@ -21,20 +21,44 @@ To enable the GitHub OmniAuth provider you must register your application with G 1. On your GitLab server, open the configuration file. + For omnibus package: + + ```sh + sudo editor /etc/gitlab/gitlab.rb + ``` + + For instalations from source: + ```sh - cd /home/git/gitlab + cd /home/git/gitlab - sudo -u git -H editor config/gitlab.yml + sudo -u git -H editor config/gitlab.yml ``` -1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details. +1. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for inital settings. + +1. Add the provider configuration: + + For omnibus package: + + ```ruby + gitlab_rails['omniauth_providers'] = [ + { + "name" => "github", + "app_id" => "YOUR APP ID", + "app_secret" => "YOUR APP SECRET", + "url" => "https://github.com/", + "args" => { "scope" => "user:email" } } + } + ] + ``` -1. Under `providers:` uncomment (or add) lines that look like the following: + For installation from source: ``` - - { name: 'github', app_id: 'YOUR APP ID', - app_secret: 'YOUR APP SECRET', - args: { scope: 'user:email' } } + - { name: 'github', app_id: 'YOUR APP ID', + app_secret: 'YOUR APP SECRET', + args: { scope: 'user:email' } } ``` 1. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7. diff --git a/doc/integration/gitlab.md b/doc/integration/gitlab.md index b3b1d897225..b95ef5c0af3 100644 --- a/doc/integration/gitlab.md +++ b/doc/integration/gitlab.md @@ -12,35 +12,60 @@ To enable the GitLab OmniAuth provider you must register your application with G 1. Provide the required details. - Name: This can be anything. Consider something like "\'s GitLab" or "\'s GitLab" or something else descriptive. - - Redirect URI: - + - Redirect URI: + ``` http://gitlab.example.com/import/gitlab/callback http://gitlab.example.com/users/auth/gitlab/callback ``` - The first link is required for the importer and second for the authorization. + The first link is required for the importer and second for the authorization. 1. Select "Submit". 1. You should now see a Application ID and Secret. Keep this page open as you continue configuration. +1. You should now see a Client ID and Client Secret near the top right of the page (see screenshot). Keep this page open as you continue configuration. ![GitHub app](github_app.png) + 1. On your GitLab server, open the configuration file. + For omnibus package: + ```sh - cd /home/git/gitlab + sudo editor /etc/gitlab/gitlab.rb + ``` + + For instalations from source: - sudo -u git -H editor config/gitlab.yml + ```sh + cd /home/git/gitlab + + sudo -u git -H editor config/gitlab.yml ``` -1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details. +1. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for inital settings. + +1. Add the provider configuration: + + For omnibus package: + + ```ruby + gitlab_rails['omniauth_providers'] = [ + { + "name" => "gitlab", + "app_id" => "YOUR APP ID", + "app_secret" => "YOUR APP SECRET", + "args" => { "scope" => "api" } } + } + ] + ``` -1. Under `providers:` uncomment (or add) lines that look like the following: + For installations from source: ``` - - { name: 'gitlab', app_id: 'YOUR APP ID', - app_secret: 'YOUR APP SECRET', - args: { scope: 'api' } } + - { name: 'gitlab', app_id: 'YOUR APP ID', + app_secret: 'YOUR APP SECRET', + args: { scope: 'api' } } ``` 1. Change 'YOUR APP ID' to the Application ID from the GitLab application page. diff --git a/doc/integration/google.md b/doc/integration/google.md index 7a78aff8ea4..76beac16c49 100644 --- a/doc/integration/google.md +++ b/doc/integration/google.md @@ -27,22 +27,45 @@ To enable the Google OAuth2 OmniAuth provider you must register your application - Authorized redirect URI: 'https://gitlab.example.com/users/auth/google_oauth2/callback' 1. Under the heading "Client ID for web application" you should see a Client ID and Client secret (see screenshot). Keep this page open as you continue configuration. ![Google app](google_app.png) -1. On your GitLab server, open the configuration file. +1. On your GitLab server, open the configuration file. + + For omnibus package: + + ```sh + sudo editor /etc/gitlab/gitlab.rb + ``` + + For instalations from source: ```sh - cd /home/git/gitlab + cd /home/git/gitlab - sudo -u git -H editor config/gitlab.yml + sudo -u git -H editor config/gitlab.yml ``` -1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details. +1. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for inital settings. + +1. Add the provider configuration: + + For omnibus package: + + ```ruby + gitlab_rails['omniauth_providers'] = [ + { + "name" => "google_oauth2", + "app_id" => "YOUR APP ID", + "app_secret" => "YOUR APP SECRET", + "args" => { "access_type" => "offline", "approval_prompt" => '' } } + } + ] + ``` -1. Under `providers:` uncomment (or add) lines that look like the following: + For installations from source: ``` - - { name: 'google_oauth2', app_id: 'YOUR APP ID', - app_secret: 'YOUR APP SECRET', - args: { access_type: 'offline', approval_prompt: '' } } + - { name: 'google_oauth2', app_id: 'YOUR APP ID', + app_secret: 'YOUR APP SECRET', + args: { access_type: 'offline', approval_prompt: '' } } ``` 1. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7. diff --git a/doc/integration/omniauth.md b/doc/integration/omniauth.md index 7911cd3e84d..7433de33909 100644 --- a/doc/integration/omniauth.md +++ b/doc/integration/omniauth.md @@ -1,8 +1,8 @@ # OmniAuth -GitLab leverages OmniAuth to allow users to sign in using Twitter, GitHub, and other popular services. Configuring +GitLab leverages OmniAuth to allow users to sign in using Twitter, GitHub, and other popular services. -OmniAuth does not prevent standard GitLab authentication or LDAP (if configured) from continuing to work. Users can choose to sign in using any of the configured mechanisms. +Configuring OmniAuth does not prevent standard GitLab authentication or LDAP (if configured) from continuing to work. Users can choose to sign in using any of the configured mechanisms. - [Initial OmniAuth Configuration](#initial-omniauth-configuration) - [Supported Providers](#supported-providers) @@ -11,9 +11,37 @@ OmniAuth does not prevent standard GitLab authentication or LDAP (if configured) ## Initial OmniAuth Configuration -Before configuring individual OmniAuth providers there are a few global settings that need to be verified. +Before configuring individual OmniAuth providers there are a few global settings that are in common for all providers that we need to consider. -1. Open the configuration file. +- Omniauth needs to be enabled, see details below for example. +- `allow_single_sign_on` defaults to `false`. If `false` users must be created manually or they will not be able to +sign in via OmniAuth. +- `block_auto_created_users` defaults to `true`. If `true` auto created users will be blocked by default and will +have to be unblocked by an administrator before they are able to sign in. +- **Note:** If you set `allow_single_sign_on` to `true` and `block_auto_created_users` to `false` please be aware +that any user on the Internet will be able to successfully sign in to your GitLab without administrative approval. + +If you want to change these settings: + +* **For omnibus package** + + Open the configuration file: + + ```sh + sudo editor /etc/gitlab/gitlab.rb + ``` + + and change + + ``` + gitlab_rails['omniauth_enabled'] = true + gitlab_rails['omniauth_allow_single_sign_on'] = false + gitlab_rails['block_auto_created_users'] = true + ``` + +* **For installations from source** + + Open the configuration file: ```sh cd /home/git/gitlab @@ -21,13 +49,13 @@ Before configuring individual OmniAuth providers there are a few global settings sudo -u git -H editor config/gitlab.yml ``` -1. Find the section dealing with OmniAuth. The section will look similar to the following. + and change the following section ``` - ## OmniAuth settings + ## OmniAuth settings omniauth: # Allow login via Twitter, Google, etc. using OmniAuth providers - enabled: false + enabled: true # CAUTION! # This allows users to login without having a user account first (default: false). @@ -35,43 +63,9 @@ Before configuring individual OmniAuth providers there are a few global settings allow_single_sign_on: false # Locks down those users until they have been cleared by the admin (default: true). block_auto_created_users: true - - ## Auth providers - # Uncomment the following lines and fill in the data of the auth provider you want to use - # If your favorite auth provider is not listed you can use others: - # see https://github.com/gitlabhq/gitlab-public-wiki/wiki/Custom-omniauth-provider-configurations - # The 'app_id' and 'app_secret' parameters are always passed as the first two - # arguments, followed by optional 'args' which can be either a hash or an array. - providers: - # - { name: 'google_oauth2', app_id: 'YOUR APP ID', - # app_secret: 'YOUR APP SECRET', - # args: { access_type: 'offline', approval_prompt: '' } } - # - { name: 'twitter', app_id: 'YOUR APP ID', - # app_secret: 'YOUR APP SECRET'} - # - { name: 'github', app_id: 'YOUR APP ID', - # app_secret: 'YOUR APP SECRET', - # args: { scope: 'user:email' } } - # - {"name": 'shibboleth', - # args: { shib_session_id_field: "HTTP_SHIB_SESSION_ID", - # shib_application_id_field: "HTTP_SHIB_APPLICATION_ID", - # uid_field: "HTTP_EPPN", - # name_field: "HTTP_CN", - # info_fields: {"email": "HTTP_MAIL" } } } - ``` -1. Change `enabled` to `true`. - -1. Consider the next two configuration options: `allow_single_sign_on` and `block_auto_created_users`. - - - `allow_single_sign_on` defaults to `false`. If `false` users must be created manually or they will not be able to - sign in via OmniAuth. - - `block_auto_created_users` defaults to `true`. If `true` auto created users will be blocked by default and will - have to be unblocked by an administrator before they are able to sign in. - - **Note:** If you set `allow_single_sign_on` to `true` and `block_auto_created_users` to `false` please be aware - that any user on the Internet will be able to successfully sign in to your GitLab without administrative approval. - -1. Choose one or more of the Supported Providers below to continue configuration. +Now we can choose one or more of the Supported Providers below to continue configuration. ## Supported Providers diff --git a/doc/integration/shibboleth.md b/doc/integration/shibboleth.md index ea11f1afeab..6258e5f1030 100644 --- a/doc/integration/shibboleth.md +++ b/doc/integration/shibboleth.md @@ -2,12 +2,12 @@ This documentation is for enabling shibboleth with gitlab-omnibus package. -In order to enable Shibboleth support in gitlab we need to use Apache instead of Nginx (It may be possible to use Nginx, however I did not found way to easily configure Nginx that is bundled in gitlab-omnibus package). Apache uses mod_shib2 module for shibboleth authentication and can pass attributes as headers to omniauth-shibboleth provider. +In order to enable Shibboleth support in gitlab we need to use Apache instead of Nginx (It may be possible to use Nginx, however I did not found way to easily configure Nginx that is bundled in gitlab-omnibus package). Apache uses mod_shib2 module for shibboleth authentication and can pass attributes as headers to omniauth-shibboleth provider. To enable the Shibboleth OmniAuth provider you must: -1. Configure Apache shibboleth module. Installation and configuration of module it self is out of scope of this document. +1. Configure Apache shibboleth module. Installation and configuration of module it self is out of scope of this document. Check https://wiki.shibboleth.net/ for more info. 1. You can find Apache config in gitlab-recipes (https://github.com/gitlabhq/gitlab-recipes/blob/master/web-server/apache/gitlab-ssl.conf) @@ -37,15 +37,15 @@ exclude shibboleth URLs from rewriting, add "RewriteCond %{REQUEST_URI} !/Shibbo # Apache equivalent of Nginx try files RewriteEngine on RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_URI} !/Shibboleth.sso - RewriteCond %{REQUEST_URI} !/shibboleth-sp + RewriteCond %{REQUEST_URI} !/Shibboleth.sso + RewriteCond %{REQUEST_URI} !/shibboleth-sp RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA] RequestHeader set X_FORWARDED_PROTO 'https' ``` -1. Edit /etc/gitlab/gitlab.rb configuration file, your shibboleth attributes should be in form of "HTTP_ATTRIBUTE" and you should addjust them to your need and environment. Add any other configuration you need. +1. Edit /etc/gitlab/gitlab.rb configuration file, your shibboleth attributes should be in form of "HTTP_ATTRIBUTE" and you should addjust them to your need and environment. Add any other configuration you need. -File it should look like this: +File should look like this: ``` external_url 'https://gitlab.example.com' gitlab_rails['internal_api_url'] = 'https://gitlab.example.com' @@ -70,7 +70,7 @@ gitlab_rails['omniauth_providers'] = [ ] ``` -1. Save changes and reconfigure gitlab: +1. Save changes and reconfigure gitlab: ``` sudo gitlab-ctl reconfigure ``` diff --git a/doc/integration/twitter.md b/doc/integration/twitter.md index b9e501c5ec1..2d517b2fbc9 100644 --- a/doc/integration/twitter.md +++ b/doc/integration/twitter.md @@ -33,20 +33,41 @@ To enable the Twitter OmniAuth provider you must register your application with 1. On your GitLab server, open the configuration file. + For omnibus package: + + ```sh + sudo editor /etc/gitlab/gitlab.rb + ``` + + For instalations from source: + ```sh - cd /home/git/gitlab + cd /home/git/gitlab - sudo -u git -H editor config/gitlab.yml + sudo -u git -H editor config/gitlab.yml ``` -1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) -for more details. +1. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for inital settings. + +1. Add the provider configuration: + + For omnibus package: + + ```ruby + gitlab_rails['omniauth_providers'] = [ + { + "name" => "twitter", + "app_id" => "YOUR APP ID", + "app_secret" => "YOUR APP SECRET" + } + ] + ``` -1. Under `providers:` uncomment (or add) lines that look like the following: + For installations from source: ``` - - { name: 'twitter', app_id: 'YOUR APP ID', - app_secret: 'YOUR APP SECRET' } + - { name: 'twitter', app_id: 'YOUR APP ID', + app_secret: 'YOUR APP SECRET' } ``` 1. Change 'YOUR APP ID' to the API key from Twitter page in step 11. -- cgit v1.2.1 From ebd00cc7f0da544f03e04464031085b66306a43f Mon Sep 17 00:00:00 2001 From: Zhang Sen Date: Sun, 15 Feb 2015 18:24:00 +0800 Subject: Fix wrong word in document of google oauth --- doc/integration/google.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/integration/google.md b/doc/integration/google.md index 7a78aff8ea4..51d740489da 100644 --- a/doc/integration/google.md +++ b/doc/integration/google.md @@ -45,9 +45,9 @@ To enable the Google OAuth2 OmniAuth provider you must register your application args: { access_type: 'offline', approval_prompt: '' } } ``` -1. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7. +1. Change 'YOUR APP ID' to the client ID from the Google Developer page from step 10. -1. Change 'YOUR APP SECRET' to the client secret from the GitHub application page from step 7. +1. Change 'YOUR APP SECRET' to the client secret from the Google Developer page from step 10. 1. Save the configuration file. -- cgit v1.2.1 From 3ab07b8aae8dae43cfa3aae1306c59ea264a8594 Mon Sep 17 00:00:00 2001 From: Bugagazavr Date: Sun, 15 Feb 2015 17:01:27 +0300 Subject: Update API branches documentation [ci skip] --- doc/api/branches.md | 131 ++++++++++++++++++++-------------------------------- 1 file changed, 51 insertions(+), 80 deletions(-) (limited to 'doc') diff --git a/doc/api/branches.md b/doc/api/branches.md index 319f0b47386..6a9c10c8520 100644 --- a/doc/api/branches.md +++ b/doc/api/branches.md @@ -15,27 +15,20 @@ Parameters: ```json [ { - "name": "master", "commit": { + "author_email": "john@example.com", + "author_name": "John Smith", + "authored_date": "2012-06-27T05:51:39-07:00", + "committed_date": "2012-06-28T03:44:20-07:00", + "committer_email": "john@example.com", + "committer_name": "John Smith", "id": "7b5c3cc8be40ee161ae89a06bba6229da1032a0c", - "parents": [ - { - "id": "4ad91d3c1144c406e50c7b33bae684bd6837faf8" - } - ], - "tree": "46e82de44b1061621357f24c05515327f2795a95", "message": "add projects API", - "author": { - "name": "John Smith", - "email": "john@example.com" - }, - "committer": { - "name": "John Smith", - "email": "john@example.com" - }, - "authored_date": "2012-06-27T05:51:39-07:00", - "committed_date": "2012-06-28T03:44:20-07:00" + "parent_ids": [ + "4ad91d3c1144c406e50c7b33bae684bd6837faf8" + ] }, + "name": "master", "protected": true } ] @@ -56,27 +49,20 @@ Parameters: ```json { - "name": "master", "commit": { + "author_email": "john@example.com", + "author_name": "John Smith", + "authored_date": "2012-06-27T05:51:39-07:00", + "committed_date": "2012-06-28T03:44:20-07:00", + "committer_email": "john@example.com", + "committer_name": "John Smith", "id": "7b5c3cc8be40ee161ae89a06bba6229da1032a0c", - "parents": [ - { - "id": "4ad91d3c1144c406e50c7b33bae684bd6837faf8" - } - ], - "tree": "46e82de44b1061621357f24c05515327f2795a95", "message": "add projects API", - "author": { - "name": "John Smith", - "email": "john@example.com" - }, - "committer": { - "name": "John Smith", - "email": "john@example.com" - }, - "authored_date": "2012-06-27T05:51:39-07:00", - "committed_date": "2012-06-28T03:44:20-07:00" + "parent_ids": [ + "4ad91d3c1144c406e50c7b33bae684bd6837faf8" + ] }, + "name": "master", "protected": true } ``` @@ -97,27 +83,20 @@ Parameters: ```json { - "name": "master", "commit": { + "author_email": "john@example.com", + "author_name": "John Smith", + "authored_date": "2012-06-27T05:51:39-07:00", + "committed_date": "2012-06-28T03:44:20-07:00", + "committer_email": "john@example.com", + "committer_name": "John Smith", "id": "7b5c3cc8be40ee161ae89a06bba6229da1032a0c", - "parents": [ - { - "id": "4ad91d3c1144c406e50c7b33bae684bd6837faf8" - } - ], - "tree": "46e82de44b1061621357f24c05515327f2795a95", "message": "add projects API", - "author": { - "name": "John Smith", - "email": "john@example.com" - }, - "committer": { - "name": "John Smith", - "email": "john@example.com" - }, - "authored_date": "2012-06-27T05:51:39-07:00", - "committed_date": "2012-06-28T03:44:20-07:00" + "parent_ids": [ + "4ad91d3c1144c406e50c7b33bae684bd6837faf8" + ] }, + "name": "master", "protected": true } ``` @@ -138,27 +117,20 @@ Parameters: ```json { - "name": "master", "commit": { + "author_email": "john@example.com", + "author_name": "John Smith", + "authored_date": "2012-06-27T05:51:39-07:00", + "committed_date": "2012-06-28T03:44:20-07:00", + "committer_email": "john@example.com", + "committer_name": "John Smith", "id": "7b5c3cc8be40ee161ae89a06bba6229da1032a0c", - "parents": [ - { - "id": "4ad91d3c1144c406e50c7b33bae684bd6837faf8" - } - ], - "tree": "46e82de44b1061621357f24c05515327f2795a95", "message": "add projects API", - "author": { - "name": "John Smith", - "email": "john@example.com" - }, - "committer": { - "name": "John Smith", - "email": "john@example.com" - }, - "authored_date": "2012-06-27T05:51:39-07:00", - "committed_date": "2012-06-28T03:44:20-07:00" + "parent_ids": [ + "4ad91d3c1144c406e50c7b33bae684bd6837faf8" + ] }, + "name": "master", "protected": false } ``` @@ -177,21 +149,20 @@ Parameters: ```json { - "name": "my-new-branch", "commit": { - "id": "8848c0e90327a0b70f1865b843fb2fbfb9345e57", - "message": "Merge pull request #54 from brightbox/use_fog_brightbox_module\n\nUpdate to use fog-brightbox module", - "parent_ids": [ - "fff449e0bf453576f16c91d6544f00a2664009d8", - "f93a93626fec20fd659f4ed3ab2e64019b6169ae" - ], - "authored_date": "2014-02-20T19:54:55+02:00", - "author_name": "john smith", "author_email": "john@example.com", - "committed_date": "2014-02-20T19:54:55+02:00", - "committer_name": "john smith", - "committer_email": "john@example.com" + "author_name": "John Smith", + "authored_date": "2012-06-27T05:51:39-07:00", + "committed_date": "2012-06-28T03:44:20-07:00", + "committer_email": "john@example.com", + "committer_name": "John Smith", + "id": "7b5c3cc8be40ee161ae89a06bba6229da1032a0c", + "message": "add projects API", + "parent_ids": [ + "4ad91d3c1144c406e50c7b33bae684bd6837faf8" + ] }, + "name": "master", "protected": false } ``` -- cgit v1.2.1 From 2df8a91c8259711b3fb3d0ab3b31329aae869b96 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Mon, 16 Feb 2015 09:10:07 -0800 Subject: Rephrased wording in the documentation to say "installation from source" instead of "manual installation" or similar. --- doc/README.md | 2 +- doc/hooks/custom_hooks.md | 2 +- doc/install/installation.md | 2 +- doc/install/requirements.md | 2 +- doc/raketasks/backup_restore.md | 2 +- doc/raketasks/import.md | 4 ++-- doc/update/README.md | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index 79d4f5273ee..932e90e359a 100644 --- a/doc/README.md +++ b/doc/README.md @@ -13,7 +13,7 @@ ## Administrator documentation -- [Install](install/README.md) Requirements, directory structures and manual installation. +- [Install](install/README.md) Requirements, directory structures and installation from source. - [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, LDAP and Twitter. - [Raketasks](raketasks/README.md) Backups, maintenance, automatic web hook setup and the importing of projects. - [Custom git hooks](hooks/custom_hooks.md) Custom git hooks (on the filesystem) for when web hooks aren't enough. diff --git a/doc/hooks/custom_hooks.md b/doc/hooks/custom_hooks.md index 00867ead80d..f7d4f3de68b 100644 --- a/doc/hooks/custom_hooks.md +++ b/doc/hooks/custom_hooks.md @@ -24,7 +24,7 @@ set up a custom hook. 1. Pick a project that needs a custom git hook. 1. On the GitLab server, navigate to the project's repository directory. -For a manual install the path is usually +For an installation from source the path is usually `/home/git/repositories//.git`. For Omnibus installs the path is usually `/var/opt/gitlab/git-data/repositories//.git`. 1. Create a new directory in this location called `custom_hooks`. diff --git a/doc/install/installation.md b/doc/install/installation.md index bd81073c7eb..39ffe5052fc 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -2,7 +2,7 @@ ## Consider the Omnibus package installation -Since a manual installation is a lot of work and error prone we strongly recommend the fast and reliable [Omnibus package installation](https://about.gitlab.com/downloads/) (deb/rpm). +Since an installation from source is a lot of work and error prone we strongly recommend the fast and reliable [Omnibus package installation](https://about.gitlab.com/downloads/) (deb/rpm). ## Select Version to Install diff --git a/doc/install/requirements.md b/doc/install/requirements.md index 2cf9e82fd21..5bdb9caa2bf 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -22,7 +22,7 @@ For the installations options please see [the installation page on the GitLab we - FreeBSD On the above unsupported distributions is still possible to install GitLab yourself. -Please see the [manual installation guide](https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md) and the [unofficial installation guides](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Unofficial-Installation-Guides) on the public wiki for more information. +Please see the [installation from source guide](https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md) and the [unofficial installation guides](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Unofficial-Installation-Guides) on the public wiki for more information. ### Non-Unix operating systems such as Windows diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index bbcf395c745..99cdfff0ac6 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -137,7 +137,7 @@ with the name of your bucket: Please be informed that a backup does not store your configuration files. If you use an Omnibus package please see the [instructions in the readme to backup your configuration](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#backup-and-restore-omnibus-gitlab-configuration). If you have a cookbook installation there should be a copy of your configuration in Chef. -If you have a manual installation please consider backing up your `gitlab.yml` file, any SSL keys and certificates, and your [SSH host keys](https://superuser.com/questions/532040/copy-ssh-keys-from-one-server-to-another-server/532079#532079). +If you have an installation from source, please consider backing up your `gitlab.yml` file, any SSL keys and certificates, and your [SSH host keys](https://superuser.com/questions/532040/copy-ssh-keys-from-one-server-to-another-server/532079#532079). ## Restore a previously created backup diff --git a/doc/raketasks/import.md b/doc/raketasks/import.md index 9a10c8d6850..8a38937062e 100644 --- a/doc/raketasks/import.md +++ b/doc/raketasks/import.md @@ -13,7 +13,7 @@ - For omnibus-gitlab, it is located at: `/var/opt/gitlab/git-data/repositories` by default, unless you changed it in the `/etc/gitlab/gitlab.rb` file. -- For manual installations, it is usually located at: `/home/git/repositories` or you can see where +- For installations from source, it is usually located at: `/home/git/repositories` or you can see where your repositories are located by looking at `config/gitlab.yml` under the `gitlab_shell => repos_path` entry. New folder needs to have git user ownership and read/write/execute access for git user and its group: @@ -47,7 +47,7 @@ with `/home/git`. $ sudo gitlab-rake gitlab:import:repos ``` -#### Manual Installation +#### Installation from source Before running this command you need to change the directory to where your GitLab installation is located: diff --git a/doc/update/README.md b/doc/update/README.md index 5380ddbd030..0472537eeb5 100644 --- a/doc/update/README.md +++ b/doc/update/README.md @@ -4,11 +4,11 @@ Depending on the installation method and your GitLab version, there are multiple - [Omnibus update guide](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md) contains the steps needed to update a GitLab [package](https://about.gitlab.com/downloads/). -## Manual Installation +## Installation from source -- [The individual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update) are for those who have installed GitLab manually. +- [The individual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update) are for those who have installed GitLab from source. - [The CE to EE update guides](https://gitlab.com/subscribers/gitlab-ee/tree/master/doc/update) are for subscribers of the Enterprise Edition only. The steps are very similar to a version upgrade: stop the server, get the code, update config files for the new functionality, install libs and do migrations, update the init script, start the application and check the application status. -- [Upgrader](upgrader.md) is an automatic ruby script that performs the update for manual installations. +- [Upgrader](upgrader.md) is an automatic ruby script that performs the update for installations from source. - [Patch versions](patch_versions.md) guide includes the steps needed for a patch version, eg. 6.2.0 to 6.2.1. ## Miscellaneous -- cgit v1.2.1 From d11c64a67ff0385cb4a3c3e3b52c023c083b7c57 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Mon, 16 Feb 2015 17:51:29 -0800 Subject: Updated the installation and update guides --- doc/install/installation.md | 6 +- doc/update/5.4-to-6.0.md | 3 + doc/update/6.x-or-7.x-to-7.7.md | 291 ---------------------------------------- doc/update/6.x-or-7.x-to-7.8.md | 291 ++++++++++++++++++++++++++++++++++++++++ doc/update/7.7-to-7.8.md | 119 ++++++++++++++++ 5 files changed, 416 insertions(+), 294 deletions(-) delete mode 100644 doc/update/6.x-or-7.x-to-7.7.md create mode 100644 doc/update/6.x-or-7.x-to-7.8.md create mode 100644 doc/update/7.7-to-7.8.md (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index 39ffe5052fc..f5dcec2f61e 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -183,9 +183,9 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da ### Clone the Source # Clone GitLab repository - sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-6-stable gitlab + sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-8-stable gitlab -**Note:** You can change `7-6-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! +**Note:** You can change `7-8-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! ### Configure It @@ -280,7 +280,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da GitLab Shell is an SSH access and repository management software developed specially for GitLab. # Run the installation task for gitlab-shell (replace `REDIS_URL` if needed): - sudo -u git -H bundle exec rake gitlab:shell:install[v2.4.2] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production + sudo -u git -H bundle exec rake gitlab:shell:install[v2.4.3] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production # By default, the gitlab-shell config is generated from your main GitLab config. # You can review (and modify) the gitlab-shell config as follows: diff --git a/doc/update/5.4-to-6.0.md b/doc/update/5.4-to-6.0.md index d18c3fe8586..d9c6d9bfb91 100644 --- a/doc/update/5.4-to-6.0.md +++ b/doc/update/5.4-to-6.0.md @@ -5,6 +5,9 @@ GitLab 6.0 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489. +**You need to follow this guide first, before updating past 6.0, as it contains critical migration steps that are only present +in the `6-0-stable` branch** + ## Deprecations ### Global projects diff --git a/doc/update/6.x-or-7.x-to-7.7.md b/doc/update/6.x-or-7.x-to-7.7.md deleted file mode 100644 index 8280cf2f38f..00000000000 --- a/doc/update/6.x-or-7.x-to-7.7.md +++ /dev/null @@ -1,291 +0,0 @@ -# From 6.x or 7.x to 7.7 -*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.x-or-7.x-to-7.4.md) for the most up to date instructions.* - -This allows you to upgrade any version of GitLab from 6.0 and up (including 7.0 and up) to 7.7. - -## Global issue numbers - -As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects. - -## Editable labels - -In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it -possible to edit the label text and color. The characters `?`, `&` and `,` are -no longer allowed however so those will be removed from your tags during the -database migrations for GitLab 7.2. - -## 0. Stop server - - sudo service gitlab stop - -## 1. Backup - -It's useful to make a backup just in case things go south: -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) - -```bash -cd /home/git/gitlab -sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production -``` - -## 2. Update Ruby - -If you are still using Ruby 1.9.3 or below, you will need to update Ruby. -You can check which version you are running with `ruby -v`. - -If you are you running Ruby 2.0.x, you do not need to upgrade ruby, but can consider doing so for performance reasons. - -If you are running Ruby 2.1.1 consider upgrading to 2.1.5, because of the high memory usage of Ruby 2.1.1. - -Install, update dependencies: - -```bash -sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl -``` - -Download and compile Ruby: - -```bash -mkdir /tmp/ruby && cd /tmp/ruby -curl --progress http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz | tar xz -cd ruby-2.1.5 -./configure --disable-install-rdoc -make -sudo make install -``` - -Install Bundler: - -```bash -sudo gem install bundler --no-ri --no-rdoc -``` - -## 3. Get latest code - -```bash -cd /home/git/gitlab -sudo -u git -H git fetch --all -sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically -``` - -For GitLab Community Edition: - -```bash -sudo -u git -H git checkout 7-7-stable -``` - -OR - -For GitLab Enterprise Edition: - -```bash -sudo -u git -H git checkout 7-7-stable-ee -``` - -## 4. Install additional packages - -```bash -# Add support for logrotate for better log file handling -sudo apt-get install logrotate - -# Install pkg-config and cmake, which is needed for the latest versions of rugged -sudo apt-get install pkg-config cmake - -# Install Kerberos header files, which are needed for GitLab EE Kerberos support -sudo apt-get install libkrb5-dev -``` - -## 5. Configure Redis to use sockets - - # Configure redis to use sockets - sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig - # Disable Redis listening on TCP by setting 'port' to 0 - sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf - # Enable Redis socket for default Debian / Ubuntu path - echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf - # Be sure redis group can write to the socket, enable only if supported (>= redis 2.4.0). - sudo sed -i '/# unixsocketperm/ s/^# unixsocketperm.*/unixsocketperm 0775/' /etc/redis/redis.conf - # Activate the changes to redis.conf - sudo service redis-server restart - # Add git to the redis group - sudo usermod -aG redis git - - # Configure Redis connection settings - sudo -u git -H cp config/resque.yml.example config/resque.yml - # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration - sudo -u git -H editor config/resque.yml - - # Configure gitlab-shell to use Redis sockets - sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml - -## 6. Update gitlab-shell - -```bash -cd /home/git/gitlab-shell -sudo -u git -H git fetch -sudo -u git -H git checkout v2.4.1 -``` - -## 7. Install libs, migrations, etc. - -```bash -cd /home/git/gitlab - -# MySQL installations (note: the line below states '--without ... postgres') -sudo -u git -H bundle install --without development test postgres --deployment - -# PostgreSQL installations (note: the line below states '--without ... mysql') -sudo -u git -H bundle install --without development test mysql --deployment - -# Run database migrations -sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production - -# Enable internal issue IDs (introduced in GitLab 6.1) -sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production - -# Clean up assets and cache -sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production - -# Close access to gitlab-satellites for others -sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites - -# Update init.d script -sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab -``` - -## 8. Update config files - -TIP: to see what changed in `gitlab.yml.example` in this release use next command: - -``` -git diff 6-0-stable:config/gitlab.yml.example 7-7-stable:config/gitlab.yml.example -``` - -* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-7-stable/config/gitlab.yml.example but with your settings. -* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-7-stable/config/unicorn.rb.example but with your settings. -* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.4.0/config.yml.example but with your settings. -* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-7-stable/lib/support/nginx/gitlab but with your settings. -* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-7-stable/lib/support/nginx/gitlab-ssl but with your settings. -* Copy rack attack middleware config - -```bash -sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb -``` - -* Set up logrotate - -```bash -sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab -``` - -## 9. Start application - - sudo service gitlab start - sudo service nginx restart - -## 10. Check application status - -Check if GitLab and its environment are configured correctly: - - cd /home/git/gitlab - sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production - -To make sure you didn't miss anything run a more thorough check with: - - sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production - -If all items are green, then congratulations upgrade complete! - -## 11. Update OmniAuth configuration - -When using Google omniauth login, changes of the Google account required. -Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/). -More details can be found at the [integration documentation](../../../master/doc/integration/google.md). - -## 12. Optional optimizations for GitLab setups with MySQL databases - -Only applies if running MySQL database created with GitLab 6.7 or earlier. If you are not experiencing any issues you may not need the following instructions however following them will bring your database in line with the latest recommended installation configuration and help avoid future issues. Be sure to follow these directions exactly. These directions should be safe for any MySQL instance but to be sure make a current MySQL database backup beforehand. - -``` -# Stop GitLab -sudo service gitlab stop - -# Secure your MySQL installation (added in GitLab 6.2) -sudo mysql_secure_installation - -# Login to MySQL -mysql -u root -p - -# do not type the 'mysql>', this is part of the prompt - -# Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) -SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; - -# If previous query returned results, copy & run all shown SQL statements - -# Convert all tables to correct character set -SET foreign_key_checks = 0; -SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; - -# If previous query returned results, copy & run all shown SQL statements - -# turn foreign key checks back on -SET foreign_key_checks = 1; - -# Find MySQL users -mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%'; - -# If git user exists and gitlab user does not exist -# you are done with the database cleanup tasks -mysql> \q - -# If both users exist skip to Delete gitlab user - -# Create new user for GitLab (changed in GitLab 6.4) -# change $password in the command below to a real password you pick -mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password'; - -# Grant the git user necessary permissions on the database -mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost'; - -# Delete the old gitlab user -mysql> DELETE FROM mysql.user WHERE user='gitlab'; - -# Quit the database session -mysql> \q - -# Try connecting to the new database with the new user -sudo -u git -H mysql -u git -p -D gitlabhq_production - -# Type the password you replaced $password with earlier - -# You should now see a 'mysql>' prompt - -# Quit the database session -mysql> \q - -# Update database configuration details -# See config/database.yml.mysql for latest recommended configuration details -# Remove the reaping_frequency setting line if it exists (removed in GitLab 6.8) -# Set production -> pool: 10 (updated in GitLab 5.3) -# Set production -> username: git -# Set production -> password: the password your replaced $password with earlier -sudo -u git -H editor /home/git/gitlab/config/database.yml -``` - -## Things went south? Revert to previous version (6.0) - -### 1. Revert the code to the previous version - -Follow the [upgrade guide from 5.4 to 6.0](5.4-to-6.0.md), except for the database migration (the backup is already migrated to the previous version). - -### 2. Restore from the backup: - -```bash -cd /home/git/gitlab -sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production -``` - -## Login issues after upgrade? - -If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page) diff --git a/doc/update/6.x-or-7.x-to-7.8.md b/doc/update/6.x-or-7.x-to-7.8.md new file mode 100644 index 00000000000..9cda434dc4e --- /dev/null +++ b/doc/update/6.x-or-7.x-to-7.8.md @@ -0,0 +1,291 @@ +# From 6.x or 7.x to 7.8 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.x-or-7.x-to-7.8.md) for the most up to date instructions.* + +This allows you to upgrade any version of GitLab from 6.0 and up (including 7.0 and up) to 7.8. + +## Global issue numbers + +As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects. + +## Editable labels + +In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it +possible to edit the label text and color. The characters `?`, `&` and `,` are +no longer allowed however so those will be removed from your tags during the +database migrations for GitLab 7.2. + +## 0. Stop server + + sudo service gitlab stop + +## 1. Backup + +It's useful to make a backup just in case things go south: +(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production +``` + +## 2. Update Ruby + +If you are still using Ruby 1.9.3 or below, you will need to update Ruby. +You can check which version you are running with `ruby -v`. + +If you are you running Ruby 2.0.x, you do not need to upgrade ruby, but can consider doing so for performance reasons. + +If you are running Ruby 2.1.1 consider upgrading to 2.1.5, because of the high memory usage of Ruby 2.1.1. + +Install, update dependencies: + +```bash +sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl +``` + +Download and compile Ruby: + +```bash +mkdir /tmp/ruby && cd /tmp/ruby +curl --progress http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz | tar xz +cd ruby-2.1.5 +./configure --disable-install-rdoc +make +sudo make install +``` + +Install Bundler: + +```bash +sudo gem install bundler --no-ri --no-rdoc +``` + +## 3. Get latest code + +```bash +cd /home/git/gitlab +sudo -u git -H git fetch --all +sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically +``` + +For GitLab Community Edition: + +```bash +sudo -u git -H git checkout 7-8-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 7-8-stable-ee +``` + +## 4. Install additional packages + +```bash +# Add support for logrotate for better log file handling +sudo apt-get install logrotate + +# Install pkg-config and cmake, which is needed for the latest versions of rugged +sudo apt-get install pkg-config cmake + +# Install Kerberos header files, which are needed for GitLab EE Kerberos support +sudo apt-get install libkrb5-dev +``` + +## 5. Configure Redis to use sockets + + # Configure redis to use sockets + sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig + # Disable Redis listening on TCP by setting 'port' to 0 + sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf + # Enable Redis socket for default Debian / Ubuntu path + echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf + # Be sure redis group can write to the socket, enable only if supported (>= redis 2.4.0). + sudo sed -i '/# unixsocketperm/ s/^# unixsocketperm.*/unixsocketperm 0775/' /etc/redis/redis.conf + # Activate the changes to redis.conf + sudo service redis-server restart + # Add git to the redis group + sudo usermod -aG redis git + + # Configure Redis connection settings + sudo -u git -H cp config/resque.yml.example config/resque.yml + # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration + sudo -u git -H editor config/resque.yml + + # Configure gitlab-shell to use Redis sockets + sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml + +## 6. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch +sudo -u git -H git checkout v2.4.3 +``` + +## 7. Install libs, migrations, etc. + +```bash +cd /home/git/gitlab + +# MySQL installations (note: the line below states '--without ... postgres') +sudo -u git -H bundle install --without development test postgres --deployment + +# PostgreSQL installations (note: the line below states '--without ... mysql') +sudo -u git -H bundle install --without development test mysql --deployment + +# Run database migrations +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production + +# Enable internal issue IDs (introduced in GitLab 6.1) +sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production + +# Clean up assets and cache +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production + +# Close access to gitlab-satellites for others +sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites + +# Update init.d script +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab +``` + +## 8. Update config files + +TIP: to see what changed in `gitlab.yml.example` in this release use next command: + +``` +git diff 6-0-stable:config/gitlab.yml.example 7-8-stable:config/gitlab.yml.example +``` + +* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/config/gitlab.yml.example but with your settings. +* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/config/unicorn.rb.example but with your settings. +* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.4.0/config.yml.example but with your settings. +* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/lib/support/nginx/gitlab but with your settings. +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stablef/lib/support/nginx/gitlab-ssl but with your settings. +* Copy rack attack middleware config + +```bash +sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb +``` + +* Set up logrotate + +```bash +sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab +``` + +## 9. Start application + + sudo service gitlab start + sudo service nginx restart + +## 10. Check application status + +Check if GitLab and its environment are configured correctly: + + cd /home/git/gitlab + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production + +To make sure you didn't miss anything run a more thorough check with: + + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production + +If all items are green, then congratulations upgrade complete! + +## 11. Update OmniAuth configuration + +When using Google omniauth login, changes of the Google account required. +Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/). +More details can be found at the [integration documentation](../../../master/doc/integration/google.md). + +## 12. Optional optimizations for GitLab setups with MySQL databases + +Only applies if running MySQL database created with GitLab 6.7 or earlier. If you are not experiencing any issues you may not need the following instructions however following them will bring your database in line with the latest recommended installation configuration and help avoid future issues. Be sure to follow these directions exactly. These directions should be safe for any MySQL instance but to be sure make a current MySQL database backup beforehand. + +``` +# Stop GitLab +sudo service gitlab stop + +# Secure your MySQL installation (added in GitLab 6.2) +sudo mysql_secure_installation + +# Login to MySQL +mysql -u root -p + +# do not type the 'mysql>', this is part of the prompt + +# Convert all tables to use the InnoDB storage engine (added in GitLab 6.8) +SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `ENGINE` <> 'InnoDB' AND `TABLE_TYPE` = 'BASE TABLE'; + +# If previous query returned results, copy & run all shown SQL statements + +# Convert all tables to correct character set +SET foreign_key_checks = 0; +SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE'; + +# If previous query returned results, copy & run all shown SQL statements + +# turn foreign key checks back on +SET foreign_key_checks = 1; + +# Find MySQL users +mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%'; + +# If git user exists and gitlab user does not exist +# you are done with the database cleanup tasks +mysql> \q + +# If both users exist skip to Delete gitlab user + +# Create new user for GitLab (changed in GitLab 6.4) +# change $password in the command below to a real password you pick +mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password'; + +# Grant the git user necessary permissions on the database +mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost'; + +# Delete the old gitlab user +mysql> DELETE FROM mysql.user WHERE user='gitlab'; + +# Quit the database session +mysql> \q + +# Try connecting to the new database with the new user +sudo -u git -H mysql -u git -p -D gitlabhq_production + +# Type the password you replaced $password with earlier + +# You should now see a 'mysql>' prompt + +# Quit the database session +mysql> \q + +# Update database configuration details +# See config/database.yml.mysql for latest recommended configuration details +# Remove the reaping_frequency setting line if it exists (removed in GitLab 6.8) +# Set production -> pool: 10 (updated in GitLab 5.3) +# Set production -> username: git +# Set production -> password: the password your replaced $password with earlier +sudo -u git -H editor /home/git/gitlab/config/database.yml +``` + +## Things went south? Revert to previous version (7.0) + +### 1. Revert the code to the previous version + +Follow the [upgrade guide from 6.9 to 7.0](6.9-to-7.0.md), except for the database migration (the backup is already migrated to the previous version). + +### 2. Restore from the backup: + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production +``` + +## Login issues after upgrade? + +If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page) diff --git a/doc/update/7.7-to-7.8.md b/doc/update/7.7-to-7.8.md new file mode 100644 index 00000000000..01b4fc4c992 --- /dev/null +++ b/doc/update/7.7-to-7.8.md @@ -0,0 +1,119 @@ +# From 7.7 to 7.8 + +### 0. Stop server + + sudo service gitlab stop + +### 1. Backup + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production +``` + +### 2. Get latest code + +```bash +sudo -u git -H git fetch --all +sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically +``` + +For GitLab Community Edition: + +```bash +sudo -u git -H git checkout 7-8-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 7-8-stable-ee +``` + +### 3. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch +sudo -u git -H git checkout v2.4.3 +``` + +### 4. Install libs, migrations, etc. + +```bash +sudo apt-get install libkrb5-dev + +cd /home/git/gitlab + +# MySQL installations (note: the line below states '--without ... postgres') +sudo -u git -H bundle install --without development test postgres --deployment + +# PostgreSQL installations (note: the line below states '--without ... mysql') +sudo -u git -H bundle install --without development test mysql --deployment + +# Run database migrations +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production + +# Clean up assets and cache +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production + +# Update init.d script +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab +``` + +### 5. Update config files + +#### New configuration options for `gitlab.yml` + +There are new configuration options available for [`gitlab.yml`](config/gitlab.yml.example). View them with the command below and apply them to your current `gitlab.yml`. + +``` +git diff origin/7-6-stable:config/gitlab.yml.example origin/7-8-stable:config/gitlab.yml.example +``` + +#### Change Nginx settings + +* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as [`lib/support/nginx/gitlab`](/lib/support/nginx/gitlab) but with your settings +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as [`lib/support/nginx/gitlab-ssl`](/lib/support/nginx/gitlab-ssl) but with your setting + +#### Setup time zone (optional) + +Consider setting the time zone in `gitlab.yml` otherwise GitLab will default to UTC. If you set a time zone previously in [`application.rb`](config/application.rb) (unlikely), unset it. + +### 6. Start application + + sudo service gitlab start + sudo service nginx restart + +### 7. Check application status + +Check if GitLab and its environment are configured correctly: + + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production + +To make sure you didn't miss anything run a more thorough check with: + + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production + +If all items are green, then congratulations upgrade is complete! + +### 8. GitHub settings (if applicable) + +If you are using GitHub as an OAuth provider for authentication, you should change the callback URL so that it +only contains a root URL (ex. `https://gitlab.example.com/`) + +## Things went south? Revert to previous version (7.6) + +### 1. Revert the code to the previous version +Follow the [upgrade guide from 7.5 to 7.6](7.5-to-7.6.md), except for the database migration +(The backup is already migrated to the previous version) + +### 2. Restore from the backup: + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production +``` +If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above. -- cgit v1.2.1 From b6a678ef43f763b3c507ace0639b802207ed3cb7 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Mon, 16 Feb 2015 20:27:58 -0800 Subject: Use correct shell version in update doc. --- doc/update/6.x-or-7.x-to-7.8.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/update/6.x-or-7.x-to-7.8.md b/doc/update/6.x-or-7.x-to-7.8.md index 9cda434dc4e..90d889d5113 100644 --- a/doc/update/6.x-or-7.x-to-7.8.md +++ b/doc/update/6.x-or-7.x-to-7.8.md @@ -163,7 +163,7 @@ git diff 6-0-stable:config/gitlab.yml.example 7-8-stable:config/gitlab.yml.examp * Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/config/gitlab.yml.example but with your settings. * Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/config/unicorn.rb.example but with your settings. -* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.4.0/config.yml.example but with your settings. +* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.4.3/config.yml.example but with your settings. * HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/lib/support/nginx/gitlab but with your settings. * HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stablef/lib/support/nginx/gitlab-ssl but with your settings. * Copy rack attack middleware config @@ -235,7 +235,7 @@ SET foreign_key_checks = 1; # Find MySQL users mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%'; -# If git user exists and gitlab user does not exist +# If git user exists and gitlab user does not exist # you are done with the database cleanup tasks mysql> \q -- cgit v1.2.1 From 24d939afb9816f3de2ca247de82f96ca32de3612 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 17 Feb 2015 16:23:44 -0800 Subject: Remove Group#owner_id from API since it is not used any more --- doc/api/groups.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc') diff --git a/doc/api/groups.md b/doc/api/groups.md index 3c1858e697d..b5a4b05ccaf 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -14,7 +14,6 @@ GET /groups "id": 1, "name": "Foobar Group", "path": "foo-bar", - "owner_id": 18, "description": "An interesting group" } ] @@ -87,7 +86,6 @@ GET /groups?search=foobar "id": 1, "name": "Foobar Group", "path": "foo-bar", - "owner_id": 18, "description": "An interesting group" } ] -- cgit v1.2.1 From 10e4e2110c388ac43f1ebf437b963f13a1882129 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Wed, 18 Feb 2015 20:49:19 -0800 Subject: Improve the explanation and linking of the Oauth docs. --- doc/README.md | 1 + doc/api/README.md | 3 ++- doc/api/oauth2.md | 11 +++++++---- doc/integration/README.md | 3 +-- doc/integration/external-issue-tracker.md | 3 ++- doc/integration/oauth_provider.md | 6 +++++- 6 files changed, 18 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index 932e90e359a..59cfe1bb11a 100644 --- a/doc/README.md +++ b/doc/README.md @@ -10,6 +10,7 @@ - [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects. - [Web hooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project. - [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN. +- [OAuth2 provider](integration/oauth_provider.md) to allow you to login to other applications from GitLab. ## Administrator documentation diff --git a/doc/api/README.md b/doc/api/README.md index 8cbba8598d5..dec530d0b81 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -22,6 +22,7 @@ ## Clients Find API Clients for GitLab [on our website](https://about.gitlab.com/applications/#api-clients). +You can use [GitLab as an OAuth2 client](oauth2.md) to make API calls. ## Introduction @@ -67,7 +68,7 @@ curl https://localhost:3000/api/v3/user?access_token=OAUTH-TOKEN curl -H "Authorization: Bearer OAUTH-TOKEN" https://localhost:3000/api/v3/user ``` -Read more about [OAuth2 in GitLab](oauth2.md). +Read more about [GitLab as an OAuth2 client](oauth2.md). ## Status codes diff --git a/doc/api/oauth2.md b/doc/api/oauth2.md index 7bb391054ce..d416a826f79 100644 --- a/doc/api/oauth2.md +++ b/doc/api/oauth2.md @@ -1,14 +1,17 @@ -# OAuth2 authentication +# GitLab as an OAuth2 client -OAuth2 is a protocol that enables us to get access to private details of user's account without getting its password. +This document is about using other OAuth authentication service providers to sign into GitLab. +If you want GitLab to be an OAuth authentication service provider to sign into other services please see the [Oauth2 provider documentation](../integration/oauth_provider.md). -Before using the OAuth2 you should create an application in user's account. Each application getting unique App ID and App Secret parameters. You should not share them. +OAuth2 is a protocol that enables us to authenticate a user without requiring them to give their password. + +Before using the OAuth2 you should create an application in user's account. Each application gets a unique App ID and App Secret parameters. You should not share these. This functionality is based on [doorkeeper gem](https://github.com/doorkeeper-gem/doorkeeper) ## Web Application Flow -This flow is using for authentication from third-party web sites and probably is most used. +This flow is using for authentication from third-party web sites and is probably used the most. It basically consists of an exchange of an authorization token for an access token. For more detailed info, check out the [RFC spec here](http://tools.ietf.org/html/rfc6749#section-4.1) This flow consists from 3 steps. diff --git a/doc/integration/README.md b/doc/integration/README.md index 1fc8ab997ec..e5f33d8deed 100644 --- a/doc/integration/README.md +++ b/doc/integration/README.md @@ -8,9 +8,8 @@ See the documentation below for details on how to configure these services. - [LDAP](ldap.md) Set up sign in via LDAP - [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, GitLab, and Google via OAuth. - [Slack](slack.md) Integrate with the Slack chat service -- [OAuth2 provider](oauth_provider.md) OAuth2 application creation -Jenkins support is [available in GitLab EE](http://doc.gitlab.com/ee/integration/jenkins.html). +GitLab Enterprise Edition contains [advanced JIRA support](http://doc.gitlab.com/ee/integration/jira.html) and [advanced Jenkins support](http://doc.gitlab.com/ee/integration/jenkins.html). ## Project services diff --git a/doc/integration/external-issue-tracker.md b/doc/integration/external-issue-tracker.md index 53d6898b6e8..96755707dee 100644 --- a/doc/integration/external-issue-tracker.md +++ b/doc/integration/external-issue-tracker.md @@ -8,6 +8,8 @@ GitLab has a great issue tracker but you can also use an external issue tracker ![Jira screenshot](jira-integration-points.png) +GitLab Enterprise Edition contains [advanced JIRA support](http://doc.gitlab.com/ee/integration/jira.html). + ## Configuration ### Project Service @@ -23,7 +25,6 @@ Fill in the required details on the page: * `issues_url` The URL to the issue in Redmine project that is linked to this GitLab project. Note that the `issues_url` requires `:id` in the url. This id is used by GitLab as a placeholder to replace the issue number. * `new_issue_url` This is the URL to create a new issue in Redmine for the project linked to this GitLab project. - ### Service Template It is necessary to configure the external issue tracker per project, because project specific details are needed for the integration with GitLab. diff --git a/doc/integration/oauth_provider.md b/doc/integration/oauth_provider.md index 5fdb74a43df..192c321f712 100644 --- a/doc/integration/oauth_provider.md +++ b/doc/integration/oauth_provider.md @@ -1,4 +1,8 @@ -## GitLab as OAuth2 provider +## GitLab as OAuth2 authentication service provider + +This document is about using GitLab as an OAuth authentication service provider to sign into other services. +If you want to use other OAuth authentication service providers to sign into GitLab please see the [OAuth2 client documentation](../api/oauth2.md) + OAuth2 provides client applications a 'secure delegated access' to server resources on behalf of a resource owner. Or you can allow users to sign in to your application with their GitLab.com account. In fact OAuth allows to issue access token to third-party clients by an authorization server, with the approval of the resource owner, or end-user. -- cgit v1.2.1 From ff70d2f24e8b437a4c006b61a9b669309718baad Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 18 Feb 2015 22:06:49 -0800 Subject: Improve GitLab.com integration documentation --- doc/integration/gitlab.md | 27 ++++++++++++++++----------- doc/integration/gitlab_app.png | Bin 0 -> 55325 bytes 2 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 doc/integration/gitlab_app.png (limited to 'doc') diff --git a/doc/integration/gitlab.md b/doc/integration/gitlab.md index b95ef5c0af3..87400bed5b5 100644 --- a/doc/integration/gitlab.md +++ b/doc/integration/gitlab.md @@ -1,10 +1,13 @@ -# GitLab OAuth2 OmniAuth Provider +# Integrate your server with GitLab.com -To enable the GitLab OmniAuth provider you must register your application with GitLab. GitLab will generate a client ID and secret key for you to use. +Import projects from GitLab.com and login to your GitLab instance with your GitLab.com account. -1. Sign in to GitLab. +To enable the GitLab.com OmniAuth provider you must register your application with GitLab.com. +GitLab.com will generate a application ID and secret key for you to use. -1. Navigate to your settings. +1. Sign in to GitLab.com + +1. Navigate to your profile settings. 1. Select "Applications" in the left menu. @@ -15,17 +18,17 @@ To enable the GitLab OmniAuth provider you must register your application with G - Redirect URI: ``` - http://gitlab.example.com/import/gitlab/callback - http://gitlab.example.com/users/auth/gitlab/callback + http://your-gitlab.example.com/import/gitlab/callback + http://your-gitlab.example.com/users/auth/gitlab/callback ``` The first link is required for the importer and second for the authorization. 1. Select "Submit". -1. You should now see a Application ID and Secret. Keep this page open as you continue configuration. - -1. You should now see a Client ID and Client Secret near the top right of the page (see screenshot). Keep this page open as you continue configuration. ![GitHub app](github_app.png) +1. You should now see a Client ID and Client Secret near the top right of the page (see screenshot). + Keep this page open as you continue configuration. + ![GitLab app](gitlab_app.png) 1. On your GitLab server, open the configuration file. @@ -43,7 +46,7 @@ To enable the GitLab OmniAuth provider you must register your application with G sudo -u git -H editor config/gitlab.yml ``` -1. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for inital settings. +1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for inital settings. 1. Add the provider configuration: @@ -76,4 +79,6 @@ To enable the GitLab OmniAuth provider you must register your application with G 1. Restart GitLab for the changes to take effect. -On the sign in page there should now be a GitLab icon below the regular sign in form. Click the icon to begin the authentication process. GitLab will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to your GitLab instance and will be signed in. +On the sign in page there should now be a GitLab.com icon below the regular sign in form. +Click the icon to begin the authentication process. GitLab.com will ask the user to sign in and authorize the GitLab application. +If everything goes well the user will be returned to your GitLab instance and will be signed in. diff --git a/doc/integration/gitlab_app.png b/doc/integration/gitlab_app.png new file mode 100644 index 00000000000..3f9391a821b Binary files /dev/null and b/doc/integration/gitlab_app.png differ -- cgit v1.2.1 From a3d039259e56cd7cb6551c21551f010ea12e6acc Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 18 Feb 2015 22:07:09 -0800 Subject: Fix broken links in documentation --- doc/README.md | 2 +- doc/integration/github.md | 2 +- doc/integration/omniauth.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index 59cfe1bb11a..4e00dceac2b 100644 --- a/doc/README.md +++ b/doc/README.md @@ -10,7 +10,7 @@ - [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects. - [Web hooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project. - [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN. -- [OAuth2 provider](integration/oauth_provider.md) to allow you to login to other applications from GitLab. +- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab. ## Administrator documentation diff --git a/doc/integration/github.md b/doc/integration/github.md index c9c27859c5e..137d7e9d632 100644 --- a/doc/integration/github.md +++ b/doc/integration/github.md @@ -35,7 +35,7 @@ To enable the GitHub OmniAuth provider you must register your application with G sudo -u git -H editor config/gitlab.yml ``` -1. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for inital settings. +1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for inital settings. 1. Add the provider configuration: diff --git a/doc/integration/omniauth.md b/doc/integration/omniauth.md index 7433de33909..c92fa3ee4b7 100644 --- a/doc/integration/omniauth.md +++ b/doc/integration/omniauth.md @@ -70,7 +70,7 @@ Now we can choose one or more of the Supported Providers below to continue confi ## Supported Providers - [GitHub](github.md) -- [GitLab](gitlab.md) +- [GitLab.com](gitlab.md) - [Google](google.md) - [Shibboleth](shibboleth.md) - [Twitter](twitter.md) -- cgit v1.2.1 From 93e42f690bc057ca0e803074aaeb1b55ea9c2232 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Thu, 19 Feb 2015 11:20:58 +0100 Subject: Document fun facts about omnibus-gitlab --- doc/development/omnibus.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc/development/omnibus.md (limited to 'doc') diff --git a/doc/development/omnibus.md b/doc/development/omnibus.md new file mode 100644 index 00000000000..0ba354d28a2 --- /dev/null +++ b/doc/development/omnibus.md @@ -0,0 +1,32 @@ +# What you should know about omnibus packages + +Most users install GitLab using our omnibus packages. As a developer it can be +good to know how the omnibus packages differ from what you have on your laptop +when you are coding. + +## Files are owned by root by default + +All the files in the Rails tree (`app/`, `config/` etc.) are owned by 'root' in +omnibus installations. This makes the installation simpler and it provides +extra security. The omnibus reconfigure script contains commands that give +write access to the 'git' user only where needed. + +For example, the 'git' user is allowed to write in the `log/` directory, in +`public/uploads`, and they are allowed to rewrite the `db/schema.rb` file. + +In other cases, the reconfigure script tricks GitLab into not trying to write a +file. For instance, GitLab will generate a `.secret` file if it cannot find one +and write it to the Rails root. In the omnibus packages, reconfigure writes the +`.secret` file first, so that GitLab never tries to write it. + +## Code, data and logs are in separate directories + +The omnibus design separates code (read-only, under `/opt/gitlab`) from data +(read/write, under `/var/opt/gitlab`) and logs (read/write, under +`/var/log/gitlab`). To make this happen the reconfigure script sets custom +paths where it can in GitLab config files, and where there are no path +settings, it uses symlinks. + +For example, `config/gitlab.yml` is treated as data so that file is a symlink. +The same goes for `public/uploads`. The `log/` directory is replaced by omnibus +with a symlink to `/var/log/gitlab/gitlab-rails`. -- cgit v1.2.1 From 92434b29cc45677fe72bb6a8a5bd09d5ead8d138 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 20 Feb 2015 10:27:37 -0800 Subject: Extend project web hooks with more data * add git_http_url and git_ssh_url to project web hook * add visibility_level to project web hook * add documentation about project visibility_level in API --- doc/api/projects.md | 18 ++++++++++++++++++ doc/web_hooks/web_hooks.md | 20 ++++++++++++++------ 2 files changed, 32 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/api/projects.md b/doc/api/projects.md index 454f6fa2e91..a1a23051d7e 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -1,5 +1,23 @@ # Projects + +### Project visibility level + +Project in GitLab has be either private, internal or public. +You can determine it by `visibility_level` field in project. + +Constants for project visibility levels are next: + +* Private. `visibility_level` is `0`. + Project access must be granted explicitly for each user. + +* Internal. `visibility_level` is `10`. + The project can be cloned by any logged in user. + +* Public. `visibility_level` is `20`. + The project can be cloned without any authentication. + + ## List projects Get a list of projects accessible by the authenticated user. diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md index e3399e5f1b8..29ef5b59bac 100644 --- a/doc/web_hooks/web_hooks.md +++ b/doc/web_hooks/web_hooks.md @@ -24,16 +24,19 @@ Triggered when you push to the repository except when pushing tags. "project_id": 15, "repository": { "name": "Diaspora", - "url": "git@example.com:diaspora.git", + "url": "git@example.com:mike/diasporadiaspora.git", "description": "", - "homepage": "http://example.com/diaspora" + "homepage": "http://example.com/mike/diaspora", + "git_http_url":"http://example.com/mike/diaspora.git", + "git_ssh_url":"git@example.com:mike/diaspora.git", + "visibility_level":0 }, "commits": [ { "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", "message": "Update Catalan translation to e38cb41.", "timestamp": "2011-12-12T14:27:31+02:00", - "url": "http://example.com/diaspora/commits/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", + "url": "http://example.com/mike/diaspora/commit/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", "author": { "name": "Jordi Mallach", "email": "jordi@softcatala.org" @@ -43,7 +46,7 @@ Triggered when you push to the repository except when pushing tags. "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", "message": "fixed readme", "timestamp": "2012-01-03T23:36:29+02:00", - "url": "http://example.com/diaspora/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "url": "http://example.com/mike/diaspora/commit/da1560886d4f094c3e6c9ef40349f7d38b5d27d7", "author": { "name": "GitLab dev user", "email": "gitlabdev@dv6700.(none)" @@ -72,8 +75,13 @@ Triggered when you create (or delete) tags to the repository. "name": "jsmith", "url": "ssh://git@example.com/jsmith/example.git", "description": "", - "homepage": "http://example.com/jsmith/example" - } + "homepage": "http://example.com/jsmith/example", + "git_http_url":"http://example.com/jsmith/example.git", + "git_ssh_url":"git@example.com:jsmith/example.git", + "visibility_level":0 + }, + "commits": [], + "total_commits_count": 0 } ``` -- cgit v1.2.1 From 0c4d27e82da8f438d35fcb47241c41522e6b0dce Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 20 Feb 2015 22:36:19 +0100 Subject: Point out nginx config changes in update guides. --- doc/update/6.x-or-7.x-to-7.8.md | 8 ++++++-- doc/update/7.7-to-7.8.md | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/update/6.x-or-7.x-to-7.8.md b/doc/update/6.x-or-7.x-to-7.8.md index 90d889d5113..2d11ab1d238 100644 --- a/doc/update/6.x-or-7.x-to-7.8.md +++ b/doc/update/6.x-or-7.x-to-7.8.md @@ -164,8 +164,6 @@ git diff 6-0-stable:config/gitlab.yml.example 7-8-stable:config/gitlab.yml.examp * Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/config/gitlab.yml.example but with your settings. * Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/config/unicorn.rb.example but with your settings. * Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.4.3/config.yml.example but with your settings. -* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/lib/support/nginx/gitlab but with your settings. -* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stablef/lib/support/nginx/gitlab-ssl but with your settings. * Copy rack attack middleware config ```bash @@ -178,6 +176,12 @@ sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab ``` +### Change Nginx settings + +* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/lib/support/nginx/gitlab but with your settings. +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stablef/lib/support/nginx/gitlab-ssl but with your settings. +* Take special note of the `location /uploads/` section that has been added, the directives from `# gzip off;` up to `proxy_set_header X-Frame-Options SAMEORIGIN;` that have been moved from `location @gitlab` to `server`, and the `gzip on;` directive that has been added to `location ~ ^/(assets)/`. + ## 9. Start application sudo service gitlab start diff --git a/doc/update/7.7-to-7.8.md b/doc/update/7.7-to-7.8.md index 01b4fc4c992..4196eb8023a 100644 --- a/doc/update/7.7-to-7.8.md +++ b/doc/update/7.7-to-7.8.md @@ -75,8 +75,9 @@ git diff origin/7-6-stable:config/gitlab.yml.example origin/7-8-stable:config/gi #### Change Nginx settings -* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as [`lib/support/nginx/gitlab`](/lib/support/nginx/gitlab) but with your settings -* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as [`lib/support/nginx/gitlab-ssl`](/lib/support/nginx/gitlab-ssl) but with your setting +* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as [`lib/support/nginx/gitlab`](/lib/support/nginx/gitlab) but with your settings. +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as [`lib/support/nginx/gitlab-ssl`](/lib/support/nginx/gitlab-ssl) but with your settings. +* Take special note of the `location /uploads/` section that has been added, the directives from `# gzip off;` up to `proxy_set_header X-Frame-Options SAMEORIGIN;` that have been moved from `location @gitlab` to `server`, and the `gzip on;` directive that has been added to `location ~ ^/(assets)/`. #### Setup time zone (optional) -- cgit v1.2.1 From 08874d2b51e71debac61659050ea577dffd89bf8 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 20 Feb 2015 23:27:17 +0100 Subject: Make changes to nginx config less likely to break something. --- doc/update/6.x-or-7.x-to-7.8.md | 2 +- doc/update/7.7-to-7.8.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/update/6.x-or-7.x-to-7.8.md b/doc/update/6.x-or-7.x-to-7.8.md index 2d11ab1d238..859f4c1a6d6 100644 --- a/doc/update/6.x-or-7.x-to-7.8.md +++ b/doc/update/6.x-or-7.x-to-7.8.md @@ -180,7 +180,7 @@ sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab * HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/lib/support/nginx/gitlab but with your settings. * HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stablef/lib/support/nginx/gitlab-ssl but with your settings. -* Take special note of the `location /uploads/` section that has been added, the directives from `# gzip off;` up to `proxy_set_header X-Frame-Options SAMEORIGIN;` that have been moved from `location @gitlab` to `server`, and the `gzip on;` directive that has been added to `location ~ ^/(assets)/`. +* A new `location /uploads/` section has been added that needs to have the same content as the existing `location @gitlab` section. ## 9. Start application diff --git a/doc/update/7.7-to-7.8.md b/doc/update/7.7-to-7.8.md index 4196eb8023a..7ca0fe65785 100644 --- a/doc/update/7.7-to-7.8.md +++ b/doc/update/7.7-to-7.8.md @@ -77,7 +77,7 @@ git diff origin/7-6-stable:config/gitlab.yml.example origin/7-8-stable:config/gi * HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as [`lib/support/nginx/gitlab`](/lib/support/nginx/gitlab) but with your settings. * HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as [`lib/support/nginx/gitlab-ssl`](/lib/support/nginx/gitlab-ssl) but with your settings. -* Take special note of the `location /uploads/` section that has been added, the directives from `# gzip off;` up to `proxy_set_header X-Frame-Options SAMEORIGIN;` that have been moved from `location @gitlab` to `server`, and the `gzip on;` directive that has been added to `location ~ ^/(assets)/`. +* A new `location /uploads/` section has been added that needs to have the same content as the existing `location @gitlab` section. #### Setup time zone (optional) -- cgit v1.2.1 From 50305c363b85c0d55b5a0c7bcd5fcb569a437ec1 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Sun, 22 Feb 2015 10:54:28 +0100 Subject: Update gitlab-shell to 2.5.3 in 7-8 update guide, fixes #8838 --- doc/update/7.7-to-7.8.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/update/7.7-to-7.8.md b/doc/update/7.7-to-7.8.md index 7ca0fe65785..c6bf5b227e4 100644 --- a/doc/update/7.7-to-7.8.md +++ b/doc/update/7.7-to-7.8.md @@ -37,7 +37,7 @@ sudo -u git -H git checkout 7-8-stable-ee ```bash cd /home/git/gitlab-shell sudo -u git -H git fetch -sudo -u git -H git checkout v2.4.3 +sudo -u git -H git checkout v2.5.3 ``` ### 4. Install libs, migrations, etc. @@ -105,10 +105,10 @@ If all items are green, then congratulations upgrade is complete! If you are using GitHub as an OAuth provider for authentication, you should change the callback URL so that it only contains a root URL (ex. `https://gitlab.example.com/`) -## Things went south? Revert to previous version (7.6) +## Things went south? Revert to previous version (7.7) ### 1. Revert the code to the previous version -Follow the [upgrade guide from 7.5 to 7.6](7.5-to-7.6.md), except for the database migration +Follow the [upgrade guide from 7.6 to 7.7](7.6-to-7.7.md), except for the database migration (The backup is already migrated to the previous version) ### 2. Restore from the backup: -- cgit v1.2.1 From 2bf0a690bfd3985b9f8f0394a8a77d3b9dde44d1 Mon Sep 17 00:00:00 2001 From: Patrik Kernstock Date: Sun, 22 Feb 2015 21:39:13 +0100 Subject: Update 7.7-to-7.8.md --- doc/update/7.7-to-7.8.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/7.7-to-7.8.md b/doc/update/7.7-to-7.8.md index c6bf5b227e4..a8a5c7f66c6 100644 --- a/doc/update/7.7-to-7.8.md +++ b/doc/update/7.7-to-7.8.md @@ -70,7 +70,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab There are new configuration options available for [`gitlab.yml`](config/gitlab.yml.example). View them with the command below and apply them to your current `gitlab.yml`. ``` -git diff origin/7-6-stable:config/gitlab.yml.example origin/7-8-stable:config/gitlab.yml.example +git diff origin/7-7-stable:config/gitlab.yml.example origin/7-8-stable:config/gitlab.yml.example ``` #### Change Nginx settings -- cgit v1.2.1 From 2feaa69cd5831578f99c3833f8b1e3e5a8031c1d Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Mon, 23 Feb 2015 23:10:35 -0800 Subject: Update version of gitlab-shell in the installation and update documentation. --- doc/install/installation.md | 4 ++-- doc/update/6.x-or-7.x-to-7.8.md | 4 ++-- doc/update/7.7-to-7.8.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index f5dcec2f61e..28597fd39d2 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -141,7 +141,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da # Try connecting to the new database with the new user sudo -u git -H psql -d gitlabhq_production - + # Quit the database session gitlabhq_production> \q @@ -280,7 +280,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da GitLab Shell is an SSH access and repository management software developed specially for GitLab. # Run the installation task for gitlab-shell (replace `REDIS_URL` if needed): - sudo -u git -H bundle exec rake gitlab:shell:install[v2.4.3] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production + sudo -u git -H bundle exec rake gitlab:shell:install[v2.5.4] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production # By default, the gitlab-shell config is generated from your main GitLab config. # You can review (and modify) the gitlab-shell config as follows: diff --git a/doc/update/6.x-or-7.x-to-7.8.md b/doc/update/6.x-or-7.x-to-7.8.md index 859f4c1a6d6..5884312c47f 100644 --- a/doc/update/6.x-or-7.x-to-7.8.md +++ b/doc/update/6.x-or-7.x-to-7.8.md @@ -123,7 +123,7 @@ sudo apt-get install libkrb5-dev ```bash cd /home/git/gitlab-shell sudo -u git -H git fetch -sudo -u git -H git checkout v2.4.3 +sudo -u git -H git checkout v2.5.4 ``` ## 7. Install libs, migrations, etc. @@ -163,7 +163,7 @@ git diff 6-0-stable:config/gitlab.yml.example 7-8-stable:config/gitlab.yml.examp * Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/config/gitlab.yml.example but with your settings. * Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/config/unicorn.rb.example but with your settings. -* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.4.3/config.yml.example but with your settings. +* Make `/home/git/gitlab-shell/config.yml` the same as https://gitlab.com/gitlab-org/gitlab-shell/blob/v2.5.4/config.yml.example but with your settings. * Copy rack attack middleware config ```bash diff --git a/doc/update/7.7-to-7.8.md b/doc/update/7.7-to-7.8.md index a8a5c7f66c6..46ca163c1bb 100644 --- a/doc/update/7.7-to-7.8.md +++ b/doc/update/7.7-to-7.8.md @@ -37,7 +37,7 @@ sudo -u git -H git checkout 7-8-stable-ee ```bash cd /home/git/gitlab-shell sudo -u git -H git fetch -sudo -u git -H git checkout v2.5.3 +sudo -u git -H git checkout v2.5.4 ``` ### 4. Install libs, migrations, etc. @@ -102,7 +102,7 @@ If all items are green, then congratulations upgrade is complete! ### 8. GitHub settings (if applicable) -If you are using GitHub as an OAuth provider for authentication, you should change the callback URL so that it +If you are using GitHub as an OAuth provider for authentication, you should change the callback URL so that it only contains a root URL (ex. `https://gitlab.example.com/`) ## Things went south? Revert to previous version (7.7) -- cgit v1.2.1 From 51b18fe6f6558f14e5a8123d27f65f3557134822 Mon Sep 17 00:00:00 2001 From: Igor Bogoslavskyi Date: Tue, 24 Feb 2015 10:50:18 +0100 Subject: typo fixed fixed a typo in an url to gitlab-ssl. Now it does not return the 404 error --- doc/update/6.x-or-7.x-to-7.8.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/6.x-or-7.x-to-7.8.md b/doc/update/6.x-or-7.x-to-7.8.md index 5884312c47f..673d9253d62 100644 --- a/doc/update/6.x-or-7.x-to-7.8.md +++ b/doc/update/6.x-or-7.x-to-7.8.md @@ -179,7 +179,7 @@ sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab ### Change Nginx settings * HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/lib/support/nginx/gitlab but with your settings. -* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stablef/lib/support/nginx/gitlab-ssl but with your settings. +* HTTPS setups: Make `/etc/nginx/sites-available/gitlab-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-8-stable/lib/support/nginx/gitlab-ssl but with your settings. * A new `location /uploads/` section has been added that needs to have the same content as the existing `location @gitlab` section. ## 9. Start application -- cgit v1.2.1 From ad6d6232342558705c54ba70a94f9d7ddbd00f8c Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 17 Feb 2015 16:59:50 +0100 Subject: Add Bitbucket importer. --- doc/integration/bitbucket.m | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/integration/bitbucket.m (limited to 'doc') diff --git a/doc/integration/bitbucket.m b/doc/integration/bitbucket.m new file mode 100644 index 00000000000..30404ce4c54 --- /dev/null +++ b/doc/integration/bitbucket.m @@ -0,0 +1 @@ +TODO \ No newline at end of file -- cgit v1.2.1 From 20691df230332022cb4d5008d84c7ee6e6c8dbfd Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 18 Feb 2015 22:42:52 +0100 Subject: Add Bitbucket integration docs. --- doc/integration/bitbucket.m | 1 - doc/integration/bitbucket.md | 97 ++++++++++++++++++++++++++++++++++++++++++++ doc/integration/github.md | 29 ++++++++----- doc/integration/gitlab.md | 18 ++++---- doc/integration/google.md | 14 +++---- doc/integration/omniauth.md | 1 + doc/integration/twitter.md | 14 +++---- 7 files changed, 139 insertions(+), 35 deletions(-) delete mode 100644 doc/integration/bitbucket.m create mode 100644 doc/integration/bitbucket.md (limited to 'doc') diff --git a/doc/integration/bitbucket.m b/doc/integration/bitbucket.m deleted file mode 100644 index 30404ce4c54..00000000000 --- a/doc/integration/bitbucket.m +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/doc/integration/bitbucket.md b/doc/integration/bitbucket.md new file mode 100644 index 00000000000..9f24ad8c58d --- /dev/null +++ b/doc/integration/bitbucket.md @@ -0,0 +1,97 @@ +# Integrate your server with Bitbucket + +Import projects from Bitbucket and login to your GitLab instance with your Bitbucket account. + +To enable the Bitbucket OmniAuth provider you must register your application with Bitbucket. +Bitbucket will generate an application ID and secret key for you to use. + +1. Sign in to Bitbucket. + +1. Navigate to your individual user settings or a team's settings, depending on how you want the application registered. It does not matter if the application is registered as an individual or a team - that is entirely up to you. + +1. Select "OAuth" in the left menu. + +1. Select "Add consumer". + +1. Provide the required details. + - Name: This can be anything. Consider something like "\'s GitLab" or "\'s GitLab" or something else descriptive. + - Application description: Fill this in if you wish. + - URL: The URL to your GitLab installation. 'https://gitlab.company.com' +1. Select "Save". + +1. You should now see a Key and Secret in the list of OAuth customers. + Keep this page open as you continue configuration. + +1. On your GitLab server, open the configuration file. + + For omnibus package: + + ```sh + sudo editor /etc/gitlab/gitlab.rb + ``` + + For instalations from source: + + ```sh + cd /home/git/gitlab + + sudo -u git -H editor config/gitlab.yml + ``` + +1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings. + +1. Add the provider configuration: + + For omnibus package: + + ```ruby + gitlab_rails['omniauth_providers'] = [ + { + "name" => "bitbucket", + "app_id" => "YOUR_KEY", + "app_secret" => "YOUR_APP_SECRET", + "url" => "https://bitbucket.org/" + } + ] + ``` + + For installation from source: + + ``` + - { name: 'bitbucket', app_id: 'YOUR_KEY', + app_secret: 'YOUR_APP_SECRET' } + ``` + +1. Change 'YOUR_APP_ID' to the key from the Bitbucket application page from step 7. + +1. Change 'YOUR_APP_SECRET' to the secret from the Bitbucket application page from step 7. + +1. Save the configuration file. + +1. Restart GitLab for the changes to take effect. + +On the sign in page there should now be a Bitbucket icon below the regular sign in form. +Click the icon to begin the authentication process. Bitbucket will ask the user to sign in and authorize the GitLab application. +If everything goes well the user will be returned to GitLab and will be signed in. + +## Bitbucket project import + +To allow projects to be imported directly into GitLab, Bitbucket requires one extra setup step compared to GitHub and GitLab.com. + +Bitbucket doesn't allow OAuth applications to clone repositories over HTTPS, and instead requires GitLab to use SSH and identify itself using your GitLab server's SSH key. + +GitLab will automatically register your public key with Bitbucket as a deploy key for the repositories to be imported. Your public key needs to be at `~/.ssh/id_rsa.pub`, which will expand to `/home/git/.ssh/id_rsa.pub` in most configurations. + +If you have that file in place, you're all set and should see the "Import projects from Bitbucket" option enabled. If you don't, do the following: + +1. Create a new SSH key: + + ```sh + sudo -u git -H ssh-keygen + ``` + + Make sure to use an **empty passphrase**. + +2. Restart GitLab to allow it to find the new public key. + +You should now see the "Import projects from Bitbucket" option on the New Project page enabled. \ No newline at end of file diff --git a/doc/integration/github.md b/doc/integration/github.md index 137d7e9d632..a9f1bc31bb4 100644 --- a/doc/integration/github.md +++ b/doc/integration/github.md @@ -1,6 +1,9 @@ -# GitHub OAuth2 OmniAuth Provider +# Integrate your server with GitHub -To enable the GitHub OmniAuth provider you must register your application with GitHub. GitHub will generate a client ID and secret key for you to use. +Import projects from GitHub and login to your GitLab instance with your GitHub account. + +To enable the GitHub OmniAuth provider you must register your application with GitHub. +GitHub will generate an application ID and secret key for you to use. 1. Sign in to GitHub. @@ -17,7 +20,9 @@ To enable the GitHub OmniAuth provider you must register your application with G - Authorization callback URL: 'https://gitlab.company.com/' 1. Select "Register application". -1. You should now see a Client ID and Client Secret near the top right of the page (see screenshot). Keep this page open as you continue configuration. ![GitHub app](github_app.png) +1. You should now see a Client ID and Client Secret near the top right of the page (see screenshot). + Keep this page open as you continue configuration. + ![GitHub app](github_app.png) 1. On your GitLab server, open the configuration file. @@ -35,7 +40,7 @@ To enable the GitHub OmniAuth provider you must register your application with G sudo -u git -H editor config/gitlab.yml ``` -1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for inital settings. +1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings. 1. Add the provider configuration: @@ -45,8 +50,8 @@ To enable the GitHub OmniAuth provider you must register your application with G gitlab_rails['omniauth_providers'] = [ { "name" => "github", - "app_id" => "YOUR APP ID", - "app_secret" => "YOUR APP SECRET", + "app_id" => "YOUR_APP_ID", + "app_secret" => "YOUR_APP_SECRET", "url" => "https://github.com/", "args" => { "scope" => "user:email" } } } @@ -56,17 +61,19 @@ To enable the GitHub OmniAuth provider you must register your application with G For installation from source: ``` - - { name: 'github', app_id: 'YOUR APP ID', - app_secret: 'YOUR APP SECRET', + - { name: 'github', app_id: 'YOUR_APP_ID', + app_secret: 'YOUR_APP_SECRET', args: { scope: 'user:email' } } ``` -1. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7. +1. Change 'YOUR_APP_ID' to the client ID from the GitHub application page from step 7. -1. Change 'YOUR APP SECRET' to the client secret from the GitHub application page from step 7. +1. Change 'YOUR_APP_SECRET' to the client secret from the GitHub application page from step 7. 1. Save the configuration file. 1. Restart GitLab for the changes to take effect. -On the sign in page there should now be a GitHub icon below the regular sign in form. Click the icon to begin the authentication process. GitHub will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in. +On the sign in page there should now be a GitHub icon below the regular sign in form. +Click the icon to begin the authentication process. GitHub will ask the user to sign in and authorize the GitLab application. +If everything goes well the user will be returned to GitLab and will be signed in. \ No newline at end of file diff --git a/doc/integration/gitlab.md b/doc/integration/gitlab.md index 87400bed5b5..49ffaa62af8 100644 --- a/doc/integration/gitlab.md +++ b/doc/integration/gitlab.md @@ -3,7 +3,7 @@ Import projects from GitLab.com and login to your GitLab instance with your GitLab.com account. To enable the GitLab.com OmniAuth provider you must register your application with GitLab.com. -GitLab.com will generate a application ID and secret key for you to use. +GitLab.com will generate an application ID and secret key for you to use. 1. Sign in to GitLab.com @@ -46,7 +46,7 @@ GitLab.com will generate a application ID and secret key for you to use. sudo -u git -H editor config/gitlab.yml ``` -1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for inital settings. +1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings. 1. Add the provider configuration: @@ -56,8 +56,8 @@ GitLab.com will generate a application ID and secret key for you to use. gitlab_rails['omniauth_providers'] = [ { "name" => "gitlab", - "app_id" => "YOUR APP ID", - "app_secret" => "YOUR APP SECRET", + "app_id" => "YOUR_APP_ID", + "app_secret" => "YOUR_APP_SECRET", "args" => { "scope" => "api" } } } ] @@ -66,14 +66,14 @@ GitLab.com will generate a application ID and secret key for you to use. For installations from source: ``` - - { name: 'gitlab', app_id: 'YOUR APP ID', - app_secret: 'YOUR APP SECRET', + - { name: 'gitlab', app_id: 'YOUR_APP_ID', + app_secret: 'YOUR_APP_SECRET', args: { scope: 'api' } } ``` -1. Change 'YOUR APP ID' to the Application ID from the GitLab application page. +1. Change 'YOUR_APP_ID' to the Application ID from the GitLab.com application page. -1. Change 'YOUR APP SECRET' to the secret from the GitLab application page. +1. Change 'YOUR_APP_SECRET' to the secret from the GitLab.com application page. 1. Save the configuration file. @@ -81,4 +81,4 @@ GitLab.com will generate a application ID and secret key for you to use. On the sign in page there should now be a GitLab.com icon below the regular sign in form. Click the icon to begin the authentication process. GitLab.com will ask the user to sign in and authorize the GitLab application. -If everything goes well the user will be returned to your GitLab instance and will be signed in. +If everything goes well the user will be returned to your GitLab instance and will be signed in. \ No newline at end of file diff --git a/doc/integration/google.md b/doc/integration/google.md index 168077c2770..d7b741ece69 100644 --- a/doc/integration/google.md +++ b/doc/integration/google.md @@ -43,7 +43,7 @@ To enable the Google OAuth2 OmniAuth provider you must register your application sudo -u git -H editor config/gitlab.yml ``` -1. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for inital settings. +1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings. 1. Add the provider configuration: @@ -53,8 +53,8 @@ To enable the Google OAuth2 OmniAuth provider you must register your application gitlab_rails['omniauth_providers'] = [ { "name" => "google_oauth2", - "app_id" => "YOUR APP ID", - "app_secret" => "YOUR APP SECRET", + "app_id" => "YOUR_APP_ID", + "app_secret" => "YOUR_APP_SECRET", "args" => { "access_type" => "offline", "approval_prompt" => '' } } } ] @@ -63,14 +63,14 @@ To enable the Google OAuth2 OmniAuth provider you must register your application For installations from source: ``` - - { name: 'google_oauth2', app_id: 'YOUR APP ID', - app_secret: 'YOUR APP SECRET', + - { name: 'google_oauth2', app_id: 'YOUR_APP_ID', + app_secret: 'YOUR_APP_SECRET', args: { access_type: 'offline', approval_prompt: '' } } ``` -1. Change 'YOUR APP ID' to the client ID from the Google Developer page from step 10. +1. Change 'YOUR_APP_ID' to the client ID from the Google Developer page from step 10. -1. Change 'YOUR APP SECRET' to the client secret from the Google Developer page from step 10. +1. Change 'YOUR_APP_SECRET' to the client secret from the Google Developer page from step 10. 1. Save the configuration file. diff --git a/doc/integration/omniauth.md b/doc/integration/omniauth.md index c92fa3ee4b7..24f7b4bb4b4 100644 --- a/doc/integration/omniauth.md +++ b/doc/integration/omniauth.md @@ -70,6 +70,7 @@ Now we can choose one or more of the Supported Providers below to continue confi ## Supported Providers - [GitHub](github.md) +- [Bitbucket](bitbucket.md) - [GitLab.com](gitlab.md) - [Google](google.md) - [Shibboleth](shibboleth.md) diff --git a/doc/integration/twitter.md b/doc/integration/twitter.md index 2d517b2fbc9..fe9091ad9a8 100644 --- a/doc/integration/twitter.md +++ b/doc/integration/twitter.md @@ -47,7 +47,7 @@ To enable the Twitter OmniAuth provider you must register your application with sudo -u git -H editor config/gitlab.yml ``` -1. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for inital settings. +1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings. 1. Add the provider configuration: @@ -57,8 +57,8 @@ To enable the Twitter OmniAuth provider you must register your application with gitlab_rails['omniauth_providers'] = [ { "name" => "twitter", - "app_id" => "YOUR APP ID", - "app_secret" => "YOUR APP SECRET" + "app_id" => "YOUR_APP_ID", + "app_secret" => "YOUR_APP_SECRET" } ] ``` @@ -66,13 +66,13 @@ To enable the Twitter OmniAuth provider you must register your application with For installations from source: ``` - - { name: 'twitter', app_id: 'YOUR APP ID', - app_secret: 'YOUR APP SECRET' } + - { name: 'twitter', app_id: 'YOUR_APP_ID', + app_secret: 'YOUR_APP_SECRET' } ``` -1. Change 'YOUR APP ID' to the API key from Twitter page in step 11. +1. Change 'YOUR_APP_ID' to the API key from Twitter page in step 11. -1. Change 'YOUR APP SECRET' to the API secret from the Twitter page in step 11. +1. Change 'YOUR_APP_SECRET' to the API secret from the Twitter page in step 11. 1. Save the configuration file. -- cgit v1.2.1 From 53e404144c8ce9f602ec1e3a642d5d3971dc8217 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Tue, 24 Feb 2015 20:24:30 +0200 Subject: changelog && documentation --- doc/workflow/web_editor.md | 4 ++-- doc/workflow/web_editor/edit_file.png | Bin 99624 -> 89039 bytes doc/workflow/web_editor/new_file.png | Bin 100516 -> 85526 bytes 3 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/workflow/web_editor.md b/doc/workflow/web_editor.md index bcadf5e8c0d..7fc8f96b9ec 100644 --- a/doc/workflow/web_editor.md +++ b/doc/workflow/web_editor.md @@ -10,7 +10,7 @@ to create the first file and open it in the web editor. ![web editor 1](web_editor/empty_project.png) -Fill in a file name, some content, a commit message and press the commit button. +Fill in a file name, some content, a commit message, branch name and press the commit button. The file will be saved to the repository. ![web editor 2](web_editor/new_file.png) @@ -21,6 +21,6 @@ viewing the file. ![web editor 3](web_editor/show_file.png) Editing a file is almost the same as creating a new file, -with as addition the ability to preview your changes in a separate tab. +with as addition the ability to preview your changes in a separate tab. Also you can save your change to another branch by filling out field `branch` ![web editor 3](web_editor/edit_file.png) diff --git a/doc/workflow/web_editor/edit_file.png b/doc/workflow/web_editor/edit_file.png index 1522c50b62f..f480c69ac3e 100644 Binary files a/doc/workflow/web_editor/edit_file.png and b/doc/workflow/web_editor/edit_file.png differ diff --git a/doc/workflow/web_editor/new_file.png b/doc/workflow/web_editor/new_file.png index 80941f37cea..55ebd9e0257 100644 Binary files a/doc/workflow/web_editor/new_file.png and b/doc/workflow/web_editor/new_file.png differ -- cgit v1.2.1 From 56f51bed6b166f12b8b0f4f1bd883142c5e079a6 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 25 Feb 2015 00:04:48 +0100 Subject: Expand Bitbucket integration docs. --- doc/integration/bitbucket.md | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/integration/bitbucket.md b/doc/integration/bitbucket.md index 9f24ad8c58d..cc6389f5aaf 100644 --- a/doc/integration/bitbucket.md +++ b/doc/integration/bitbucket.md @@ -76,22 +76,46 @@ If everything goes well the user will be returned to GitLab and will be signed i ## Bitbucket project import -To allow projects to be imported directly into GitLab, Bitbucket requires one extra setup step compared to GitHub and GitLab.com. +To allow projects to be imported directly into GitLab, Bitbucket requires two extra setup steps compared to GitHub and GitLab.com. Bitbucket doesn't allow OAuth applications to clone repositories over HTTPS, and instead requires GitLab to use SSH and identify itself using your GitLab server's SSH key. -GitLab will automatically register your public key with Bitbucket as a deploy key for the repositories to be imported. Your public key needs to be at `~/.ssh/id_rsa.pub`, which will expand to `/home/git/.ssh/id_rsa.pub` in most configurations. +### Step 1: Known hosts + +To allow GitLab to connect to Bitbucket over SSH, you need to add 'bitbucket.org' to your GitLab server's known SSH hosts. Take the following steps to do so: + +1. Manually connect to 'bitbucket.org' over SSH, while logged in as the `git` account that GitLab will use: + + ```sh + ssh git@bitbucket.org + ``` + +1. Verify the RSA key fingerprint you'll see in the response matches the one in the [Bitbucket documentation](https://confluence.atlassian.com/display/BITBUCKET/Use+the+SSH+protocol+with+Bitbucket#UsetheSSHprotocolwithBitbucket-KnownhostorBitbucket'spublickeyfingerprints) (the specific IP address doesn't matter): + + ```sh + The authenticity of host 'bitbucket.org (207.223.240.182)' can't be established. + RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40. + Are you sure you want to continue connecting (yes/no)? + ``` + +1. If the fingerprint matches, type `yes` to continue connecting and have 'bitbucket.org' be added to your known hosts. + +1. Your GitLab server is now able to connect to Bitbucket over SSH. Continue to step 2: + +### Step 2: Public key + +To be able to access repositories on Bitbucket, GitLab will automatically register your public key with Bitbucket as a deploy key for the repositories to be imported. Your public key needs to be at `~/.ssh/id_rsa.pub`, which will expand to `/home/git/.ssh/id_rsa.pub` in most configurations. If you have that file in place, you're all set and should see the "Import projects from Bitbucket" option enabled. If you don't, do the following: 1. Create a new SSH key: ```sh - sudo -u git -H ssh-keygen + sudo -u git -H ssh-keygen ``` Make sure to use an **empty passphrase**. 2. Restart GitLab to allow it to find the new public key. -You should now see the "Import projects from Bitbucket" option on the New Project page enabled. \ No newline at end of file +You should now see the "Import projects from Bitbucket" option on the New Project page enabled. -- cgit v1.2.1