diff options
-rw-r--r-- | Gemfile.lock | 4 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/sections/editor.scss | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/sections/notes.scss | 1 | ||||
-rw-r--r-- | config/initializers/secret_token.rb | 4 | ||||
-rw-r--r-- | doc/README.md | 2 | ||||
-rw-r--r-- | doc/install/installation.md | 6 | ||||
-rw-r--r-- | doc/install/requirements.md | 22 | ||||
-rw-r--r-- | doc/release/monthly.md | 15 | ||||
-rw-r--r-- | doc/update/6.7-to-6.8.md | 131 | ||||
-rw-r--r-- | doc/update/README.md | 4 | ||||
-rw-r--r-- | doc/workflow/authorization_for_merge_requests.md | 32 |
13 files changed, 208 insertions, 22 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index 7682540eba0..155e03e5456 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -644,7 +644,7 @@ DEPENDENCIES simplecov sinatra six - slack-notifier (~> 0.2.0) + slack-notifier (~> 0.3.2) slim spinach-rails spring (= 1.1.1) @@ -662,4 +662,4 @@ DEPENDENCIES unicorn (~> 4.6.3) unicorn-worker-killer version_sorter - webmock
\ No newline at end of file + webmock diff --git a/README.md b/README.md index 31065cf3020..3f3453a267a 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ * Completely free and open source (MIT Expat license) * Powered by Ruby on Rails +### Canonical source + +* The source of GitLab Communinity Edition is [hosted on GitLab Cloud](https://gitlab.com/gitlab-org/gitlab-ce/) and there are mirrors to make [contributing](CONTRIBUTING.md) as easy as possible. + ### Code status * [![build status](https://ci.gitlab.org/projects/1/status.png?ref=master)](https://ci.gitlab.org/projects/1?ref=master) on ci.gitlab.org (master branch) @@ -1 +1 @@ -6.8.0.pre +6.8.0.rc1 diff --git a/app/assets/stylesheets/sections/editor.scss b/app/assets/stylesheets/sections/editor.scss index 057f7b7fd44..f62f46ee168 100644 --- a/app/assets/stylesheets/sections/editor.scss +++ b/app/assets/stylesheets/sections/editor.scss @@ -26,9 +26,6 @@ float: left; } - .commit-btn { - @extend .save-btn; - } .message { display: inline-block; margin: 5px 8px 0 8px; diff --git a/app/assets/stylesheets/sections/notes.scss b/app/assets/stylesheets/sections/notes.scss index cfd5d5d9424..c9c7b6ecced 100644 --- a/app/assets/stylesheets/sections/notes.scss +++ b/app/assets/stylesheets/sections/notes.scss @@ -54,7 +54,6 @@ ul.notes { .diff-file, .discussion-hidden, .notes { - @extend .borders; background-color: #F9F9F9; } .diff-file .notes { diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 98400290113..62a54bc8c63 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -9,7 +9,9 @@ require 'securerandom' def find_secure_token token_file = Rails.root.join('.secret') - if File.exist? token_file + if ENV.key?('SECRET_KEY_BASE') + ENV['SECRET_KEY_BASE'] + elsif File.exist? token_file # Use the existing token. File.read(token_file).chomp else diff --git a/doc/README.md b/doc/README.md index 6c8fe3a96ce..b73d7bb38e1 100644 --- a/doc/README.md +++ b/doc/README.md @@ -6,7 +6,7 @@ + [Public access](public_access/public_access.md) Learn how you can allow public and internal access to a project. + [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/workflow.md) Learn how to use Git and GitLab together. ++ [Workflow](workflow/README.md) Learn how to use Git and GitLab together. **Administrator documentation** diff --git a/doc/install/installation.md b/doc/install/installation.md index e2b37b0788a..fb3faa536f0 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -173,13 +173,13 @@ 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 6-7-stable gitlab + sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 6-8-stable gitlab # Go to gitlab dir cd /home/git/gitlab **Note:** -You can change `6-7-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! +You can change `6-8-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! ## Configure it @@ -373,7 +373,7 @@ nobody can access your GitLab by using this login information later on. ## Additional markup styles Apart from the always supported markdown style there are other rich text files that GitLab can display. -But you might have to install a depency to do so. +But 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. For example, reStructuredText markup language support requires python-docutils: diff --git a/doc/install/requirements.md b/doc/install/requirements.md index 56a2a5efeb0..62e21dc72bb 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -43,18 +43,24 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab ## CPU -- 1 core works for under 100 users but the responsiveness might suffer -- **2 cores** is the **recommended** number of cores and supports up to 100 users -- 4 cores supports up to 1,000 users -- 8 cores supports up to 10,000 users +- 1 core works supports up to 100 users but the application will not be responsive +- **2 cores** is the **recommended** number of cores and supports up to 500 users +- 4 cores supports up to 2,000 users +- 8 cores supports up to 5,000 users +- 16 cores supports up to 10,0000 users +- 32 cores supports up to 20,0000 users +- 64 cores supports up to 40,0000 users ## Memory -- 512MB is too little memory, GitLab will be very slow and you will need 250MB of swap -- 768MB is the minimal memory size but we advise against this +- 512MB is the abolute minimum, you need 256MB of swap, you can configure only one slow unicorn worker, only ssh access will work, we do not recommend this - 1GB supports up to 100 users (with individual repositories under 250MB, otherwise git memory usage necessitates using swap space) -- **2GB** is the **recommended** memory size and supports up to 1,000 users -- 4GB supports up to 10,000 users +- **2GB** is the **recommended** memory size and supports up to 500 users +- 4GB supports up to 2,000 users +- 8GB supports up to 5,000 users +- 16GB supports up to 10,000 users +- 32GB supports up to 20,000 users +- 64GB supports up to 40,000 users ## Storage diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 2949e320f3c..9dbe62f1210 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -17,6 +17,10 @@ NOTE: This is a guide for GitLab developers. If you are trying to install GitLab #### 3. Do users need to update dependencies like `git`? +- Check the [GitLab Shell version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L782) + +- Check the [Git version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L794) + #### 4. Get latest code #### 5. Does GitLab shell need to be updated? @@ -72,3 +76,14 @@ After making the release branch new commits are cherry-picked from master. When * Mention what GitLab is on the second line: GitLab is open source software to collaborate on code. * Select and thank the the Most Valuable Person (MVP) of this release. * 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. + +# Tweet + +Send out a tweet to share the good news with the world. For a major/minor release, list the features in short and link to the blog post. + +For a RC, make sure to explain what a RC is. + +A patch release tweet should specify the fixes it brings and link to the corresponding blog post. + + + diff --git a/doc/update/6.7-to-6.8.md b/doc/update/6.7-to-6.8.md new file mode 100644 index 00000000000..63023fd384b --- /dev/null +++ b/doc/update/6.7-to-6.8.md @@ -0,0 +1,131 @@ +# From 6.7 to 6.8 + +### 0. Backup + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production +``` + +### 1. Stop server + +```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 6-8-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 6-8-stable-ee +``` + +### 3. Update gitlab-shell (and its config) + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch +sudo -u git -H git checkout v1.9.3 +``` + +### 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 + +# Update the logrotate configuration (keep logs for 90 days instead of 52 weeks) +sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab + +# Close access to gitlab-satellites for others +sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites +``` + +### 5. 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 if desired. + +``` +git diff 6-7-stable:config/gitlab.yml.example 6-8-stable:config/gitlab.yml.example +``` + +#### MySQL? Remove reaping frequency + +If you are using MySQL as a database, remove `reaping_frequency` from you database.yml to prevent crashes. [Relevant commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/5163a8fcb9cfd63435560fda00173b76df2ccc93). + +#### HTTPS? Disable gzip + +If you are using HTTPS, disable gzip as in [this commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/563fec734912d81cd7caea6fa8ec2b397fb72a9b) to prevent BREACH attacks. + +#### Turn on asset compression + +To improve performance, enable gzip asset compression as seen [in this commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/8af94ed75505f0253823b9b2d44320fecea5b5fb). + +### 6. Update Init script + +```bash +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab +sudo chmod +x /etc/init.d/gitlab +``` + +### 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! + +## Things went south? Revert to previous version (6.7) + +### 1. Revert the code to the previous version +Follow the [`upgrade guide from 6.6 to 6.7`](6.6-to-6.7.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. diff --git a/doc/update/README.md b/doc/update/README.md index 06e3764616f..9ce48a019e8 100644 --- a/doc/update/README.md +++ b/doc/update/README.md @@ -1,5 +1,5 @@ -+ [The indivual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update) -+ [Uprader](upgrader.md) ++ [The individual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update) ++ [Upgrader](upgrader.md) + [Ruby](ruby.md) + [Patch versions](patch_versions.md) + [MySQL to PostgreSQL](mysql_to_postgresql.md) diff --git a/doc/workflow/authorization_for_merge_requests.md b/doc/workflow/authorization_for_merge_requests.md new file mode 100644 index 00000000000..4e07d7c04c5 --- /dev/null +++ b/doc/workflow/authorization_for_merge_requests.md @@ -0,0 +1,32 @@ +There are two main ways to have a merge request flow with GitLab: working with protected branches in a single repository, or working with forks of an authoritative project. + +## Protected branch flow + +With the protected branch flow everybody works within the same GitLab project. +The project maintainers get Master access and the regular developers get Developer access. +The maintainers mark the authoritative branches as 'Protected'. +The developers push feature branches to the project and create merge requests to have their feature branches reviewed and merged into one of the protected branches. +Only users with Master access can merge changes into a protected branch. + +### Advantages + +- fewer projects means less clutter +- developers need to consider only one remote repository + +### Disadvantages + +- manual setup of protected branch required for each new project + +## Forking workflow + +With the forking workflow the maintainers get Master access and the regular developers get Reporter access to the authoritative repository, which prohibits them from pushing any changes to it. +Developers create forks of the authoritative project and push their feature branches to their own forks. +To get their changes into master they need to create a merge request across forks. + +### Advantages + +- in an appropriately configured GitLab group, new projects automatically get the required access restrictions for regular developers: fewer manual steps to configure authorization for new projects + +### Disadvantages + +- the project need to keep their forks up to date, which requires more advanced Git skills (managing multiple remotes) |