From 4c586dc7c217b3e43956919fa752a8fa4e16acb9 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 9 Jul 2015 12:35:53 -0700 Subject: Revert "api: add 'system', 'upvote', and 'downvote' fields to note queries" This reverts commit dd4fee5fdbda07fbc09234c4b043c3c9939a6a9b. --- doc/api/notes.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/api/notes.md b/doc/api/notes.md index c683cb883d4..ee2f9fa0eac 100644 --- a/doc/api/notes.md +++ b/doc/api/notes.md @@ -31,10 +31,7 @@ Parameters: "state": "active", "created_at": "2013-09-30T13:46:01Z" }, - "created_at": "2013-10-02T09:22:45Z", - "system": true, - "upvote": false, - "downvote": false + "created_at": "2013-10-02T09:22:45Z" }, { "id": 305, @@ -48,10 +45,7 @@ Parameters: "state": "active", "created_at": "2013-09-30T13:46:01Z" }, - "created_at": "2013-10-02T09:56:03Z", - "system": false, - "upvote": false, - "downvote": false + "created_at": "2013-10-02T09:56:03Z" } ] ``` -- cgit v1.2.1 From 13bf844a1e7884c2fa964704b9d02146086ceb93 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 9 Jul 2015 22:50:05 -0700 Subject: Revert "use relative link to SSH setup page" This reverts commit f876ef6e4db9c5ece17d3bd5c7c8a4e31d9374b3. --- doc/gitlab-basics/create-your-ssh-keys.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/gitlab-basics/create-your-ssh-keys.md b/doc/gitlab-basics/create-your-ssh-keys.md index cb699588cac..e1acc2bd65b 100644 --- a/doc/gitlab-basics/create-your-ssh-keys.md +++ b/doc/gitlab-basics/create-your-ssh-keys.md @@ -28,7 +28,7 @@ You need to connect your computer to your GitLab account through SSH Keys. They ## To generate an SSH Key on your commandline -* Go to your [commandline](start-using-git.md) and follow the [instructions](../ssh/README.md) to generate it +* Go to your [commandline](start-using-git.md) and follow the [instructions](https://gitlab.com/help/ssh/README) to generate it * Copy the SSH Key that your commandline created and paste it on the "Key" box on the GitLab page. The title will be added automatically -- cgit v1.2.1 From 414cacd7f47c8c89a6a270928bbf9c8d8dcbd3ab Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 9 Jul 2015 13:21:37 -0400 Subject: api: expose work_in_progress flag --- doc/api/merge_requests.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 7b0873a9111..24c0b461308 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -49,7 +49,8 @@ Parameters: "state": "active", "created_at": "2012-04-29T08:46:00Z" }, - "description":"fixed login page css paddings" + "description":"fixed login page css paddings", + "work_in_progress": false } ] ``` @@ -94,7 +95,8 @@ Parameters: "state": "active", "created_at": "2012-04-29T08:46:00Z" }, - "description":"fixed login page css paddings" + "description":"fixed login page css paddings", + "work_in_progress": false } ``` @@ -118,6 +120,7 @@ Parameters: "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.", + "work_in_progress": false, "state": "reopened", "created_at": "2015-02-02T19:49:39.159Z", "updated_at": "2015-02-02T20:08:49.959Z", -- cgit v1.2.1 From 903daedb5a963d55f8b2e836127958f92a1562a5 Mon Sep 17 00:00:00 2001 From: karen Carias Date: Fri, 10 Jul 2015 12:54:02 -0700 Subject: added link to issue closing pattern in doc --- doc/api/milestones.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/api/milestones.md b/doc/api/milestones.md index a6828728264..cba4a7c484c 100644 --- a/doc/api/milestones.md +++ b/doc/api/milestones.md @@ -87,3 +87,5 @@ Parameters: - `id` (required) - The ID of a project - `milestone_id` (required) - The ID of a project milestone + +You can close multiple issues with one Merge Request by following the [issue closing pattern documentation](http://doc.gitlab.com/ce/customization/issue_closing.html). -- cgit v1.2.1 From 31565d78906577bf8582982e5492166e8edd3218 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Mon, 13 Jul 2015 12:36:53 +0200 Subject: Revert "added link to issue closing pattern in doc" This reverts commit 903daedb5a963d55f8b2e836127958f92a1562a5. --- doc/api/milestones.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc') diff --git a/doc/api/milestones.md b/doc/api/milestones.md index cba4a7c484c..a6828728264 100644 --- a/doc/api/milestones.md +++ b/doc/api/milestones.md @@ -87,5 +87,3 @@ Parameters: - `id` (required) - The ID of a project - `milestone_id` (required) - The ID of a project milestone - -You can close multiple issues with one Merge Request by following the [issue closing pattern documentation](http://doc.gitlab.com/ce/customization/issue_closing.html). -- cgit v1.2.1 From 9ba0079c5133cfef71b469c0af69db3e6c01bda1 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 13 Jul 2015 18:14:26 +0200 Subject: Add 'ed' step to mysql-to-postgres procedure Introduced in https://github.com/gitlabhq/mysql-postgresql-converter/commit/b2d1599706f532e1bac836243f25e005c816ef14 --- doc/update/mysql_to_postgresql.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/update/mysql_to_postgresql.md b/doc/update/mysql_to_postgresql.md index 8ef3e0d55cc..6f89f9eda79 100644 --- a/doc/update/mysql_to_postgresql.md +++ b/doc/update/mysql_to_postgresql.md @@ -16,6 +16,7 @@ git clone https://github.com/gitlabhq/mysql-postgresql-converter.git -b gitlab cd mysql-postgresql-converter mysqldump --compatible=postgresql --default-character-set=utf8 -r gitlabhq_production.mysql -u root gitlabhq_production -p python db_converter.py gitlabhq_production.mysql gitlabhq_production.psql +ed -s gitlabhq_production.psql < move_drop_indexes.ed # Import the database dump as the application database user sudo -u git psql -f gitlabhq_production.psql -d gitlabhq_production @@ -56,6 +57,7 @@ sudo -u git -H git clone https://github.com/gitlabhq/mysql-postgresql-converter. # Convert gitlabhq_production.mysql sudo -u git -H mkdir db sudo -u git -H python mysql-postgresql-converter/db_converter.py gitlabhq_production.mysql db/database.sql +sudo -u git -H ed -s db/database.sql < move_drop_indexes.ed # Compress database backup sudo -u git -H gzip db/database.sql -- cgit v1.2.1 From 5f34759ecb630ef410fe1025cf19e37f1dd4615f Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 13 Jul 2015 18:24:15 +0200 Subject: Allow user to specify content he wants to see on project page Signed-off-by: Dmitriy Zaporozhets --- doc/profile/preferences.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/profile/preferences.md b/doc/profile/preferences.md index ce5f1936782..f17bbe8f2aa 100644 --- a/doc/profile/preferences.md +++ b/doc/profile/preferences.md @@ -30,3 +30,9 @@ will be. Setting it to **Starred Projects** will make that Dashboard view the default when signing in or clicking the application logo in the upper left. The default is **Your Projects**. + +### Default Project view + +It allows user to choose what content he or she want to see on project page. + +The default is **Readme**. -- cgit v1.2.1 From 6f581841d5c01b39fcc9f5c013541136d861ebcc Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 13 Jul 2015 18:54:15 +0200 Subject: Remove author information from "post" in merge_requests API. From both experimenting with the API and reading the source code, this appears to not be used at all. My guess is this was copypasta from somewhere else. --- doc/api/merge_requests.md | 8 -------- 1 file changed, 8 deletions(-) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 7b0873a9111..7624fd3a3ef 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -336,14 +336,6 @@ Parameters: ```json { - "author": { - "id": 1, - "username": "admin", - "email": "admin@example.com", - "name": "Administrator", - "blocked": false, - "created_at": "2012-04-29T08:46:00Z" - }, "note": "text1" } ``` -- cgit v1.2.1 From 3d6e67e44ed65eafbf81de3abb6b3c69b2500079 Mon Sep 17 00:00:00 2001 From: karen Carias Date: Mon, 13 Jul 2015 10:36:29 -0700 Subject: fixed notifications title --- doc/workflow/README.md | 2 +- doc/workflow/notifications.md | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/workflow/README.md b/doc/workflow/README.md index f1959d30139..1f39d02bdf3 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -7,7 +7,7 @@ - [Groups](groups.md) - [Keyboard shortcuts](shortcuts.md) - [Labels](labels.md) -- [Notifications](notifications.md) +- [Notification emails](notifications.md) - [Project Features](project_features.md) - [Project forking workflow](forking_workflow.md) - [Protected branches](protected_branches.md) diff --git a/doc/workflow/notifications.md b/doc/workflow/notifications.md index 17215de677e..2b5f06dd1fa 100644 --- a/doc/workflow/notifications.md +++ b/doc/workflow/notifications.md @@ -1,6 +1,6 @@ -# GitLab Notifications +# GitLab Notification Emails -GitLab has notifications system in place to notify a user of events important for the workflow. +GitLab has a notification system in place to notify a user of events that are important for the workflow. ## Notification settings @@ -67,5 +67,3 @@ Below is the table of events users can be notified of: | Reopen merge request | Project members [1] | [1] higher than participating | | Merge merge request | MR author [1], MR assignee [2], project members [3] | [1] [2] not disabled, [3] higher than participating | | New comment | Mentioned users [1], users participating [2], project members [3] | [1] [2] not disabled, [3] higher than participating | - - -- cgit v1.2.1 From 80afd4c594e74737e0dfae5ecb747104ec83f157 Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Tue, 14 Jul 2015 11:49:53 +0200 Subject: create update guides for 7.13 --- doc/update/6.x-or-7.x-to-7.12.md | 304 --------------------------------------- doc/update/6.x-or-7.x-to-7.13.md | 304 +++++++++++++++++++++++++++++++++++++++ doc/update/7.12-to-7.13.md | 129 +++++++++++++++++ 3 files changed, 433 insertions(+), 304 deletions(-) delete mode 100644 doc/update/6.x-or-7.x-to-7.12.md create mode 100644 doc/update/6.x-or-7.x-to-7.13.md create mode 100644 doc/update/7.12-to-7.13.md (limited to 'doc') diff --git a/doc/update/6.x-or-7.x-to-7.12.md b/doc/update/6.x-or-7.x-to-7.12.md deleted file mode 100644 index 5705fb360db..00000000000 --- a/doc/update/6.x-or-7.x-to-7.12.md +++ /dev/null @@ -1,304 +0,0 @@ -# From 6.x or 7.x to 7.12 -*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.x-or-7.x-to-7.12.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.12. - -## 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.6, 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.6.tar.gz | tar xz -cd ruby-2.1.6 -./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-12-stable -``` - -OR - -For GitLab Enterprise Edition: - -```bash -sudo -u git -H git checkout 7-12-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 - -# If you want to use Kerberos with GitLab EE for user authentication, install Kerberos header files -# If you don't know what Kerberos is, you can assume you don't need it. -sudo apt-get install libkrb5-dev - -# Install nodejs, javascript runtime required for assets -sudo apt-get install nodejs -``` - -## 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.6.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-12-stable:config/gitlab.yml.example -``` - -* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-12-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-12-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.6.0/config.yml.example 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 -``` - -### Change Nginx settings - -* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-12-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-12-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. - -### Check the version of /usr/local/bin/git - -If you installed Git from source into /usr/local/bin/git then please [check -your version](7.11-to-7.12.md). - -## 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/6.x-or-7.x-to-7.13.md b/doc/update/6.x-or-7.x-to-7.13.md new file mode 100644 index 00000000000..3e3ceb1194c --- /dev/null +++ b/doc/update/6.x-or-7.x-to-7.13.md @@ -0,0 +1,304 @@ +# From 6.x or 7.x to 7.13 +*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/6.x-or-7.x-to-7.13.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.13. + +## 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.6, 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.6.tar.gz | tar xz +cd ruby-2.1.6 +./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-13-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 7-13-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 + +# If you want to use Kerberos with GitLab EE for user authentication, install Kerberos header files +# If you don't know what Kerberos is, you can assume you don't need it. +sudo apt-get install libkrb5-dev + +# Install nodejs, javascript runtime required for assets +sudo apt-get install nodejs +``` + +## 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.6.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-13-stable:config/gitlab.yml.example +``` + +* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-13-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-13-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.6.0/config.yml.example 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 +``` + +### Change Nginx settings + +* HTTP setups: Make `/etc/nginx/sites-available/gitlab` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-13-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-13-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. + +### Check the version of /usr/local/bin/git + +If you installed Git from source into /usr/local/bin/git then please [check +your version](7.12-to-7.13.md). + +## 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.12-to-7.13.md b/doc/update/7.12-to-7.13.md new file mode 100644 index 00000000000..57ebe3261b6 --- /dev/null +++ b/doc/update/7.12-to-7.13.md @@ -0,0 +1,129 @@ +# From 7.12 to 7.13 + +### 0. Double-check your Git version + +**This notice applies only to /usr/local/bin/git** + +If you compiled Git from source on your GitLab server then please double-check +that you are using a version that protects against CVE-2014-9390. For six +months after this vulnerability became known the GitLab installation guide +still contained instructions that would install the outdated, 'vulnerable' Git +version 2.1.2. + +Run the following command to get your current Git version. + +``` +/usr/local/bin/git --version +``` + +If you see 'No such file or directory' then you did not install Git according +to the outdated instructions from the GitLab installation guide and you can go +to the next step 'Stop server' below. + +If you see a version string then it should be v1.8.5.6, v1.9.5, v2.0.5, v2.1.4, +v2.2.1 or newer. You can use the [instructions in the GitLab source +installation +guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#1-packages-dependencies) +to install a newer version of Git. + +### 1. Stop server + + sudo service gitlab stop + +### 2. Backup + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production +``` + +### 3. 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-13-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 7-13-stable-ee +``` + +### 4. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch +sudo -u git -H git checkout v2.6.3 +``` + +### 5. 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 +``` + +### 6. 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-12-stable:config/gitlab.yml.example origin/7-13-stable:config/gitlab.yml.example +`````` + +### 7. Start application + + sudo service gitlab start + sudo service nginx restart + +### 8. 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, the upgrade is complete! + +## Things went south? Revert to previous version (7.12) + +### 1. Revert the code to the previous version +Follow the [upgrade guide from 7.11 to 7.12](7.11-to-7.12.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 e26e46db2c8a3ed5254428b1406bd60719d4ba23 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 14 Jul 2015 11:50:01 +0200 Subject: Fix path to move_drop_indexes.ed --- doc/update/mysql_to_postgresql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/mysql_to_postgresql.md b/doc/update/mysql_to_postgresql.md index 6f89f9eda79..26605c7c3a3 100644 --- a/doc/update/mysql_to_postgresql.md +++ b/doc/update/mysql_to_postgresql.md @@ -57,7 +57,7 @@ sudo -u git -H git clone https://github.com/gitlabhq/mysql-postgresql-converter. # Convert gitlabhq_production.mysql sudo -u git -H mkdir db sudo -u git -H python mysql-postgresql-converter/db_converter.py gitlabhq_production.mysql db/database.sql -sudo -u git -H ed -s db/database.sql < move_drop_indexes.ed +sudo -u git -H ed -s db/database.sql < mysql-postgresql-converter/move_drop_indexes.ed # Compress database backup sudo -u git -H gzip db/database.sql -- cgit v1.2.1 From b3ab0e4efb6c242cf39805fb8c94c3e6023d15ec Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Tue, 14 Jul 2015 17:59:36 +0200 Subject: Revert "Change default admin password from "5iveL!fe" to "password"" This reverts commit 8a01a1222875b190d32769f7a6e7a74720079d2a. --- 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 cf58abea4eb..8b918cba133 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -404,7 +404,7 @@ NOTE: Supply `SANITIZE=true` environment variable to `gitlab:check` to omit proj 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 - password + 5iveL!fe **Important Note:** On login you'll be prompted to change the password. -- cgit v1.2.1