Commit 36a9e47d authored by Marin Jankovski's avatar Marin Jankovski

Merge remote-tracking branch 'CE/master' into merge_ce_rc1

Conflicts:
	Gemfile.lock
	VERSION
	doc/README.md
	doc/install/installation.md
parents 8dd312da 630d0424
...@@ -2,6 +2,7 @@ v 7.3.0 ...@@ -2,6 +2,7 @@ v 7.3.0
- Always set the 'origin' remote in satellite actions - Always set the 'origin' remote in satellite actions
- Write authorized_keys in tmp/ during tests - Write authorized_keys in tmp/ during tests
- Use sockets to connect to Redis - Use sockets to connect to Redis
- Add dormant New Relic gem (can be enabled via environment variables)
- Expire Rack sessions after 1 week - Expire Rack sessions after 1 week
- Cleaner signin/signup pages - Cleaner signin/signup pages
- Improved comments UI - Improved comments UI
......
...@@ -92,13 +92,13 @@ For examples of feedback on merge requests please look at already [closed merge ...@@ -92,13 +92,13 @@ For examples of feedback on merge requests please look at already [closed merge
1. The change is as small as possible (see the above paragraph for details) 1. The change is as small as possible (see the above paragraph for details)
1. Include proper tests and make all tests pass (unless it contains a test exposing a bug in existing code) 1. Include proper tests and make all tests pass (unless it contains a test exposing a bug in existing code)
1. Can merge without problems (if not please use: `git rebase master`) 1. Initially contains a single commit (please use `git rebase -i` to squash commits)
1. Can merge without problems (if not please merge `master`, never rebase commits pushed to the remote server)
1. Does not break any existing functionality 1. Does not break any existing functionality
1. Fixes one specific issue or implements one specific feature (do not combine things, send separate merge requests if needed) 1. Fixes one specific issue or implements one specific feature (do not combine things, send separate merge requests if needed)
1. Keeps the GitLab code base clean and well structured 1. Keeps the GitLab code base clean and well structured
1. Contains functionality we think other users will benefit from too 1. Contains functionality we think other users will benefit from too
1. Doesn't add configuration options since they complicate future changes 1. Doesn't add configuration options since they complicate future changes
1. Initially contains a single commit (please use `git rebase -i` to squash commits)
1. Changes after submitting the merge request should be in separate commits (no squashing). You will be asked to squash when the review is over, before merging. 1. Changes after submitting the merge request should be in separate commits (no squashing). You will be asked to squash when the review is over, before merging.
1. It conforms to the following style guides 1. It conforms to the following style guides
......
...@@ -252,3 +252,5 @@ end ...@@ -252,3 +252,5 @@ end
group :production do group :production do
gem "gitlab_meta", '7.0' gem "gitlab_meta", '7.0'
end end
gem "newrelic_rpm"
...@@ -296,6 +296,7 @@ GEM ...@@ -296,6 +296,7 @@ GEM
net-scp (1.1.2) net-scp (1.1.2)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
net-ssh (2.8.0) net-ssh (2.8.0)
newrelic_rpm (3.9.4.245)
nokogiri (1.6.2.1) nokogiri (1.6.2.1)
mini_portile (= 0.6.0) mini_portile (= 0.6.0)
nprogress-rails (0.1.2.3) nprogress-rails (0.1.2.3)
...@@ -642,6 +643,7 @@ DEPENDENCIES ...@@ -642,6 +643,7 @@ DEPENDENCIES
mousetrap-rails mousetrap-rails
mysql2 mysql2
net-ldap net-ldap
newrelic_rpm
nprogress-rails nprogress-rails
omniauth (~> 1.1.3) omniauth (~> 1.1.3)
omniauth-github omniauth-github
......
7.3.0.pre-ee 7.3.0.rc1-ee
# New Relic configuration file
#
# This file is here to make sure the New Relic gem stays
# quiet by default.
#
# To enable and configure New Relic, please use
# environment variables, e.g. NEW_RELIC_ENABLED=true
production:
enabled: false
development:
enabled: false
test:
enabled: false
...@@ -18,12 +18,14 @@ ...@@ -18,12 +18,14 @@
- [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) 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. - [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. - [Update](update/README.md) Update guides to upgrade your installation.
- [Branded login page](customization/branded_login_page.md) Change the login page appearance for your GitLab instance. - [Branded login page](customization/branded_login_page.md) Change the login page appearance for your GitLab instance.
- [Git Hooks](git_hooks/git_hooks.md) Advanced push rules for your project. - [Git Hooks](git_hooks/git_hooks.md) Advanced push rules for your project.
- [Email](tools/email.md) Email GitLab users from GitLab - [Email](tools/email.md) Email GitLab users from GitLab
- [Welcome message](customization/welcome_message.md) Add a custom welcome message to the sign-in page.
## Contributor documentation ## Contributor documentation
- [Development](development/README.md) Explains the architecture and the guidelines for shell commands. - [Development](development/README.md) Explains the architecture and the guidelines for shell commands.
- [Legal](legal/README.md) Contributor license agreements. - [Legal](legal/README.md) Contributor license agreements.
- [Release](release/README.md) How to make the monthly and security releases. - [Release](release/README.md) How to make the monthly and security releases.
\ No newline at end of file
# Add a welcome message to the sign-in page (GitLab Community Edition)
It is possible to add a markdown-formatted welcome message to your GitLab
sign-in page. Users of GitLab Enterprise Edition should use the [branded login
page feature](/ee/customization/branded_login_page.html) instead.
## Omnibus-gitlab example
In `/etc/gitlab/gitlab.rb`:
```ruby
gitlab_rails['extra_sign_in_text'] = <<'EOS'
# ACME GitLab
Welcome to the [ACME](http://www.example.com) GitLab server!
EOS
```
Run `sudo gitlab-ctl reconfigure` for changes to take effect.
## Installation from source
In `/home/git/gitlab/config/gitlab.yml`:
```yaml
# snip
production:
# snip
extra:
sign_in_text: |
# ACME GitLab
Welcome to the [ACME](http://www.example.com) GitLab server!
```
Run `sudo service gitlab reload` for the change to take effect.
...@@ -157,8 +157,6 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da ...@@ -157,8 +157,6 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da
# Clone GitLab repository # Clone GitLab repository
sudo -u git -H git clone https://gitlab.com/subscribers/gitlab-ee.git -b 7-3-stable-ee gitlab sudo -u git -H git clone https://gitlab.com/subscribers/gitlab-ee.git -b 7-3-stable-ee gitlab
# Go to gitlab dir
cd /home/git/gitlab
**Note:** You can change `7-3-stable-ee` to `master` if you want the *bleeding edge* version, but never install master on a production server! **Note:** You can change `7-3-stable-ee` to `master` if you want the *bleeding edge* version, but never install master on a production server!
...@@ -195,7 +193,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da ...@@ -195,7 +193,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da
# Find number of cores # Find number of cores
nproc nproc
# Enable cluster mode if you expect to have a high load instance # Enable cluster mode if you expect to have a high load instance
# Ex. change amount of workers to 3 for 2GB RAM server # Ex. change amount of workers to 3 for 2GB RAM server
# Set the number of workers to at least the number of cores # Set the number of workers to at least the number of cores
......
# From 6.0 to 7.2 # From 6.0 to 7.3
# GitLab 7.3 has not been released yet!
## Global issue numbers ## Global issue numbers
...@@ -67,7 +69,7 @@ sudo -u git -H git fetch --all ...@@ -67,7 +69,7 @@ sudo -u git -H git fetch --all
For GitLab Community Edition: For GitLab Community Edition:
```bash ```bash
sudo -u git -H git checkout 7-2-stable sudo -u git -H git checkout 7-3-stable
``` ```
OR OR
...@@ -75,7 +77,7 @@ OR ...@@ -75,7 +77,7 @@ OR
For GitLab Enterprise Edition: For GitLab Enterprise Edition:
```bash ```bash
sudo -u git -H git checkout 7-2-stable-ee sudo -u git -H git checkout 7-3-stable-ee
``` ```
...@@ -89,15 +91,35 @@ sudo apt-get install logrotate ...@@ -89,15 +91,35 @@ sudo apt-get install logrotate
sudo apt-get install pkg-config cmake sudo apt-get install pkg-config cmake
``` ```
## 5. Update gitlab-shell ## 5. Configure Redis to use sockets
# Configure redis to use sockets
sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig
sed -e 's/^# unixsocket /unixsocket /' -e 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /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
cd /home/git/gitlab
# Configure Redis connection settings
sudo -u git -H cp config/resque.yml.example config/resque.yml
# Change the Redis socket path if necessary
sudo -u git -H editor config/resque.yml
cd /home/git/gitlab-shell
# Configure gitlab-shell to use Redis sockets
sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' config.yml
## 6. Update gitlab-shell
```bash ```bash
cd /home/git/gitlab-shell cd /home/git/gitlab-shell
sudo -u git -H git fetch sudo -u git -H git fetch
sudo -u git -H git checkout v1.9.7 sudo -u git -H git checkout v2.0.0
``` ```
## 6. Install libs, migrations, etc. ## 7. Install libs, migrations, etc.
```bash ```bash
cd /home/git/gitlab cd /home/git/gitlab
...@@ -124,19 +146,19 @@ sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites ...@@ -124,19 +146,19 @@ sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
``` ```
## 7. Update config files ## 8. Update config files
TIP: to see what changed in gitlab.yml.example in this release use next command: 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-2-stable:config/gitlab.yml.example git diff 6-0-stable:config/gitlab.yml.example 7-3-stable:config/gitlab.yml.example
``` ```
* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-2-stable/config/gitlab.yml.example but with your settings. * Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-3-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-2-stable/config/unicorn.rb.example but with your settings. * Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-3-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/v1.9.7/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.0.0/config.yml.example but with your settings.
* HTTP setups: Make `/etc/nginx/sites-available/nginx` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-2-stable/lib/support/nginx/gitlab but with your settings. * HTTP setups: Make `/etc/nginx/sites-available/nginx` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-3-stable/lib/support/nginx/gitlab but with your settings.
* HTTPS setups: Make `/etc/nginx/sites-available/nginx-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-2-stable/lib/support/nginx/gitlab-ssl but with your settings. * HTTPS setups: Make `/etc/nginx/sites-available/nginx-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-3-stable/lib/support/nginx/gitlab-ssl but with your settings.
* Copy rack attack middleware config * Copy rack attack middleware config
```bash ```bash
...@@ -149,12 +171,12 @@ sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers ...@@ -149,12 +171,12 @@ sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers
sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
``` ```
## 8. Start application ## 9. Start application
sudo service gitlab start sudo service gitlab start
sudo service nginx restart sudo service nginx restart
## 9. Check application status ## 10. Check application status
Check if GitLab and its environment are configured correctly: Check if GitLab and its environment are configured correctly:
...@@ -167,7 +189,7 @@ To make sure you didn't miss anything run a more thorough check with: ...@@ -167,7 +189,7 @@ To make sure you didn't miss anything run a more thorough check with:
If all items are green, then congratulations upgrade complete! If all items are green, then congratulations upgrade complete!
## 10. Update OmniAuth configuration ## 11. Update OmniAuth configuration
When using Google omniauth login, changes of the Google account required. 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/). Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/).
......
...@@ -2,14 +2,71 @@ ...@@ -2,14 +2,71 @@
# GitLab 7.3 has not been released yet! # GitLab 7.3 has not been released yet!
This document currently just serves as a place to keep track of updates that will be needed for the 7.3 update. ### 0. Backup
### Update config files ```bash
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
* HTTP setups: Make `/etc/nginx/sites-available/nginx` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-0-stable/lib/support/nginx/gitlab but with your settings. ### 1. Stop server
* HTTPS setups: Make `/etc/nginx/sites-available/nginx-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-0-stable/lib/support/nginx/gitlab-ssl but with your setting
### Configure Redis to use sockets ```bash
sudo service gitlab stop
```
### 2. Get latest code
```bash
cd /home/git/gitlab
sudo -u git -H git fetch --all
```
For GitLab Community Edition:
```bash
sudo -u git -H git checkout 7-3-stable
```
OR
For GitLab Enterprise Edition:
```bash
sudo -u git -H git checkout 7-3-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.0.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. Configure Redis to use sockets
# Configure redis to use sockets # Configure redis to use sockets
sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig
...@@ -29,3 +86,58 @@ This document currently just serves as a place to keep track of updates that wil ...@@ -29,3 +86,58 @@ This document currently just serves as a place to keep track of updates that wil
# Configure gitlab-shell to use Redis sockets # Configure gitlab-shell to use Redis sockets
sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' config.yml sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' config.yml
### 6. 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 7-2-stable:config/gitlab.yml.example 7-3-stable:config/gitlab.yml.example
```
* HTTP setups: Make `/etc/nginx/sites-available/nginx` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-3-stable/lib/support/nginx/gitlab but with your settings.
* HTTPS setups: Make `/etc/nginx/sites-available/nginx-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-3-stable/lib/support/nginx/gitlab-ssl but with your setting
Update rack attack middleware config
```
sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
```
### 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 upgrade is complete!
### 9. 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](../integration/google.md).
## Things went south? Revert to previous version (7.2)
### 1. Revert the code to the previous version
Follow the [upgrade guide from 7.1 to 7.2](7.1-to-7.2.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.
...@@ -356,8 +356,7 @@ namespace :gitlab do ...@@ -356,8 +356,7 @@ namespace :gitlab do
check_repo_base_user_and_group check_repo_base_user_and_group
check_repo_base_permissions check_repo_base_permissions
check_satellites_permissions check_satellites_permissions
check_update_hook_is_up_to_date check_repos_hooks_directory_is_link
check_repos_update_hooks_is_link
check_gitlab_shell_self_test check_gitlab_shell_self_test
finished_checking "GitLab Shell" finished_checking "GitLab Shell"
...@@ -367,29 +366,6 @@ namespace :gitlab do ...@@ -367,29 +366,6 @@ namespace :gitlab do
# Checks # Checks
######################## ########################
def check_update_hook_is_up_to_date
print "update hook up-to-date? ... "
hook_file = "update"
gitlab_shell_hooks_path = Gitlab.config.gitlab_shell.hooks_path
gitlab_shell_hook_file = File.join(gitlab_shell_hooks_path, hook_file)
if File.exists?(gitlab_shell_hook_file)
puts "yes".green
else
puts "no".red
puts "Could not find #{gitlab_shell_hook_file}"
try_fixing_it(
'Check the hooks_path in config/gitlab.yml',
'Check your gitlab-shell installation'
)
for_more_information(
see_installation_guide_section "GitLab Shell"
)
end
end
def check_repo_base_exists def check_repo_base_exists
print "Repo base directory exists? ... " print "Repo base directory exists? ... "
...@@ -508,18 +484,10 @@ namespace :gitlab do ...@@ -508,18 +484,10 @@ namespace :gitlab do
end end
end end
def check_repos_update_hooks_is_link def check_repos_hooks_directory_is_link
print "update hooks in repos are links: ... " print "hooks directories in repos are links: ... "
hook_file = "update"
gitlab_shell_hooks_path = Gitlab.config.gitlab_shell.hooks_path gitlab_shell_hooks_path = Gitlab.config.gitlab_shell.hooks_path
gitlab_shell_hook_file = File.join(gitlab_shell_hooks_path, hook_file)
gitlab_shell_ssh_user = Gitlab.config.gitlab_shell.ssh_user
unless File.exists?(gitlab_shell_hook_file)
puts "can't check because of previous errors".magenta
return
end
unless Project.count > 0 unless Project.count > 0
puts "can't check, you have no projects".magenta puts "can't check, you have no projects".magenta
...@@ -529,38 +497,25 @@ namespace :gitlab do ...@@ -529,38 +497,25 @@ namespace :gitlab do
Project.find_each(batch_size: 100) do |project| Project.find_each(batch_size: 100) do |project|
print sanitized_message(project) print sanitized_message(project)
project_hook_directory = File.join(project.repository.path_to_repo, "hooks")
if project.empty_repo? if project.empty_repo?
puts "repository is empty".magenta puts "repository is empty".magenta
elsif File.realpath(project_hook_directory) == File.realpath(gitlab_shell_hooks_path)
puts 'ok'.green
else else
project_hook_file = File.join(project.repository.path_to_repo, "hooks", hook_file) puts "wrong or missing hooks".red
try_fixing_it(
unless File.exists?(project_hook_file) sudo_gitlab("#{gitlab_shell_path}/bin/create-hooks"),
puts "missing".red 'Check the hooks_path in config/gitlab.yml',
try_fixing_it( 'Check your gitlab-shell installation'
"sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}" )
) for_more_information(
for_more_information( see_installation_guide_section "GitLab Shell"
"#{gitlab_shell_path}/bin/create-hooks" )
) fix_and_rerun
fix_and_rerun
next
end
if File.lstat(project_hook_file).symlink? &&
File.realpath(project_hook_file) == File.realpath(gitlab_shell_hook_file)
puts "ok".green
else
puts "not a link to GitLab Shell's hook".red
try_fixing_it(
"sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}"
)
for_more_information(
"#{gitlab_shell_path}/bin/create-hooks"
)
fix_and_rerun
end
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment