From 65c25993b08c465e92d0ea24c28d59f06239d63d Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Sat, 20 Aug 2016 10:57:10 +0200 Subject: Update gitlab-shell to v3.4.0 --- doc/update/8.10-to-8.11.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/update') diff --git a/doc/update/8.10-to-8.11.md b/doc/update/8.10-to-8.11.md index 84c624cbcb7..253fff50bdd 100644 --- a/doc/update/8.10-to-8.11.md +++ b/doc/update/8.10-to-8.11.md @@ -46,7 +46,7 @@ sudo -u git -H git checkout 8-11-stable-ee ```bash cd /home/git/gitlab-shell sudo -u git -H git fetch --all --tags -sudo -u git -H git checkout v3.3.3 +sudo -u git -H git checkout v3.4.0 ``` ### 5. Update gitlab-workhorse -- cgit v1.2.1 From 21ddda75ac739a89565a2334fdfd77ed104d2fbe Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 22 Aug 2016 10:00:01 -0600 Subject: Add Ruby 2.3 upgrade notes. --- doc/update/8.10-to-8.11.md | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) (limited to 'doc/update') diff --git a/doc/update/8.10-to-8.11.md b/doc/update/8.10-to-8.11.md index 253fff50bdd..d423d6131b2 100644 --- a/doc/update/8.10-to-8.11.md +++ b/doc/update/8.10-to-8.11.md @@ -20,7 +20,31 @@ cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production ``` -### 3. Get latest code +### 3. Update Ruby + +If you are you running Ruby 2.1.x, you do not _need_ to upgrade Ruby yet, but you should note that support for 2.1.x is deprecated and we will require 2.3.x in 8.13. It's strongly recommended that you upgrade as soon as possible. + +You can check which version you are running with `ruby -v`. + +Download and compile Ruby: + +``bash +mkdir /tmp/ruby && cd /tmp/ruby +curl -O --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz +echo 'c39b4001f7acb4e334cb60a0f4df72d434bef711 ruby-2.3.1.tar.gz' | shasum -c - && tar xzf ruby-2.3.1.tar.gz +cd ruby-2.3.1 +./configure --disable-install-rdoc +make +sudo make install +`` + +Install Bundler: + +``bash +sudo gem install bundler --no-ri --no-rdoc +`` + +### 4. Get latest code ```bash sudo -u git -H git fetch --all @@ -41,7 +65,7 @@ For GitLab Enterprise Edition: sudo -u git -H git checkout 8-11-stable-ee ``` -### 4. Update gitlab-shell +### 5. Update gitlab-shell ```bash cd /home/git/gitlab-shell @@ -49,7 +73,7 @@ sudo -u git -H git fetch --all --tags sudo -u git -H git checkout v3.4.0 ``` -### 5. Update gitlab-workhorse +### 6. Update gitlab-workhorse Install and compile gitlab-workhorse. This requires [Go 1.5](https://golang.org/dl) which should already be on your system from @@ -62,7 +86,7 @@ sudo -u git -H git checkout v0.7.8 sudo -u git -H make ``` -### 6. Install libs, migrations, etc. +### 7. Install libs, migrations, etc. ```bash cd /home/git/gitlab @@ -84,7 +108,7 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS ``` -### 7. Update configuration files +### 8. Update configuration files #### New configuration options for `gitlab.yml` @@ -133,12 +157,12 @@ Ensure you're still up-to-date with the latest init script changes: sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab -### 8. Start application +### 9. Start application sudo service gitlab start sudo service nginx restart -### 9. Check application status +### 10. Check application status Check if GitLab and its environment are configured correctly: -- cgit v1.2.1 From dc743a6e1f15c9a17411d2a18e89df30871272a7 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 22 Aug 2016 10:26:23 -0600 Subject: Appease the linter. --- doc/update/8.10-to-8.11.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/update') diff --git a/doc/update/8.10-to-8.11.md b/doc/update/8.10-to-8.11.md index d423d6131b2..1c849ad59a9 100644 --- a/doc/update/8.10-to-8.11.md +++ b/doc/update/8.10-to-8.11.md @@ -30,8 +30,8 @@ Download and compile Ruby: ``bash mkdir /tmp/ruby && cd /tmp/ruby -curl -O --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz -echo 'c39b4001f7acb4e334cb60a0f4df72d434bef711 ruby-2.3.1.tar.gz' | shasum -c - && tar xzf ruby-2.3.1.tar.gz +curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz +echo 'c39b4001f7acb4e334cb60a0f4df72d434bef711 ruby-2.3.1.tar.gz' | shasum --check - && tar xzf ruby-2.3.1.tar.gz cd ruby-2.3.1 ./configure --disable-install-rdoc make -- cgit v1.2.1 From b36b885cfd6cc931e701812492d51986797714b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D=C3=A1vila=20Santos?= Date: Mon, 22 Aug 2016 18:05:13 +0000 Subject: Fix for update 8.10-to-8.11.md doc. --- doc/update/8.10-to-8.11.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/update') diff --git a/doc/update/8.10-to-8.11.md b/doc/update/8.10-to-8.11.md index 1c849ad59a9..98721763566 100644 --- a/doc/update/8.10-to-8.11.md +++ b/doc/update/8.10-to-8.11.md @@ -28,7 +28,7 @@ You can check which version you are running with `ruby -v`. Download and compile Ruby: -``bash +```bash mkdir /tmp/ruby && cd /tmp/ruby curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz echo 'c39b4001f7acb4e334cb60a0f4df72d434bef711 ruby-2.3.1.tar.gz' | shasum --check - && tar xzf ruby-2.3.1.tar.gz @@ -36,13 +36,13 @@ cd ruby-2.3.1 ./configure --disable-install-rdoc make sudo make install -`` +``` Install Bundler: -``bash +```bash sudo gem install bundler --no-ri --no-rdoc -`` +``` ### 4. Get latest code -- cgit v1.2.1 From c40fd0b1c2aa5d3354fd50e37a4fe22483df2042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20=C3=98ivind=20Bj=C3=B8rnsen?= Date: Fri, 26 Aug 2016 07:24:13 +0000 Subject: docs: make sure to update 8.10-to-8.11 workhorse version too (see !5983) --- doc/update/8.10-to-8.11.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/update') diff --git a/doc/update/8.10-to-8.11.md b/doc/update/8.10-to-8.11.md index 98721763566..b058f8e2a03 100644 --- a/doc/update/8.10-to-8.11.md +++ b/doc/update/8.10-to-8.11.md @@ -82,7 +82,7 @@ GitLab 8.1. ```bash cd /home/git/gitlab-workhorse sudo -u git -H git fetch --all -sudo -u git -H git checkout v0.7.8 +sudo -u git -H git checkout v0.7.11 sudo -u git -H make ``` -- cgit v1.2.1 From 74abc527ecaf6a2e94cab4c36221ee921cedda82 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 30 Aug 2016 13:49:17 +0200 Subject: Create bitmaps during 'git gc' --- doc/update/8.11-to-8.12.md | 198 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 doc/update/8.11-to-8.12.md (limited to 'doc/update') diff --git a/doc/update/8.11-to-8.12.md b/doc/update/8.11-to-8.12.md new file mode 100644 index 00000000000..544a80662d3 --- /dev/null +++ b/doc/update/8.11-to-8.12.md @@ -0,0 +1,198 @@ +# From 8.11 to 8.12 + +Make sure you view this update guide 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 at 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/archives.html) for installation +guide links by version. + +### 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. Update Ruby + +If you are you running Ruby 2.1.x, you do not _need_ to upgrade Ruby yet, but you should note that support for 2.1.x is deprecated and we will require 2.3.x in 8.13. It's strongly recommended that you upgrade as soon as possible. + +You can check which version you are running with `ruby -v`. + +Download and compile Ruby: + +```bash +mkdir /tmp/ruby && cd /tmp/ruby +curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz +echo 'c39b4001f7acb4e334cb60a0f4df72d434bef711 ruby-2.3.1.tar.gz' | shasum --check - && tar xzf ruby-2.3.1.tar.gz +cd ruby-2.3.1 +./configure --disable-install-rdoc +make +sudo make install +``` + +Install Bundler: + +```bash +sudo gem install bundler --no-ri --no-rdoc +``` + +### 4. 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 8-12-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 8-12-stable-ee +``` + +### 5. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch --all --tags +sudo -u git -H git checkout v3.4.0 +``` + +### 6. Update gitlab-workhorse + +Install and compile gitlab-workhorse. This requires +[Go 1.5](https://golang.org/dl) which should already be on your system from +GitLab 8.1. + +```bash +cd /home/git/gitlab-workhorse +sudo -u git -H git fetch --all +sudo -u git -H git checkout v0.7.8 +sudo -u git -H make +``` + +### 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 postgres development test --deployment + +# PostgreSQL installations (note: the line below states '--without mysql') +sudo -u git -H bundle install --without mysql development test --deployment + +# Optional: clean up old gems +sudo -u git -H bundle clean + +# 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 + +``` + +### 8. Update configuration 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 manually to your current `gitlab.yml`: + +```sh +git diff origin/8-11-stable:config/gitlab.yml.example origin/8-12-stable:config/gitlab.yml.example +``` + +#### Git configuration + +```sh +# Enable packfile bitmaps +sudo -u git -H git config --global repack.writeBitmaps true +``` + +#### Nginx configuration + +Ensure you're still up-to-date with the latest NGINX configuration changes: + +```sh +# For HTTPS configurations +git diff origin/8-11-stable:lib/support/nginx/gitlab-ssl origin/8-12-stable:lib/support/nginx/gitlab-ssl + +# For HTTP configurations +git diff origin/8-11-stable:lib/support/nginx/gitlab origin/8-12-stable:lib/support/nginx/gitlab +``` + +If you are using Apache instead of NGINX please see the updated [Apache templates]. +Also note that because Apache does not support upstreams behind Unix sockets you +will need to let gitlab-workhorse listen on a TCP port. You can do this +via [/etc/default/gitlab]. + +[Apache templates]: https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apache +[/etc/default/gitlab]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-12-stable/lib/support/init.d/gitlab.default.example#L38 + +#### SMTP configuration + +If you're installing from source and use SMTP to deliver mail, you will need to add the following line +to config/initializers/smtp_settings.rb: + +```ruby +ActionMailer::Base.delivery_method = :smtp +``` + +See [smtp_settings.rb.sample] as an example. + +[smtp_settings.rb.sample]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-12-stable/config/initializers/smtp_settings.rb.sample#L13? + +#### Init script + +Ensure you're still up-to-date with the latest init script changes: + + sudo cp lib/support/init.d/gitlab /etc/init.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: + + 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: + + 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 (8.11) + +### 1. Revert the code to the previous version + +Follow the [upgrade guide from 8.9 to 8.11](8.9-to-8.11.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 5ebc787ca02e018b0344bd4e4fc2a6ac9f6f1677 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 31 Aug 2016 16:42:36 +0200 Subject: Final piece of search-and-replace --- doc/update/8.11-to-8.12.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/update') diff --git a/doc/update/8.11-to-8.12.md b/doc/update/8.11-to-8.12.md index 544a80662d3..aac19897f9e 100644 --- a/doc/update/8.11-to-8.12.md +++ b/doc/update/8.11-to-8.12.md @@ -185,7 +185,7 @@ If all items are green, then congratulations, the upgrade is complete! ### 1. Revert the code to the previous version -Follow the [upgrade guide from 8.9 to 8.11](8.9-to-8.11.md), except for the +Follow the [upgrade guide from 8.10 to 8.11](8.10-to-8.11.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 90c0fdfc9da36c29fe5093b78e0581c19c2279b5 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 31 Aug 2016 17:12:37 +0200 Subject: More changes suggested by Robert --- doc/update/8.11-to-8.12.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/update') diff --git a/doc/update/8.11-to-8.12.md b/doc/update/8.11-to-8.12.md index aac19897f9e..953e9d7e74c 100644 --- a/doc/update/8.11-to-8.12.md +++ b/doc/update/8.11-to-8.12.md @@ -105,7 +105,6 @@ 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 - ``` ### 8. Update configuration files @@ -120,8 +119,10 @@ git diff origin/8-11-stable:config/gitlab.yml.example origin/8-12-stable:config/ #### Git configuration +Configure Git to generate packfile bitmaps (introduced in Git 2.0) on +the GitLab server during `git gc`. + ```sh -# Enable packfile bitmaps sudo -u git -H git config --global repack.writeBitmaps true ``` -- cgit v1.2.1 From dd0431c5f7c93a2f9cee6766c9c8f3b0536022e9 Mon Sep 17 00:00:00 2001 From: Ruben Davila Date: Thu, 1 Sep 2016 12:33:37 -0500 Subject: Some minor updates for upgrade guides for 8.12. --- doc/update/8.11-to-8.12.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/update') diff --git a/doc/update/8.11-to-8.12.md b/doc/update/8.11-to-8.12.md index 953e9d7e74c..c8ca42f97bc 100644 --- a/doc/update/8.11-to-8.12.md +++ b/doc/update/8.11-to-8.12.md @@ -82,7 +82,7 @@ GitLab 8.1. ```bash cd /home/git/gitlab-workhorse sudo -u git -H git fetch --all -sudo -u git -H git checkout v0.7.8 +sudo -u git -H git checkout v0.7.11 sudo -u git -H make ``` -- cgit v1.2.1