From e3f8ed5cefcae3df9179f7b1198bf8026918653e Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Thu, 4 Feb 2016 17:51:12 +0000 Subject: doc: fix git lfs workaround for using http instead of https the url should only point to `info/lfs` instead of `info/lfs/batch/objects` --- doc/workflow/lfs/manage_large_binaries_with_git_lfs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md b/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md index b59e92cb317..596478bf3cd 100644 --- a/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md +++ b/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md @@ -104,7 +104,7 @@ To prevent this from happening, set the lfs url in project Git config: ```bash -git config --add lfs.url "http://gitlab.example.com/group/project.git/info/lfs/objects/batch" +git config --add lfs.url "http://gitlab.example.com/group/project.git/info/lfs" ``` ### Credentials are always required when pushing an object -- cgit v1.2.1 From 33520f1f699502740e67682b17ccd9432b6e693b Mon Sep 17 00:00:00 2001 From: a-tal Date: Fri, 26 Feb 2016 20:49:50 -0800 Subject: fix example urls for (de)associating runners to projects --- doc/api/runners.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api/runners.md b/doc/api/runners.md index cc6c6b7cb2f..ddfa298f79d 100644 --- a/doc/api/runners.md +++ b/doc/api/runners.md @@ -275,7 +275,7 @@ POST /projects/:id/runners | `runner_id` | integer | yes | The ID of a runner | ``` -curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners" -F "runner_id=9" +curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/9/runners" -F "runner_id=9" ``` Example response: @@ -306,7 +306,7 @@ DELETE /projects/:id/runners/:runner_id | `runner_id` | integer | yes | The ID of a runner | ``` -curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners/9" +curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/9/runners/9" ``` Example response: -- cgit v1.2.1 From 1824fb0603c798ec467ea3529570031e7dbb2986 Mon Sep 17 00:00:00 2001 From: Florian Date: Tue, 5 Apr 2016 15:20:58 +0000 Subject: Fix broken link in CI quickstart docs The space between the [label] and the (link) caused it to be interpreted literally. --- doc/ci/quick_start/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ci/quick_start/README.md b/doc/ci/quick_start/README.md index 9aba4326e11..aae9ccae1d3 100644 --- a/doc/ci/quick_start/README.md +++ b/doc/ci/quick_start/README.md @@ -212,8 +212,8 @@ If you want to receive e-mail notifications about the result status of the builds, you should explicitly enable the **Builds Emails** service under your project's settings. -For more information read the [Builds emails service documentation] -(../../project_services/builds_emails.md). +For more information read the +[Builds emails service documentation](../../project_services/builds_emails.md). ## Builds badge -- cgit v1.2.1 From 35266de2f0e91ac73995ab8ced1bbcb12e35f773 Mon Sep 17 00:00:00 2001 From: Chris McKnight Date: Wed, 6 Jan 2016 11:20:52 -0600 Subject: Updates git lfs initialize command --- doc/workflow/lfs/manage_large_binaries_with_git_lfs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md b/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md index ba91685a20b..83db44c10b1 100644 --- a/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md +++ b/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md @@ -44,7 +44,7 @@ check it into your Git repository: ```bash git clone git@gitlab.example.com:group/project.git -git lfs init # initialize the Git LFS project project +git lfs install # initialize the Git LFS project project git lfs track "*.iso" # select the file extensions that you want to treat as large files ``` @@ -152,4 +152,4 @@ If you are using OS X you can use `osxkeychain` to store and encrypt your creden For Windows, you can use `wincred` or Microsoft's [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases). More details about various methods of storing the user credentials can be found -on [Git Credential Storage documentation](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage). \ No newline at end of file +on [Git Credential Storage documentation](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage). -- cgit v1.2.1 From 03e5873ae52f3c8c0efb7baa7d1a358a7c3e7974 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 19 Apr 2016 19:04:58 +0300 Subject: Fix broken links [ci skip] --- doc/ci/deployment/README.md | 98 ------------------------------------ doc/ci/examples/deployment/README.md | 98 ++++++++++++++++++++++++++++++++++++ doc/ci/triggers/README.md | 2 +- doc/markdown/markdown.md | 3 +- 4 files changed, 101 insertions(+), 100 deletions(-) delete mode 100644 doc/ci/deployment/README.md create mode 100644 doc/ci/examples/deployment/README.md (limited to 'doc') diff --git a/doc/ci/deployment/README.md b/doc/ci/deployment/README.md deleted file mode 100644 index 7d91ce6710f..00000000000 --- a/doc/ci/deployment/README.md +++ /dev/null @@ -1,98 +0,0 @@ -## Using Dpl as deployment tool -Dpl (dee-pee-ell) is a deploy tool made for continuous deployment that's developed and used by Travis CI, but can also be used with GitLab CI. - -**We recommend to use Dpl, if you're deploying to any of these of these services: https://github.com/travis-ci/dpl#supported-providers**. - -### Requirements -To use Dpl you need at least Ruby 1.8.7 with ability to install gems. - -### Basic usage -The Dpl can be installed on any machine with: -``` -gem install dpl -``` - -This allows you to test all commands from your shell, rather than having to test it on a CI server. - -If you don't have Ruby installed you can do it on Debian-compatible Linux with: -``` -apt-get update -apt-get install ruby-dev -``` - -The Dpl provides support for vast number of services, including: Heroku, Cloud Foundry, AWS/S3, and more. -To use it simply define provider and any additional parameters required by the provider. - -For example if you want to use it to deploy your application to heroku, you need to specify `heroku` as provider, specify `api-key` and `app`. -There's more and all possible parameters can be found here: https://github.com/travis-ci/dpl#heroku - -``` -staging: - type: deploy - - gem install dpl - - dpl --provider=heroku --app=my-app-staging --api-key=$HEROKU_STAGING_API_KEY -``` - -In the above example we use Dpl to deploy `my-app-staging` to Heroku server with api-key stored in `HEROKU_STAGING_API_KEY` secure variable. - -To use different provider take a look at long list of [Supported Providers](https://github.com/travis-ci/dpl#supported-providers). - -### Using Dpl with Docker -When you use GitLab Runner you most likely configured it to use your server's shell commands. -This means that all commands are run in context of local user (ie. gitlab_runner or gitlab_ci_multi_runner). -It also means that most probably in your Docker container you don't have the Ruby runtime installed. -You will have to install it: -``` -staging: - type: deploy - - apt-get update -yq - - apt-get install -y ruby-dev - - gem install dpl - - dpl --provider=heroku --app=my-app-staging --api-key=$HEROKU_STAGING_API_KEY - only: - - master -``` - -The first line `apt-get update -yq` updates the list of available packages, where second `apt-get install -y ruby-dev` install `Ruby` runtime on system. -The above example is valid for all Debian-compatible systems. - -### Usage in staging and production -It's pretty common in developer workflow to have staging (development) and production environment. -If we consider above example: we would like to deploy `master` branch to `staging` and `all tags` to `production` environment. -The final `.gitlab-ci.yml` for that setup would look like this: - -``` -staging: - type: deploy - - gem install dpl - - dpl --provider=heroku --app=my-app-staging --api-key=$HEROKU_STAGING_API_KEY - only: - - master - -production: - type: deploy - - gem install dpl - - dpl --provider=heroku --app=my-app-production --api-key=$HEROKU_PRODUCTION_API_KEY - only: - - tags -``` - -We created two deploy jobs that are executed on different events: -1. `staging` is executed for all commits that were pushed to `master` branch, -2. `production` is executed for all pushed tags. - -We also use two secure variables: -1. `HEROKU_STAGING_API_KEY` - Heroku API key used to deploy staging app, -2. `HEROKU_PRODUCTION_API_KEY` - Heroku API key used to deploy production app. - -### Storing API keys -In GitLab CI 7.12 a new feature was introduced: Secure Variables. -Secure Variables can added by going to `Project > Variables > Add Variable`. -**This feature requires `gitlab-runner` with version equal or greater than 0.4.0.** -The variables that are defined in the project settings are sent along with the build script to the runner. -The secure variables are stored out of the repository. Never store secrets in your projects' .gitlab-ci.yml. -It is also important that secret's value is hidden in the build log. - -You access added variable by prefixing it's name with `$` (on non-Windows runners) or `%` (for Windows Batch runners): -1. `$SECRET_VARIABLE` - use it for non-Windows runners -2. `%SECRET_VARIABLE%` - use it for Windows Batch runners diff --git a/doc/ci/examples/deployment/README.md b/doc/ci/examples/deployment/README.md new file mode 100644 index 00000000000..7d91ce6710f --- /dev/null +++ b/doc/ci/examples/deployment/README.md @@ -0,0 +1,98 @@ +## Using Dpl as deployment tool +Dpl (dee-pee-ell) is a deploy tool made for continuous deployment that's developed and used by Travis CI, but can also be used with GitLab CI. + +**We recommend to use Dpl, if you're deploying to any of these of these services: https://github.com/travis-ci/dpl#supported-providers**. + +### Requirements +To use Dpl you need at least Ruby 1.8.7 with ability to install gems. + +### Basic usage +The Dpl can be installed on any machine with: +``` +gem install dpl +``` + +This allows you to test all commands from your shell, rather than having to test it on a CI server. + +If you don't have Ruby installed you can do it on Debian-compatible Linux with: +``` +apt-get update +apt-get install ruby-dev +``` + +The Dpl provides support for vast number of services, including: Heroku, Cloud Foundry, AWS/S3, and more. +To use it simply define provider and any additional parameters required by the provider. + +For example if you want to use it to deploy your application to heroku, you need to specify `heroku` as provider, specify `api-key` and `app`. +There's more and all possible parameters can be found here: https://github.com/travis-ci/dpl#heroku + +``` +staging: + type: deploy + - gem install dpl + - dpl --provider=heroku --app=my-app-staging --api-key=$HEROKU_STAGING_API_KEY +``` + +In the above example we use Dpl to deploy `my-app-staging` to Heroku server with api-key stored in `HEROKU_STAGING_API_KEY` secure variable. + +To use different provider take a look at long list of [Supported Providers](https://github.com/travis-ci/dpl#supported-providers). + +### Using Dpl with Docker +When you use GitLab Runner you most likely configured it to use your server's shell commands. +This means that all commands are run in context of local user (ie. gitlab_runner or gitlab_ci_multi_runner). +It also means that most probably in your Docker container you don't have the Ruby runtime installed. +You will have to install it: +``` +staging: + type: deploy + - apt-get update -yq + - apt-get install -y ruby-dev + - gem install dpl + - dpl --provider=heroku --app=my-app-staging --api-key=$HEROKU_STAGING_API_KEY + only: + - master +``` + +The first line `apt-get update -yq` updates the list of available packages, where second `apt-get install -y ruby-dev` install `Ruby` runtime on system. +The above example is valid for all Debian-compatible systems. + +### Usage in staging and production +It's pretty common in developer workflow to have staging (development) and production environment. +If we consider above example: we would like to deploy `master` branch to `staging` and `all tags` to `production` environment. +The final `.gitlab-ci.yml` for that setup would look like this: + +``` +staging: + type: deploy + - gem install dpl + - dpl --provider=heroku --app=my-app-staging --api-key=$HEROKU_STAGING_API_KEY + only: + - master + +production: + type: deploy + - gem install dpl + - dpl --provider=heroku --app=my-app-production --api-key=$HEROKU_PRODUCTION_API_KEY + only: + - tags +``` + +We created two deploy jobs that are executed on different events: +1. `staging` is executed for all commits that were pushed to `master` branch, +2. `production` is executed for all pushed tags. + +We also use two secure variables: +1. `HEROKU_STAGING_API_KEY` - Heroku API key used to deploy staging app, +2. `HEROKU_PRODUCTION_API_KEY` - Heroku API key used to deploy production app. + +### Storing API keys +In GitLab CI 7.12 a new feature was introduced: Secure Variables. +Secure Variables can added by going to `Project > Variables > Add Variable`. +**This feature requires `gitlab-runner` with version equal or greater than 0.4.0.** +The variables that are defined in the project settings are sent along with the build script to the runner. +The secure variables are stored out of the repository. Never store secrets in your projects' .gitlab-ci.yml. +It is also important that secret's value is hidden in the build log. + +You access added variable by prefixing it's name with `$` (on non-Windows runners) or `%` (for Windows Batch runners): +1. `$SECRET_VARIABLE` - use it for non-Windows runners +2. `%SECRET_VARIABLE%` - use it for Windows Batch runners diff --git a/doc/ci/triggers/README.md b/doc/ci/triggers/README.md index 9f7c1bfe6a0..1848f6319d8 100644 --- a/doc/ci/triggers/README.md +++ b/doc/ci/triggers/README.md @@ -33,7 +33,7 @@ POST /projects/:id/trigger/builds The required parameters are the trigger's `token` and the Git `ref` on which the trigger will be performed. Valid refs are the branch, the tag or the commit -SHA. The `:id` of a project can be found by [querying the API](../api/projects.md) +SHA. The `:id` of a project can be found by [querying the API](../../api/projects.md) or by visiting the **Triggers** page which provides self-explanatory examples. When a rebuild is triggered, the information is exposed in GitLab's UI under diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index 4f199b6af6f..3f44a1b4c6c 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -402,7 +402,7 @@ There are two ways to create links, inline-style and reference-style. [I'm a reference-style link][Arbitrary case-insensitive reference text] -[I'm a relative reference to a repository file](LICENSE) +[I'm a relative reference to a repository file](LICENSE)[^1] [You can use numbers for reference-style link definitions][1] @@ -594,3 +594,4 @@ By including colons in the header row, you can align the text within that column [rouge]: http://rouge.jneen.net/ "Rouge website" [redcarpet]: https://github.com/vmg/redcarpet "Redcarpet website" +[^1]: This link will be broken if you see this document from the Help page or docs.gitlab.com -- cgit v1.2.1 From d39127104727f019c0728c599a807fbbb3e8e7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Fri, 8 Apr 2016 23:03:23 -0300 Subject: Include Milestone reference syntax in Markdown documentation --- doc/markdown/markdown.md | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index 4f199b6af6f..1afa1f14067 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -185,20 +185,23 @@ GFM will turn that reference into a link so you can navigate between them easily GFM will recognize the following: -| input | references | -|:-----------------------|:---------------------------| -| `@user_name` | specific user | -| `@group_name` | specific group | -| `@all` | entire team | -| `#123` | issue | -| `!123` | merge request | -| `$123` | snippet | -| `~123` | label by ID | -| `~bug` | one-word label by name | -| `~"feature request"` | multi-word label by name | -| `9ba12248` | specific commit | -| `9ba12248...b19a04f5` | commit range comparison | -| `[README](doc/README)` | repository file references | +| input | references | +|:-----------------------|:--------------------------- | +| `@user_name` | specific user | +| `@group_name` | specific group | +| `@all` | entire team | +| `#123` | issue | +| `!123` | merge request | +| `$123` | snippet | +| `~123` | label by ID | +| `~bug` | one-word label by name | +| `~"feature request"` | multi-word label by name | +| `%123` | milestone by ID | +| `%v1.23` | one-word milestone by name | +| `%"release candidate"` | multi-word milestone by name | +| `9ba12248` | specific commit | +| `9ba12248...b19a04f5` | commit range comparison | +| `[README](doc/README)` | repository file references | GFM also recognizes certain cross-project references: @@ -206,6 +209,7 @@ GFM also recognizes certain cross-project references: |:----------------------------------------|:------------------------| | `namespace/project#123` | issue | | `namespace/project!123` | merge request | +| `namespace/project%123` | milestone | | `namespace/project$123` | snippet | | `namespace/project@9ba12248` | specific commit | | `namespace/project@9ba12248...b19a04f5` | commit range comparison | -- cgit v1.2.1 From ff1e7474ed0f210df004c714e1b83c1c2eb0d91c Mon Sep 17 00:00:00 2001 From: Andrew Collett Date: Thu, 21 Apr 2016 10:30:27 +0000 Subject: Update cas.md to reflect the current syntax, and added that gitlab-ctl reconfigure should be run. --- doc/integration/cas.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/integration/cas.md b/doc/integration/cas.md index e6b2071f193..e34e306f9ac 100644 --- a/doc/integration/cas.md +++ b/doc/integration/cas.md @@ -27,17 +27,18 @@ To enable the CAS OmniAuth provider you must register your application with your ```ruby gitlab_rails['omniauth_providers'] = [ { - name: "cas3", - label: "cas", - args: { - url: 'CAS_SERVER', - login_url: '/CAS_PATH/login', - service_validate_url: '/CAS_PATH/p3/serviceValidate', - logout_url: '/CAS_PATH/logout'} } - } + "name"=> "cas3", + "label"=> "cas", + "args"=> { + "url"=> 'CAS_SERVER', + "login_url"=> '/CAS_PATH/login', + "service_validate_url"=> '/CAS_PATH/p3/serviceValidate', + "logout_url"=> '/CAS_PATH/logout' + } } ] ``` + For installations from source: @@ -57,6 +58,8 @@ To enable the CAS OmniAuth provider you must register your application with your 1. Save the configuration file. +1. Run `gitlab-ctl reconfigure` for the omnibus package. + 1. Restart GitLab for the changes to take effect. On the sign in page there should now be a CAS tab in the sign in form. -- cgit v1.2.1 From f4e0c56279007fd6cec3d8e6bd684f0483b0e0ff Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 3 May 2016 13:03:10 +0200 Subject: Improve documentation and web test for web hooks I wanted to share what I learned trying to debug web hooks using netcat. --- doc/web_hooks/web_hooks.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md index c1c51302e79..6ffdb18339e 100644 --- a/doc/web_hooks/web_hooks.md +++ b/doc/web_hooks/web_hooks.md @@ -13,6 +13,19 @@ You can configure webhooks to listen for specific events like pushes, issues or Webhooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server. +## Webhook endpoint tips + +If you are writing your own endpoint (web server) that will receive +GitLab web hooks keep in mind the following things: + +- Your endpoint should send its HTTP response as fast as possible. If + you wait too long, GitLab may decide the hook failed and retry it. +- Your endpoint should ALWAYS return a valid HTTP response. If you do + not do this then GitLab will think the hook failed and retry it. + Most HTTP libraries take care of this for you automatically but if + you are writing a low-level hook this is important to remember. +- GitLab ignores the HTTP status code returned by your endpoint. + ## SSL Verification By default, the SSL certificate of the webhook endpoint is verified based on -- cgit v1.2.1 From e449a6c05c734ff9e38e13013591d07d03c0fff6 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 4 May 2016 13:14:11 +0200 Subject: Added documentation on how to instrument methods [ci skip] --- doc/development/instrumentation.md | 129 +++++++++++++++++++++++++++++++++++-- 1 file changed, 123 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/development/instrumentation.md b/doc/development/instrumentation.md index c1cf2e77c26..9168c70945a 100644 --- a/doc/development/instrumentation.md +++ b/doc/development/instrumentation.md @@ -1,12 +1,125 @@ # Instrumenting Ruby Code -GitLab Performance Monitoring allows instrumenting of custom blocks of Ruby -code. This can be used to measure the time spent in a specific part of a larger -chunk of code. The resulting data is stored as a field in the transaction that -executed the block. +GitLab Performance Monitoring allows instrumenting of both methods and custom +blocks of Ruby code. Method instrumentation is the primary form of +instrumentation with block-based instrumentation only being used when we want to +drill down to specific regions of code within a method. -To start measuring a block of Ruby code you should use `Gitlab::Metrics.measure` -and give it a name: +## Instrumenting Methods + +Instrumenting methods is done by using the `Gitlab::Metrics::Instrumentation` +module. This module offers a few different methods that can be used to +instrument code: + +* `instrument_method`: instruments a single class method. +* `instrument_instance_method`: instruments a single instance method. +* `instrument_class_hierarchy`: given a Class this method will recursively + instrument all sub-classes (both class and instance methods). +* `instrument_methods`: instruments all public class methods of a Module. +* `instrument_instance_methods`: instruments all public instance methods of a + Module. + +To remove the need for typing the full `Gitlab::Metrics::Instrumentation` +namespace you can use the `configure` class method. This method simply yields +the supplied block while passing `Gitlab::Metrics::Instrumentation` as its +argument. An example: + +``` +Gitlab::Metrics::Instrumentation.configure do |conf| + conf.instrument_method(Foo, :bar) + conf.instrument_method(Foo, :baz) +end +``` + +Using this method is in general preferred over directly calling the various +instrumentation methods. + +Method instrumentation should be added in the initializer +`config/initializers/metrics.rb`. + +### Examples + +Instrumenting a single method: + +``` +Gitlab::Metrics::Instrumentation.configure do |conf| + conf.instrument_method(User, :find_by) +end +``` + +Instrumenting an entire class hierarchy: + +``` +Gitlab::Metrics::Instrumentation.configure do |conf| + conf.instrument_class_hierarchy(ActiveRecord::Base) +end +``` + +Instrumenting all public class methods: + +``` +Gitlab::Metrics::Instrumentation.configure do |conf| + conf.instrument_methods(User) +end +``` + +### Checking Instrumented Methods + +The easiest way to check if a method has been instrumented is to check its +source location. For example: + +``` +method = Rugged::TagCollection.instance_method(:[]) + +method.source_location +``` + +If the source location points to `lib/gitlab/metrics/instrumentation.rb` you +know the method has been instrumented. + +If you're using Pry you can use the `$` command to display the source code of a +method (along with its source location), this is easier than running the above +Ruby code. In case of the above snippet you'd run the following: + +``` +$ Rugged::TagCollection#[] +``` + +This will print out something along the lines of: + +``` +From: /path/to/your/gitlab/lib/gitlab/metrics/instrumentation.rb @ line 148: +Owner: # +Visibility: public +Number of lines: 21 + +def #{name}(#{args_signature}) + trans = Gitlab::Metrics::Instrumentation.transaction + + if trans + start = Time.now + retval = super + duration = (Time.now - start) * 1000.0 + + if duration >= Gitlab::Metrics.method_call_threshold + trans.increment(:method_duration, duration) + + trans.add_metric(Gitlab::Metrics::Instrumentation::SERIES, + { duration: duration }, + method: #{label.inspect}) + end + + retval + else + super + end +end +``` + +## Instrumenting Ruby Blocks + +Measuring blocks of Ruby code is done by calling `Gitlab::Metrics.measure` and +passing it a block. For example: ```ruby Gitlab::Metrics.measure(:foo) do @@ -14,6 +127,10 @@ Gitlab::Metrics.measure(:foo) do end ``` +The block is executed and the execution time is stored as a set of fields in the +currently running transaction. If no transaction is present the block is yielded +without measuring anything. + 3 values are measured for a block: 1. The real time elapsed, stored in NAME_real_time. -- cgit v1.2.1 From 80b30500e44b621c0ecd3c062349b34ddbb0a0fb Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Fri, 6 May 2016 00:42:13 +0000 Subject: blost -> blog --- doc/ci/examples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ci/examples/README.md b/doc/ci/examples/README.md index cc059dc4376..3a152c9116a 100644 --- a/doc/ci/examples/README.md +++ b/doc/ci/examples/README.md @@ -10,6 +10,6 @@ ## Outside the documentation -- [Blost post about using GitLab CI for iOS projects](https://about.gitlab.com/2016/03/10/setting-up-gitlab-ci-for-ios-projects/) +- [Blog post about using GitLab CI for iOS projects](https://about.gitlab.com/2016/03/10/setting-up-gitlab-ci-for-ios-projects/) - [Repo's with examples for various languages](https://gitlab.com/groups/gitlab-examples) - [The .gitlab-ci.yml file for GitLab itself](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml) -- cgit v1.2.1 From 76f43d5ce2e784067a04b64ea1838e1de459287d Mon Sep 17 00:00:00 2001 From: Fabio Huser Date: Sun, 1 May 2016 22:48:26 +0200 Subject: docs(api): adapted user API documentation to match with latest API The user API documentation and the actual implementation were out of sync, missing certain newly introduced fields and beeing inconsistent between certain API definitions. The documentation was changed according the actual latest implementation. Signed-off-by: Fabio Huser --- doc/api/users.md | 80 ++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 22 deletions(-) (limited to 'doc') diff --git a/doc/api/users.md b/doc/api/users.md index 7d2b4897cff..7e848586dbd 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -20,6 +20,7 @@ GET /users "name": "John Smith", "state": "active", "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg", + "web_url": "http://localhost:3000/u/john_smith" }, { "id": 2, @@ -27,6 +28,7 @@ GET /users "name": "Jack Smith", "state": "blocked", "avatar_url": "http://gravatar.com/../e32131cd8.jpeg", + "web_url": "http://localhost:3000/u/jack_smith" } ] ``` @@ -45,21 +47,31 @@ GET /users "email": "john@example.com", "name": "John Smith", "state": "active", + "avatar_url": "http://localhost:3000/uploads/user/avatar/1/index.jpg", + "web_url": "http://localhost:3000/u/john_smith", "created_at": "2012-05-23T08:00:58Z", + "is_admin": false, "bio": null, + "location": null, "skype": "", "linkedin": "", "twitter": "", "website_url": "", - "extern_uid": "john.smith", - "provider": "provider_name", + "last_sign_in_at": "2012-06-01T11:41:01Z", + "confirmed_at": "2012-05-23T09:05:22Z", "theme_id": 1, "color_scheme_id": 2, - "is_admin": false, - "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg", + "projects_limit": 100, + "current_sign_in_at": "2012-06-02T06:36:55Z", + "identities": [ + {"provider": "github", "extern_uid": "2435223452345"}, + {"provider": "bitbucket", "extern_uid": "john.smith"}, + {"provider": "google_oauth2", "extern_uid": "8776128412476123468721346"} + ], "can_create_group": true, - "current_sign_in_at": "2014-03-19T13:12:15Z", - "two_factor_enabled": true + "can_create_project": true, + "two_factor_enabled": true, + "external": false }, { "id": 2, @@ -67,24 +79,27 @@ GET /users "email": "jack@example.com", "name": "Jack Smith", "state": "blocked", + "avatar_url": "http://localhost:3000/uploads/user/avatar/2/index.jpg", + "web_url": "http://localhost:3000/u/jack_smith", "created_at": "2012-05-23T08:01:01Z", + "is_admin": false, "bio": null, "location": null, "skype": "", "linkedin": "", "twitter": "", "website_url": "", - "extern_uid": "jack.smith", - "provider": "provider_name", + "last_sign_in_at": null, + "confirmed_at": "2012-05-30T16:53:06.148Z", "theme_id": 1, "color_scheme_id": 3, - "is_admin": false, - "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg", - "can_create_group": true, - "can_create_project": true, "projects_limit": 100, "current_sign_in_at": "2014-03-19T17:54:13Z", - "two_factor_enabled": false + "identities": [], + "can_create_group": true, + "can_create_project": true, + "two_factor_enabled": true, + "external": false } ] ``` @@ -124,6 +139,7 @@ Parameters: "name": "John Smith", "state": "active", "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg", + "web_url": "http://localhost:3000/u/john_smith", "created_at": "2012-05-23T08:00:58Z", "is_admin": false, "bio": null, @@ -152,23 +168,31 @@ Parameters: "email": "john@example.com", "name": "John Smith", "state": "active", + "avatar_url": "http://localhost:3000/uploads/user/avatar/1/index.jpg", + "web_url": "http://localhost:3000/u/john_smith", "created_at": "2012-05-23T08:00:58Z", - "confirmed_at": "2012-05-23T08:00:58Z", - "last_sign_in_at": "2015-03-23T08:00:58Z", + "is_admin": false, "bio": null, "location": null, "skype": "", "linkedin": "", "twitter": "", "website_url": "", - "extern_uid": "john.smith", - "provider": "provider_name", + "last_sign_in_at": "2012-06-01T11:41:01Z", + "confirmed_at": "2012-05-23T09:05:22Z", "theme_id": 1, "color_scheme_id": 2, - "is_admin": false, + "projects_limit": 100, + "current_sign_in_at": "2012-06-02T06:36:55Z", + "identities": [ + {"provider": "github", "extern_uid": "2435223452345"}, + {"provider": "bitbucket", "extern_uid": "john.smith"}, + {"provider": "google_oauth2", "extern_uid": "8776128412476123468721346"} + ], "can_create_group": true, "can_create_project": true, - "projects_limit": 100 + "two_factor_enabled": true, + "external": false } ``` @@ -261,21 +285,33 @@ GET /user "username": "john_smith", "email": "john@example.com", "name": "John Smith", - "private_token": "dd34asd13as", "state": "active", + "avatar_url": "http://localhost:3000/uploads/user/avatar/1/index.jpg", + "web_url": "http://localhost:3000/u/john_smith", "created_at": "2012-05-23T08:00:58Z", + "is_admin": false, "bio": null, "location": null, "skype": "", "linkedin": "", "twitter": "", "website_url": "", + "last_sign_in_at": "2012-06-01T11:41:01Z", + "confirmed_at": "2012-05-23T09:05:22Z", "theme_id": 1, "color_scheme_id": 2, - "is_admin": false, + "projects_limit": 100, + "current_sign_in_at": "2012-06-02T06:36:55Z", + "identities": [ + {"provider": "github", "extern_uid": "2435223452345"}, + {"provider": "bitbucket", "extern_uid": "john_smith"}, + {"provider": "google_oauth2", "extern_uid": "8776128412476123468721346"} + ], "can_create_group": true, "can_create_project": true, - "projects_limit": 100 + "two_factor_enabled": true, + "external": false, + "private_token": "dd34asd13as" } ``` -- cgit v1.2.1 From dd4fe8e9bbdd1f9874f20fbbd481bf56158f4f0c Mon Sep 17 00:00:00 2001 From: Takuya Noguchi Date: Sat, 7 May 2016 13:09:27 +0900 Subject: Update CI example docs. --- doc/ci/examples/README.md | 2 +- .../examples/test-and-deploy-python-application-to-heroku.md | 10 +++++----- doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/ci/examples/README.md b/doc/ci/examples/README.md index cc059dc4376..31760d872b2 100644 --- a/doc/ci/examples/README.md +++ b/doc/ci/examples/README.md @@ -4,7 +4,7 @@ - [Test and deploy a Ruby application to Heroku](test-and-deploy-ruby-application-to-heroku.md) - [Test and deploy a Python application to Heroku](test-and-deploy-python-application-to-heroku.md) - [Test a Clojure application](test-clojure-application.md) -- [Using `dpl` as deployment tool](deployment/README.md) +- [Using `dpl` as deployment tool](../deployment/README.md) - Help your favorite programming language and GitLab by sending a merge request with a guide for that language. diff --git a/doc/ci/examples/test-and-deploy-python-application-to-heroku.md b/doc/ci/examples/test-and-deploy-python-application-to-heroku.md index a236da53fe9..e4d3970deac 100644 --- a/doc/ci/examples/test-and-deploy-python-application-to-heroku.md +++ b/doc/ci/examples/test-and-deploy-python-application-to-heroku.md @@ -8,7 +8,7 @@ This is what the `.gitlab-ci.yml` file looks like for this project: ```yaml test: script: - # this configures django application to use attached postgres database that is run on `postgres` host + # this configures Django application to use attached postgres database that is run on `postgres` host - export DATABASE_URL=postgres://postgres:@postgres:5432/python-test-app - apt-get update -qy - apt-get install -y python-dev python-pip @@ -37,7 +37,7 @@ production: ``` This project has three jobs: -1. `test` - used to test rails application, +1. `test` - used to test Django application, 2. `staging` - used to automatically deploy staging environment every push to `master` branch 3. `production` - used to automatically deploy production environmnet for every created tag @@ -61,12 +61,12 @@ gitlab-ci-multi-runner register \ --non-interactive \ --url "https://gitlab.com/ci/" \ --registration-token "PROJECT_REGISTRATION_TOKEN" \ - --description "python-3.2" \ + --description "python-3.5" \ --executor "docker" \ - --docker-image python:3.2 \ + --docker-image python:3.5 \ --docker-postgres latest ``` -With the command above, you create a runner that uses [python:3.2](https://registry.hub.docker.com/u/library/python/) image and uses [postgres](https://registry.hub.docker.com/u/library/postgres/) database. +With the command above, you create a runner that uses [python:3.5](https://hub.docker.com/r/_/python/) image and uses [postgres](https://hub.docker.com/r/_/postgres/) database. To access PostgreSQL database you need to connect to `host: postgres` as user `postgres` without password. diff --git a/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md b/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md index f5645d586ae..08c10d391ea 100644 --- a/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md +++ b/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md @@ -1,5 +1,5 @@ ## Test and Deploy a ruby application -This example will guide you how to run tests in your Ruby application and deploy it automatically as Heroku application. +This example will guide you how to run tests in your Ruby on Rails application and deploy it automatically as Heroku application. You can checkout the example [source](https://gitlab.com/ayufan/ruby-getting-started) and check [CI status](https://gitlab.com/ayufan/ruby-getting-started/builds?scope=all). @@ -32,7 +32,7 @@ production: ``` This project has three jobs: -1. `test` - used to test rails application, +1. `test` - used to test Rails application, 2. `staging` - used to automatically deploy staging environment every push to `master` branch 3. `production` - used to automatically deploy production environmnet for every created tag @@ -62,6 +62,6 @@ gitlab-ci-multi-runner register \ --docker-postgres latest ``` -With the command above, you create a runner that uses [ruby:2.2](https://registry.hub.docker.com/u/library/ruby/) image and uses [postgres](https://registry.hub.docker.com/u/library/postgres/) database. +With the command above, you create a runner that uses [ruby:2.2](https://hub.docker.com/r/_/ruby/) image and uses [postgres](https://hub.docker.com/r/_/postgres/) database. To access PostgreSQL database you need to connect to `host: postgres` as user `postgres` without password. -- cgit v1.2.1 From 95221312599a88b2f7898a22b2fa5b47d3b61f8c Mon Sep 17 00:00:00 2001 From: Takuya Noguchi Date: Sat, 7 May 2016 13:29:24 +0900 Subject: Update Docker Hub links. --- doc/ci/docker/using_docker_images.md | 6 +++--- doc/ci/examples/php.md | 6 +++--- doc/ci/services/mysql.md | 4 ++-- doc/ci/services/postgres.md | 2 +- doc/ci/services/redis.md | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/ci/docker/using_docker_images.md b/doc/ci/docker/using_docker_images.md index 84212fb3c61..ab7369ce972 100644 --- a/doc/ci/docker/using_docker_images.md +++ b/doc/ci/docker/using_docker_images.md @@ -273,7 +273,7 @@ creation. [Docker Fundamentals]: https://docs.docker.com/engine/understanding-docker/ [hub]: https://hub.docker.com/ [linking-containers]: https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/ -[tutum/wordpress]: https://registry.hub.docker.com/u/tutum/wordpress/ -[postgres-hub]: https://registry.hub.docker.com/u/library/postgres/ -[mysql-hub]: https://registry.hub.docker.com/u/library/mysql/ +[tutum/wordpress]: https://hub.docker.com/r/tutum/wordpress/ +[postgres-hub]: https://hub.docker.com/r/_/postgres/ +[mysql-hub]: https://hub.docker.com/r/_/mysql/ [runner-priv-reg]: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/configuration/advanced-configuration.md#using-a-private-docker-registry diff --git a/doc/ci/examples/php.md b/doc/ci/examples/php.md index db077927126..26953014502 100644 --- a/doc/ci/examples/php.md +++ b/doc/ci/examples/php.md @@ -60,7 +60,7 @@ docker-php-ext-install pdo_mysql You might wonder what `docker-php-ext-install` is. In short, it is a script provided by the official php docker image that you can use to easilly install extensions. For more information read the the documentation at -. +. Now that we created the script that contains all prerequisites for our build environment, let's add it in `.gitlab-ci.yml`: @@ -92,7 +92,7 @@ Finally, commit your files and push them to GitLab to see your build succeeding The final `.gitlab-ci.yml` should look similar to this: ```yaml -# Select image from https://hub.docker.com/_/php/ +# Select image from https://hub.docker.com/r/_/php/ image: php:5.6 before_script: @@ -278,7 +278,7 @@ that runs on [GitLab.com](https://gitlab.com) using our publicly available Want to hack on it? Simply fork it, commit and push your changes. Within a few moments the changes will be picked by a public runner and the build will begin. -[php-hub]: https://hub.docker.com/_/php/ +[php-hub]: https://hub.docker.com/r/_/php/ [phpenv]: https://github.com/phpenv/phpenv [phpenv-installation]: https://github.com/phpenv/phpenv#installation [php-example-repo]: https://gitlab.com/gitlab-examples/php diff --git a/doc/ci/services/mysql.md b/doc/ci/services/mysql.md index c66d77122b2..aaf3aa77837 100644 --- a/doc/ci/services/mysql.md +++ b/doc/ci/services/mysql.md @@ -16,7 +16,7 @@ services: - mysql:latest variables: - # Configure mysql environment variables (https://hub.docker.com/_/mysql/) + # Configure mysql environment variables (https://hub.docker.com/r/_/mysql/) MYSQL_DATABASE: el_duderino MYSQL_ROOT_PASSWORD: mysql_strong_password ``` @@ -114,5 +114,5 @@ available [shared runners](../runners/README.md). Want to hack on it? Simply fork it, commit and push your changes. Within a few moments the changes will be picked by a public runner and the build will begin. -[hub-mysql]: https://hub.docker.com/_/mysql/ +[hub-mysql]: https://hub.docker.com/r/_/mysql/ [mysql-example-repo]: https://gitlab.com/gitlab-examples/mysql diff --git a/doc/ci/services/postgres.md b/doc/ci/services/postgres.md index 17d21dbda1c..f787cc0a124 100644 --- a/doc/ci/services/postgres.md +++ b/doc/ci/services/postgres.md @@ -110,5 +110,5 @@ available [shared runners](../runners/README.md). Want to hack on it? Simply fork it, commit and push your changes. Within a few moments the changes will be picked by a public runner and the build will begin. -[hub-pg]: https://hub.docker.com/_/postgres/ +[hub-pg]: https://hub.docker.com/r/_/postgres/ [postgres-example-repo]: https://gitlab.com/gitlab-examples/postgres diff --git a/doc/ci/services/redis.md b/doc/ci/services/redis.md index b281e8f9f60..80705024d2f 100644 --- a/doc/ci/services/redis.md +++ b/doc/ci/services/redis.md @@ -65,5 +65,5 @@ that runs on [GitLab.com](https://gitlab.com) using our publicly available Want to hack on it? Simply fork it, commit and push your changes. Within a few moments the changes will be picked by a public runner and the build will begin. -[hub-redis]: https://hub.docker.com/_/redis/ +[hub-redis]: https://hub.docker.com/r/_/redis/ [redis-example-repo]: https://gitlab.com/gitlab-examples/redis -- cgit v1.2.1 From 3c8265559a6965411c5c155a15fae4f2a822a532 Mon Sep 17 00:00:00 2001 From: Takuya Noguchi Date: Sat, 7 May 2016 14:54:36 +0900 Subject: Rename Docker with Docker Engine. --- doc/ci/docker/using_docker_build.md | 6 +++--- doc/ci/docker/using_docker_images.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/ci/docker/using_docker_build.md b/doc/ci/docker/using_docker_build.md index 5fb086b1dd9..ca52a483a59 100644 --- a/doc/ci/docker/using_docker_build.md +++ b/doc/ci/docker/using_docker_build.md @@ -41,9 +41,9 @@ GitLab Runner then executes build scripts as `gitlab-runner` user. --description "My Runner" ``` -2. Install Docker on server. +2. Install Docker Engine on server. - For more information how to install Docker on different systems checkout the [Supported installations](https://docs.docker.com/installation/). + For more information how to install Docker Engine on different systems checkout the [Supported installations](https://docs.docker.com/engine/installation/). 3. Add `gitlab-runner` user to `docker` group: @@ -151,4 +151,4 @@ In order to do that follow the steps: An example project using this approach can be found here: https://gitlab.com/gitlab-examples/docker. [docker-in-docker]: https://blog.docker.com/2013/09/docker-can-now-run-within-docker/ -[docker-cap]: https://docs.docker.com/reference/run/#runtime-privilege-and-linux-capabilities +[docker-cap]: https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities diff --git a/doc/ci/docker/using_docker_images.md b/doc/ci/docker/using_docker_images.md index ab7369ce972..56ac2195c49 100644 --- a/doc/ci/docker/using_docker_images.md +++ b/doc/ci/docker/using_docker_images.md @@ -64,7 +64,7 @@ You can see some widely used services examples in the relevant documentation of ### How is service linked to the build To better understand how the container linking works, read -[Linking containers together](https://docs.docker.com/userguide/dockerlinks/). +[Linking containers together][linking-containers]. To summarize, if you add `mysql` as service to your application, the image will then be used to create a container that is linked to the build container. -- cgit v1.2.1 From e129df53e1760b678b8c478787bf69253f8a1eaf Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Sun, 8 May 2016 09:38:24 +0100 Subject: Update build triggers API documentation (#10153) Update build triggers API documentation [ci skip] * Ensure updated/deleted timestamps are consistent --- doc/api/build_triggers.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api/build_triggers.md b/doc/api/build_triggers.md index 4a12e962b62..0881a7d7a90 100644 --- a/doc/api/build_triggers.md +++ b/doc/api/build_triggers.md @@ -101,8 +101,18 @@ DELETE /projects/:id/triggers/:token | Attribute | Type | required | Description | |-----------|---------|----------|--------------------------| | `id` | integer | yes | The ID of a project | -| `token` | string | yes | The `token` of a project | +| `token` | string | yes | The `token` of a trigger | ``` curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d" ``` + +```json +{ + "created_at": "2015-12-23T16:25:56.760Z", + "deleted_at": "2015-12-24T12:32:20.100Z", + "last_used": null, + "token": "7b9148c158980bbd9bcea92c17522d", + "updated_at": "2015-12-24T12:32:20.100Z" +} +``` -- cgit v1.2.1 From 5bd32954f619b521496bca200a0ed31615b8e736 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 9 May 2016 13:52:20 +0200 Subject: Remove space --- doc/web_hooks/web_hooks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md index 6ffdb18339e..45506ac1d7c 100644 --- a/doc/web_hooks/web_hooks.md +++ b/doc/web_hooks/web_hooks.md @@ -16,7 +16,7 @@ Webhooks can be used to update an external issue tracker, trigger CI builds, upd ## Webhook endpoint tips If you are writing your own endpoint (web server) that will receive -GitLab web hooks keep in mind the following things: +GitLab webhooks keep in mind the following things: - Your endpoint should send its HTTP response as fast as possible. If you wait too long, GitLab may decide the hook failed and retry it. -- cgit v1.2.1 From 5364400741b7d041c945ccca98283bc465d5a87c Mon Sep 17 00:00:00 2001 From: cnam-dep Date: Wed, 24 Feb 2016 00:59:32 +0300 Subject: API: Expose Issue#user_notes_count --- doc/api/issues.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/api/issues.md b/doc/api/issues.md index 3e78149f442..fc7a7ae0c0c 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -77,7 +77,8 @@ Example response: "created_at" : "2016-01-04T15:31:51.081Z", "iid" : 6, "labels" : [], - "subscribed" : false + "subscribed" : false, + "user_notes_count": 1 } ] ``` @@ -154,7 +155,8 @@ Example response: "title" : "Ut commodi ullam eos dolores perferendis nihil sunt.", "updated_at" : "2016-01-04T15:31:46.176Z", "created_at" : "2016-01-04T15:31:46.176Z", - "subscribed" : false + "subscribed" : false, + "user_notes_count": 1 } ] ``` @@ -216,7 +218,8 @@ Example response: "title" : "Ut commodi ullam eos dolores perferendis nihil sunt.", "updated_at" : "2016-01-04T15:31:46.176Z", "created_at" : "2016-01-04T15:31:46.176Z", - "subscribed": false + "subscribed": false, + "user_notes_count": 1 } ``` @@ -271,7 +274,8 @@ Example response: "description" : null, "updated_at" : "2016-01-07T12:44:33.959Z", "milestone" : null, - "subscribed" : true + "subscribed" : true, + "user_notes_count": 0 } ``` @@ -329,7 +333,8 @@ Example response: "id" : 85, "assignee" : null, "milestone" : null, - "subscribed" : true + "subscribed" : true, + "user_notes_count": 0 } ``` -- cgit v1.2.1 From f5240f9703fea9902ac4304b8e12daed5c21820d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Tue, 15 Mar 2016 16:17:24 +0100 Subject: Expose MergeRequest#user_notes_count in the API and use the method in issues list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- doc/api/merge_requests.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 2057f9d77aa..8217e30fe25 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -67,7 +67,8 @@ Parameters: }, "merge_when_build_succeeds": true, "merge_status": "can_be_merged", - "subscribed" : false + "subscribed" : false, + "user_notes_count": 1 } ] ``` @@ -130,7 +131,8 @@ Parameters: }, "merge_when_build_succeeds": true, "merge_status": "can_be_merged", - "subscribed" : true + "subscribed" : true, + "user_notes_count": 1 } ``` @@ -230,6 +232,7 @@ Parameters: "merge_when_build_succeeds": true, "merge_status": "can_be_merged", "subscribed" : true, + "user_notes_count": 1, "changes": [ { "old_path": "VERSION", @@ -308,7 +311,8 @@ Parameters: }, "merge_when_build_succeeds": true, "merge_status": "can_be_merged", - "subscribed" : true + "subscribed" : true, + "user_notes_count": 0 } ``` @@ -378,7 +382,8 @@ Parameters: }, "merge_when_build_succeeds": true, "merge_status": "can_be_merged", - "subscribed" : true + "subscribed" : true, + "user_notes_count": 1 } ``` @@ -472,7 +477,8 @@ Parameters: }, "merge_when_build_succeeds": true, "merge_status": "can_be_merged", - "subscribed" : true + "subscribed" : true, + "user_notes_count": 1 } ``` @@ -537,7 +543,8 @@ Parameters: }, "merge_when_build_succeeds": true, "merge_status": "can_be_merged", - "subscribed" : true + "subscribed" : true, + "user_notes_count": 1 } ``` @@ -602,7 +609,8 @@ Example response: "title" : "Consequatur vero maxime deserunt laboriosam est voluptas dolorem.", "created_at" : "2016-01-04T15:31:51.081Z", "iid" : 6, - "labels" : [] + "labels" : [], + "user_notes_count": 1 }, ] ``` -- cgit v1.2.1 From 63c45fa75b2fb6519106417d58fe879db352b812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 9 May 2016 15:21:23 +0000 Subject: Revert "Merge branch 'patch-1' into 'master'" This reverts merge request !4030 --- doc/api/notes.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/api/notes.md b/doc/api/notes.md index a6b5b1787fd..7aa1c2155bf 100644 --- a/doc/api/notes.md +++ b/doc/api/notes.md @@ -15,7 +15,7 @@ GET /projects/:id/issues/:issue_id/notes Parameters: - `id` (required) - The ID of a project -- `issue_id` (required) - The IID of an issue (not ID) +- `issue_id` (required) - The ID of an issue ```json [ @@ -73,7 +73,7 @@ GET /projects/:id/issues/:issue_id/notes/:note_id Parameters: - `id` (required) - The ID of a project -- `issue_id` (required) - The IID of a project issue (not ID) +- `issue_id` (required) - The ID of a project issue - `note_id` (required) - The ID of an issue note ### Create new issue note @@ -87,7 +87,7 @@ POST /projects/:id/issues/:issue_id/notes Parameters: - `id` (required) - The ID of a project -- `issue_id` (required) - The IID of an issue (not ID) +- `issue_id` (required) - The ID of an issue - `body` (required) - The content of a note - `created_at` (optional) - Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z @@ -102,7 +102,7 @@ PUT /projects/:id/issues/:issue_id/notes/:note_id Parameters: - `id` (required) - The ID of a project -- `issue_id` (required) - The IID of an issue (not ID) +- `issue_id` (required) - The ID of an issue - `note_id` (required) - The ID of a note - `body` (required) - The content of a note @@ -120,7 +120,7 @@ Parameters: | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `id` | integer | yes | The ID of a project | -| `issue_id` | integer | yes | The IID of an issue | +| `issue_id` | integer | yes | The ID of an issue | | `note_id` | integer | yes | The ID of a note | ```bash -- cgit v1.2.1 From 0094d8f19644152a66b9d21b8cd86f797199311f Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 9 May 2016 20:29:57 +0300 Subject: Rename `images` to `container_registry` --- doc/permissions/permissions.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/permissions/permissions.md b/doc/permissions/permissions.md index 6219693b8a8..6be5ea0b486 100644 --- a/doc/permissions/permissions.md +++ b/doc/permissions/permissions.md @@ -27,6 +27,7 @@ documentation](../workflow/add-user/add-user.md). | Manage issue tracker | | ✓ | ✓ | ✓ | ✓ | | Manage labels | | ✓ | ✓ | ✓ | ✓ | | See a commit status | | ✓ | ✓ | ✓ | ✓ | +| See a container registry | | ✓ | ✓ | ✓ | ✓ | | Manage merge requests | | | ✓ | ✓ | ✓ | | Create new merge request | | | ✓ | ✓ | ✓ | | Create new branches | | | ✓ | ✓ | ✓ | @@ -37,6 +38,7 @@ documentation](../workflow/add-user/add-user.md). | Write a wiki | | | ✓ | ✓ | ✓ | | Cancel and retry builds | | | ✓ | ✓ | ✓ | | Create or update commit status | | | ✓ | ✓ | ✓ | +| Update a container registry | | | ✓ | ✓ | ✓ | | Create new milestones | | | | ✓ | ✓ | | Add new team members | | | | ✓ | ✓ | | Push to protected branches | | | | ✓ | ✓ | -- cgit v1.2.1 From 9f679ac2079dc1d412aaaed806c3d06bdc071046 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 9 May 2016 20:35:25 +0300 Subject: Update docs/api/projects.md with container registry enabled option --- doc/api/projects.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/api/projects.md b/doc/api/projects.md index de1faadebf5..f5f195b97df 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -424,6 +424,7 @@ Parameters: - `builds_enabled` (optional) - `wiki_enabled` (optional) - `snippets_enabled` (optional) +- `container_registry_enabled` (optional) - `public` (optional) - if `true` same as setting visibility_level = 20 - `visibility_level` (optional) - `import_url` (optional) @@ -447,6 +448,7 @@ Parameters: - `builds_enabled` (optional) - `wiki_enabled` (optional) - `snippets_enabled` (optional) +- `container_registry_enabled` (optional) - `public` (optional) - if `true` same as setting visibility_level = 20 - `visibility_level` (optional) - `import_url` (optional) @@ -472,6 +474,7 @@ Parameters: - `builds_enabled` (optional) - `wiki_enabled` (optional) - `snippets_enabled` (optional) +- `container_registry_enabled` (optional) - `public` (optional) - if `true` same as setting visibility_level = 20 - `visibility_level` (optional) - `public_builds` (optional) -- cgit v1.2.1 From b5043d5d33ed2a213889dfe52c819addd0d847ef Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 9 May 2016 22:34:24 +0300 Subject: Fix review comments --- doc/permissions/permissions.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/permissions/permissions.md b/doc/permissions/permissions.md index 6be5ea0b486..30f6c75e1cf 100644 --- a/doc/permissions/permissions.md +++ b/doc/permissions/permissions.md @@ -39,6 +39,7 @@ documentation](../workflow/add-user/add-user.md). | Cancel and retry builds | | | ✓ | ✓ | ✓ | | Create or update commit status | | | ✓ | ✓ | ✓ | | Update a container registry | | | ✓ | ✓ | ✓ | +| Remove a container registry images | | | ✓ | ✓ | ✓ | | Create new milestones | | | | ✓ | ✓ | | Add new team members | | | | ✓ | ✓ | | Push to protected branches | | | | ✓ | ✓ | -- cgit v1.2.1 From 973cd0fec7b69d1398a86df67d10f7c38a9a4ced Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Wed, 11 May 2016 18:08:17 +0300 Subject: Update 8.8 guides --- doc/install/installation.md | 2 +- doc/update/8.7-to-8.8.md | 154 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 doc/update/8.7-to-8.8.md (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index e3af3022262..44ae0be406c 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -269,7 +269,7 @@ sudo usermod -aG redis git ### Clone the Source # Clone GitLab repository - sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 8-7-stable gitlab + sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 8-8-stable gitlab **Note:** You can change `8-7-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! diff --git a/doc/update/8.7-to-8.8.md b/doc/update/8.7-to-8.8.md new file mode 100644 index 00000000000..b4d9212289c --- /dev/null +++ b/doc/update/8.7-to-8.8.md @@ -0,0 +1,154 @@ +# From 8.7 to 8.8 + +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. 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-8-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 8-8-stable-ee +``` + +### 4. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch --all --tags +sudo -u git -H git checkout v2.7.2 +``` + +### 5. 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.1 +sudo -u git -H make +``` + +### 6. 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 + +``` + +### 7. Update configuration files + +#### Git configuration + +Disable `git gc --auto` because GitLab runs `git gc` for us already. + +```sh +sudo -u git -H git config --global gc.auto 0 +``` + +#### Nginx configuration + +Ensure you're still up-to-date with the latest NGINX configuration changes: + +```sh +# For HTTPS configurations +git diff origin/8-7-stable:lib/support/nginx/gitlab-ssl origin/8-8-stable:lib/support/nginx/gitlab-ssl + +# For HTTP configurations +git diff origin/8-7-stable:lib/support/nginx/gitlab origin/8-8-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-8-stable/lib/support/init.d/gitlab.default.example#L37 + +#### 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 + +### 8. Start application + + sudo service gitlab start + sudo service nginx restart + +### 9. 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.6) + +### 1. Revert the code to the previous version + +Follow the [upgrade guide from 8.6 to 8.7](8.6-to-8.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. -- cgit v1.2.1 From 3a91f5081eeeef8dca52a418aba2d786cbc8ddf4 Mon Sep 17 00:00:00 2001 From: Andrei Gliga Date: Tue, 10 May 2016 11:53:22 +0300 Subject: documentation for enabling or disabling OAuth sign in --- doc/integration/img/enabled-oauth-sign-in-sources.png | Bin 0 -> 49081 bytes doc/integration/omniauth.md | 14 ++++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 doc/integration/img/enabled-oauth-sign-in-sources.png (limited to 'doc') diff --git a/doc/integration/img/enabled-oauth-sign-in-sources.png b/doc/integration/img/enabled-oauth-sign-in-sources.png new file mode 100644 index 00000000000..95f8bbdcd24 Binary files /dev/null and b/doc/integration/img/enabled-oauth-sign-in-sources.png differ diff --git a/doc/integration/omniauth.md b/doc/integration/omniauth.md index cab329c0dec..f0d7394005c 100644 --- a/doc/integration/omniauth.md +++ b/doc/integration/omniauth.md @@ -11,6 +11,7 @@ of the configured mechanisms. - [Supported Providers](#supported-providers) - [Enable OmniAuth for an Existing User](#enable-omniauth-for-an-existing-user) - [OmniAuth configuration sample when using Omnibus GitLab](https://gitlab.com/gitlab-org/omnibus-gitlab/tree/master#omniauth-google-twitter-github-login) +- [Enable or disable Sign In with an OmniAuth provider without disabling import sources](#enable-or-disable-sign-in-with-an-omniauth-provider-without-disabling-import-sources) ## Supported Providers @@ -191,3 +192,16 @@ experience [in the public Wiki](https://github.com/gitlabhq/gitlab-public-wiki/w While we can't officially support every possible authentication mechanism out there, we'd like to at least help those with specific needs. + +## Enable or disable Sign In with an OmniAuth provider without disabling import sources +>**Note:** +This setting was introduced with version 8.8 of GitLab + +Administrators are able to enable or disable Sign In via some OmniAuth providers. + +>**Note:** +By default Sign In is enabled via all the OAuth Providers that have been configured in config/gitlab.yml. + +In order to enable/disable an OmniAuth provider go to Admin Area -> Settings-> Sign-in Restrictions section -> Enabled OAuth Sign-In sources and select the providers you want to enable or disable. + +![Enabled OAuth Sign-In sources](img/enabled-oauth-sign-in-sources.png) -- cgit v1.2.1 From 2a99c51590da3c430b27538a1f570d34209d51c7 Mon Sep 17 00:00:00 2001 From: Andrei Gliga Date: Tue, 10 May 2016 18:39:27 +0300 Subject: corrections to the Enable or disable Sign In with OmniAuth --- doc/integration/omniauth.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/integration/omniauth.md b/doc/integration/omniauth.md index f0d7394005c..f3e891fa457 100644 --- a/doc/integration/omniauth.md +++ b/doc/integration/omniauth.md @@ -194,14 +194,15 @@ While we can't officially support every possible authentication mechanism out th we'd like to at least help those with specific needs. ## Enable or disable Sign In with an OmniAuth provider without disabling import sources + >**Note:** -This setting was introduced with version 8.8 of GitLab +This setting was introduced with version 8.8 of GitLab. Administrators are able to enable or disable Sign In via some OmniAuth providers. >**Note:** By default Sign In is enabled via all the OAuth Providers that have been configured in config/gitlab.yml. -In order to enable/disable an OmniAuth provider go to Admin Area -> Settings-> Sign-in Restrictions section -> Enabled OAuth Sign-In sources and select the providers you want to enable or disable. +In order to enable/disable an OmniAuth provider, go to Admin Area -> Settings -> Sign-in Restrictions section -> Enabled OAuth Sign-In sources and select the providers you want to enable or disable. ![Enabled OAuth Sign-In sources](img/enabled-oauth-sign-in-sources.png) -- cgit v1.2.1 From 2576a55e35f06d2d59783867be5e7e2ccbed982e Mon Sep 17 00:00:00 2001 From: Andrei Gliga Date: Wed, 11 May 2016 19:52:06 +0300 Subject: config/gitlab.yml between `` --- doc/integration/omniauth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/integration/omniauth.md b/doc/integration/omniauth.md index f3e891fa457..820f40f81a9 100644 --- a/doc/integration/omniauth.md +++ b/doc/integration/omniauth.md @@ -201,7 +201,7 @@ This setting was introduced with version 8.8 of GitLab. Administrators are able to enable or disable Sign In via some OmniAuth providers. >**Note:** -By default Sign In is enabled via all the OAuth Providers that have been configured in config/gitlab.yml. +By default Sign In is enabled via all the OAuth Providers that have been configured in `config/gitlab.yml`. In order to enable/disable an OmniAuth provider, go to Admin Area -> Settings -> Sign-in Restrictions section -> Enabled OAuth Sign-In sources and select the providers you want to enable or disable. -- cgit v1.2.1 From c0c2cd4ed72cda88e182f3eafb472687d9d075f1 Mon Sep 17 00:00:00 2001 From: Andrei Gliga Date: Wed, 11 May 2016 19:55:24 +0300 Subject: new screenshot for the docs on how to enabled/disable OmniAuth Sign In --- .../img/enabled-oauth-sign-in-sources.png | Bin 49081 -> 92674 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'doc') diff --git a/doc/integration/img/enabled-oauth-sign-in-sources.png b/doc/integration/img/enabled-oauth-sign-in-sources.png index 95f8bbdcd24..08155a4fade 100644 Binary files a/doc/integration/img/enabled-oauth-sign-in-sources.png and b/doc/integration/img/enabled-oauth-sign-in-sources.png differ -- cgit v1.2.1 From 5553ad24e4fe42670ba0f4e2010819abac499e7d Mon Sep 17 00:00:00 2001 From: Andrei Gliga Date: Thu, 12 May 2016 13:37:44 +0300 Subject: Revert "new screenshot for the docs on how to enabled/disable OmniAuth Sign In" [ci skip] This reverts commit 7b295370efc124360d52e37e8e709914028f6443. --- .../img/enabled-oauth-sign-in-sources.png | Bin 92674 -> 49081 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'doc') diff --git a/doc/integration/img/enabled-oauth-sign-in-sources.png b/doc/integration/img/enabled-oauth-sign-in-sources.png index 08155a4fade..95f8bbdcd24 100644 Binary files a/doc/integration/img/enabled-oauth-sign-in-sources.png and b/doc/integration/img/enabled-oauth-sign-in-sources.png differ -- cgit v1.2.1 From e8efaca23ce0b5aa347dfa053091d0b48e746fb8 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 9 May 2016 15:05:19 +0200 Subject: Updated migration styleguide for new helpers --- doc/development/migration_style_guide.md | 46 ++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index 28dedf3978c..1c13b094582 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -8,7 +8,10 @@ In addition, having to take a server offline for a an upgrade small or big is a big burden for most organizations. For this reason it is important that your migrations are written carefully, can be applied online and adhere to the style guide below. -It's advised to have offline migrations only in major GitLab releases. +Migrations should not require GitLab installations to be taken offline unless +_absolutely_ necessary. If a migration requires downtime this should be +clearly mentioned during the review process as well as being documented in the +monthly release post. When writing your migrations, also consider that databases might have stale data or inconsistencies and guard for that. Try to make as little assumptions as possible @@ -58,6 +61,45 @@ remove_index :namespaces, column: :name if index_exists?(:namespaces, :name) If you need to add an unique index please keep in mind there is possibility of existing duplicates. If it is possible write a separate migration for handling this situation. It can be just removing or removing with overwriting all references to these duplicates depend on situation. +When adding an index make sure to use the method `add_concurrent_index` instead +of the regular `add_index` method. The `add_concurrent_index` method +automatically creates concurrent indexes when using PostgreSQL, removing the +need for downtime. To use this method you must disable transactions by calling +the method `disable_ddl_transaction!` in the body of your migration class like +so: + +``` +class MyMigration < ActiveRecord::Migration + disable_ddl_transaction! + + def change + + end +end +``` + +## Adding Columns With Default Values + +When adding columns with default values you should use the method +`add_column_with_default`. This method ensures the table is updated without +requiring downtime. This method is not reversible so you must manually define +the `up` and `down` methods in your migration class. + +For example, to add the column `foo` to the `projects` table with a default +value of `10` you'd write the following: + +``` +class MyMigration < ActiveRecord::Migration + def up + add_column_with_default(:projects, :foo, :integer, 10) + end + + def down + remove_column(:projects, :foo) + end +end +``` + ## Testing Make sure that your migration works with MySQL and PostgreSQL with data. An empty database does not guarantee that your migration is correct. @@ -89,4 +131,4 @@ select_all("SELECT name, COUNT(id) as cnt FROM tags GROUP BY name HAVING COUNT(i execute("UPDATE taggings SET tag_id = #{origin_tag_id} WHERE tag_id IN(#{duplicate_ids.join(",")})") execute("DELETE FROM tags WHERE id IN(#{duplicate_ids.join(",")})") end -``` \ No newline at end of file +``` -- cgit v1.2.1 From 0c22698bd4dbe7d0d3e4a6c8bc946ac6f5de1c12 Mon Sep 17 00:00:00 2001 From: Ahmad Sherif Date: Thu, 12 May 2016 22:48:09 +0200 Subject: Add API endpoints for un/subscribing from/to a label Closes #15638 --- doc/api/labels.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'doc') diff --git a/doc/api/labels.md b/doc/api/labels.md index 3730c07c5a7..b857d81768e 100644 --- a/doc/api/labels.md +++ b/doc/api/labels.md @@ -165,3 +165,73 @@ Example response: "description": "Documentation" } ``` + +## Subscribe to a label + +Subscribes the authenticated user to a label to receive notifications. If the +operation is successful, status code `201` together with the updated label is +returned. If the user is already subscribed to the label, the status code `304` +is returned. If the project or label is not found, status code `404` is +returned. + +``` +POST /projects/:id/labels/:label_id/subscription +``` + +| Attribute | Type | Required | Description | +| ---------- | ----------------- | -------- | ------------------------------------ | +| `id` | integer | yes | The ID of a project | +| `label_id` | integer or string | yes | The ID or title of a project's label | + +```bash +curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/labels/1/subscription +``` + +Example response: + +```json +{ + "name": "Docs", + "color": "#cc0033", + "description": "", + "open_issues_count": 0, + "closed_issues_count": 0, + "open_merge_requests_count": 0, + "subscribed": true +} +``` + +## Unsubscribe from a label + +Unsubscribes the authenticated user from a label to not receive notifications +from it. If the operation is successful, status code `200` together with the +updated label is returned. If the user is not subscribed to the label, the +status code `304` is returned. If the project or label is not found, status code +`404` is returned. + +``` +DELETE /projects/:id/labels/:label_id/subscription +``` + +| Attribute | Type | Required | Description | +| ---------- | ----------------- | -------- | ------------------------------------ | +| `id` | integer | yes | The ID of a project | +| `label_id` | integer or string | yes | The ID or title of a project's label | + +```bash +curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/labels/1/subscription +``` + +Example response: + +```json +{ + "name": "Docs", + "color": "#cc0033", + "description": "", + "open_issues_count": 0, + "closed_issues_count": 0, + "open_merge_requests_count": 0, + "subscribed": false +} +``` -- cgit v1.2.1 From 935c684ad3427069431a1130d364a4481af6cb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Fri, 13 May 2016 18:39:32 +0200 Subject: Revert "Merge branch 'doc-fix-db-gem-install-instructions' into 'master' " This reverts commit 66d8ef1ad9d5952b7e7f026658f71aafc861950e, reversing changes made to 6a8359f3d3be01af6f5b124b61af7ee1c77c17d0. The `--with` option was added in Bundler 1.10 but in this case it shouldn't even be needed: I've tested the original command locally and the pg gem was installed, so I believe the user that opened the original MR ran the wrong command (i.e. `sudo -u git -H bundle install --without development test postgres --deployment` instead of `sudo -u git -H bundle install --without development test mysql --deployment`. See discussion at https://gitlab.com/gitlab-org/gitlab-ce/commit/66d8ef1ad9d5952b7e7f026658f71aafc861950e for more context. --- doc/update/patch_versions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/update/patch_versions.md b/doc/update/patch_versions.md index b4283a526f3..60729316cde 100644 --- a/doc/update/patch_versions.md +++ b/doc/update/patch_versions.md @@ -57,10 +57,10 @@ sudo -u git -H make cd /home/git/gitlab # PostgreSQL -sudo -u git -H bundle install --without development test mysql --with postgres --deployment +sudo -u git -H bundle install --without development test mysql --deployment # MySQL -sudo -u git -H bundle install --without development test postgres --with mysql --deployment +sudo -u git -H bundle install --without development test postgres --deployment # Optional: clean up old gems sudo -u git -H bundle clean -- cgit v1.2.1 From 9eb4569ed9330d65fb24e0272402fe5ac739b8be Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 13 May 2016 16:17:01 -0500 Subject: Change all occurrences of doc.gitlab.com to docs.gitlab.com [ci skip] --- doc/administration/environment_variables.md | 2 +- doc/administration/high_availability/load_balancer.md | 2 +- doc/administration/high_availability/nfs.md | 2 +- doc/api/services.md | 2 +- doc/development/doc_styleguide.md | 4 ++-- doc/gitlab-basics/create-issue.md | 2 +- doc/gitlab-basics/create-project.md | 2 +- doc/hooks/custom_hooks.md | 2 +- doc/install/installation.md | 2 +- doc/install/relative_url.md | 2 +- doc/integration/README.md | 2 +- doc/intro/README.md | 2 +- doc/logs/logs.md | 2 +- doc/raketasks/README.md | 2 +- doc/update/README.md | 6 +++--- doc/workflow/gitlab_flow.md | 4 ++-- doc/workflow/groups.md | 2 +- doc/workflow/importing/import_projects_from_github.md | 2 +- doc/workflow/importing/import_projects_from_gitlab_com.md | 2 +- doc/workflow/lfs/manage_large_binaries_with_git_lfs.md | 2 +- 20 files changed, 24 insertions(+), 24 deletions(-) (limited to 'doc') diff --git a/doc/administration/environment_variables.md b/doc/administration/environment_variables.md index 43ab153d76d..7f53915a4d7 100644 --- a/doc/administration/environment_variables.md +++ b/doc/administration/environment_variables.md @@ -58,4 +58,4 @@ to the naming scheme `GITLAB_#{name in 1_settings.rb in upper case}`. It's possible to preconfigure the GitLab docker image by adding the environment variable `GITLAB_OMNIBUS_CONFIG` to the `docker run` command. -For more information see the ['preconfigure-docker-container' section in the Omnibus documentation](http://doc.gitlab.com/omnibus/docker/#preconfigure-docker-container). +For more information see the ['preconfigure-docker-container' section in the Omnibus documentation](http://docs.gitlab.com/omnibus/docker/#preconfigure-docker-container). diff --git a/doc/administration/high_availability/load_balancer.md b/doc/administration/high_availability/load_balancer.md index b1fe34ed9a1..136f570ac27 100644 --- a/doc/administration/high_availability/load_balancer.md +++ b/doc/administration/high_availability/load_balancer.md @@ -60,4 +60,4 @@ Read more on high-availability configuration: configure custom domains with custom SSL, which would not be possible if SSL was terminated at the load balancer. -[gitlab-pages]: http://doc.gitlab.com/ee/pages/administration.html +[gitlab-pages]: http://docs.gitlab.com/ee/pages/administration.html diff --git a/doc/administration/high_availability/nfs.md b/doc/administration/high_availability/nfs.md index e4e124e200a..49ff5d536a1 100644 --- a/doc/administration/high_availability/nfs.md +++ b/doc/administration/high_availability/nfs.md @@ -113,4 +113,4 @@ Read more on high-availability configuration: 1. [Configure the GitLab application servers](gitlab.md) 1. [Configure the load balancers](load_balancer.md) -[udp-log-shipping]: http://doc.gitlab.com/omnibus/settings/logs.html#udp-log-shipping-gitlab-enterprise-edition-only "UDP log shipping" +[udp-log-shipping]: http://docs.gitlab.com/omnibus/settings/logs.html#udp-log-shipping-gitlab-enterprise-edition-only "UDP log shipping" diff --git a/doc/api/services.md b/doc/api/services.md index 7d45b2cf463..83ac7845156 100644 --- a/doc/api/services.md +++ b/doc/api/services.md @@ -491,7 +491,7 @@ Jira issue tracker Set JIRA service for a project. -> Setting `project_url`, `issues_url` and `new_issue_url` will allow a user to easily navigate to the Jira issue tracker. See the [integration doc](http://doc.gitlab.com/ce/integration/external-issue-tracker.html) for details. Support for referencing commits and automatic closing of Jira issues directly from GitLab is [available in GitLab EE.](http://doc.gitlab.com/ee/integration/jira.html) +> Setting `project_url`, `issues_url` and `new_issue_url` will allow a user to easily navigate to the Jira issue tracker. See the [integration doc](http://docs.gitlab.com/ce/integration/external-issue-tracker.html) for details. Support for referencing commits and automatic closing of Jira issues directly from GitLab is [available in GitLab EE.](http://docs.gitlab.com/ee/integration/jira.html) ``` PUT /projects/:id/services/jira diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index 187ec9e7b75..8292b393757 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -127,7 +127,7 @@ Inside the document: ``` If the document you are editing resides in a place other than the GitLab CE/EE `doc/` directory, instead of the relative link, use the full path: - `http://doc.gitlab.com/ce/administration/restart_gitlab.html`. + `http://docs.gitlab.com/ce/administration/restart_gitlab.html`. Replace `reconfigure` with `restart` where appropriate. ## Installation guide @@ -266,5 +266,5 @@ curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -d "restricted_signup_domai [cURL]: http://curl.haxx.se/ "cURL website" [single spaces]: http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html -[gfm]: http://doc.gitlab.com/ce/markdown/markdown.html#newlines "GitLab flavored markdown documentation" +[gfm]: http://docs.gitlab.com/ce/markdown/markdown.html#newlines "GitLab flavored markdown documentation" [doc-restart]: ../administration/restart_gitlab.md "GitLab restart documentation" diff --git a/doc/gitlab-basics/create-issue.md b/doc/gitlab-basics/create-issue.md index 87f078def04..5221d85b661 100644 --- a/doc/gitlab-basics/create-issue.md +++ b/doc/gitlab-basics/create-issue.md @@ -24,4 +24,4 @@ You may assign the Issue to a user, add a milestone and add labels (they are all ![Submit new issue](basicsimages/submit_new_issue.png) -Your Issue will now be added to the Issue Tracker and will be ready to be reviewed. You can comment on it and mention the people involved. You can also link Issues to the Merge Requests where the Issues are solved. To do this, you can use an [Issue closing pattern](http://doc.gitlab.com/ce/customization/issue_closing.html). +Your Issue will now be added to the Issue Tracker and will be ready to be reviewed. You can comment on it and mention the people involved. You can also link Issues to the Merge Requests where the Issues are solved. To do this, you can use an [Issue closing pattern](http://docs.gitlab.com/ce/customization/issue_closing.html). diff --git a/doc/gitlab-basics/create-project.md b/doc/gitlab-basics/create-project.md index b545d62549d..f737dffc024 100644 --- a/doc/gitlab-basics/create-project.md +++ b/doc/gitlab-basics/create-project.md @@ -14,7 +14,7 @@ Fill out the required information: 1. Select a [visibility level](https://gitlab.com/help/public_access/public_access) -1. You can also [import your existing projects](http://doc.gitlab.com/ce/workflow/importing/README.html) +1. You can also [import your existing projects](http://docs.gitlab.com/ce/workflow/importing/README.html) 1. Click on "create project" diff --git a/doc/hooks/custom_hooks.md b/doc/hooks/custom_hooks.md index dcdf49d3379..820934f97f1 100644 --- a/doc/hooks/custom_hooks.md +++ b/doc/hooks/custom_hooks.md @@ -2,7 +2,7 @@ **Note: Custom git hooks must be configured on the filesystem of the GitLab server. Only GitLab server administrators will be able to complete these tasks. -Please explore [webhooks](../web_hooks/web_hooks.md) as an option if you do not have filesystem access. For a user configurable Git Hooks interface, please see [GitLab Enterprise Edition Git Hooks](http://doc.gitlab.com/ee/git_hooks/git_hooks.html).** +Please explore [webhooks](../web_hooks/web_hooks.md) as an option if you do not have filesystem access. For a user configurable Git Hooks interface, please see [GitLab Enterprise Edition Git Hooks](http://docs.gitlab.com/ee/git_hooks/git_hooks.html).** Git natively supports hooks that are executed on different actions. Examples of server-side git hooks include pre-receive, post-receive, and update. diff --git a/doc/install/installation.md b/doc/install/installation.md index 44ae0be406c..fa11eb9ba6a 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -6,7 +6,7 @@ Since an installation from source is a lot of work and error prone we strongly r One reason the Omnibus package is more reliable is its use of Runit to restart any of the GitLab processes in case one crashes. On heavily used GitLab instances the memory usage of the Sidekiq background worker will grow over time. -Omnibus packages solve this by [letting the Sidekiq terminate gracefully](http://doc.gitlab.com/ce/operations/sidekiq_memory_killer.html) if it uses too much memory. +Omnibus packages solve this by [letting the Sidekiq terminate gracefully](http://docs.gitlab.com/ce/operations/sidekiq_memory_killer.html) if it uses too much memory. After this termination Runit will detect Sidekiq is not running and will start it. Since installations from source don't have Runit, Sidekiq can't be terminated and its memory usage will grow over time. diff --git a/doc/install/relative_url.md b/doc/install/relative_url.md index 0245febfcd8..44d2a14f366 100644 --- a/doc/install/relative_url.md +++ b/doc/install/relative_url.md @@ -132,5 +132,5 @@ To disable the relative URL: 1. Follow the same as above starting from 2. and set up the GitLab URL to one that doesn't contain a relative path. -[omnibus-rel]: http://doc.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab "How to setup relative URL in Omnibus GitLab" +[omnibus-rel]: http://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab "How to setup relative URL in Omnibus GitLab" [restart gitlab]: ../administration/restart_gitlab.md#installations-from-source "How to restart GitLab" diff --git a/doc/integration/README.md b/doc/integration/README.md index 6fe04aa2a06..fd330dd7a7d 100644 --- a/doc/integration/README.md +++ b/doc/integration/README.md @@ -19,7 +19,7 @@ See the documentation below for details on how to configure these services. GitLab Enterprise Edition contains [advanced Jenkins support][jenkins]. -[jenkins]: http://doc.gitlab.com/ee/integration/jenkins.html +[jenkins]: http://docs.gitlab.com/ee/integration/jenkins.html ## Project services diff --git a/doc/intro/README.md b/doc/intro/README.md index ab298d3808e..382d10aaf40 100644 --- a/doc/intro/README.md +++ b/doc/intro/README.md @@ -39,4 +39,4 @@ Install and update your GitLab installation. - [Install GitLab](https://about.gitlab.com/installation/) - [Update GitLab](https://about.gitlab.com/update/) -- [Explore Omnibus GitLab configuration options](http://doc.gitlab.com/omnibus/settings/configuration.html) +- [Explore Omnibus GitLab configuration options](http://docs.gitlab.com/omnibus/settings/configuration.html) diff --git a/doc/logs/logs.md b/doc/logs/logs.md index 27937e51764..ef5affa2ebd 100644 --- a/doc/logs/logs.md +++ b/doc/logs/logs.md @@ -1,6 +1,6 @@ ## Log system GitLab has advanced log system so everything is logging and you can analize your instance using various system log files. -In addition to system log files, GitLab Enterprise Edition comes with Audit Events. Find more about them [in Audit Events documentation](http://doc.gitlab.com/ee/administration/audit_events.html) +In addition to system log files, GitLab Enterprise Edition comes with Audit Events. Find more about them [in Audit Events documentation](http://docs.gitlab.com/ee/administration/audit_events.html) System log files are typically plain text in a standard log file format. This guide talks about how to read and use these system log files. diff --git a/doc/raketasks/README.md b/doc/raketasks/README.md index 6be954ad68b..a49c43b8ef2 100644 --- a/doc/raketasks/README.md +++ b/doc/raketasks/README.md @@ -8,4 +8,4 @@ - [User management](user_management.md) - [Webhooks](web_hooks.md) - [Import](import.md) of git repositories in bulk -- [Rebuild authorized_keys file](http://doc.gitlab.com/ce/raketasks/maintenance.html#rebuild-authorized_keys-file) task for administrators +- [Rebuild authorized_keys file](http://docs.gitlab.com/ce/raketasks/maintenance.html#rebuild-authorized_keys-file) task for administrators diff --git a/doc/update/README.md b/doc/update/README.md index a770633c9b8..975d72164b4 100644 --- a/doc/update/README.md +++ b/doc/update/README.md @@ -29,7 +29,7 @@ Based on your installation, choose a section below that fits your needs. ## Omnibus Packages -- The [Omnibus update guide](http://doc.gitlab.com/omnibus/update/README.html) +- The [Omnibus update guide](http://docs.gitlab.com/omnibus/update/README.html) contains the steps needed to update an Omnibus GitLab package. ## Installation from source @@ -86,10 +86,10 @@ possible. information about configuring GitLab to work with a MySQL database. - [Restoring from backup after a failed upgrade](restore_after_failure.md) -[omnidocker]: http://doc.gitlab.com/omnibus/docker/README.html +[omnidocker]: http://docs.gitlab.com/omnibus/docker/README.html [source-ee]: https://gitlab.com/gitlab-org/gitlab-ee/tree/master/doc/update [source-ce]: https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update [ee-ce]: ../downgrade_ee_to_ce/README.md [ce]: https://about.gitlab.com/features/#community [ee]: https://about.gitlab.com/features/#enterprise -[omni-ce-ee]: http://doc.gitlab.com/omnibus/update/README.html#from-community-edition-to-enterprise-edition +[omni-ce-ee]: http://docs.gitlab.com/omnibus/update/README.html#from-community-edition-to-enterprise-edition diff --git a/doc/workflow/gitlab_flow.md b/doc/workflow/gitlab_flow.md index 1b354bcc0f1..2b2f140f8bf 100644 --- a/doc/workflow/gitlab_flow.md +++ b/doc/workflow/gitlab_flow.md @@ -131,7 +131,7 @@ When you feel comfortable with it to be merged you assign it to the person that There is room for more feedback and after the assigned person feels comfortable with the result the branch is merged. If the assigned person does not feel comfortable they can close the merge request without merging. -In GitLab it is common to protect the long-lived branches (e.g. the master branch) so that normal developers [can't modify these protected branches](http://doc.gitlab.com/ce/permissions/permissions.html). +In GitLab it is common to protect the long-lived branches (e.g. the master branch) so that normal developers [can't modify these protected branches](http://docs.gitlab.com/ce/permissions/permissions.html). So if you want to merge it into a protected branch you assign it to someone with master authorizations. ## Issues with GitLab flow @@ -187,7 +187,7 @@ If you have an issue that spans across multiple repositories, the best thing is ![Vim screen showing the rebase view](rebase.png) With git you can use an interactive rebase (`rebase -i`) to squash multiple commits into one and reorder them. -In GitLab EE and .com you can also [rebase before merge](http://doc.gitlab.com/ee/workflow/rebase_before_merge.html) from the web interface. +In GitLab EE and .com you can also [rebase before merge](http://docs.gitlab.com/ee/workflow/rebase_before_merge.html) from the web interface. This functionality is useful if you made a couple of commits for small changes during development and want to replace them with a single commit or if you want to make the order more logical. However you should never rebase commits you have pushed to a remote server. Somebody can have referred to the commits or cherry-picked them. diff --git a/doc/workflow/groups.md b/doc/workflow/groups.md index 52bf611dc5e..34ada1774d8 100644 --- a/doc/workflow/groups.md +++ b/doc/workflow/groups.md @@ -54,7 +54,7 @@ If necessary, you can increase the access level of an individual user for a spec ## Managing group memberships via LDAP In GitLab Enterprise Edition it is possible to manage GitLab group memberships using LDAP groups. -See [the GitLab Enterprise Edition documentation](http://doc.gitlab.com/ee/integration/ldap.html) for more information. +See [the GitLab Enterprise Edition documentation](http://docs.gitlab.com/ee/integration/ldap.html) for more information. ## Allowing only admins to create groups diff --git a/doc/workflow/importing/import_projects_from_github.md b/doc/workflow/importing/import_projects_from_github.md index e670e415c71..a7dfac2c120 100644 --- a/doc/workflow/importing/import_projects_from_github.md +++ b/doc/workflow/importing/import_projects_from_github.md @@ -44,5 +44,5 @@ case the namespace is taken, the project will be imported on the user's namespace. [gh-import]: ../../integration/github.md "GitHub integration" -[ee-gh]: http://doc.gitlab.com/ee/integration/github.html "GitHub integration for GitLab EE" +[ee-gh]: http://docs.gitlab.com/ee/integration/github.html "GitHub integration for GitLab EE" [new-project]: ../../gitlab-basics/create-project.md "How to create a new project in GitLab" diff --git a/doc/workflow/importing/import_projects_from_gitlab_com.md b/doc/workflow/importing/import_projects_from_gitlab_com.md index 1117db98e7e..dcc00074b75 100644 --- a/doc/workflow/importing/import_projects_from_gitlab_com.md +++ b/doc/workflow/importing/import_projects_from_gitlab_com.md @@ -2,7 +2,7 @@ You can import your existing GitLab.com projects to your GitLab instance. But keep in mind that it is possible only if GitLab support is enabled on your GitLab instance. -You can read more about GitLab support [here](http://doc.gitlab.com/ce/integration/gitlab.html) +You can read more about GitLab support [here](http://docs.gitlab.com/ce/integration/gitlab.html) To get to the importer page you need to go to "New project" page. ![New project page](gitlab_importer/new_project_page.png) diff --git a/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md b/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md index 83db44c10b1..1295dfbd770 100644 --- a/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md +++ b/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md @@ -4,7 +4,7 @@ Managing large files such as audio, video and graphics files has always been one of the shortcomings of Git. The general recommendation is to not have Git repositories larger than 1GB to preserve performance. -GitLab already supports [managing large files with git annex](http://doc.gitlab.com/ee/workflow/git_annex.html) +GitLab already supports [managing large files with git annex](http://docs.gitlab.com/ee/workflow/git_annex.html) (EE only), however in certain environments it is not always convenient to use different commands to differentiate between the large files and regular ones. -- cgit v1.2.1 From e037faa3f8b9f6238a574e52f85b10dd0464a496 Mon Sep 17 00:00:00 2001 From: donhui <977675308@qq.com> Date: Mon, 16 May 2016 16:22:22 +0800 Subject: typo fix: # Disable all components except Redis typo fix: # Disable all components except Redis --- doc/administration/high_availability/redis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/administration/high_availability/redis.md b/doc/administration/high_availability/redis.md index d89a1e582ca..f6153216f33 100644 --- a/doc/administration/high_availability/redis.md +++ b/doc/administration/high_availability/redis.md @@ -26,7 +26,7 @@ that runs Redis. ```ruby external_url 'https://gitlab.example.com' - # Disable all components except PostgreSQL + # Disable all components except Redis redis['enable'] = true bootstrap['enable'] = false nginx['enable'] = false -- cgit v1.2.1 From 7bb84e64979edda8e76f077bd58aeb35857aec23 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Fri, 6 May 2016 17:59:45 -0300 Subject: Change landing page when skipping confirmation email and add documentation --- doc/security/README.md | 1 + doc/security/user_email_confirmation.md | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 doc/security/user_email_confirmation.md (limited to 'doc') diff --git a/doc/security/README.md b/doc/security/README.md index 4cd0fdd4094..38706e48ec5 100644 --- a/doc/security/README.md +++ b/doc/security/README.md @@ -8,3 +8,4 @@ - [User File Uploads](user_file_uploads.md) - [How we manage the CRIME vulnerability](crime_vulnerability.md) - [Enforce Two-factor authentication](two_factor_authentication.md) +- [Send email confirmation on sign-up](user_email_confirmation.md) diff --git a/doc/security/user_email_confirmation.md b/doc/security/user_email_confirmation.md new file mode 100644 index 00000000000..4293944ae8b --- /dev/null +++ b/doc/security/user_email_confirmation.md @@ -0,0 +1,7 @@ +# User email confirmation at sign-up + +Gitlab admin can enable email confirmation on sign-up, if you want to confirm all +user emails before they are able to sign-in. + +In the Admin area under **Settings** (`/admin/application_settings`), go to section +**Sign-in Restrictions** and look for **Send confirmation email on sign-up** option. -- cgit v1.2.1 From e3e392965ee16f79a80b0f8517ff8c9e445bb907 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 16 May 2016 16:39:23 -0500 Subject: Update permission doc --- doc/permissions/permissions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/permissions/permissions.md b/doc/permissions/permissions.md index 30f6c75e1cf..b76ce31cbad 100644 --- a/doc/permissions/permissions.md +++ b/doc/permissions/permissions.md @@ -39,7 +39,7 @@ documentation](../workflow/add-user/add-user.md). | Cancel and retry builds | | | ✓ | ✓ | ✓ | | Create or update commit status | | | ✓ | ✓ | ✓ | | Update a container registry | | | ✓ | ✓ | ✓ | -| Remove a container registry images | | | ✓ | ✓ | ✓ | +| Remove a container registry image | | | ✓ | ✓ | ✓ | | Create new milestones | | | | ✓ | ✓ | | Add new team members | | | | ✓ | ✓ | | Push to protected branches | | | | ✓ | ✓ | -- cgit v1.2.1 From fc9844e8e1955359eae5b159069a90a993c667d1 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Mon, 16 May 2016 13:34:10 -0300 Subject: Update documentation --- doc/workflow/notifications.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/workflow/notifications.md b/doc/workflow/notifications.md index 80817c98d22..cbca94c0b5e 100644 --- a/doc/workflow/notifications.md +++ b/doc/workflow/notifications.md @@ -69,7 +69,7 @@ In all of the below cases, the notification will be sent to: ...with notification level "Participating" or higher -- Watchers: project members with notification level "Watch" +- Watchers: users with notification level "Watch" - Subscribers: anyone who manually subscribed to the issue/merge request | Event | Sent to | -- cgit v1.2.1 From f7bdbc0b55dfed9f1bfabf052436bac2997e78f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Wed, 18 May 2016 00:07:51 -0500 Subject: Make it clearer that /licenses is the OS license templates endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- doc/api/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api/README.md b/doc/api/README.md index ff039f1886f..27c5962decf 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -33,7 +33,7 @@ following locations: - [Build triggers](build_triggers.md) - [Build Variables](build_variables.md) - [Runners](runners.md) -- [Licenses](licenses.md) +- [Open source license templates](licenses.md) ## Authentication -- cgit v1.2.1 From 6daec9e6f1a83a2a38b791a24f39e8e4b539c873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Wed, 18 May 2016 11:05:51 -0500 Subject: Add documentation for Inline Diff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- doc/markdown/markdown.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index 4f199b6af6f..b0c6d6a4bbf 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -8,6 +8,7 @@ * [Multiple underscores in words](#multiple-underscores-in-words) * [URL auto-linking](#url-auto-linking) * [Code and Syntax Highlighting](#code-and-syntax-highlighting) +* [Inline Diff](#inline-diff) * [Emoji](#emoji) * [Special GitLab references](#special-gitlab-references) * [Task lists](#task-lists) @@ -153,6 +154,19 @@ s = "There is no highlighting for this." But let's throw in a tag. ``` +## Inline Diff + +With inline diffs tags you can display {+ additions +} or [- deletions -]. + +The wrapping tags can be either curly braces or square brackets [+ additions +] or {- deletions -}. + +However the wrapping tags cannot be mixed as such: + +- {+ additions +] +- [+ additions +} +- {- deletions -] +- [- deletions -} + ## Emoji Sometimes you want to :monkey: around a bit and add some :star2: to your :speech_balloon:. Well we have a gift for you: -- cgit v1.2.1 From b5552bc4e57f73a80e990ee4182fb48fa4851ad3 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Wed, 18 May 2016 08:48:48 -0700 Subject: Add health check feature documentation --- doc/README.md | 1 + doc/monitoring/health_check.md | 57 ++++++++++++++++++++++++++++++ doc/monitoring/img/health_check_token.png | Bin 0 -> 10884 bytes 3 files changed, 58 insertions(+) create mode 100644 doc/monitoring/health_check.md create mode 100644 doc/monitoring/img/health_check_token.png (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index e358da1c424..8aed060d247 100644 --- a/doc/README.md +++ b/doc/README.md @@ -41,6 +41,7 @@ - [Git LFS configuration](workflow/lfs/lfs_administration.md) - [Housekeeping](administration/housekeeping.md) Keep your Git repository tidy and fast. - [GitLab Performance Monitoring](monitoring/performance/introduction.md) Configure GitLab and InfluxDB for measuring performance metrics +- [Monitoring uptime](monitoring/health_check.md) Check the server status using the health check endpoint - [Sidekiq Troubleshooting](administration/troubleshooting/sidekiq.md) Debug when Sidekiq appears hung and is not processing jobs - [High Availability](administration/high_availability/README.md) Configure multiple servers for scaling or high availability diff --git a/doc/monitoring/health_check.md b/doc/monitoring/health_check.md new file mode 100644 index 00000000000..bbfb63dd844 --- /dev/null +++ b/doc/monitoring/health_check.md @@ -0,0 +1,57 @@ +# Health Check +_**Note:** This feature was [introduced][ce-3888] in GitLab 8.8_ + +GitLab provides a health check endpoint for uptime monitoring on the `health_check` web +endpoint. The health check reports on the overall system status based on the status of +the database connection, the state of the database migrations, and the ability to write +and access the cache. This endpoint can be provided to uptime monitoring services like +[Pingdom][pindom], [Nagios][nagios-health], and [NewRelic][newrelic-health]. + +## Access Token + +A access token needs to be provided while accessing the health check endpoint. The current +accepted token can be found on the `admin/heath_check` page of your GitLab instance. + +![access token](img/health_check_token.png) + +The access token can be passed as a url parameter: + +`https://gitlab.example.com/health_check.json?token=ACCESS_TOKEN` + +or as a http header: + +```bash +curl -H "TOKEN: ACCESS_TOKEN" https://gitlab.example.com/health_check.json +``` + +## Using the Endpoint + +Once you have the access token, health information can be retrieved as plain text, JSON, +or XML using the `health_check` endpoint: + +- `https://gitlab.example.com/health_check?token=ACCESS_TOKEN` +- `https://gitlab.example.com/health_check.json?token=ACCESS_TOKEN` +- `https://gitlab.example.com/health_check.xml?token=ACCESS_TOKEN` + +You can also ask for the status of specific services: + +- `https://gitlab.example.com/health_check/cache.json?token=ACCESS_TOKEN` +- `https://gitlab.example.com/health_check/database.json?token=ACCESS_TOKEN` +- `https://gitlab.example.com/health_check/migrations.json?token=ACCESS_TOKEN` + +Example output: +```bash +curl -H "TOKEN: ACCESS_TOKEN" https://gitlab.example.com/health_check.json +{"healthy":true,"message":"success"} +``` + +## Status + +On failure the endpoint will return a `500` http status code. On success the endpoint +will return a valid successful http status code, and a `success` message. Ideally your +uptime monitoring should look for the success message. + +[ce-3888]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3888 +[pingdom]: https://www.pingdom.com +[nagios-health]: https://nagios-plugins.org/doc/man/check_http.html +[newrelic-health]: https://docs.newrelic.com/docs/alerts/alert-policies/downtime-alerts/availability-monitoring diff --git a/doc/monitoring/img/health_check_token.png b/doc/monitoring/img/health_check_token.png new file mode 100644 index 00000000000..2daf8606b00 Binary files /dev/null and b/doc/monitoring/img/health_check_token.png differ -- cgit v1.2.1 From 35430f9ef72664218a3cdc0f7c06852a5d6e90ab Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Wed, 18 May 2016 12:00:26 -0700 Subject: Fix broken pingdom link in the health_check docs --- doc/monitoring/health_check.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/monitoring/health_check.md b/doc/monitoring/health_check.md index bbfb63dd844..22c53a9aecd 100644 --- a/doc/monitoring/health_check.md +++ b/doc/monitoring/health_check.md @@ -5,7 +5,7 @@ GitLab provides a health check endpoint for uptime monitoring on the `health_che endpoint. The health check reports on the overall system status based on the status of the database connection, the state of the database migrations, and the ability to write and access the cache. This endpoint can be provided to uptime monitoring services like -[Pingdom][pindom], [Nagios][nagios-health], and [NewRelic][newrelic-health]. +[Pingdom][pingdom], [Nagios][nagios-health], and [NewRelic][newrelic-health]. ## Access Token -- cgit v1.2.1 From 01256eecfa39cf3edc3d0eb43e624f62e45df552 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Wed, 18 May 2016 21:34:58 -0500 Subject: Update 'after_script' introduction note --- doc/ci/yaml/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 7e9bced7616..63866d8c71c 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -128,7 +128,7 @@ builds, including deploy builds. This can be an array or a multi-line string. ### after_script >**Note:** -Introduced in GitLab 8.7 and GitLab Runner v1.2. +Introduced in GitLab 8.7 and requires Gitlab Runner v1.2 (not yet released) `after_script` is used to define the command that will be run after for all builds. This has to be an array or a multi-line string. -- cgit v1.2.1 From b253aa32c75cb5b0796ad6a7cd85cba78516ba26 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Fri, 6 May 2016 12:44:20 +0200 Subject: Add docs for a new configuration setting for runner --- doc/ci/runners/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ci/runners/README.md b/doc/ci/runners/README.md index a06650b3387..e449d3dc61e 100644 --- a/doc/ci/runners/README.md +++ b/doc/ci/runners/README.md @@ -125,7 +125,13 @@ shared runners will only run the jobs they are equipped to run. For instance, at GitLab we have runners tagged with "rails" if they contain the appropriate dependencies to run Rails test suites. -### Be Careful with Sensitive Information +### Prevent runner with tags from picking jobs without tags + +You can configure runner to prevent it from picking jobs with tags when +runnner does not have tags assigned. This configuration setting is available +in GitLab interface when editting runner details. + +### Be careful with sensitive information If you can run a build on a runner, you can get access to any code it runs and get the token of the runner. With shared runners, this means that anyone -- cgit v1.2.1 From bf9cc351c28a349ca4c573978c869d2b90209d52 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 10 May 2016 13:19:25 +0200 Subject: Add minor corrections related to config of runner --- doc/ci/runners/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/ci/runners/README.md b/doc/ci/runners/README.md index e449d3dc61e..b42d7a62ebc 100644 --- a/doc/ci/runners/README.md +++ b/doc/ci/runners/README.md @@ -127,9 +127,9 @@ the appropriate dependencies to run Rails test suites. ### Prevent runner with tags from picking jobs without tags -You can configure runner to prevent it from picking jobs with tags when -runnner does not have tags assigned. This configuration setting is available -in GitLab interface when editting runner details. +You can configure a runner to prevent it from picking jobs with tags when +the runnner does not have tags assigned. This setting is available on each +runner in *Project Settings* > *Runners*. ### Be careful with sensitive information -- cgit v1.2.1 From 1a98dcacc527f684bc68eb6c7d7f94371e329fee Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Fri, 20 May 2016 17:24:06 +0000 Subject: Fix grammar in health_check.md A access token -> An access token --- doc/monitoring/health_check.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/monitoring/health_check.md b/doc/monitoring/health_check.md index 22c53a9aecd..5157cf686a7 100644 --- a/doc/monitoring/health_check.md +++ b/doc/monitoring/health_check.md @@ -9,7 +9,7 @@ and access the cache. This endpoint can be provided to uptime monitoring service ## Access Token -A access token needs to be provided while accessing the health check endpoint. The current +An access token needs to be provided while accessing the health check endpoint. The current accepted token can be found on the `admin/heath_check` page of your GitLab instance. ![access token](img/health_check_token.png) -- cgit v1.2.1 From 69a07cf4d4771b9e754ce783b7973b7898480719 Mon Sep 17 00:00:00 2001 From: Sanster Date: Sat, 21 May 2016 22:33:54 +0800 Subject: fix group members api doc: remove emial --- doc/api/groups.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc') diff --git a/doc/api/groups.md b/doc/api/groups.md index 2821bc21b81..1ccb9715e96 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -265,7 +265,6 @@ GET /groups/:id/members { "id": 1, "username": "raymond_smith", - "email": "ray@smith.org", "name": "Raymond Smith", "state": "active", "created_at": "2012-10-22T14:13:35Z", @@ -274,7 +273,6 @@ GET /groups/:id/members { "id": 2, "username": "john_doe", - "email": "joh@doe.org", "name": "John Doe", "state": "active", "created_at": "2012-10-22T14:13:35Z", -- cgit v1.2.1 From 2264bb136b78a07b3dde3aaacbae7ba3918775e0 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sun, 22 May 2016 00:41:20 -0500 Subject: Copyedit health check docs --- doc/monitoring/health_check.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/monitoring/health_check.md b/doc/monitoring/health_check.md index 5157cf686a7..defbf37ac19 100644 --- a/doc/monitoring/health_check.md +++ b/doc/monitoring/health_check.md @@ -1,5 +1,6 @@ # Health Check -_**Note:** This feature was [introduced][ce-3888] in GitLab 8.8_ + +>**Note:** This feature was [introduced][ce-3888] in GitLab 8.8. GitLab provides a health check endpoint for uptime monitoring on the `health_check` web endpoint. The health check reports on the overall system status based on the status of @@ -14,11 +15,13 @@ accepted token can be found on the `admin/heath_check` page of your GitLab insta ![access token](img/health_check_token.png) -The access token can be passed as a url parameter: +The access token can be passed as a URL parameter: -`https://gitlab.example.com/health_check.json?token=ACCESS_TOKEN` +``` +https://gitlab.example.com/health_check.json?token=ACCESS_TOKEN +``` -or as a http header: +or as an HTTP header: ```bash curl -H "TOKEN: ACCESS_TOKEN" https://gitlab.example.com/health_check.json @@ -39,16 +42,22 @@ You can also ask for the status of specific services: - `https://gitlab.example.com/health_check/database.json?token=ACCESS_TOKEN` - `https://gitlab.example.com/health_check/migrations.json?token=ACCESS_TOKEN` -Example output: +For example, the JSON output of the following health check: + ```bash curl -H "TOKEN: ACCESS_TOKEN" https://gitlab.example.com/health_check.json +``` + +would be like: + +``` {"healthy":true,"message":"success"} ``` ## Status -On failure the endpoint will return a `500` http status code. On success the endpoint -will return a valid successful http status code, and a `success` message. Ideally your +On failure, the endpoint will return a `500` HTTP status code. On success, the endpoint +will return a valid successful HTTP status code, and a `success` message. Ideally your uptime monitoring should look for the success message. [ce-3888]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3888 -- cgit v1.2.1 From 18dddc0c84f2f88e9b37883f1a745dbbeb74b6f3 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Fri, 13 May 2016 11:44:48 -0400 Subject: Initial docker container registry configuration docs. --- doc/administration/container_registry.md | 127 +++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 doc/administration/container_registry.md (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md new file mode 100644 index 00000000000..d89cfd1d43e --- /dev/null +++ b/doc/administration/container_registry.md @@ -0,0 +1,127 @@ +# GitLab Container Registry Administration + +Documentation on how to use Container Registry are under [TODO](TODO.md). + +## Configuration + +Containers can be large in size and they are stored on the server GitLab is +installed on. + +The Container Registry works under HTTPS by default. +This means that the Container Registry requires a SSL certificate. +There are two options on how this can be configured: + +1. Use its own domain - needs a SSL certificate for that specific domain +(eg. registry.example.com) or a wildcard certificate if hosted under a subdomain +(eg. registry.gitlab.example.com) +1. Use existing GitLab domain and expose the registry on a port - can reuse +existing GitLab SSL certificate + +Note that using HTTP is possible, +[see insecure Registry document.](https://github.com/docker/distribution/blob/master/docs/insecure.md) + +Please take this into consideration before configuring Container Registry for +the first time. + +## Container Registry under its own domain + +Lets assume that you want the Container Registry to be accessible at +`https://registry.gitlab.example.com`. + +### Omnibus GitLab packages + +Place your SSL certificate and key in +`/etc/gitlab/ssl/registry.gitlab.example.com.crt` +and +`/etc/gitlab/ssl/registry.gitlab.example.com.key` and make sure they have +correct permissions: + +```bash +chmod 600 /etc/gitlab/ssl/registry.gitlab.example.com.* +``` + +Once the SSL certificate is in place, edit `/etc/gitlab/gitlab.rb` with: + +```ruby +registry_external_url 'https://registry.gitlab.example.com' +``` + +Save the file and [reconfigure GitLab][] for the changes to take effect. + +Users should now be able to login to the Container Registry using: + +```bash +docker login registry.gitlab.example.com +``` + +with their GitLab credentials. + +If you have a [wildcard certificate][], you need to specify the path to the +certificate in addition to the URL, in this case `/etc/gitlab/gitlab.rb` will +look like: + +```ruby +registry_external_url 'https://registry.gitlab.example.com' +registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/certificate.pem" +registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/certificate.key" +``` + +## Container Registry under existing GitLab domain + +Lets assume that your GitLab instance is accessible at +`https://gitlab.example.com`. You can expose the Container Registry under +a separate port. + +Lets assume that you've exposed port `4567` in your network firewall. + +### Omnibus GitLab packages + +Your `/etc/gitlab/gitlab.rb` should contain the Container Registry URL as +well as the path to the existing SSL certificate and key used by GitLab. + +```ruby +registry_external_url 'https://gitlab.example.com:4567' + +## If your SSL certificate is not in /etc/gitlab/ssl/gitlab.example.com.crt +## and key not in /etc/gitlab/ssl/gitlab.example.com.key uncomment the lines +## below + +# registry_nginx['ssl_certificate'] = "/path/to/certificate.pem" +# registry_nginx['ssl_certificate_key'] = "/path/to/certificate.key" +``` + +Save the file and [reconfigure GitLab][] for the changes to take effect. + +Users should now be able to login to the Container Registry using: + +```bash +docker login gitlab.example.com:4567 +``` + +with their GitLab credentials. + +## Container Registry storage path + +It is possible to change path where containers will be stored by the Container +Registry. + +### Omnibus GitLab packages + +By default, the path Container Registry is using to store the containers is in +`/var/opt/gitlab/gitlab-rails/shared/registry`. +This path is accessible to the user running the Container Registry daemon, +user running GitLab and to the user running Nginx web server. + +In `/etc/gitlab/gitlab.rb`: + +```ruby +gitlab_rails['registry_path'] = "/path/to/registry/storage" +``` + +Save the file and [reconfigure GitLab][] for the changes to take effect. + +**NOTE** You should confirm that the GitLab, registry and the web server user +have access to this directory. + +[reconfigure gitlab]: ../../administration/restart_gitlab.md "How to restart GitLab documentation" +[wildcard certificate]: "https://en.wikipedia.org/wiki/Wildcard_certificate" -- cgit v1.2.1 From 63c1792eface9ae8345d2dfe814b83ab8a401ea4 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sun, 15 May 2016 10:02:20 -0500 Subject: Rearrange headings --- doc/administration/container_registry.md | 42 +++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index d89cfd1d43e..2b7e143f685 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -1,6 +1,18 @@ # GitLab Container Registry Administration -Documentation on how to use Container Registry are under [TODO](TODO.md). +> **Note:** +This feature was [introduced][ce-4040] in GitLab 8.8. + + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Configuration](#configuration) + - [Container Registry under its own domain](#container-registry-under-its-own-domain) + - [Container Registry under existing GitLab domain](#container-registry-under-existing-gitlab-domain) +- [Container Registry storage path](#container-registry-storage-path) + + ## Configuration @@ -12,23 +24,25 @@ This means that the Container Registry requires a SSL certificate. There are two options on how this can be configured: 1. Use its own domain - needs a SSL certificate for that specific domain -(eg. registry.example.com) or a wildcard certificate if hosted under a subdomain -(eg. registry.gitlab.example.com) + (eg. registry.example.com) or a wildcard certificate if hosted under a subdomain + (eg. registry.gitlab.example.com) 1. Use existing GitLab domain and expose the registry on a port - can reuse -existing GitLab SSL certificate + existing GitLab SSL certificate -Note that using HTTP is possible, -[see insecure Registry document.](https://github.com/docker/distribution/blob/master/docs/insecure.md) +Note that using HTTP is possible but not recommended, +[see insecure Registry document][docker-insecure]. Please take this into consideration before configuring Container Registry for the first time. -## Container Registry under its own domain +### Container Registry under its own domain Lets assume that you want the Container Registry to be accessible at `https://registry.gitlab.example.com`. -### Omnibus GitLab packages +--- + +**Omnibus GitLab packages** Place your SSL certificate and key in `/etc/gitlab/ssl/registry.gitlab.example.com.crt` @@ -66,7 +80,7 @@ registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/certificate.pem" registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/certificate.key" ``` -## Container Registry under existing GitLab domain +### Container Registry under existing GitLab domain Lets assume that your GitLab instance is accessible at `https://gitlab.example.com`. You can expose the Container Registry under @@ -74,7 +88,9 @@ a separate port. Lets assume that you've exposed port `4567` in your network firewall. -### Omnibus GitLab packages +**Omnibus GitLab packages** + +--- Your `/etc/gitlab/gitlab.rb` should contain the Container Registry URL as well as the path to the existing SSL certificate and key used by GitLab. @@ -105,7 +121,9 @@ with their GitLab credentials. It is possible to change path where containers will be stored by the Container Registry. -### Omnibus GitLab packages +**Omnibus GitLab packages** + +--- By default, the path Container Registry is using to store the containers is in `/var/opt/gitlab/gitlab-rails/shared/registry`. @@ -125,3 +143,5 @@ have access to this directory. [reconfigure gitlab]: ../../administration/restart_gitlab.md "How to restart GitLab documentation" [wildcard certificate]: "https://en.wikipedia.org/wiki/Wildcard_certificate" +[ce-4040]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4040 +[docker-insecure]: https://github.com/docker/distribution/blob/master/docs/insecure.md -- cgit v1.2.1 From 04d231ef8743db55784f5c1a1f50438445ed908d Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 16 May 2016 19:21:06 -0500 Subject: Rearrange configuration parts --- doc/administration/container_registry.md | 76 ++++++++++++++++---------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index 2b7e143f685..1791c95df60 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -8,8 +8,8 @@ This feature was [introduced][ce-4040] in GitLab 8.8. **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - [Configuration](#configuration) - - [Container Registry under its own domain](#container-registry-under-its-own-domain) - [Container Registry under existing GitLab domain](#container-registry-under-existing-gitlab-domain) + - [Container Registry under its own domain](#container-registry-under-its-own-domain) - [Container Registry storage path](#container-registry-storage-path) @@ -26,7 +26,7 @@ There are two options on how this can be configured: 1. Use its own domain - needs a SSL certificate for that specific domain (eg. registry.example.com) or a wildcard certificate if hosted under a subdomain (eg. registry.gitlab.example.com) -1. Use existing GitLab domain and expose the registry on a port - can reuse +1. Use the existing GitLab domain and expose the registry on a port - can reuse existing GitLab SSL certificate Note that using HTTP is possible but not recommended, @@ -35,6 +35,42 @@ Note that using HTTP is possible but not recommended, Please take this into consideration before configuring Container Registry for the first time. +### Container Registry under existing GitLab domain + +Lets assume that your GitLab instance is accessible at +`https://gitlab.example.com`. You can expose the Container Registry under +a separate port. + +Lets assume that you've exposed port `4567` in your network firewall. + +**Omnibus GitLab packages** + +--- + +Your `/etc/gitlab/gitlab.rb` should contain the Container Registry URL as +well as the path to the existing SSL certificate and key used by GitLab. + +```ruby +registry_external_url 'https://gitlab.example.com:4567' + +## If your SSL certificate is not in /etc/gitlab/ssl/gitlab.example.com.crt +## and key not in /etc/gitlab/ssl/gitlab.example.com.key uncomment the lines +## below + +# registry_nginx['ssl_certificate'] = "/path/to/certificate.pem" +# registry_nginx['ssl_certificate_key'] = "/path/to/certificate.key" +``` + +Save the file and [reconfigure GitLab][] for the changes to take effect. + +Users should now be able to login to the Container Registry using: + +```bash +docker login gitlab.example.com:4567 +``` + +with their GitLab credentials. + ### Container Registry under its own domain Lets assume that you want the Container Registry to be accessible at @@ -80,42 +116,6 @@ registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/certificate.pem" registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/certificate.key" ``` -### Container Registry under existing GitLab domain - -Lets assume that your GitLab instance is accessible at -`https://gitlab.example.com`. You can expose the Container Registry under -a separate port. - -Lets assume that you've exposed port `4567` in your network firewall. - -**Omnibus GitLab packages** - ---- - -Your `/etc/gitlab/gitlab.rb` should contain the Container Registry URL as -well as the path to the existing SSL certificate and key used by GitLab. - -```ruby -registry_external_url 'https://gitlab.example.com:4567' - -## If your SSL certificate is not in /etc/gitlab/ssl/gitlab.example.com.crt -## and key not in /etc/gitlab/ssl/gitlab.example.com.key uncomment the lines -## below - -# registry_nginx['ssl_certificate'] = "/path/to/certificate.pem" -# registry_nginx['ssl_certificate_key'] = "/path/to/certificate.key" -``` - -Save the file and [reconfigure GitLab][] for the changes to take effect. - -Users should now be able to login to the Container Registry using: - -```bash -docker login gitlab.example.com:4567 -``` - -with their GitLab credentials. - ## Container Registry storage path It is possible to change path where containers will be stored by the Container -- cgit v1.2.1 From 0695cdee178ac995f7dec81dcd734eef7e28e36e Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Wed, 18 May 2016 12:03:57 -0500 Subject: Add assumptions section and refactor domain configuration --- doc/administration/container_registry.md | 56 ++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 17 deletions(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index 1791c95df60..17a0c229b97 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -7,33 +7,49 @@ This feature was [introduced][ce-4040] in GitLab 8.8. **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* -- [Configuration](#configuration) +- [Assumptions](#assumptions) +- [Container Registry domain configuration](#container-registry-domain-configuration) - [Container Registry under existing GitLab domain](#container-registry-under-existing-gitlab-domain) - [Container Registry under its own domain](#container-registry-under-its-own-domain) - [Container Registry storage path](#container-registry-storage-path) +- [Disable Container Registry](#disable-container-registry) +- [Changelog](#changelog) -## Configuration +## Assumptions -Containers can be large in size and they are stored on the server GitLab is -installed on. +If you are using Omnibus, you have to bare in mind the following: -The Container Registry works under HTTPS by default. -This means that the Container Registry requires a SSL certificate. -There are two options on how this can be configured: +- The container Registry will be enabled by default if GitLab is configured + with HTTPS and it will listen on port `5005`. If you want the Registry to + listen on a port other than `5005` which is the default, read [#Container Registry under existing GitLab domain](#container-registry-under-existing-gitlab-domain) + on how to achieve that. You will also have to configure your firewall to allow + connections to that port. +- The Container Registry works under HTTPS by default. Note that using HTTP is + possible but not recommended and out of the scope of this document, + [see the insecure Registry documentation][docker-insecure] if you want to + implement this. -1. Use its own domain - needs a SSL certificate for that specific domain - (eg. registry.example.com) or a wildcard certificate if hosted under a subdomain - (eg. registry.gitlab.example.com) -1. Use the existing GitLab domain and expose the registry on a port - can reuse - existing GitLab SSL certificate +## Container Registry domain configuration -Note that using HTTP is possible but not recommended, -[see insecure Registry document][docker-insecure]. +There are two ways you can configure the container Registry domain. Either use +the existing GitLab domain where in that case the Registry will listen on a port, +or use a completely separate domain. Since the container Registry requires a +TLS certificate, in the end it all boils down to how easy or pricey is to +get a new TLS certificate. -Please take this into consideration before configuring Container Registry for -the first time. +1. If the Registry is configured to use its own domain, you will need a TLS + certificate for that specific domain (e.g., `registry.example.com`) or maybe + a wildcard certificate if hosted under a subdomain (e.g., `registry.gitlab.example.com`). +1. If the Registry is configured to use the existing GitLab domain, you can + expose the Registry on a port so that you can reuse the existing GitLab TLS + certificate. + +Please take this into consideration before configuring the Container Registry +for the first time. + +Read more about Docker Registry at https://docs.docker.com/registry/introduction/. ### Container Registry under existing GitLab domain @@ -141,7 +157,13 @@ Save the file and [reconfigure GitLab][] for the changes to take effect. **NOTE** You should confirm that the GitLab, registry and the web server user have access to this directory. +## Disable Container Registry + + +## Changelog + + [reconfigure gitlab]: ../../administration/restart_gitlab.md "How to restart GitLab documentation" [wildcard certificate]: "https://en.wikipedia.org/wiki/Wildcard_certificate" [ce-4040]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4040 -[docker-insecure]: https://github.com/docker/distribution/blob/master/docs/insecure.md +[docker-insecure]: https://docs.docker.com/registry/insecure/ -- cgit v1.2.1 From 0cdc080a4a4d8146f6c874c91b8bff6960214c56 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 20 May 2016 13:18:18 -0500 Subject: Refactor container docs --- doc/administration/container_registry.md | 179 +++++++++++++++++++++++++------ 1 file changed, 147 insertions(+), 32 deletions(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index 17a0c229b97..15c3c1a7470 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -3,11 +3,18 @@ > **Note:** This feature was [introduced][ce-4040] in GitLab 8.8. +With the Docker container Registry integrated into GitLab, every project can +have its own space for Docker images. + +You can read more about Docker Registry at https://docs.docker.com/registry/introduction/. + +--- + **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* -- [Assumptions](#assumptions) +- [Differences between Omnibus and source installations](#differences-between-omnibus-and-source-installations) - [Container Registry domain configuration](#container-registry-domain-configuration) - [Container Registry under existing GitLab domain](#container-registry-under-existing-gitlab-domain) - [Container Registry under its own domain](#container-registry-under-its-own-domain) @@ -17,67 +24,110 @@ This feature was [introduced][ce-4040] in GitLab 8.8. -## Assumptions + +## Differences between Omnibus and source installations If you are using Omnibus, you have to bare in mind the following: - The container Registry will be enabled by default if GitLab is configured with HTTPS and it will listen on port `5005`. If you want the Registry to - listen on a port other than `5005` which is the default, read [#Container Registry under existing GitLab domain](#container-registry-under-existing-gitlab-domain) + listen on a port other than `5005`, read [#Container Registry under existing GitLab domain](#container-registry-under-existing-gitlab-domain) on how to achieve that. You will also have to configure your firewall to allow connections to that port. -- The Container Registry works under HTTPS by default. Note that using HTTP is - possible but not recommended and out of the scope of this document, +- The container Registry works under HTTPS by default. Using HTTP is possible + but not recommended and out of the scope of this document, [see the insecure Registry documentation][docker-insecure] if you want to implement this. +--- + +If you have installed GitLab from source: +- Omnibus has some things configured for you + +- You will have to install Docker Registry by yourself. You can follow the + [official documentation][registry-deploy]. +- The container Registry will not be enabled by default, you will have to + configure it in `gitlab.yml`. + +The contents of `gitlab.yml` are: + +``` +registry: + enabled: true + host: registry.gitlab.example.com + port: 5005 + api_url: http://localhost:5000/ + key_path: config/registry.key + path: shared/registry + issuer: gitlab-issuer +``` + +where: + +| Parameter | Description | +| --------- | ----------- | +| `enabled` | Enables the Registry in GitLab. By default this is false. | +| `host` | The host URL under which the Registry will run and the users will be able to use. | +| `port` | The port under which the external Registry domain will listen on. | +| `api_url` | The internal API URL under which the Registry is exposed to. It defaults to `http://localhost:5000`. | +| `key_path`| The private key location that is a pair of Registry's `rootcertbundle`. Read the [token auth configuration documentation][token-config]. | +| `path` | This should be the same directory like specified in Registry's `rootdirectory`. Read the [storage configuration documentation][storage-config]. | +| `issuer` | This should be the same value as configured in Registry's `issuer`. Read the [token auth configuration documentation][token-config]. | + ## Container Registry domain configuration -There are two ways you can configure the container Registry domain. Either use +There are two ways you can configure the Registry's external domain. Either use the existing GitLab domain where in that case the Registry will listen on a port, or use a completely separate domain. Since the container Registry requires a TLS certificate, in the end it all boils down to how easy or pricey is to get a new TLS certificate. -1. If the Registry is configured to use its own domain, you will need a TLS - certificate for that specific domain (e.g., `registry.example.com`) or maybe - a wildcard certificate if hosted under a subdomain (e.g., `registry.gitlab.example.com`). -1. If the Registry is configured to use the existing GitLab domain, you can - expose the Registry on a port so that you can reuse the existing GitLab TLS - certificate. - Please take this into consideration before configuring the Container Registry for the first time. -Read more about Docker Registry at https://docs.docker.com/registry/introduction/. - ### Container Registry under existing GitLab domain -Lets assume that your GitLab instance is accessible at -`https://gitlab.example.com`. You can expose the Container Registry under -a separate port. +If the Registry is configured to use the existing GitLab domain, you can +expose the Registry on a port so that you can reuse the existing GitLab TLS +certificate. -Lets assume that you've exposed port `4567` in your network firewall. +Assuming that the GitLab domain is `https://gitlab.example.com` and the port the +Registry is exposed to the outside world is `4567`, here is what you need to set +in `gitlab.rb` or `gitlab.yml` if you are using Omnibus GitLab or installed +GitLab from source respectively. **Omnibus GitLab packages** ---- +1. Your `/etc/gitlab/gitlab.rb` should contain the Registry URL as well as the + path to the existing TLS certificate and key used by GitLab. -Your `/etc/gitlab/gitlab.rb` should contain the Container Registry URL as -well as the path to the existing SSL certificate and key used by GitLab. + ```ruby + registry_external_url 'https://gitlab.example.com:4567' -```ruby -registry_external_url 'https://gitlab.example.com:4567' + ## If your SSL certificate is not in /etc/gitlab/ssl/gitlab.example.com.crt + ## and key not in /etc/gitlab/ssl/gitlab.example.com.key uncomment the lines + ## below -## If your SSL certificate is not in /etc/gitlab/ssl/gitlab.example.com.crt -## and key not in /etc/gitlab/ssl/gitlab.example.com.key uncomment the lines -## below + # registry_nginx['ssl_certificate'] = "/path/to/certificate.pem" + # registry_nginx['ssl_certificate_key'] = "/path/to/certificate.key" + ``` -# registry_nginx['ssl_certificate'] = "/path/to/certificate.pem" -# registry_nginx['ssl_certificate_key'] = "/path/to/certificate.key" -``` +1. Save the file and [reconfigure GitLab][] for the changes to take effect. -Save the file and [reconfigure GitLab][] for the changes to take effect. +--- + +**Installation from source** + +``` +registry: + enabled: true + host: registry.gitlab.example.com + port: 5005 + api_url: http://localhost:5000/ + key_path: config/registry.key + path: shared/registry + issuer: gitlab-issuer +``` Users should now be able to login to the Container Registry using: @@ -89,7 +139,11 @@ with their GitLab credentials. ### Container Registry under its own domain -Lets assume that you want the Container Registry to be accessible at +If the Registry is configured to use its own domain, you will need a TLS +certificate for that specific domain (e.g., `registry.example.com`) or maybe +a wildcard certificate if hosted under a subdomain (e.g., `registry.gitlab.example.com`). + +Let's assume that you want the container Registry to be accessible at `https://registry.gitlab.example.com`. --- @@ -114,6 +168,17 @@ registry_external_url 'https://registry.gitlab.example.com' Save the file and [reconfigure GitLab][] for the changes to take effect. +``` +registry: + enabled: true + host: registry.gitlab.example.com + port: 5005 + api_url: http://localhost:5000/ + key_path: config/registry.key + path: shared/registry + issuer: gitlab-issuer +``` + Users should now be able to login to the Container Registry using: ```bash @@ -132,6 +197,17 @@ registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/certificate.pem" registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/certificate.key" ``` +``` +registry: + enabled: true + host: registry.gitlab.example.com + port: 5005 + api_url: http://localhost:5000/ + key_path: config/registry.key + path: shared/registry + issuer: gitlab-issuer +``` + ## Container Registry storage path It is possible to change path where containers will be stored by the Container @@ -152,6 +228,17 @@ In `/etc/gitlab/gitlab.rb`: gitlab_rails['registry_path'] = "/path/to/registry/storage" ``` +``` +registry: + enabled: true + host: registry.gitlab.example.com + port: 5005 + api_url: http://localhost:5000/ + key_path: config/registry.key + path: shared/registry + issuer: gitlab-issuer +``` + Save the file and [reconfigure GitLab][] for the changes to take effect. **NOTE** You should confirm that the GitLab, registry and the web server user @@ -159,6 +246,31 @@ have access to this directory. ## Disable Container Registry +**Omnibus GitLab** + +``` +# Settings used by GitLab application +# gitlab_rails['registry_enabled'] = true +``` + +``` +# gitlab_rails['registry_host'] = "registry.gitlab.example.com" +# gitlab_rails['registry_api_url'] = "http://localhost:5000" +# gitlab_rails['registry_key_path'] = "/var/opt/gitlab/gitlab-rails/certificate.key" +# gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry" +# gitlab_rails['registry_issuer'] = "omnibus-gitlab-issuer" + +# Settings used by Registry application +# registry['enable'] = true +# registry['username'] = "registry" +# registry['group'] = "registry" +# registry['uid'] = nil +# registry['gid'] = nil +# registry['dir'] = "/var/opt/gitlab/registry" +# registry['log_directory'] = "/var/log/gitlab/registry" +# registry['log_level'] = "info" +# registry['rootcertbundle'] = "/var/opt/gitlab/registry/certificate.crt" +``` ## Changelog @@ -167,3 +279,6 @@ have access to this directory. [wildcard certificate]: "https://en.wikipedia.org/wiki/Wildcard_certificate" [ce-4040]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4040 [docker-insecure]: https://docs.docker.com/registry/insecure/ +[registry-deploy]: https://docs.docker.com/registry/deploying/ +[storage-config]: https://docs.docker.com/registry/configuration/#storage +[token-config]: https://docs.docker.com/registry/configuration/#token -- cgit v1.2.1 From c6cd07ba3a8ef149ff69e0c1520a810b3001b65f Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 20 May 2016 13:18:39 -0500 Subject: Add link to container registry --- doc/README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index 8aed060d247..a297ce54f3e 100644 --- a/doc/README.md +++ b/doc/README.md @@ -44,6 +44,7 @@ - [Monitoring uptime](monitoring/health_check.md) Check the server status using the health check endpoint - [Sidekiq Troubleshooting](administration/troubleshooting/sidekiq.md) Debug when Sidekiq appears hung and is not processing jobs - [High Availability](administration/high_availability/README.md) Configure multiple servers for scaling or high availability +- [Container Registry](administration/container_registry.md) Configure Docker Registry with GitLab ## Contributor documentation -- cgit v1.2.1 From e9817f21f4baa20244095f56dd0d45b5c2e9c5dc Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sat, 21 May 2016 20:08:26 -0500 Subject: Major overhaul of the Registry admin docs --- doc/administration/container_registry.md | 294 ++++++++++++++++++++----------- 1 file changed, 187 insertions(+), 107 deletions(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index 15c3c1a7470..21f086792cd 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -3,8 +3,8 @@ > **Note:** This feature was [introduced][ce-4040] in GitLab 8.8. -With the Docker container Registry integrated into GitLab, every project can -have its own space for Docker images. +With the Docker Container Registry integrated into GitLab, every project can +have its own space to store its Docker images. You can read more about Docker Registry at https://docs.docker.com/registry/introduction/. @@ -14,18 +14,22 @@ You can read more about Docker Registry at https://docs.docker.com/registry/intr **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* -- [Differences between Omnibus and source installations](#differences-between-omnibus-and-source-installations) +- [How to enable the Container Registry](#how-to-enable-the-container-registry) - [Container Registry domain configuration](#container-registry-domain-configuration) - - [Container Registry under existing GitLab domain](#container-registry-under-existing-gitlab-domain) - - [Container Registry under its own domain](#container-registry-under-its-own-domain) + - [Configure Container Registry under an existing GitLab domain](#configure-container-registry-under-an-existing-gitlab-domain) + - [Configure Container Registry under its own domain](#configure-container-registry-under-its-own-domain) +- [Disable Container Registry site-wide](#disable-container-registry-site-wide) +- [Disable Container Registry per project](#disable-container-registry-per-project) +- [Disable Container Registry for new projects site-wide](#disable-container-registry-for-new-projects-site-wide) - [Container Registry storage path](#container-registry-storage-path) -- [Disable Container Registry](#disable-container-registry) +- [Storage limitations](#storage-limitations) - [Changelog](#changelog) +## How to enable the Container Registry -## Differences between Omnibus and source installations +**Omnibus GitLab installations** If you are using Omnibus, you have to bare in mind the following: @@ -35,19 +39,21 @@ If you are using Omnibus, you have to bare in mind the following: on how to achieve that. You will also have to configure your firewall to allow connections to that port. - The container Registry works under HTTPS by default. Using HTTP is possible - but not recommended and out of the scope of this document, - [see the insecure Registry documentation][docker-insecure] if you want to + but not recommended and out of the scope of this document. + [See the insecure Registry documentation][docker-insecure] if you want to implement this. --- +**Installations from source** + If you have installed GitLab from source: -- Omnibus has some things configured for you -- You will have to install Docker Registry by yourself. You can follow the - [official documentation][registry-deploy]. -- The container Registry will not be enabled by default, you will have to - configure it in `gitlab.yml`. +1. You will have to [install Docker Registry][registry-deploy] by yourself. +1. After the installation is complete, you will have to configure the Registry's + settings `gitlab.yml` in order to enable it. +1. Use the sample NGINX configuration file that is found under + [`lib/support/nginx/registry-ssl`][registry-ssl]. The contents of `gitlab.yml` are: @@ -66,26 +72,31 @@ where: | Parameter | Description | | --------- | ----------- | -| `enabled` | Enables the Registry in GitLab. By default this is false. | +| `enabled` | `true` or `false`. Enables the Registry in GitLab. By default this is `false`. | | `host` | The host URL under which the Registry will run and the users will be able to use. | | `port` | The port under which the external Registry domain will listen on. | | `api_url` | The internal API URL under which the Registry is exposed to. It defaults to `http://localhost:5000`. | | `key_path`| The private key location that is a pair of Registry's `rootcertbundle`. Read the [token auth configuration documentation][token-config]. | -| `path` | This should be the same directory like specified in Registry's `rootdirectory`. Read the [storage configuration documentation][storage-config]. | +| `path` | This should be the same directory like specified in Registry's `rootdirectory`. Read the [storage configuration documentation][storage-config]. This path needs to be readable by the GitLab user, the web-server user and the Registry user. Read more in [#container-registry-storage-path](#container-registry-storage-path). | | `issuer` | This should be the same value as configured in Registry's `issuer`. Read the [token auth configuration documentation][token-config]. | +>**Note:** +GitLab does not ship with a Registry init file. Hence, [restarting GitLab][restart gitlab] +will not restart the Registry should you modify its settings. Read the upstream +documentation on how to achieve that. + ## Container Registry domain configuration There are two ways you can configure the Registry's external domain. Either use the existing GitLab domain where in that case the Registry will listen on a port, or use a completely separate domain. Since the container Registry requires a -TLS certificate, in the end it all boils down to how easy or pricey is to -get a new TLS certificate. +TLS certificate, in the end it all boils down to how easy or pricey is to get a +new TLS certificate. Please take this into consideration before configuring the Container Registry for the first time. -### Container Registry under existing GitLab domain +### Configure Container Registry under an existing GitLab domain If the Registry is configured to use the existing GitLab domain, you can expose the Registry on a port so that you can reuse the existing GitLab TLS @@ -96,118 +107,203 @@ Registry is exposed to the outside world is `4567`, here is what you need to set in `gitlab.rb` or `gitlab.yml` if you are using Omnibus GitLab or installed GitLab from source respectively. -**Omnibus GitLab packages** +--- + +**Omnibus GitLab installations** + +>**Note:** +If you are using HTTPS in your Omnibus packages, then the Registry will be +enabled by default and exposed under port `5005`. Follow the steps below only if +you want to change the default port. 1. Your `/etc/gitlab/gitlab.rb` should contain the Registry URL as well as the - path to the existing TLS certificate and key used by GitLab. + path to the existing TLS certificate and key used by GitLab: ```ruby + gitlab_rails['registry_port'] = "4567" + gitlab_rails['registry_host'] = "gitlab.example.com" + + # The following setting is needed for NGINX registry_external_url 'https://gitlab.example.com:4567' + ``` - ## If your SSL certificate is not in /etc/gitlab/ssl/gitlab.example.com.crt - ## and key not in /etc/gitlab/ssl/gitlab.example.com.key uncomment the lines - ## below + If your TLS certificate is not in `/etc/gitlab/ssl/gitlab.example.com.crt` + and key not in `/etc/gitlab/ssl/gitlab.example.com.key` uncomment the lines + below: - # registry_nginx['ssl_certificate'] = "/path/to/certificate.pem" - # registry_nginx['ssl_certificate_key'] = "/path/to/certificate.key" + ```ruby + registry_nginx['ssl_certificate'] = "/path/to/certificate.pem" + registry_nginx['ssl_certificate_key'] = "/path/to/certificate.key" ``` 1. Save the file and [reconfigure GitLab][] for the changes to take effect. --- -**Installation from source** +**Installations from source** -``` -registry: - enabled: true - host: registry.gitlab.example.com - port: 5005 - api_url: http://localhost:5000/ - key_path: config/registry.key - path: shared/registry - issuer: gitlab-issuer -``` +1. Open `/home/git/gitlab/config/gitlab.yml`, find the `registry` entry and + configure it with the following settings: + + ``` + registry: + enabled: true + host: gitlab.example.com + port: 4567 + ``` -Users should now be able to login to the Container Registry using: +1. Save the file and [restart GitLab][] for the changes to take effect. +1. Make the relevant changes in NGINX as well (domain, port, TLS certificates path). + +--- + +Users should now be able to login to the Container Registry with their GitLab +credentials using: ```bash docker login gitlab.example.com:4567 ``` -with their GitLab credentials. - -### Container Registry under its own domain +### Configure Container Registry under its own domain If the Registry is configured to use its own domain, you will need a TLS certificate for that specific domain (e.g., `registry.example.com`) or maybe -a wildcard certificate if hosted under a subdomain (e.g., `registry.gitlab.example.com`). +a wildcard certificate if hosted under a subdomain of your existing GitLab +domain (e.g., `registry.gitlab.example.com`). Let's assume that you want the container Registry to be accessible at `https://registry.gitlab.example.com`. --- -**Omnibus GitLab packages** +**Omnibus GitLab installations** -Place your SSL certificate and key in -`/etc/gitlab/ssl/registry.gitlab.example.com.crt` -and -`/etc/gitlab/ssl/registry.gitlab.example.com.key` and make sure they have -correct permissions: +1. Place your TLS certificate and key in + `/etc/gitlab/ssl/registry.gitlab.example.com.crt` and + `/etc/gitlab/ssl/registry.gitlab.example.com.key` and make sure they have + correct permissions: -```bash -chmod 600 /etc/gitlab/ssl/registry.gitlab.example.com.* -``` + ```bash + chmod 600 /etc/gitlab/ssl/registry.gitlab.example.com.* + ``` + +1. Once the TLS certificate is in place, edit `/etc/gitlab/gitlab.rb` with: + + ```ruby + registry_external_url 'https://registry.gitlab.example.com' + ``` -Once the SSL certificate is in place, edit `/etc/gitlab/gitlab.rb` with: +1. Save the file and [reconfigure GitLab][] for the changes to take effect. +> **Note:** +If you have a [wildcard certificate][], you need to specify the path to the +certificate in addition to the URL, in this case `/etc/gitlab/gitlab.rb` will +look like: +> ```ruby registry_external_url 'https://registry.gitlab.example.com' +registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/certificate.pem" +registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/certificate.key" ``` -Save the file and [reconfigure GitLab][] for the changes to take effect. +--- -``` -registry: - enabled: true - host: registry.gitlab.example.com - port: 5005 - api_url: http://localhost:5000/ - key_path: config/registry.key - path: shared/registry - issuer: gitlab-issuer -``` +**Installations from source** + +1. Open `/home/git/gitlab/config/gitlab.yml`, find the `registry` entry and + configure it with the following settings: + + ``` + registry: + enabled: true + host: registry.gitlab.example.com + port: 4567 + ``` + +1. Save the file and [restart GitLab][] for the changes to take effect. +1. Make the relevant changes in NGINX as well (domain, port, TLS certificates path). + +--- -Users should now be able to login to the Container Registry using: +Users should now be able to login to the Container Registry using their GitLab +credentials: ```bash docker login registry.gitlab.example.com ``` -with their GitLab credentials. +## Disable Container Registry site-wide -If you have a [wildcard certificate][], you need to specify the path to the -certificate in addition to the URL, in this case `/etc/gitlab/gitlab.rb` will -look like: +**Omnibus GitLab** ```ruby -registry_external_url 'https://registry.gitlab.example.com' -registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/certificate.pem" -registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/certificate.key" +gitlab_rails['registry_enabled'] = true ``` ``` -registry: - enabled: true - host: registry.gitlab.example.com - port: 5005 - api_url: http://localhost:5000/ - key_path: config/registry.key - path: shared/registry - issuer: gitlab-issuer +# gitlab_rails['registry_port'] = "5005" +# gitlab_rails['registry_host'] = "registry.gitlab.example.com" +# gitlab_rails['registry_api_url'] = "http://localhost:5000" +# gitlab_rails['registry_key_path'] = "/var/opt/gitlab/gitlab-rails/certificate.key" +# gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry" +# gitlab_rails['registry_issuer'] = "omnibus-gitlab-issuer" + +# Settings used by Registry application +# registry['enable'] = true +# registry['username'] = "registry" +# registry['group'] = "registry" +# registry['uid'] = nil +# registry['gid'] = nil +# registry['dir'] = "/var/opt/gitlab/registry" +# registry['log_directory'] = "/var/log/gitlab/registry" +# registry['log_level'] = "info" +# registry['rootcertbundle'] = "/var/opt/gitlab/registry/certificate.crt" ``` +## Disable Container Registry per project + +If Registry is enabled in your GitLab instance, but you don't need it for your +project, you can disable it from your project's settings. Read the user guide +on how to achieve that. + +## Disable Container Registry for new projects site-wide + +The Registry is enabled by default on all new projects. To disable this function +and let the owners of a project to enable Registry by themselves, follow the +steps below. + +--- + +**Omnibus GitLab installations** + +1. Edit `/etc/gitlab/gitlab.rb` and add the following line: + + ```ruby + gitlab_rails['gitlab_default_projects_features_container_registry'] = false + ``` + +1. Save the file and [reconfigure GitLab][] for the changes to take effect. + +--- + +**Installations from source** + +1. Open `/home/git/gitlab/config/gitlab.yml`, find the `default_projects_features` + entry and configure it so that `container_registry` is set to `false`: + + ``` + ## Default project features settings + default_projects_features: + issues: true + merge_requests: true + wiki: true + snippets: false + builds: true + container_registry: false + ``` + +1. Save the file and [restart GitLab][] for the changes to take effect. + ## Container Registry storage path It is possible to change path where containers will be stored by the Container @@ -244,41 +340,25 @@ Save the file and [reconfigure GitLab][] for the changes to take effect. **NOTE** You should confirm that the GitLab, registry and the web server user have access to this directory. -## Disable Container Registry - -**Omnibus GitLab** - -``` -# Settings used by GitLab application -# gitlab_rails['registry_enabled'] = true -``` - -``` -# gitlab_rails['registry_host'] = "registry.gitlab.example.com" -# gitlab_rails['registry_api_url'] = "http://localhost:5000" -# gitlab_rails['registry_key_path'] = "/var/opt/gitlab/gitlab-rails/certificate.key" -# gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry" -# gitlab_rails['registry_issuer'] = "omnibus-gitlab-issuer" +## Storage limitations -# Settings used by Registry application -# registry['enable'] = true -# registry['username'] = "registry" -# registry['group'] = "registry" -# registry['uid'] = nil -# registry['gid'] = nil -# registry['dir'] = "/var/opt/gitlab/registry" -# registry['log_directory'] = "/var/log/gitlab/registry" -# registry['log_level'] = "info" -# registry['rootcertbundle'] = "/var/opt/gitlab/registry/certificate.crt" -``` +Currently, there is no storage limitation, which means a user can upload an +infinite amount of Docker images with arbitrary sizes. This setting will be +configurable in future releases. ## Changelog +**GitLab 8.8 ([source docs][8-8-docs])** + +- GitLab Container Registry feature was introduced. -[reconfigure gitlab]: ../../administration/restart_gitlab.md "How to restart GitLab documentation" -[wildcard certificate]: "https://en.wikipedia.org/wiki/Wildcard_certificate" +[reconfigure gitlab]: restart_gitlab.md#omnibus-gitlab-reconfigure +[restart gitlab]: restart_gitlab.md#installations-from-source +[wildcard certificate]: https://en.wikipedia.org/wiki/Wildcard_certificate [ce-4040]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4040 [docker-insecure]: https://docs.docker.com/registry/insecure/ [registry-deploy]: https://docs.docker.com/registry/deploying/ [storage-config]: https://docs.docker.com/registry/configuration/#storage [token-config]: https://docs.docker.com/registry/configuration/#token +[8-8-docs]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-8-stable/doc/administration/container_registry.md +[registry-ssl]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/support/nginx/registry-ssl -- cgit v1.2.1 From 27067e565fb5c425b307a8e28c5dcab95fa8b0bf Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sat, 21 May 2016 20:15:42 -0500 Subject: Clarify how the Registry is enabled in Omnibus --- doc/administration/container_registry.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index 21f086792cd..435e7f627b0 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -34,14 +34,17 @@ You can read more about Docker Registry at https://docs.docker.com/registry/intr If you are using Omnibus, you have to bare in mind the following: - The container Registry will be enabled by default if GitLab is configured - with HTTPS and it will listen on port `5005`. If you want the Registry to - listen on a port other than `5005`, read [#Container Registry under existing GitLab domain](#container-registry-under-existing-gitlab-domain) + with HTTPS in new and existing installations (no action is required from the + administrator), and it will listen on port `5005`. If you wish to change it, + read [#Container Registry under existing GitLab domain](#container-registry-under-existing-gitlab-domain) on how to achieve that. You will also have to configure your firewall to allow - connections to that port. -- The container Registry works under HTTPS by default. Using HTTP is possible - but not recommended and out of the scope of this document. - [See the insecure Registry documentation][docker-insecure] if you want to - implement this. + incoming connections to that port. + +>**Note:** +The container Registry works under HTTPS by default. Using HTTP is possible +but not recommended and out of the scope of this document. +Read the [insecure Registry documentation][docker-insecure] if you want to +implement this. --- -- cgit v1.2.1 From e955f49fb7d8edeefc0d2647539276acf34d5731 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sun, 22 May 2016 17:23:30 -0500 Subject: Fix Registry docs now that it is not enabled be default --- doc/administration/container_registry.md | 43 ++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 16 deletions(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index 435e7f627b0..a3df14019f3 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -14,7 +14,7 @@ You can read more about Docker Registry at https://docs.docker.com/registry/intr **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* -- [How to enable the Container Registry](#how-to-enable-the-container-registry) +- [Enable the Container Registry](#enable-the-container-registry) - [Container Registry domain configuration](#container-registry-domain-configuration) - [Configure Container Registry under an existing GitLab domain](#configure-container-registry-under-an-existing-gitlab-domain) - [Configure Container Registry under its own domain](#configure-container-registry-under-its-own-domain) @@ -27,18 +27,19 @@ You can read more about Docker Registry at https://docs.docker.com/registry/intr -## How to enable the Container Registry +## Enable the Container Registry **Omnibus GitLab installations** -If you are using Omnibus, you have to bare in mind the following: +1. Open `/etc/gitlab/gitlab.rb` and edit or add the following line: -- The container Registry will be enabled by default if GitLab is configured - with HTTPS in new and existing installations (no action is required from the - administrator), and it will listen on port `5005`. If you wish to change it, - read [#Container Registry under existing GitLab domain](#container-registry-under-existing-gitlab-domain) - on how to achieve that. You will also have to configure your firewall to allow - incoming connections to that port. + ```ruby + gitlab_rails['registry_enabled'] = true + ``` + +1. The next step is to configure the domain name under which the Container + Registry will listen to. Read [#container-registry-domain-configuration](#container-registry-domain-configuration) + and pick one of the two options that fits your case. >**Note:** The container Registry works under HTTPS by default. Using HTTP is possible @@ -54,9 +55,10 @@ If you have installed GitLab from source: 1. You will have to [install Docker Registry][registry-deploy] by yourself. 1. After the installation is complete, you will have to configure the Registry's - settings `gitlab.yml` in order to enable it. + settings in `gitlab.yml` in order to enable it. 1. Use the sample NGINX configuration file that is found under - [`lib/support/nginx/registry-ssl`][registry-ssl]. + [`lib/support/nginx/registry-ssl`][registry-ssl] and edit it to match the + `host`, `port` and TLS certs paths. The contents of `gitlab.yml` are: @@ -90,11 +92,15 @@ documentation on how to achieve that. ## Container Registry domain configuration -There are two ways you can configure the Registry's external domain. Either use -the existing GitLab domain where in that case the Registry will listen on a port, -or use a completely separate domain. Since the container Registry requires a -TLS certificate, in the end it all boils down to how easy or pricey is to get a -new TLS certificate. +There are two ways you can configure the Registry's external domain. + +- Either [use the existing GitLab domain][existing-domain] where in that case + the Registry will have to listen on a port and reuse GitLab's TLS certificate, +- or [use a completely separate domain][new-domain] with a new TLS certificate + for that domain. + +Since the container Registry requires a TLS certificate, in the end it all boils +down to how easy or pricey is to get a new one. Please take this into consideration before configuring the Container Registry for the first time. @@ -193,6 +199,9 @@ Let's assume that you want the container Registry to be accessible at 1. Once the TLS certificate is in place, edit `/etc/gitlab/gitlab.rb` with: ```ruby + gitlab_rails['registry_host'] = "registry.gitlab.example.com" + + # The following setting is needed for NGINX registry_external_url 'https://registry.gitlab.example.com' ``` @@ -365,3 +374,5 @@ configurable in future releases. [token-config]: https://docs.docker.com/registry/configuration/#token [8-8-docs]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-8-stable/doc/administration/container_registry.md [registry-ssl]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/support/nginx/registry-ssl +[existing-domain]: #configure-container-registry-under-an-existing-gitlab-domain +[new-domain]: #configure-container-registry-under-its-own-domain -- cgit v1.2.1 From b565cfa50fa53bede268904d318547e593931f0b Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sun, 22 May 2016 18:52:42 -0500 Subject: Fix remaining docs on enabling/disabling Registry --- doc/administration/container_registry.md | 67 ++++++++++++++++---------------- 1 file changed, 34 insertions(+), 33 deletions(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index a3df14019f3..7d7d5fd1e84 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -120,22 +120,20 @@ GitLab from source respectively. **Omnibus GitLab installations** ->**Note:** -If you are using HTTPS in your Omnibus packages, then the Registry will be -enabled by default and exposed under port `5005`. Follow the steps below only if -you want to change the default port. - 1. Your `/etc/gitlab/gitlab.rb` should contain the Registry URL as well as the path to the existing TLS certificate and key used by GitLab: ```ruby - gitlab_rails['registry_port'] = "4567" gitlab_rails['registry_host'] = "gitlab.example.com" + gitlab_rails['registry_port'] = "4567" # The following setting is needed for NGINX registry_external_url 'https://gitlab.example.com:4567' ``` + Note how the `registry_external_url` is listening on HTTPS and is a + conjunction of `registry_host` and `registry_port`. + If your TLS certificate is not in `/etc/gitlab/ssl/gitlab.example.com.crt` and key not in `/etc/gitlab/ssl/gitlab.example.com.key` uncomment the lines below: @@ -213,7 +211,6 @@ certificate in addition to the URL, in this case `/etc/gitlab/gitlab.rb` will look like: > ```ruby -registry_external_url 'https://registry.gitlab.example.com' registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/certificate.pem" registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/certificate.key" ``` @@ -229,7 +226,6 @@ registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/certificate.key" registry: enabled: true host: registry.gitlab.example.com - port: 4567 ``` 1. Save the file and [restart GitLab][] for the changes to take effect. @@ -246,31 +242,36 @@ docker login registry.gitlab.example.com ## Disable Container Registry site-wide +>**Note:** +Disabling the Registry in the Rails GitLab application as set by the following +steps, will not remove any existing Docker images. This is handled by the +Registry application itself. + **Omnibus GitLab** -```ruby -gitlab_rails['registry_enabled'] = true -``` +1. Open `/etc/gitlab/gitlab.rb` and set `gitlab_rails['registry_enabled']` to + `false` and comment out the `registry_external_url`: -``` -# gitlab_rails['registry_port'] = "5005" -# gitlab_rails['registry_host'] = "registry.gitlab.example.com" -# gitlab_rails['registry_api_url'] = "http://localhost:5000" -# gitlab_rails['registry_key_path'] = "/var/opt/gitlab/gitlab-rails/certificate.key" -# gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry" -# gitlab_rails['registry_issuer'] = "omnibus-gitlab-issuer" - -# Settings used by Registry application -# registry['enable'] = true -# registry['username'] = "registry" -# registry['group'] = "registry" -# registry['uid'] = nil -# registry['gid'] = nil -# registry['dir'] = "/var/opt/gitlab/registry" -# registry['log_directory'] = "/var/log/gitlab/registry" -# registry['log_level'] = "info" -# registry['rootcertbundle'] = "/var/opt/gitlab/registry/certificate.crt" -``` + ```ruby + gitlab_rails['registry_enabled'] = false + # registry_external_url 'https://registry.gitlab.example.com' + ``` + +1. Save the file and [reconfigure GitLab][] for the changes to take effect. + +--- + +**Installations from source** + +1. Open `/home/git/gitlab/config/gitlab.yml`, find the `registry` entry and + set `enabled` to `false`: + + ``` + registry: + enabled: false + ``` + +1. Save the file and [restart GitLab][] for the changes to take effect. ## Disable Container Registry per project @@ -280,9 +281,9 @@ on how to achieve that. ## Disable Container Registry for new projects site-wide -The Registry is enabled by default on all new projects. To disable this function -and let the owners of a project to enable Registry by themselves, follow the -steps below. +If the Container Registry is enabled, then it will be available on all new +projects. To disable this function and let the owners of a project to enable +the Container Registry by themselves, follow the steps below. --- -- cgit v1.2.1 From f896a4e0c1cb66392e069556c1c298915fc55d0e Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sun, 22 May 2016 19:31:19 -0500 Subject: Refactor storage location section --- doc/administration/container_registry.md | 58 +++++++++++++++++++------------- 1 file changed, 34 insertions(+), 24 deletions(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index 7d7d5fd1e84..e9d850ca685 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -319,39 +319,49 @@ the Container Registry by themselves, follow the steps below. ## Container Registry storage path -It is possible to change path where containers will be stored by the Container -Registry. +To change the storage path where Docker images will be stored, follow the +steps below. -**Omnibus GitLab packages** +This path is accessible to: + +- the user running the Container Registry daemon, +- the user running GitLab +- and to the user running the Nginx web server. + +> **Warning** You should confirm that all GitLab, Registry and web server users +have access to this directory. --- -By default, the path Container Registry is using to store the containers is in -`/var/opt/gitlab/gitlab-rails/shared/registry`. -This path is accessible to the user running the Container Registry daemon, -user running GitLab and to the user running Nginx web server. +**Omnibus GitLab installations** -In `/etc/gitlab/gitlab.rb`: +The default location where images are stored in Omnibus, is +`/var/opt/gitlab/gitlab-rails/shared/registry`. To change it: -```ruby -gitlab_rails['registry_path'] = "/path/to/registry/storage" -``` +1. Edit `/etc/gitlab/gitlab.rb`: -``` -registry: - enabled: true - host: registry.gitlab.example.com - port: 5005 - api_url: http://localhost:5000/ - key_path: config/registry.key - path: shared/registry - issuer: gitlab-issuer -``` + ```ruby + gitlab_rails['registry_path'] = "/path/to/registry/storage" + ``` -Save the file and [reconfigure GitLab][] for the changes to take effect. +1. Save the file and [reconfigure GitLab][] for the changes to take effect. -**NOTE** You should confirm that the GitLab, registry and the web server user -have access to this directory. +--- + +**Installations from source** + +The default location where images are stored in source installations, is +`/home/git/gitlab/shared/registry`. To change it: + +1. Open `/home/git/gitlab/config/gitlab.yml`, find the `registry` entry and + change the `path` setting: + + ``` + registry: + path: shared/registry + ``` + +1. Save the file and [restart GitLab][] for the changes to take effect. ## Storage limitations -- cgit v1.2.1 From c01f99b768d0209c67e73b16751cacede2d8d6ad Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sun, 22 May 2016 19:53:19 -0500 Subject: Fixes suggested by Kamil --- doc/administration/container_registry.md | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index e9d850ca685..caf9a5bef2c 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -31,15 +31,9 @@ You can read more about Docker Registry at https://docs.docker.com/registry/intr **Omnibus GitLab installations** -1. Open `/etc/gitlab/gitlab.rb` and edit or add the following line: - - ```ruby - gitlab_rails['registry_enabled'] = true - ``` - -1. The next step is to configure the domain name under which the Container - Registry will listen to. Read [#container-registry-domain-configuration](#container-registry-domain-configuration) - and pick one of the two options that fits your case. +All you have to do is configure the domain name under which the Container +Registry will listen to. Read [#container-registry-domain-configuration](#container-registry-domain-configuration) +and pick one of the two options that fits your case. >**Note:** The container Registry works under HTTPS by default. Using HTTP is possible @@ -124,15 +118,11 @@ GitLab from source respectively. path to the existing TLS certificate and key used by GitLab: ```ruby - gitlab_rails['registry_host'] = "gitlab.example.com" - gitlab_rails['registry_port'] = "4567" - - # The following setting is needed for NGINX registry_external_url 'https://gitlab.example.com:4567' ``` - Note how the `registry_external_url` is listening on HTTPS and is a - conjunction of `registry_host` and `registry_port`. + Note how the `registry_external_url` is listening on HTTPS under the + existing GitLab URL, but on a different port. If your TLS certificate is not in `/etc/gitlab/ssl/gitlab.example.com.crt` and key not in `/etc/gitlab/ssl/gitlab.example.com.key` uncomment the lines @@ -197,12 +187,11 @@ Let's assume that you want the container Registry to be accessible at 1. Once the TLS certificate is in place, edit `/etc/gitlab/gitlab.rb` with: ```ruby - gitlab_rails['registry_host'] = "registry.gitlab.example.com" - - # The following setting is needed for NGINX registry_external_url 'https://registry.gitlab.example.com' ``` + Note how the `registry_external_url` is listening on HTTPS. + 1. Save the file and [reconfigure GitLab][] for the changes to take effect. > **Note:** @@ -249,12 +238,10 @@ Registry application itself. **Omnibus GitLab** -1. Open `/etc/gitlab/gitlab.rb` and set `gitlab_rails['registry_enabled']` to - `false` and comment out the `registry_external_url`: +1. Open `/etc/gitlab/gitlab.rb` and set `registry['enable']` to `false`: ```ruby - gitlab_rails['registry_enabled'] = false - # registry_external_url 'https://registry.gitlab.example.com' + registry['enable'] = false ``` 1. Save the file and [reconfigure GitLab][] for the changes to take effect. @@ -326,7 +313,6 @@ This path is accessible to: - the user running the Container Registry daemon, - the user running GitLab -- and to the user running the Nginx web server. > **Warning** You should confirm that all GitLab, Registry and web server users have access to this directory. -- cgit v1.2.1 From 8ed9b6aa7a31dad147e050d3fe992fbf814712fb Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sun, 22 May 2016 23:12:32 -0500 Subject: Initial version of user documentation of container registry --- doc/README.md | 1 + doc/container_registry/README.md | 84 ++++++++++++++++++++++++++ doc/container_registry/container_registry.png | Bin 0 -> 354050 bytes doc/container_registry/project_feature.png | Bin 0 -> 392842 bytes 4 files changed, 85 insertions(+) create mode 100644 doc/container_registry/README.md create mode 100644 doc/container_registry/container_registry.png create mode 100644 doc/container_registry/project_feature.png (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index a297ce54f3e..8a6adee2fba 100644 --- a/doc/README.md +++ b/doc/README.md @@ -13,6 +13,7 @@ - [Profile Settings](profile/README.md) - [Project Services](project_services/project_services.md) Integrate a project with external services, such as CI and chat. - [Public access](public_access/public_access.md) Learn how you can allow public and internal access to projects. +- [Container Registry](container-registry/README.md) Learn how to use GitLab Container Registry. - [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects. - [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project. - [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN. diff --git a/doc/container_registry/README.md b/doc/container_registry/README.md new file mode 100644 index 00000000000..5af47f7120d --- /dev/null +++ b/doc/container_registry/README.md @@ -0,0 +1,84 @@ +# GitLab Container Registry + +> **Note:** +This feature was [introduced][ce-4040] in GitLab 8.8. + +With the Docker Container Registry integrated into GitLab, every project can +have its own space to store its Docker images. + +You can read more about Docker Registry at https://docs.docker.com/registry/introduction/. + +You can read more about administering GitLab Container Registry on [GitLab Container Registry Administration](../administration/container_registry.md) + +--- + +## Start using Container Registry + +1. First ask your system administrator to enable GitLab Container Registry following the [administration documentation](../administration/container_registry.md). + +2. Go to project settings and enable `Container Registry` feature on your project: + +![](project_feature.png) + +3. Login to Container Registry with your credentials: + +``` +docker login registry.example.com +``` + +## Build and push images + +Your registry is accessible under address configured via `registry_external_url`. +To start using it you need to first build and publish images: + +``` +docker build -t registry.example.com/group/project . +docker push registry.example.com/group/project +``` + +## Use images from GitLab Container Registry + +To download and run container from images hosted in GitLab Container Registry use `docker run`: + +``` +docker run [options] registry.example.com/group/project [arguments] +``` + +## Control Container Registry from GitLab + +GitLab offers simple Container Registry management. Go to your project and click **Container Registry**. +This view will show you all tags in your repository and will easily allow you to delete them. + +![](container_registry.png) + +## Build and push images using GitLab CI + +> **Note:** +This feature requires GitLab 8.8 and GitLab Runner 1.2. + +Make sure that your GitLab Runner is configured to allow building docker images. +You have to check the [Using Docker Build](../../ci/docker/using_docker_build.md). + +You can use [docker:dind](https://hub.docker.com/_/docker/) to build your images. +This is how the `.gitlab-ci.yml` looks like: + +``` + build_image: + image: docker:git + services: + - docker:dind + stage: build + script: + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com + - docker build -t registry.gitlab.com/group/project:latest . + - docker push registry.gitlab.com/group/project:latest +``` + +You have to use special credentials `gitlab-ci-token` with password stored in `$CI_BUILD_TOKEN` in order to push to registry connected to your project. +This allows you to automated building and deployment of your images. + +## Limitations + +In order to use container image from private project as an `image:` in your `.gitlab-ci.yml` you have to follow +[Using a private Docker Registry](https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/configuration/advanced-configuration.md#using-a-private-docker-registry). +This workflow will be simplified in the future. diff --git a/doc/container_registry/container_registry.png b/doc/container_registry/container_registry.png new file mode 100644 index 00000000000..e9505a73b40 Binary files /dev/null and b/doc/container_registry/container_registry.png differ diff --git a/doc/container_registry/project_feature.png b/doc/container_registry/project_feature.png new file mode 100644 index 00000000000..57a73d253c0 Binary files /dev/null and b/doc/container_registry/project_feature.png differ -- cgit v1.2.1 From 3fa32fa2d5c2674bea0768fd4e70132c71e19051 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 23 May 2016 16:36:00 +0200 Subject: Use gitlab-workhorse 0.7.3 --- 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 fa11eb9ba6a..526f127178d 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -394,7 +394,7 @@ GitLab Shell is an SSH access and repository management software developed speci cd /home/git sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git cd gitlab-workhorse - sudo -u git -H git checkout v0.7.1 + sudo -u git -H git checkout v0.7.3 sudo -u git -H make ### Initialize Database and Activate Advanced Features -- cgit v1.2.1 From 526da93052dd794c82f49c1b908d9a4c33d91dcf Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 23 May 2016 11:47:19 -0500 Subject: Fix link to container Registry user docs --- doc/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index 8a6adee2fba..d1345ab2493 100644 --- a/doc/README.md +++ b/doc/README.md @@ -13,7 +13,7 @@ - [Profile Settings](profile/README.md) - [Project Services](project_services/project_services.md) Integrate a project with external services, such as CI and chat. - [Public access](public_access/public_access.md) Learn how you can allow public and internal access to projects. -- [Container Registry](container-registry/README.md) Learn how to use GitLab Container Registry. +- [Container Registry](container_registry/README.md) Learn how to use GitLab Container Registry. - [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects. - [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project. - [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN. -- cgit v1.2.1 From c49f5f73356ac30270bb2ba52ae3f417ca06b802 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 23 May 2016 12:31:52 -0500 Subject: Copyedit Registry user docs --- doc/container_registry/README.md | 83 +++++++++++++++------- doc/container_registry/container_registry.png | Bin 354050 -> 0 bytes doc/container_registry/img/container_registry.png | Bin 0 -> 354050 bytes doc/container_registry/img/project_feature.png | Bin 0 -> 392842 bytes doc/container_registry/project_feature.png | Bin 392842 -> 0 bytes 5 files changed, 56 insertions(+), 27 deletions(-) delete mode 100644 doc/container_registry/container_registry.png create mode 100644 doc/container_registry/img/container_registry.png create mode 100644 doc/container_registry/img/project_feature.png delete mode 100644 doc/container_registry/project_feature.png (limited to 'doc') diff --git a/doc/container_registry/README.md b/doc/container_registry/README.md index 5af47f7120d..4df24ef13cc 100644 --- a/doc/container_registry/README.md +++ b/doc/container_registry/README.md @@ -3,33 +3,48 @@ > **Note:** This feature was [introduced][ce-4040] in GitLab 8.8. +> **Note:** +This document is about the user guide. To learn how to enable GitLab Container +Registry across your GitLab instance, visit the +[administrator documentation](../administration/container_registry.md). + With the Docker Container Registry integrated into GitLab, every project can have its own space to store its Docker images. You can read more about Docker Registry at https://docs.docker.com/registry/introduction/. -You can read more about administering GitLab Container Registry on [GitLab Container Registry Administration](../administration/container_registry.md) - --- -## Start using Container Registry +## Enable the Container Registry for your project -1. First ask your system administrator to enable GitLab Container Registry following the [administration documentation](../administration/container_registry.md). +1. First, ask your system administrator to enable GitLab Container Registry + following the [administration documentation](../administration/container_registry.md). + If you are using GitLab.com, this is enabled by default so you can start using + the Registry immediately. -2. Go to project settings and enable `Container Registry` feature on your project: +1. Go to your project's settings and enable the **Container Registry** feature + on your project. For new projects this might be enabled by default. For + existing projects you will have to explicitly enable it. + + ![Enable Container Registry](img/project_feature.png) + +## Build and push images -![](project_feature.png) +After you save your project's settings, you should see a new link in the +sidebar called **Container Registry**. Following this link will get you to +your project's Registry panel where you can see how to login to the Container +Registry using your GitLab credentials. -3. Login to Container Registry with your credentials: +For example if the Registry's URL is `registry.example.com`, the you should be +able to login with: ``` docker login registry.example.com ``` -## Build and push images - -Your registry is accessible under address configured via `registry_external_url`. -To start using it you need to first build and publish images: +Building and publishing images should be a straightforward process. Just make +sure that you are using the Registry URL with the namespace and project name +that is hosted on GitLab: ``` docker build -t registry.example.com/group/project . @@ -38,18 +53,25 @@ docker push registry.example.com/group/project ## Use images from GitLab Container Registry -To download and run container from images hosted in GitLab Container Registry use `docker run`: +To download and run a container from images hosted in GitLab Container Registry, +use `docker run`: ``` docker run [options] registry.example.com/group/project [arguments] ``` -## Control Container Registry from GitLab +For more information on running Docker containers, visit the +[Docker documentation][docker-docs]. + +## Control Container Registry from within GitLab -GitLab offers simple Container Registry management. Go to your project and click **Container Registry**. -This view will show you all tags in your repository and will easily allow you to delete them. +GitLab offers a simple Container Registry management panel. Go to your project +and click **Container Registry** in the left sidebar. -![](container_registry.png) +This view will show you all tags in your project and will easily allow you to +delete them. + +![Container Registry panel](img/container_registry.png) ## Build and push images using GitLab CI @@ -57,10 +79,10 @@ This view will show you all tags in your repository and will easily allow you to This feature requires GitLab 8.8 and GitLab Runner 1.2. Make sure that your GitLab Runner is configured to allow building docker images. -You have to check the [Using Docker Build](../../ci/docker/using_docker_build.md). +You have to check the [Using Docker Build documentation](../../ci/docker/using_docker_build.md). -You can use [docker:dind](https://hub.docker.com/_/docker/) to build your images. -This is how the `.gitlab-ci.yml` looks like: +You can use [docker:dind](https://hub.docker.com/_/docker/) to build your images, +and this is how `.gitlab-ci.yml` should look like: ``` build_image: @@ -69,16 +91,23 @@ This is how the `.gitlab-ci.yml` looks like: - docker:dind stage: build script: - - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com - - docker build -t registry.gitlab.com/group/project:latest . - - docker push registry.gitlab.com/group/project:latest + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.example.com + - docker build -t registry.example.com/group/project:latest . + - docker push registry.example.com/group/project:latest ``` -You have to use special credentials `gitlab-ci-token` with password stored in `$CI_BUILD_TOKEN` in order to push to registry connected to your project. -This allows you to automated building and deployment of your images. +You have to use the credentials of the special `gitlab-ci-token` user with its +password stored in `$CI_BUILD_TOKEN` in order to push to the Registry connected +to your project. This allows you to automated building and deployment of your +Docker images. ## Limitations -In order to use container image from private project as an `image:` in your `.gitlab-ci.yml` you have to follow -[Using a private Docker Registry](https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/configuration/advanced-configuration.md#using-a-private-docker-registry). -This workflow will be simplified in the future. +In order to use a container image from your private project as an `image:` in +your `.gitlab-ci.yml`, you have to follow the +[Using a private Docker Registry][private-docker] +documentation. This workflow will be simplified in the future. + +[ce-4040]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4040 +[docker-docs]: https://docs.docker.com/engine/userguide/intro/ +[private-docker]: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/configuration/advanced-configuration.md#using-a-private-docker-registry diff --git a/doc/container_registry/container_registry.png b/doc/container_registry/container_registry.png deleted file mode 100644 index e9505a73b40..00000000000 Binary files a/doc/container_registry/container_registry.png and /dev/null differ diff --git a/doc/container_registry/img/container_registry.png b/doc/container_registry/img/container_registry.png new file mode 100644 index 00000000000..e9505a73b40 Binary files /dev/null and b/doc/container_registry/img/container_registry.png differ diff --git a/doc/container_registry/img/project_feature.png b/doc/container_registry/img/project_feature.png new file mode 100644 index 00000000000..57a73d253c0 Binary files /dev/null and b/doc/container_registry/img/project_feature.png differ diff --git a/doc/container_registry/project_feature.png b/doc/container_registry/project_feature.png deleted file mode 100644 index 57a73d253c0..00000000000 Binary files a/doc/container_registry/project_feature.png and /dev/null differ -- cgit v1.2.1 From 3258ad60cbf3fa22144a2745a1df1be67136fa5a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 23 May 2016 18:35:04 +0000 Subject: Update Google integration API workflow --- doc/integration/google.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/integration/google.md b/doc/integration/google.md index f9a20dd840d..82978b68a34 100644 --- a/doc/integration/google.md +++ b/doc/integration/google.md @@ -11,9 +11,9 @@ To enable the Google OAuth2 OmniAuth provider you must register your application - Project ID: Must be unique to all Google Developer registered applications. Google provides a randomly generated Project ID by default. You can use the randomly generated ID or choose a new one. 1. Refresh the page. You should now see your new project in the list. Click on the project. -1. Select "APIs & auth" in the left menu. +1. Select the "Google APIs" tab in the Overview. -1. Select "APIs" in the submenu. +1. Select and enable the following Google APIs - listed under "Popular APIs" - Enable `Contacts API` - Enable `Google+ API` -- cgit v1.2.1 From 07a3b09b7640a9c75d62574936d443664548b734 Mon Sep 17 00:00:00 2001 From: Florian Preinstorfer Date: Tue, 24 May 2016 10:17:40 +0000 Subject: Update branch name from 8-7-stable to 8-8-stable --- 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 526f127178d..108ceb593d0 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -271,7 +271,7 @@ sudo usermod -aG redis git # Clone GitLab repository sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 8-8-stable gitlab -**Note:** You can change `8-7-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! +**Note:** You can change `8-8-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! ### Configure It -- cgit v1.2.1 From 12cf4f885a160c7d2e29875f09dda0fba4e7ad54 Mon Sep 17 00:00:00 2001 From: sebastian-schmid Date: Tue, 24 May 2016 20:26:43 +0200 Subject: fixing typo in link #17809 --- doc/monitoring/health_check.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/monitoring/health_check.md b/doc/monitoring/health_check.md index defbf37ac19..0d17799372f 100644 --- a/doc/monitoring/health_check.md +++ b/doc/monitoring/health_check.md @@ -11,7 +11,7 @@ and access the cache. This endpoint can be provided to uptime monitoring service ## Access Token An access token needs to be provided while accessing the health check endpoint. The current -accepted token can be found on the `admin/heath_check` page of your GitLab instance. +accepted token can be found on the `admin/health_check` page of your GitLab instance. ![access token](img/health_check_token.png) -- cgit v1.2.1 From 75739e54be0fca389c05d3d9d3de69737c0ff3ab Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Mon, 23 May 2016 19:37:59 -0400 Subject: Enable RSpec/NotToNot cop and auto-correct offenses Also removes the note from the development/testing.md guide --- doc/development/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/development/testing.md b/doc/development/testing.md index 33eed29ba5c..513457d203a 100644 --- a/doc/development/testing.md +++ b/doc/development/testing.md @@ -65,7 +65,7 @@ the command line via `bundle exec teaspoon`, or via a web browser at - Use `context` to test branching logic. - Don't `describe` symbols (see [Gotchas](gotchas.md#dont-describe-symbols)). - Don't supply the `:each` argument to hooks since it's the default. -- Prefer `not_to` to `to_not`. +- Prefer `not_to` to `to_not` (_this is enforced by Rubocop_). - Try to match the ordering of tests to the ordering within the class. - Try to follow the [Four-Phase Test][four-phase-test] pattern, using newlines to separate phases. -- cgit v1.2.1 From b10b6f963dd0d0da26e1750263e6b970b839ba0f Mon Sep 17 00:00:00 2001 From: Drew Blessing Date: Wed, 25 May 2016 11:30:11 -0500 Subject: Add new HA diagrams [ci skip] --- doc/administration/high_availability/README.md | 4 ++++ .../img/high_availability/active-active-diagram.png | Bin 0 -> 29607 bytes .../img/high_availability/active-passive-diagram.png | Bin 0 -> 24246 bytes 3 files changed, 4 insertions(+) create mode 100644 doc/administration/img/high_availability/active-active-diagram.png create mode 100644 doc/administration/img/high_availability/active-passive-diagram.png (limited to 'doc') diff --git a/doc/administration/high_availability/README.md b/doc/administration/high_availability/README.md index 43d85ffb775..d74a786ac24 100644 --- a/doc/administration/high_availability/README.md +++ b/doc/administration/high_availability/README.md @@ -19,6 +19,8 @@ Components/Servers Required: - 2 servers/virtual machines (one active/one passive) +![Active/Passive HA Diagram](../img/high_availability/active-passive-diagram.png) + ### Active/Active This architecture scales easily because all application servers handle @@ -26,6 +28,8 @@ user requests simultaneously. The database, Redis, and GitLab application are all deployed on separate servers. The configuration is **only** highly-available if the database, Redis and storage are also configured as such. +![Active/Active HA Diagram](../img/high_availability/active-active-diagram.png) + **Steps to configure active/active:** 1. [Configure the database](database.md) diff --git a/doc/administration/img/high_availability/active-active-diagram.png b/doc/administration/img/high_availability/active-active-diagram.png new file mode 100644 index 00000000000..81259e0ae93 Binary files /dev/null and b/doc/administration/img/high_availability/active-active-diagram.png differ diff --git a/doc/administration/img/high_availability/active-passive-diagram.png b/doc/administration/img/high_availability/active-passive-diagram.png new file mode 100644 index 00000000000..f69ff1d0357 Binary files /dev/null and b/doc/administration/img/high_availability/active-passive-diagram.png differ -- cgit v1.2.1 From f7da994cfdfa3bf7b9c96b2f84066c5bd77b8b43 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 25 May 2016 20:44:02 +0200 Subject: Write some thoughts to the UI guide Signed-off-by: Dmitriy Zaporozhets --- doc/development/ui_guide.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'doc') diff --git a/doc/development/ui_guide.md b/doc/development/ui_guide.md index a3e260a5f89..3aef364f0ec 100644 --- a/doc/development/ui_guide.md +++ b/doc/development/ui_guide.md @@ -6,3 +6,36 @@ We created a page inside GitLab where you can check commonly used html and css e When you run GitLab instance locally - just visit http://localhost:3000/help/ui page to see UI examples you can use during GitLab development. + +## Design repository + +All design files are stored in the [gitlab-design](https://gitlab.com/gitlab-org/gitlab-design) +repository and maintained by GitLab UX designers. + +## Navigation + +GitLab layout contains of 2 sections: left sidebar and content. Left sidebar +contains static navigation menu no matter what page you visit. It also has GitLab logo +and current user profile picture. Content section contains of header and content itself. +Header describes what area of GitLab user see right now and what navigation is +available to user in this area. Depends on area (project, group, profile setting) +header name and navigation will change. For example when user visits one of the +project pages the header will contain a project name and navigation for project +pages. When visit group page it will contain a group name and navigation related +to this group. + +### Adding new tab to header navigation + +We try to keep amount of tabs in header navigation between 5 and 10 so it fits on +a laptop screens and doest not confure user with too many options. Ideally each +tab should represent some separate functionality. So everything related to issue +tracker should be under 'Issues' tab while everything related to wiki should +be under 'Wiki' tab etc. + +## Mobile screen size + +We want GitLab work on small mobile screens too. Because of size limitations +its impossible to fit everything on phone screen. Its ok in this case to hide +part of the UI on smaller resolutions in favor of better user experience. +However core functionality like browsing file, creating issue, comment, etc should +be available on all resolutions. -- cgit v1.2.1 From 16817cc49f9dbe333b560b59f05235d8e9add0b6 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Wed, 25 May 2016 14:57:15 -0400 Subject: Fix the english. --- doc/development/ui_guide.md | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/doc/development/ui_guide.md b/doc/development/ui_guide.md index 3aef364f0ec..b4dcb748351 100644 --- a/doc/development/ui_guide.md +++ b/doc/development/ui_guide.md @@ -14,28 +14,23 @@ repository and maintained by GitLab UX designers. ## Navigation -GitLab layout contains of 2 sections: left sidebar and content. Left sidebar -contains static navigation menu no matter what page you visit. It also has GitLab logo -and current user profile picture. Content section contains of header and content itself. -Header describes what area of GitLab user see right now and what navigation is -available to user in this area. Depends on area (project, group, profile setting) -header name and navigation will change. For example when user visits one of the -project pages the header will contain a project name and navigation for project -pages. When visit group page it will contain a group name and navigation related -to this group. +GitLab's layout contains 2 sections: the left sidebar and the content. The left sidebar contains a static navigation menu. +This menu will be visible regardless of what page you visit. The left sidebar also contains the GitLab logo +and the current user's profile picture. The content section contains a header and the content itself. +The header describes the current GitLab page and what navigation is +available to user in this area. Depending on the area (project, group, profile setting) the header name and navigation may change. For example when user visits one of the +project pages the header will contain a project name and navigation for that project. When the user visits a group page it will contain a group name and navigation related to this group. ### Adding new tab to header navigation -We try to keep amount of tabs in header navigation between 5 and 10 so it fits on -a laptop screens and doest not confure user with too many options. Ideally each -tab should represent some separate functionality. So everything related to issue -tracker should be under 'Issues' tab while everything related to wiki should -be under 'Wiki' tab etc. +We try to keep the amount of tabs in the header navigation between 5 and 10 so that it fits on a typical laptop screen. We also try not to confuse the user with too many options. Ideally each +tab should represent separate functionality. Everything related to the issue +tracker should be under the 'Issues' tab while everything related to the wiki should +be under 'Wiki' tab and so on and so forth. ## Mobile screen size -We want GitLab work on small mobile screens too. Because of size limitations -its impossible to fit everything on phone screen. Its ok in this case to hide -part of the UI on smaller resolutions in favor of better user experience. -However core functionality like browsing file, creating issue, comment, etc should -be available on all resolutions. +We want GitLab to work well on small mobile screens as well. Size limitations make it is impossible to fit everything on a mobile screen. In this case it is OK to hide +part of the UI for smaller resolutions in favor of a better user experience. +However core functionality like browsing files, creating issues, writing comments, should +be available on all resolutions. \ No newline at end of file -- cgit v1.2.1 From 1adaeb7d6771122702c45e33e03767389a3348c9 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 27 May 2016 13:06:02 +0200 Subject: Use gitlab-workhorse 0.7.4 This enables https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4278 . --- 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 108ceb593d0..1318b3d1fa5 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -394,7 +394,7 @@ GitLab Shell is an SSH access and repository management software developed speci cd /home/git sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git cd gitlab-workhorse - sudo -u git -H git checkout v0.7.3 + sudo -u git -H git checkout v0.7.4 sudo -u git -H make ### Initialize Database and Activate Advanced Features -- cgit v1.2.1 From d7e714e4fd5bc45f4d68281b068068a0aa9bb6e1 Mon Sep 17 00:00:00 2001 From: Aurelio Jargas Date: Fri, 27 May 2016 21:28:45 +0000 Subject: Fix typo --- doc/ci/yaml/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 63866d8c71c..a3481f58c6c 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -348,7 +348,7 @@ job_name: | allow_failure | no | Allow build to fail. Failed build doesn't contribute to commit status | | when | no | Define when to run build. Can be `on_success`, `on_failure` or `always` | | dependencies | no | Define other builds that a build depends on so that you can pass artifacts between them| -| artifacts | no | Define list build artifacts | +| artifacts | no | Define list of build artifacts | | cache | no | Define list of files that should be cached between subsequent runs | | before_script | no | Override a set of commands that are executed before build | | after_script | no | Override a set of commands that are executed after build | -- cgit v1.2.1 From 8e31da9445255f43ee230b8cfaecafbcf7f1ade6 Mon Sep 17 00:00:00 2001 From: Chris Spicer Date: Sun, 29 May 2016 22:30:16 -0700 Subject: commited -> committed --- doc/administration/repository_checks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/administration/repository_checks.md b/doc/administration/repository_checks.md index 3411e4af6a7..4172b604cec 100644 --- a/doc/administration/repository_checks.md +++ b/doc/administration/repository_checks.md @@ -5,7 +5,7 @@ This feature was [introduced][ce-3232] in GitLab 8.7. It is OFF by default because it still causes too many false alarms. Git has a built-in mechanism, [git fsck][git-fsck], to verify the -integrity of all data commited to a repository. GitLab administrators +integrity of all data committed to a repository. GitLab administrators can trigger such a check for a project via the project page under the admin panel. The checks run asynchronously so it may take a few minutes before the check result is visible on the project admin page. If the @@ -41,4 +41,4 @@ alarms you can choose to clear ALL repository check states from the --- [ce-3232]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3232 "Auto git fsck" -[git-fsck]: https://www.kernel.org/pub/software/scm/git/docs/git-fsck.html "git fsck documentation" \ No newline at end of file +[git-fsck]: https://www.kernel.org/pub/software/scm/git/docs/git-fsck.html "git fsck documentation" -- cgit v1.2.1 From 1b0367a422aeb7394a4fc412f3688fbe974e166c Mon Sep 17 00:00:00 2001 From: Chris Spicer Date: Sun, 29 May 2016 22:30:47 -0700 Subject: Add space between 'Criticalissue' --- doc/api/labels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api/labels.md b/doc/api/labels.md index b857d81768e..a181c0f57a2 100644 --- a/doc/api/labels.md +++ b/doc/api/labels.md @@ -39,7 +39,7 @@ Example response: { "name" : "critical", "color" : "#d9534f", - "description": "Criticalissue. Need fix ASAP", + "description": "Critical issue. Need fix ASAP", "open_issues_count": 1, "closed_issues_count": 3, "open_merge_requests_count": 1 -- cgit v1.2.1 From 556a41660ea84506283d58af753c1747b75bf432 Mon Sep 17 00:00:00 2001 From: Chris Spicer Date: Sun, 29 May 2016 22:31:22 -0700 Subject: Add space after comma, add space between 'beautomatically' --- doc/api/services.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api/services.md b/doc/api/services.md index 83ac7845156..b5000eff653 100644 --- a/doc/api/services.md +++ b/doc/api/services.md @@ -16,8 +16,8 @@ PUT /projects/:id/services/asana Parameters: -- `api_key` (**required**) - User API token. User must have access to task,all comments will be attributed to this user. -- `restrict_to_branch` (optional) - Comma-separated list of branches which will beautomatically inspected. Leave blank to include all branches. +- `api_key` (**required**) - User API token. User must have access to task, all comments will be attributed to this user. +- `restrict_to_branch` (optional) - Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches. ### Delete Asana service -- cgit v1.2.1 From 348d16f524440a5e4cb6f3dc671138e8786c47c7 Mon Sep 17 00:00:00 2001 From: Chris Spicer Date: Sun, 29 May 2016 22:31:39 -0700 Subject: updtae -> update --- doc/development/migration_style_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index 1c13b094582..02e024ca15a 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -116,7 +116,7 @@ Example with Arel: users = Arel::Table.new(:users) users.group(users[:user_id]).having(users[:id].count.gt(5)) -#updtae other tables with this results +#update other tables with these results ``` Example with plain SQL and `quote_string` helper: -- cgit v1.2.1 From 03901e542922fa246f94003d3d006fa6032b764e Mon Sep 17 00:00:00 2001 From: Chris Spicer Date: Sun, 29 May 2016 22:32:09 -0700 Subject: occuring -> occurring --- doc/install/requirements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index df8e8bdc476..8cbd53cc27a 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -81,7 +81,7 @@ errors during usage. - More users? Run it on [multiple application servers](https://about.gitlab.com/high-availability/) We recommend having at least 1GB of swap on your server, even if you currently have -enough available RAM. Having swap will help reduce the chance of errors occuring +enough available RAM. Having swap will help reduce the chance of errors occurring if your available memory changes. Notice: The 25 workers of Sidekiq will show up as separate processes in your process overview (such as top or htop) but they share the same RAM allocation since Sidekiq is a multithreaded application. Please see the section below about Unicorn workers for information about many you need of those. -- cgit v1.2.1 From eda55662f387ca79f91b4f49dfd9dad12dfc9d6d Mon Sep 17 00:00:00 2001 From: Chris Spicer Date: Sun, 29 May 2016 22:34:40 -0700 Subject: Grammar fixes, simlink -> symlink --- doc/logs/logs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/logs/logs.md b/doc/logs/logs.md index ef5affa2ebd..f84060b8d07 100644 --- a/doc/logs/logs.md +++ b/doc/logs/logs.md @@ -1,5 +1,5 @@ ## Log system -GitLab has advanced log system so everything is logging and you can analize your instance using various system log files. +GitLab has an advanced log system where everything is logged so that you can analyze your instance using various system log files. In addition to system log files, GitLab Enterprise Edition comes with Audit Events. Find more about them [in Audit Events documentation](http://docs.gitlab.com/ee/administration/audit_events.html) System log files are typically plain text in a standard log file format. This guide talks about how to read and use these system log files. @@ -67,13 +67,13 @@ gitlab-shell is using by Gitlab for executing git commands and provide ssh acces ``` I, [2015-02-13T06:17:00.671315 #9291] INFO -- : Adding project root/example.git at . -I, [2015-02-13T06:17:00.679433 #9291] INFO -- : Moving existing hooks directory and simlinking global hooks directory for /var/opt/gitlab/git-data/repositories/root/example.git. +I, [2015-02-13T06:17:00.679433 #9291] INFO -- : Moving existing hooks directory and symlinking global hooks directory for /var/opt/gitlab/git-data/repositories/root/example.git. ``` #### unicorn_stderr.log This file lives in `/var/log/gitlab/unicorn/unicorn_stderr.log` for omnibus package or in `/home/git/gitlab/log/unicorn_stderr.log` for installations from the source. -Unicorn is a high-performance forking Web server which is used for serving GitLab application. You can look at this log, for example, if your application does not respond. This log cantains all information about state of unicorn processes at any given time. +Unicorn is a high-performance forking Web server which is used for serving the GitLab application. You can look at this log if, for example, your application does not respond. This log contains all information about the state of unicorn processes at any given time. ``` I, [2015-02-13T06:14:46.680381 #9047] INFO -- : Refreshing Gem list -- cgit v1.2.1 From 403eea7b7a100fd28e26a8d8e5888cfd8ff6214b Mon Sep 17 00:00:00 2001 From: Chris Spicer Date: Sun, 29 May 2016 22:34:58 -0700 Subject: errros -> errors --- doc/migrate_ci_to_ce/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/migrate_ci_to_ce/README.md b/doc/migrate_ci_to_ce/README.md index 5ec0a2069b5..8f9ef054949 100644 --- a/doc/migrate_ci_to_ce/README.md +++ b/doc/migrate_ci_to_ce/README.md @@ -355,7 +355,7 @@ sudo chown git:git /var/opt/gitlab/gitlab-ci/builds ``` #### Problems when importing CI database to GitLab -If you were migrating CI database from MySQL to PostgreSQL manually you can see errros during import about missing sequences: +If you were migrating CI database from MySQL to PostgreSQL manually you can see errors during import about missing sequences: ``` ALTER SEQUENCE ERROR: relation "ci_builds_id_seq" does not exist -- cgit v1.2.1 From 9948a8fb8ddaf00fe2be75e7eccd27491fc9bd50 Mon Sep 17 00:00:00 2001 From: Chris Spicer Date: Sun, 29 May 2016 22:35:23 -0700 Subject: succes -> success --- doc/operations/moving_repositories.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/operations/moving_repositories.md b/doc/operations/moving_repositories.md index 39086b7a251..54adb99386a 100644 --- a/doc/operations/moving_repositories.md +++ b/doc/operations/moving_repositories.md @@ -134,7 +134,7 @@ sudo -u git sh -c ' cat /var/opt/gitlab/transfer-logs/* | sort | uniq -u |\ /usr/bin/env JOBS=10 \ /opt/gitlab/embedded/service/gitlab-rails/bin/parallel-rsync-repos \ - /var/opt/gitlab/transfer-logs/succes-$(date +%s).log \ + /var/opt/gitlab/transfer-logs/success-$(date +%s).log \ /var/opt/gitlab/git-data/repositories \ /mnt/gitlab/repositories ' @@ -145,7 +145,7 @@ sudo -u git -H sh -c ' cat /home/git/transfer-logs/* | sort | uniq -u |\ /usr/bin/env JOBS=10 \ bin/parallel-rsync-repos \ - /home/git/transfer-logs/succes-$(date +%s).log \ + /home/git/transfer-logs/success-$(date +%s).log \ /home/git/repositories \ /mnt/gitlab/repositories ` @@ -164,7 +164,7 @@ sudo gitlab-rake gitlab:list_repos SINCE='2015-10-1 12:00 UTC' |\ sudo -u git \ /usr/bin/env JOBS=10 \ /opt/gitlab/embedded/service/gitlab-rails/bin/parallel-rsync-repos \ - succes-$(date +%s).log \ + success-$(date +%s).log \ /var/opt/gitlab/git-data/repositories \ /mnt/gitlab/repositories @@ -174,7 +174,7 @@ sudo -u git -H bundle exec rake gitlab:list_repos SINCE='2015-10-1 12:00 UTC' |\ sudo -u git -H \ /usr/bin/env JOBS=10 \ bin/parallel-rsync-repos \ - succes-$(date +%s).log \ + success-$(date +%s).log \ /home/git/repositories \ /mnt/gitlab/repositories ``` -- cgit v1.2.1 From b0a2bf08498c5be0f8da9251d5cfff48b801f297 Mon Sep 17 00:00:00 2001 From: Arian Sameni Date: Mon, 30 May 2016 17:46:54 +0200 Subject: Fix 18009: add missing steps in update docs --- doc/update/8.6-to-8.7.md | 8 ++++++++ doc/update/8.7-to-8.8.md | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/8.6-to-8.7.md b/doc/update/8.6-to-8.7.md index 4a2c6ea91d2..bb463d43a7c 100644 --- a/doc/update/8.6-to-8.7.md +++ b/doc/update/8.6-to-8.7.md @@ -86,6 +86,14 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS ### 7. 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-6-stable:config/gitlab.yml.example origin/8-7-stable:config/gitlab.yml.example +``` + #### Git configuration Disable `git gc --auto` because GitLab runs `git gc` for us already. diff --git a/doc/update/8.7-to-8.8.md b/doc/update/8.7-to-8.8.md index b4d9212289c..32906650f6f 100644 --- a/doc/update/8.7-to-8.8.md +++ b/doc/update/8.7-to-8.8.md @@ -86,6 +86,14 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS ### 7. 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-7-stable:config/gitlab.yml.example origin/8-8-stable:config/gitlab.yml.example +``` + #### Git configuration Disable `git gc --auto` because GitLab runs `git gc` for us already. @@ -137,7 +145,7 @@ To make sure you didn't miss anything run a more thorough check: If all items are green, then congratulations, the upgrade is complete! -## Things went south? Revert to previous version (8.6) +## Things went south? Revert to previous version (8.7) ### 1. Revert the code to the previous version -- cgit v1.2.1 From 6506a9dd4433a261531613b344c3307159cd7d72 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Fri, 13 May 2016 00:40:43 -0300 Subject: Added documentation to current Wiki Page event webhook --- doc/web_hooks/web_hooks.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'doc') diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md index 45506ac1d7c..0777463def5 100644 --- a/doc/web_hooks/web_hooks.md +++ b/doc/web_hooks/web_hooks.md @@ -695,6 +695,60 @@ X-Gitlab-Event: Merge Request Hook } ``` +## Wiki Page events + +Triggered when a wiki page is created or edited. + +**Request Header**: + +``` +X-Gitlab-Event: Wiki Page Hook +``` + +**Request Body**: + +```json +{ + "object_kind": "wiki_page", + "user": { + "name": "Administrator", + "username": "root", + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon" + }, + "project": { + "name": "awesome-project", + "description": "This is awesome", + "web_url": "http://example.com/root/awesome-project", + "avatar_url": null, + "git_ssh_url": "git@example.com:root/test-project.git", + "git_http_url": "http://example.com/root/awesome-project.git", + "namespace": "root", + "visibility_level": 0, + "path_with_namespace": "root/awesome-project", + "default_branch": "master", + "homepage": "http://example.com/root/awesome-project", + "url": "git@example.com:root/awesome-project.git", + "ssh_url": "git@example.com:root/awesome-project.git", + "http_url": "http://example.com/root/awesome-project.git" + }, + "object_attributes": { + "title": "Awesome", + "content": "awesome content goes here", + "format": "markdown", + "message": "adding an awesome page to the wiki", + "slug": "awesome", + "url": "http://example.com/root/awesome-project/wikis/awesome", + "action": "create" + }, + "repository": { + "name": "awesome-project", + "url": "git@example.com:root/awesome-project.git", + "description": "test", + "homepage": "http://example.com/root/awesome-project" + } +} +``` + #### Example webhook receiver If you want to see GitLab's webhooks in action for testing purposes you can use -- cgit v1.2.1 From 846d111f1d07e62e295ea778b85ada9088be2f31 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 30 May 2016 17:12:50 +0200 Subject: Add Application Setting to configure Container Registry token expire delay (default 5min) --- doc/api/settings.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api/settings.md b/doc/api/settings.md index 1e745115dc8..43a0fe35e42 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -37,7 +37,8 @@ Example response: "created_at" : "2016-01-04T15:44:55.176Z", "default_project_visibility" : 0, "gravatar_enabled" : true, - "sign_in_text" : null + "sign_in_text" : null, + "container_registry_token_expire_delay": 5 } ``` @@ -64,6 +65,7 @@ PUT /application/settings | `restricted_signup_domains` | array of strings | no | Force people to use only corporate emails for sign-up. Default is null, meaning there is no restriction. | | `user_oauth_applications` | boolean | no | Allow users to register any application to use GitLab as an OAuth provider | | `after_sign_out_path` | string | no | Where to redirect users after logout | +| `container_registry_token_expire_delay` | integer | no | Container Registry token duration in minutes | ```bash curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/application/settings?signup_enabled=false&default_project_visibility=1 @@ -90,6 +92,7 @@ Example response: "default_snippet_visibility": 0, "restricted_signup_domains": [], "user_oauth_applications": true, - "after_sign_out_path": "" + "after_sign_out_path": "", + "container_registry_token_expire_delay": 5 } ``` -- cgit v1.2.1 From aaaed331ba06d14f0e071e0933a250c61caabf94 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Fri, 13 May 2016 04:21:01 -0300 Subject: Fix hook data for Wiki Page event Added "wiki" section and removed "repository" --- doc/web_hooks/web_hooks.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md index 0777463def5..8559b67af04 100644 --- a/doc/web_hooks/web_hooks.md +++ b/doc/web_hooks/web_hooks.md @@ -720,7 +720,7 @@ X-Gitlab-Event: Wiki Page Hook "description": "This is awesome", "web_url": "http://example.com/root/awesome-project", "avatar_url": null, - "git_ssh_url": "git@example.com:root/test-project.git", + "git_ssh_url": "git@example.com:root/awesome-project.git", "git_http_url": "http://example.com/root/awesome-project.git", "namespace": "root", "visibility_level": 0, @@ -731,6 +731,13 @@ X-Gitlab-Event: Wiki Page Hook "ssh_url": "git@example.com:root/awesome-project.git", "http_url": "http://example.com/root/awesome-project.git" }, + "wiki": { + "web_url": "http://example.com/root/awesome-project/wikis/home", + "git_ssh_url": "git@example.com:root/awesome-project.wiki.git", + "git_http_url": "http://example.com/root/awesome-project.wiki.git", + "path_with_namespace": "root/awesome-project.wiki", + "default_branch": "master" + }, "object_attributes": { "title": "Awesome", "content": "awesome content goes here", @@ -739,12 +746,6 @@ X-Gitlab-Event: Wiki Page Hook "slug": "awesome", "url": "http://example.com/root/awesome-project/wikis/awesome", "action": "create" - }, - "repository": { - "name": "awesome-project", - "url": "git@example.com:root/awesome-project.git", - "description": "test", - "homepage": "http://example.com/root/awesome-project" } } ``` -- cgit v1.2.1 From 024227bdbf76e608e70b871a5b7c1b77229028c9 Mon Sep 17 00:00:00 2001 From: Richard Grainger Date: Fri, 27 May 2016 15:55:35 +0100 Subject: Amend jira service api docs [ci skip] --- doc/api/services.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/api/services.md b/doc/api/services.md index 83ac7845156..8aa0ad8c8b2 100644 --- a/doc/api/services.md +++ b/doc/api/services.md @@ -503,6 +503,8 @@ Parameters: - `project_url` (**required**) - Project url - `issues_url` (**required**) - Issue url - `description` (optional) - Jira issue tracker +- `username` (optional) - Jira username +- `password` (optional) - Jira password ### Delete JIRA service -- cgit v1.2.1 From 22e7aab8fb5d6bf360311e0786060e4a7fb1c62f Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Wed, 1 Jun 2016 11:55:12 -0600 Subject: Add Edge to supported browsers list. [ci skip] --- doc/install/requirements.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index 8cbd53cc27a..09c6211b3ab 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -150,3 +150,4 @@ On a very active server (10,000 active users) the Sidekiq process can use 1GB+ o - Safari 7+ (known problem: required fields in html5 do not work) - Opera (Latest released version) - Internet Explorer (IE) 11+ but please make sure that you have the `Compatibility View` mode disabled. +- Edge (Latest stable version) -- cgit v1.2.1 From d863d86aeb1993c2032da0610b3662e61960eb38 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Wed, 1 Jun 2016 10:21:22 +0100 Subject: Add `sha` parameter to MR accept API The `sha` parameter is optional, and when present, must match the current HEAD SHA of the source branch. Otherwise, the API call fails with a 409 Conflict and a message containing the current HEAD for the source branch. Also tidy up some doc wording. --- doc/api/merge_requests.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 8217e30fe25..16b892dc3b7 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -413,11 +413,13 @@ curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.c Merge changes submitted with MR using this API. -If merge success you get `200 OK`. +If the merge succeeds you'll get a `200 OK`. -If it has some conflicts and can not be merged - you get 405 and error message 'Branch cannot be merged' +If it has some conflicts and can not be merged - you'll get a 405 and the error message 'Branch cannot be merged' -If merge request is already merged or closed - you get 405 and error message 'Method Not Allowed' +If merge request is already merged or closed - you'll get a 406 and the error message 'Method Not Allowed' + +If the `sha` parameter is passed and does not match the HEAD of the source - you'll get a 409 and the error message 'SHA does not match HEAD of source branch' If you don't have permissions to accept this merge request - you'll get a 401 @@ -431,7 +433,8 @@ Parameters: - `merge_request_id` (required) - ID of MR - `merge_commit_message` (optional) - Custom merge commit message - `should_remove_source_branch` (optional) - if `true` removes the source branch -- `merged_when_build_succeeds` (optional) - if `true` the MR is merge when the build succeeds +- `merged_when_build_succeeds` (optional) - if `true` the MR is merged when the build succeeds +- `sha` (optional) - if present, then this SHA must match the HEAD of the source branch, otherwise the merge will fail ```json { -- cgit v1.2.1 From 91496a09656948e713910a05f1c49417b628c26c Mon Sep 17 00:00:00 2001 From: Drew Blessing Date: Wed, 1 Jun 2016 14:44:29 -0500 Subject: Add gdb detach instructions --- doc/administration/troubleshooting/sidekiq.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/administration/troubleshooting/sidekiq.md b/doc/administration/troubleshooting/sidekiq.md index 134a7583762..a776cd3f05e 100644 --- a/doc/administration/troubleshooting/sidekiq.md +++ b/doc/administration/troubleshooting/sidekiq.md @@ -150,6 +150,14 @@ To output a backtrace from all threads at once: apply all thread bt ``` +Once you're done debugging with `gdb`, be sure to detach from the process and +exit: + +``` +detach +exit +``` + ## Check for blocking queries Sometimes the speed at which Sidekiq processes jobs can be so fast that it can -- cgit v1.2.1 From c1923aef04d63050376e14033a6a04a1e3ae0904 Mon Sep 17 00:00:00 2001 From: Drew Blessing Date: Wed, 1 Jun 2016 14:46:07 -0500 Subject: Explicitly mention advisory file locking --- doc/administration/high_availability/nfs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/administration/high_availability/nfs.md b/doc/administration/high_availability/nfs.md index 49ff5d536a1..537f4f3501d 100644 --- a/doc/administration/high_availability/nfs.md +++ b/doc/administration/high_availability/nfs.md @@ -2,8 +2,8 @@ ## Required NFS Server features -**File locking**: GitLab **requires** file locking which is only supported -natively in NFS version 4. NFSv3 also supports locking as long as +**File locking**: GitLab **requires** advisory file locking, which is only +supported natively in NFS version 4. NFSv3 also supports locking as long as Linux Kernel 2.6.5+ is used. We recommend using version 4 and do not specifically test NFSv3. -- cgit v1.2.1 From 33c499441a91c068c4b3e73748b50a2369450a5a Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Jun 2016 22:43:02 +0300 Subject: Add icons and buttons to UI guide Signed-off-by: Dmitriy Zaporozhets --- doc/development/ui_guide.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/development/ui_guide.md b/doc/development/ui_guide.md index b4dcb748351..ecaa306756b 100644 --- a/doc/development/ui_guide.md +++ b/doc/development/ui_guide.md @@ -33,4 +33,24 @@ be under 'Wiki' tab and so on and so forth. We want GitLab to work well on small mobile screens as well. Size limitations make it is impossible to fit everything on a mobile screen. In this case it is OK to hide part of the UI for smaller resolutions in favor of a better user experience. However core functionality like browsing files, creating issues, writing comments, should -be available on all resolutions. \ No newline at end of file +be available on all resolutions. + +## Icons + +* `trash` icon for button or link that does destructive action like removing +information from database or file system +* `x` icon for closing/hiding UI element. For example close modal window +* `pencil` icon for edit button or link +* `eye` icon for subscribe action +* `rss` for rss/atom feed +* `plus` for link or dropdown that lead to page wher eyou create new object (For example new issue page) + + +## Buttons + +* Button should contain icon or text. Exceptions should be approved by UX designer. +* Use gray button on white background or white button on gray background. +* Use red button for destructive actions (not revertable). For example removing issue. +* Use green or blue button for primary action. Primary button should be only one. +Do not use both green and blue button in one form. + -- cgit v1.2.1 From 814b26cfc3829a683ce565cbbfc8525dd768299d Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Jun 2016 23:04:08 +0300 Subject: Fix typo Signed-off-by: Dmitriy Zaporozhets --- doc/development/ui_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/development/ui_guide.md b/doc/development/ui_guide.md index ecaa306756b..23760a14b39 100644 --- a/doc/development/ui_guide.md +++ b/doc/development/ui_guide.md @@ -43,7 +43,7 @@ information from database or file system * `pencil` icon for edit button or link * `eye` icon for subscribe action * `rss` for rss/atom feed -* `plus` for link or dropdown that lead to page wher eyou create new object (For example new issue page) +* `plus` for link or dropdown that lead to page where you create new object (For example new issue page) ## Buttons -- cgit v1.2.1 From 2e8f039ae91767b912da2511d7697d7993293534 Mon Sep 17 00:00:00 2001 From: Mark Fletcher Date: Fri, 3 Jun 2016 18:56:26 +0100 Subject: Document the API endpoint for gathering a build log * Resolves #18015 --- doc/api/builds.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'doc') diff --git a/doc/api/builds.md b/doc/api/builds.md index 4c0a47d1ea0..5669bd0cdda 100644 --- a/doc/api/builds.md +++ b/doc/api/builds.md @@ -278,6 +278,30 @@ Response: [ce-2893]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2893 +## Get a trace file + +Get a trace of a specific build of a project + +``` +GET /projects/:id/builds/:build_id/trace +``` + +| Attribute | Type | Required | Description | +|------------|---------|----------|---------------------| +| id | integer | yes | The ID of a project | +| build_id | integer | yes | The ID of a build | + +``` +curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/8/trace" +``` + +Response: + +| Status | Description | +|-----------|-----------------------------------| +| 200 | Serves the trace file | +| 404 | Build not found or no trace file | + ## Cancel a build Cancel a single build of a project -- cgit v1.2.1 From 09a2f2dbdc4a14a2f4199f33a898ebf2aee383ef Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Mon, 6 Jun 2016 10:23:57 +0530 Subject: Add documentation for U2F registration & authentication. --- doc/profile/2fa_u2f_authenticate.png | Bin 0 -> 54413 bytes doc/profile/2fa_u2f_register.png | Bin 0 -> 112414 bytes doc/profile/two_factor_authentication.md | 63 ++++++++++++++++++++++++++++--- 3 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 doc/profile/2fa_u2f_authenticate.png create mode 100644 doc/profile/2fa_u2f_register.png (limited to 'doc') diff --git a/doc/profile/2fa_u2f_authenticate.png b/doc/profile/2fa_u2f_authenticate.png new file mode 100644 index 00000000000..b9138ff60db Binary files /dev/null and b/doc/profile/2fa_u2f_authenticate.png differ diff --git a/doc/profile/2fa_u2f_register.png b/doc/profile/2fa_u2f_register.png new file mode 100644 index 00000000000..15b3683ef73 Binary files /dev/null and b/doc/profile/2fa_u2f_register.png differ diff --git a/doc/profile/two_factor_authentication.md b/doc/profile/two_factor_authentication.md index a0e23c1586c..82505b13401 100644 --- a/doc/profile/two_factor_authentication.md +++ b/doc/profile/two_factor_authentication.md @@ -8,12 +8,27 @@ your phone. By enabling 2FA, the only way someone other than you can log into your account is to know your username and password *and* have access to your phone. -#### Note +> **Note:** When you enable 2FA, don't forget to back up your recovery codes. For your safety, if you lose your codes for GitLab.com, we can't disable or recover them. +In addition to a phone application, GitLab supports U2F (universal 2nd factor) devices as +the second factor of authentication. Once enabled, in addition to supplying your username and +password to login, you'll be prompted to activate your U2F device (usually by pressing +a button on it), and it will perform secure authentication on your behalf. + +> **Note:** Support for U2F devices was added in version 8.8 + +The U2F workflow is only supported by Google Chrome at this point, so we _strongly_ recommend +that you set up both methods of two-factor authentication, so you can still access your account +from other browsers. + +> **Note:** GitLab officially only supports [Yubikey] U2F devices. + ## Enabling 2FA +### Enable 2FA via mobile application + **In GitLab:** 1. Log in to your GitLab account. @@ -38,9 +53,26 @@ lose your codes for GitLab.com, we can't disable or recover them. 1. Click **Submit**. If the pin you entered was correct, you'll see a message indicating that -Two-factor Authentication has been enabled, and you'll be presented with a list +Two-Factor Authentication has been enabled, and you'll be presented with a list of recovery codes. +### Enable 2FA via U2F device + +**In GitLab:** + +1. Log in to your GitLab account. +1. Go to your **Profile Settings**. +1. Go to **Account**. +1. Click **Enable Two-Factor Authentication**. +1. Plug in your U2F device. +1. Click on **Setup New U2F Device**. +1. A light will start blinking on your device. Activate it by pressing its button. + +You will see a message indicating that your device was successfully set up. +Click on **Register U2F Device** to complete the process. + +![Two-Factor U2F Setup](2fa_u2f_register.png) + ## Recovery Codes Should you ever lose access to your phone, you can use one of the ten provided @@ -51,21 +83,39 @@ account. If you lose the recovery codes or just want to generate new ones, you can do so from the **Profile Settings** > **Account** page where you first enabled 2FA. +> **Note:** Recovery codes are not generated for U2F devices. + ## Logging in with 2FA Enabled Logging in with 2FA enabled is only slightly different than a normal login. Enter your username and password credentials as you normally would, and you'll -be presented with a second prompt for an authentication code. Enter the pin from -your phone's application or a recovery code to log in. +be presented with a second prompt, depending on which type of 2FA you've enabled. + +### Log in via mobile application + +Enter the pin from your phone's application or a recovery code to log in. -![Two-factor authentication on sign in](2fa_auth.png) +![Two-Factor Authentication on sign in via OTP](2fa_auth.png) + +### Log in via U2F device + +1. Click **Login via U2F Device** +1. A light will start blinking on your device. Activate it by pressing its button. + +You will see a message indicating that your device responded to the authentication request. +Click on **Authenticate via U2F Device** to complete the process. + +![Two-Factor Authentication on sign in via U2F device](2fa_u2f_authenticate.png) ## Disabling 2FA 1. Log in to your GitLab account. 1. Go to your **Profile Settings**. 1. Go to **Account**. -1. Click **Disable Two-factor Authentication**. +1. Click **Disable**, under **Two-Factor Authentication**. + +This will clear all your two-factor authentication registrations, including mobile +applications and U2F devices. ## Note to GitLab administrators @@ -74,3 +124,4 @@ You need to take special care to that 2FA keeps working after [Google Authenticator]: https://support.google.com/accounts/answer/1066447?hl=en [FreeOTP]: https://fedorahosted.org/freeotp/ +[YubiKey]: https://www.yubico.com/products/yubikey-hardware/ -- cgit v1.2.1 From 3c3234121575ce271f8b50f3dcf1880db328fed1 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Thu, 2 Jun 2016 12:04:19 -0600 Subject: Add Licensing information and guidelines to the Documentation. --- doc/development/README.md | 2 ++ doc/development/licensing.md | 57 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 doc/development/licensing.md (limited to 'doc') diff --git a/doc/development/README.md b/doc/development/README.md index aa7d54c01d0..cf1bd493a9f 100644 --- a/doc/development/README.md +++ b/doc/development/README.md @@ -7,9 +7,11 @@ - [Gotchas](gotchas.md) to avoid - [How to dump production data to staging](db_dump.md) - [Instrumentation](instrumentation.md) +- [Licensing](licensing.md) for ensuring license compliance - [Migration Style Guide](migration_style_guide.md) for creating safe migrations - [Performance guidelines](performance.md) - [Rake tasks](rake_tasks.md) for development +- [SCSS Style Guide](scss_styleguide.md) - [Shell commands](shell_commands.md) in the GitLab codebase - [Sidekiq debugging](sidekiq_debugging.md) - [SQL guidelines](sql.md) for SQL guidelines diff --git a/doc/development/licensing.md b/doc/development/licensing.md new file mode 100644 index 00000000000..87841f8c39b --- /dev/null +++ b/doc/development/licensing.md @@ -0,0 +1,57 @@ +# GitLab Licensing and Compatibility + +GitLab CE is licensed under the terms of the MIT License. GitLab EE is licensed under "The GitLab Enterprise Edition (EE) license" wherein there are more restrictions. See their respective LICENSE files ([CE][CE], [EE][EE]) for more information. + +## Automated Testing + +In order to comply with the terms the libraries we use are licensed under, we have to make sure to check new gems for compatible licenses whenever they're added. To automate this process, we use the [license_finder][license_finder] gem by Pivotal. It runs every time a new commit is pushed and verifies that all gems in the bundle use a license that doesn't conflict with the licensing of either GitLab Community Edition or GitLab Enterprise Edition. + +There are some limitations with the automated testing, however. CSS and JavaScript libraries, as well as any Ruby libraries not included by way of Bundler, must be verified manually and independently. Take care whenever one such library is used, as automated tests won't catch problematic licenses from them. + +Some gems may not include their license information in their `gemspec` file. These won't be detected by License Finder, and will have to be verified manually. [License Finder's README][license_finder] includes information and guidance on manually adding a gem's license. Make sure to include a link to the library's license in the "why" section. + +## Acceptable Licenses + +The following are licenses which are acceptable to use: + +- [The MIT License][MIT] (the MIT Expat License specifically): The MIT License requires that the license itself is included with all copies of the source. It is a permissive (non-copyleft) license as defined by the Open Source Initiative. +- [LGPL][LGPL] (version 2, version 3): GPL constraints regarding modification and redistribution under the same license are not required of projects using an LGPL library, only upon modification of the LGPL-licensed library itself. +- [Apache 2.0 License][apache-2]: A permissive license that also provides an express grant of patent rights from contributors to users. +- [Ruby 1.8 License][ruby-1.8]: Dual-licensed under either itself or the GPLv2, defer to the Ruby License itself. Acceptable because of point 3b: "You may distribute the software in object code or binary form, provided that you do at least ONE of the following: b) accompany the distribution with the machine-readable source of the software." +- [Ruby 1.9 License][ruby-1.9]: Dual-licensed under either itself or the BSD 2-Clause License, defer to BSD 2-Clause. +- [BSD 2-Clause License][BSD-2-Clause]: A permissive (non-copyleft) license as defined by the Open Source Initiative. +- [BSD 3-Clause License][BSD-3-Clause] (also known as New BSD or Modified BSD): A permissive (non-copyleft) license as defined by the Open Source Initiative +- [ISC License][ISC] (also known as the OpenBSD License): A permissive (non-copyleft) license as defined by the Open Source Initiative. + +## Unacceptable Licenses + +The following are licenses which are *not* acceptable to use: + +- [GNU GPL][GPL] (version 1, [version 2][GPLv2], [version 3][GPLv3], or any future versions): GPL-licensed libraries cannot be linked to from non-GPL projects. +- [GNU AGPLv3][AGPLv3]: AGPL-licensed libraries cannot be linked to from non-GPL projects. + +## Notes + +If a gem uses a license which is not listed above, open an issue and ask. If a license is not included in the "acceptable" list, operate under the assumption that it is not acceptable. + +Keep in mind that each license has its own restrictions (typically defined in their body text). Please make sure to comply with those restrictions at all times whenever an external library is used. + +Gems which are included only in the "development" or "test" groups by Bundler are exempt from license requirements, as they're not distributed for use in production. + +**NOTE:** This document is **not** legal advice, nor is it comprehensive. It should not be taken as such. + +[CE]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/LICENSE +[EE]: https://gitlab.com/gitlab-org/gitlab-ee/blob/master/LICENSE +[license_finder]: https://github.com/pivotal/LicenseFinder +[MIT]: http://choosealicense.com/licenses/mit/ +[LGPL]: http://choosealicense.com/licenses/lgpl-3.0/ +[apache-2]: http://choosealicense.com/licenses/apache-2.0/ +[ruby-1.8]: https://github.com/ruby/ruby/blob/ruby_1_8_6/COPYING +[ruby-1.9]: https://www.ruby-lang.org/en/about/license.txt +[BSD-2-Clause]: https://opensource.org/licenses/BSD-2-Clause +[BSD-3-Clause]: https://opensource.org/licenses/BSD-3-Clause +[ISC]: https://opensource.org/licenses/ISC +[GPL]: http://choosealicense.com/licenses/gpl-3.0/ +[GPLv2]: http://www.gnu.org/licenses/gpl-2.0.txt +[GPLv3]: http://www.gnu.org/licenses/gpl-3.0.txt +[AGPLv3]: http://choosealicense.com/licenses/agpl-3.0/ -- cgit v1.2.1 From 7045b9e908a6ea4f76b5e6ae09c5ab1385685c5a Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Thu, 2 Jun 2016 12:27:42 -0600 Subject: Make sure to mention the GNU Project and OSI-provided information regarding the GPL so no one tries to disagree with that decision. --- doc/development/licensing.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/development/licensing.md b/doc/development/licensing.md index 87841f8c39b..abfd9926522 100644 --- a/doc/development/licensing.md +++ b/doc/development/licensing.md @@ -12,7 +12,7 @@ Some gems may not include their license information in their `gemspec` file. The ## Acceptable Licenses -The following are licenses which are acceptable to use: +Libraries with the following licenses are acceptable for use: - [The MIT License][MIT] (the MIT Expat License specifically): The MIT License requires that the license itself is included with all copies of the source. It is a permissive (non-copyleft) license as defined by the Open Source Initiative. - [LGPL][LGPL] (version 2, version 3): GPL constraints regarding modification and redistribution under the same license are not required of projects using an LGPL library, only upon modification of the LGPL-licensed library itself. @@ -25,13 +25,15 @@ The following are licenses which are acceptable to use: ## Unacceptable Licenses -The following are licenses which are *not* acceptable to use: +Libraries with the following licenses are acceptable for use: - [GNU GPL][GPL] (version 1, [version 2][GPLv2], [version 3][GPLv3], or any future versions): GPL-licensed libraries cannot be linked to from non-GPL projects. - [GNU AGPLv3][AGPLv3]: AGPL-licensed libraries cannot be linked to from non-GPL projects. ## Notes +Decisions regarding the GNU GPL licenses are based on information provided by [The GNU Project][GNU-GPL-FAQ], as well as [the Open Source Initiative][OSI-GPL], which both state that linking GPL libraries makes the program itself GPL. + If a gem uses a license which is not listed above, open an issue and ask. If a license is not included in the "acceptable" list, operate under the assumption that it is not acceptable. Keep in mind that each license has its own restrictions (typically defined in their body text). Please make sure to comply with those restrictions at all times whenever an external library is used. @@ -55,3 +57,5 @@ Gems which are included only in the "development" or "test" groups by Bundler ar [GPLv2]: http://www.gnu.org/licenses/gpl-2.0.txt [GPLv3]: http://www.gnu.org/licenses/gpl-3.0.txt [AGPLv3]: http://choosealicense.com/licenses/agpl-3.0/ +[GNU-GPL-FAQ]: http://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL +[OSI-GPL]: https://opensource.org/faq#linking-proprietary-code -- cgit v1.2.1 From b2e85b796835b024d9436aae43b3a7c65fab66de Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sat, 4 Jun 2016 21:32:59 -0600 Subject: Add relevant commands to the licensing document, resolve some feedback. --- doc/development/README.md | 1 - doc/development/licensing.md | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/development/README.md b/doc/development/README.md index cf1bd493a9f..c5d5af43864 100644 --- a/doc/development/README.md +++ b/doc/development/README.md @@ -11,7 +11,6 @@ - [Migration Style Guide](migration_style_guide.md) for creating safe migrations - [Performance guidelines](performance.md) - [Rake tasks](rake_tasks.md) for development -- [SCSS Style Guide](scss_styleguide.md) - [Shell commands](shell_commands.md) in the GitLab codebase - [Sidekiq debugging](sidekiq_debugging.md) - [SQL guidelines](sql.md) for SQL guidelines diff --git a/doc/development/licensing.md b/doc/development/licensing.md index abfd9926522..8c8c7486fff 100644 --- a/doc/development/licensing.md +++ b/doc/development/licensing.md @@ -8,7 +8,39 @@ In order to comply with the terms the libraries we use are licensed under, we ha There are some limitations with the automated testing, however. CSS and JavaScript libraries, as well as any Ruby libraries not included by way of Bundler, must be verified manually and independently. Take care whenever one such library is used, as automated tests won't catch problematic licenses from them. -Some gems may not include their license information in their `gemspec` file. These won't be detected by License Finder, and will have to be verified manually. [License Finder's README][license_finder] includes information and guidance on manually adding a gem's license. Make sure to include a link to the library's license in the "why" section. +Some gems may not include their license information in their `gemspec` file. These won't be detected by License Finder, and will have to be verified manually. + +### License Finder commands + +There are a few basic commands License Finder provides that you'll need in order to manage license detection. + +To verify that the checks are passing, and/or to see what dependencies are causing the checks to fail: + +``` +bundle exec license_finder +``` + +To whitelist a new license: + +``` +license_finder whitelist add MIT +``` + +To blacklist a new license: + +``` +license_finder blacklist add GPLv2 +``` + +To tell License Finder about a dependency's license if it isn't auto-detected: + +``` +license_finder licenses add my_unknown_dependency MIT +``` + +For all of the above, please include `--why "Reason"` and `--who "My Name"` so the `decisions.yml` file can keep track of when, why, and who approved of a dependency. + +More detailed information on how the gem and its commands work is available in the [License Finder README][license_finder]. ## Acceptable Licenses @@ -25,7 +57,7 @@ Libraries with the following licenses are acceptable for use: ## Unacceptable Licenses -Libraries with the following licenses are acceptable for use: +Libraries with the following licenses are unacceptable for use: - [GNU GPL][GPL] (version 1, [version 2][GPLv2], [version 3][GPLv3], or any future versions): GPL-licensed libraries cannot be linked to from non-GPL projects. - [GNU AGPLv3][AGPLv3]: AGPL-licensed libraries cannot be linked to from non-GPL projects. -- cgit v1.2.1 From b5464726aae70f8b3344afe6eaf3970589bf9e9a Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Tue, 7 Jun 2016 15:19:15 +0200 Subject: Added 8.9 install/update guides [ci skip] --- doc/install/installation.md | 6 +- doc/update/8.8-to-8.9.md | 162 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+), 3 deletions(-) create mode 100644 doc/update/8.8-to-8.9.md (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index 1318b3d1fa5..d9290b1fa76 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -269,9 +269,9 @@ sudo usermod -aG redis git ### Clone the Source # Clone GitLab repository - sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 8-8-stable gitlab + sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 8-9-stable gitlab -**Note:** You can change `8-8-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! +**Note:** You can change `8-9-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! ### Configure It @@ -394,7 +394,7 @@ GitLab Shell is an SSH access and repository management software developed speci cd /home/git sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git cd gitlab-workhorse - sudo -u git -H git checkout v0.7.4 + sudo -u git -H git checkout v0.7.5 sudo -u git -H make ### Initialize Database and Activate Advanced Features diff --git a/doc/update/8.8-to-8.9.md b/doc/update/8.8-to-8.9.md new file mode 100644 index 00000000000..67a986ead57 --- /dev/null +++ b/doc/update/8.8-to-8.9.md @@ -0,0 +1,162 @@ +# From 8.8 to 8.9 + +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. 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-9-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 8-9-stable-ee +``` + +### 4. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch --all --tags +sudo -u git -H git checkout v3.0.0 +``` + +### 5. 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.5 +sudo -u git -H make +``` + +### 6. 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 + +``` + +### 7. 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-8-stable:config/gitlab.yml.example origin/8-9-stable:config/gitlab.yml.example +``` + +#### Git configuration + +Disable `git gc --auto` because GitLab runs `git gc` for us already. + +```sh +sudo -u git -H git config --global gc.auto 0 +``` + +#### Nginx configuration + +Ensure you're still up-to-date with the latest NGINX configuration changes: + +```sh +# For HTTPS configurations +git diff origin/8-8-stable:lib/support/nginx/gitlab-ssl origin/8-9-stable:lib/support/nginx/gitlab-ssl + +# For HTTP configurations +git diff origin/8-8-stable:lib/support/nginx/gitlab origin/8-9-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-8-stable/lib/support/init.d/gitlab.default.example#L37 + +#### 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 + +### 8. Start application + + sudo service gitlab start + sudo service nginx restart + +### 9. 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.7) + +### 1. Revert the code to the previous version + +Follow the [upgrade guide from 8.7 to 8.8](8.7-to-8.8.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 366ad9ff72b44df384bffe562ac66f85aff24c65 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 8 Jun 2016 17:11:43 +0300 Subject: Reject idea of using white/gray button depends on bg color Signed-off-by: Dmitriy Zaporozhets --- doc/development/ui_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/development/ui_guide.md b/doc/development/ui_guide.md index 23760a14b39..5893b7c219e 100644 --- a/doc/development/ui_guide.md +++ b/doc/development/ui_guide.md @@ -49,8 +49,8 @@ information from database or file system ## Buttons * Button should contain icon or text. Exceptions should be approved by UX designer. -* Use gray button on white background or white button on gray background. * Use red button for destructive actions (not revertable). For example removing issue. * Use green or blue button for primary action. Primary button should be only one. Do not use both green and blue button in one form. +* For all other cases use default white button -- cgit v1.2.1 From 0cfa368bf8cae4f9a54186241b06ef588688cfb2 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 8 Jun 2016 14:17:03 -0400 Subject: Fix version references in 8.8 to 8.9 update guide [ci skip] --- doc/update/8.8-to-8.9.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/update/8.8-to-8.9.md b/doc/update/8.8-to-8.9.md index 67a986ead57..f14046bb4be 100644 --- a/doc/update/8.8-to-8.9.md +++ b/doc/update/8.8-to-8.9.md @@ -120,7 +120,7 @@ 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-8-stable/lib/support/init.d/gitlab.default.example#L37 +[/etc/default/gitlab]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-9-stable/lib/support/init.d/gitlab.default.example#L37 #### Init script @@ -145,7 +145,7 @@ To make sure you didn't miss anything run a more thorough check: If all items are green, then congratulations, the upgrade is complete! -## Things went south? Revert to previous version (8.7) +## Things went south? Revert to previous version (8.8) ### 1. Revert the code to the previous version -- cgit v1.2.1 From e6209a407e2e8abee99bb61f089e262c3a5e51e8 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 10 Jun 2016 13:26:36 +0200 Subject: Added description of artifacts:when --- doc/ci/yaml/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'doc') diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index a3481f58c6c..39fad549a04 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -30,6 +30,7 @@ If you want a quick introduction to GitLab CI, follow our - [when](#when) - [artifacts](#artifacts) - [artifacts:name](#artifacts-name) + - [artifacts:when](#artifacts-when) - [dependencies](#dependencies) - [before_script and after_script](#before_script-and-after_script) - [Hidden jobs](#hidden-jobs) @@ -651,6 +652,32 @@ job: untracked: true ``` +#### artifacts:when + +>**Note:** +Introduced in GitLab 8.9 and GitLab Runner v1.3.0. + +`artifacts:when` is used to upload artifacts on build failure or despite the +failure. + +`artifacts:when` can be set to one of the following values: + +1. `on_success` - upload artifacts only when build succeeds. This is the default +1. `on_failure` - upload artifacts only when build fails +1. `always` - upload artifacts despite the build status + +--- + +**Example configurations** + +To upload artifacts only when build fails + +```yaml +job: + artifacts: + when: on_failure +``` + ### dependencies >**Note:** -- cgit v1.2.1 From 282674c1108bdd761f4027910a32396fe253bc95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Tue, 7 Jun 2016 13:02:55 +0200 Subject: Add documentation for the 'only_allow_merge_if_build_succeeds.rb' feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- doc/workflow/merge_requests.md | 11 +++++++++++ .../only_allow_merge_if_build_succeeds.png | Bin 0 -> 17552 bytes 2 files changed, 11 insertions(+) create mode 100644 doc/workflow/merge_requests/only_allow_merge_if_build_succeeds.png (limited to 'doc') diff --git a/doc/workflow/merge_requests.md b/doc/workflow/merge_requests.md index 1b5718c91c1..d2ec56e6504 100644 --- a/doc/workflow/merge_requests.md +++ b/doc/workflow/merge_requests.md @@ -2,6 +2,17 @@ Merge requests allow you to exchange changes you made to source code +## Only allow merge requests to be merged if the build succeeds + +You can prevent merge requests from being merged if their build did not succeed +in the project settings page. + +![only_allow_merge_if_build_succeeds](merge_requests/only_allow_merge_if_build_succeeds.png) + +Navigate to project settings page and select the `Only allow merge requests to be merged if the build succeeds` check box. + +Please note that you need to have builds configured to enable this feature. + ## Checkout merge requests locally Locate the section for your GitLab remote in the `.git/config` file. It looks like this: diff --git a/doc/workflow/merge_requests/only_allow_merge_if_build_succeeds.png b/doc/workflow/merge_requests/only_allow_merge_if_build_succeeds.png new file mode 100644 index 00000000000..18bebf5fe92 Binary files /dev/null and b/doc/workflow/merge_requests/only_allow_merge_if_build_succeeds.png differ -- cgit v1.2.1 From 0e7abb4c2851131ccc5a81e1923824ac845bbe3f Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 10 Jun 2016 15:53:38 +0200 Subject: Fix incorrect registry key value Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/18441 --- doc/administration/container_registry.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index caf9a5bef2c..7870669fa77 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -62,7 +62,7 @@ registry: host: registry.gitlab.example.com port: 5005 api_url: http://localhost:5000/ - key_path: config/registry.key + key: config/registry.key path: shared/registry issuer: gitlab-issuer ``` @@ -75,7 +75,7 @@ where: | `host` | The host URL under which the Registry will run and the users will be able to use. | | `port` | The port under which the external Registry domain will listen on. | | `api_url` | The internal API URL under which the Registry is exposed to. It defaults to `http://localhost:5000`. | -| `key_path`| The private key location that is a pair of Registry's `rootcertbundle`. Read the [token auth configuration documentation][token-config]. | +| `key` | The private key location that is a pair of Registry's `rootcertbundle`. Read the [token auth configuration documentation][token-config]. | | `path` | This should be the same directory like specified in Registry's `rootdirectory`. Read the [storage configuration documentation][storage-config]. This path needs to be readable by the GitLab user, the web-server user and the Registry user. Read more in [#container-registry-storage-path](#container-registry-storage-path). | | `issuer` | This should be the same value as configured in Registry's `issuer`. Read the [token auth configuration documentation][token-config]. | -- cgit v1.2.1 From 3714e1914b6b891274ab7d8b8db8f21dedd29e37 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 10 Jun 2016 21:25:48 +0200 Subject: Improve after review --- doc/ci/yaml/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 39fad549a04..0707555e393 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -670,7 +670,7 @@ failure. **Example configurations** -To upload artifacts only when build fails +To upload artifacts only when build fails. ```yaml job: -- cgit v1.2.1 From a85dde9182f177cc2fdabd90ccdad870bf4d84c3 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sat, 11 Jun 2016 07:16:32 -0700 Subject: Fix Error 500 when using closes_issues API with an external issue tracker Closes #18484 --- doc/api/merge_requests.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 16b892dc3b7..2930f615fc1 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -572,7 +572,7 @@ GET /projects/:id/merge_requests/:merge_request_id/closes_issues curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/76/merge_requests/1/closes_issues ``` -Example response: +Example response when the GitLab issue tracker is used: ```json [ @@ -618,6 +618,17 @@ Example response: ] ``` +Example response when an external issue tracker (e.g. JIRA) is used: + +```json +[ + { + "id" : "PROJECT-123", + "title" : "Title of this issue" + } +] +``` + ## Subscribe to a merge request Subscribes the authenticated user to a merge request to receive notification. If -- cgit v1.2.1 From 35e9fc98655e72ea67f4e04015d255fe7f242717 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 13 Jun 2016 13:52:20 +0200 Subject: Move logs/logs.md to administration/logs.md [ci skip] --- doc/administration/logs.md | 137 +++++++++++++++++++++++++++++++++++++++++++++ doc/logs/logs.md | 93 +----------------------------- 2 files changed, 138 insertions(+), 92 deletions(-) create mode 100644 doc/administration/logs.md (limited to 'doc') diff --git a/doc/administration/logs.md b/doc/administration/logs.md new file mode 100644 index 00000000000..737b39db16c --- /dev/null +++ b/doc/administration/logs.md @@ -0,0 +1,137 @@ +## Log system + +GitLab has an advanced log system where everything is logged so that you +can analyze your instance using various system log files. In addition to +system log files, GitLab Enterprise Edition comes with Audit Events. +Find more about them [in Audit Events +documentation](http://docs.gitlab.com/ee/administration/audit_events.html) + +System log files are typically plain text in a standard log file format. +This guide talks about how to read and use these system log files. + +### production.log + +This file lives in `/var/log/gitlab/gitlab-rails/production.log` for +omnibus package or in `/home/git/gitlab/log/production.log` for +installations from source. + +It contains information about all performed requests. You can see the +URL and type of request, IP address and what exactly parts of code were +involved to service this particular request. Also you can see all SQL +request that have been performed and how much time it took. This task is +more useful for GitLab contributors and developers. Use part of this log +file when you are going to report bug. For example: + +``` +Started GET "/gitlabhq/yaml_db/tree/master" for 168.111.56.1 at 2015-02-12 19:34:53 +0200 +Processing by Projects::TreeController#show as HTML + Parameters: {"project_id"=>"gitlabhq/yaml_db", "id"=>"master"} + + ... [CUT OUT] + + Namespaces"."created_at" DESC, "namespaces"."id" DESC LIMIT 1 [["id", 26]] + CACHE (0.0ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = 'Project' AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $1 AND "members"."source_type" = $2 AND "members"."user_id" = 1 ORDER BY "members"."created_at" DESC, "members"."id" DESC LIMIT 1 [["source_id", 18], ["source_type", "Project"]] + CACHE (0.0ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = 'Project' AND "members". + (1.4ms) SELECT COUNT(*) FROM "merge_requests" WHERE "merge_requests"."target_project_id" = $1 AND ("merge_requests"."state" IN ('opened','reopened')) [["target_project_id", 18]] + Rendered layouts/nav/_project.html.haml (28.0ms) + Rendered layouts/_collapse_button.html.haml (0.2ms) + Rendered layouts/_flash.html.haml (0.1ms) + Rendered layouts/_page.html.haml (32.9ms) +Completed 200 OK in 166ms (Views: 117.4ms | ActiveRecord: 27.2ms) +``` + +In this example we can see that server processed an HTTP request with URL +`/gitlabhq/yaml_db/tree/master` from IP 168.111.56.1 at 2015-02-12 +19:34:53 +0200. Also we can see that request was processed by +`Projects::TreeController`. + +### application.log + +This file lives in `/var/log/gitlab/gitlab-rails/application.log` for +omnibus package or in `/home/git/gitlab/log/application.log` for +installations from source. + +It helps you discover events happening in your instance such as user creation, +project removing and so on. For example: + +``` +October 06, 2014 11:56: User "Administrator" (admin@example.com) was created +October 06, 2014 11:56: Documentcloud created a new project "Documentcloud / Underscore" +October 06, 2014 11:56: Gitlab Org created a new project "Gitlab Org / Gitlab Ce" +October 07, 2014 11:25: User "Claudie Hodkiewicz" (nasir_stehr@olson.co.uk) was removed +October 07, 2014 11:25: Project "project133" was removed +``` + +### githost.log + +This file lives in `/var/log/gitlab/gitlab-rails/githost.log` for +omnibus package or in `/home/git/gitlab/log/githost.log` for +installations from source. + +GitLab has to interact with Git repositories but in some rare cases +something can go wrong and in this case you will know what exactly +happened. This log file contains all failed requests from GitLab to Git +repositories. In the majority of cases this file will be useful for developers +only. For example: + +``` +December 03, 2014 13:20 -> ERROR -> Command failed [1]: /usr/bin/git --git-dir=/Users/vsizov/gitlab-development-kit/gitlab/tmp/tests/gitlab-satellites/group184/gitlabhq/.git --work-tree=/Users/vsizov/gitlab-development-kit/gitlab/tmp/tests/gitlab-satellites/group184/gitlabhq merge --no-ff -mMerge branch 'feature_conflict' into 'feature' source/feature_conflict + +error: failed to push some refs to '/Users/vsizov/gitlab-development-kit/repositories/gitlabhq/gitlab_git.git' +``` + +### sidekiq.log + +This file lives in `/var/log/gitlab/gitlab-rails/sidekiq.log` for +omnibus package or in `/home/git/gitlab/log/sidekiq.log` for +installations from source. + +GitLab uses background jobs for processing tasks which can take a long +time. All information about processing these jobs are written down to +this file. For example: + +``` +2014-06-10T07:55:20Z 2037 TID-tm504 ERROR: /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/1.9.1/gems/redis-3.0.7/lib/redis/client.rb:228:in `read' +2014-06-10T18:18:26Z 14299 TID-55uqo INFO: Booting Sidekiq 3.0.0 with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"} +``` + +### gitlab-shell.log + +This file lives in `/var/log/gitlab/gitlab-shell/gitlab-shell.log` for +omnibus package or in `/home/git/gitlab-shell/gitlab-shell.log` for +installations from source. + +GitLab shell is used by Gitlab for executing Git commands and provide +SSH access to Git repositories. For example: + +``` +I, [2015-02-13T06:17:00.671315 #9291] INFO -- : Adding project root/example.git at . +I, [2015-02-13T06:17:00.679433 #9291] INFO -- : Moving existing hooks directory and symlinking global hooks directory for /var/opt/gitlab/git-data/repositories/root/example.git. +``` + +### unicorn\_stderr.log + +This file lives in `/var/log/gitlab/unicorn/unicorn_stderr.log` for +omnibus package or in `/home/git/gitlab/log/unicorn_stderr.log` for +installations from source. + +Unicorn is a high-performance forking Web server which is used for +serving the GitLab application. You can look at this log if, for +example, your application does not respond. This log contains all +information about the state of unicorn processes at any given time. + +``` +I, [2015-02-13T06:14:46.680381 #9047] INFO -- : Refreshing Gem list +I, [2015-02-13T06:14:56.931002 #9047] INFO -- : listening on addr=127.0.0.1:8080 fd=12 +I, [2015-02-13T06:14:56.931381 #9047] INFO -- : listening on addr=/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket fd=13 +I, [2015-02-13T06:14:56.936638 #9047] INFO -- : master process ready +I, [2015-02-13T06:14:56.946504 #9092] INFO -- : worker=0 spawned pid=9092 +I, [2015-02-13T06:14:56.946943 #9092] INFO -- : worker=0 ready +I, [2015-02-13T06:14:56.947892 #9094] INFO -- : worker=1 spawned pid=9094 +I, [2015-02-13T06:14:56.948181 #9094] INFO -- : worker=1 ready +W, [2015-02-13T07:16:01.312916 #9094] WARN -- : #: worker (pid: 9094) exceeds memory limit (320626688 bytes > 247066940 bytes) +W, [2015-02-13T07:16:01.313000 #9094] WARN -- : Unicorn::WorkerKiller send SIGQUIT (pid: 9094) alive: 3621 sec (trial 1) +I, [2015-02-13T07:16:01.530733 #9047] INFO -- : reaped # worker=1 +I, [2015-02-13T07:16:01.534501 #13379] INFO -- : worker=1 spawned pid=13379 +I, [2015-02-13T07:16:01.534848 #13379] INFO -- : worker=1 ready +``` diff --git a/doc/logs/logs.md b/doc/logs/logs.md index f84060b8d07..a2eca62d691 100644 --- a/doc/logs/logs.md +++ b/doc/logs/logs.md @@ -1,92 +1 @@ -## Log system -GitLab has an advanced log system where everything is logged so that you can analyze your instance using various system log files. -In addition to system log files, GitLab Enterprise Edition comes with Audit Events. Find more about them [in Audit Events documentation](http://docs.gitlab.com/ee/administration/audit_events.html) - -System log files are typically plain text in a standard log file format. This guide talks about how to read and use these system log files. - -#### production.log -This file lives in `/var/log/gitlab/gitlab-rails/production.log` for omnibus package or in `/home/git/gitlab/log/production.log` for installations from the source. - -This file contains information about all performed requests. You can see url and type of request, IP address and what exactly parts of code were involved to service this particular request. Also you can see all SQL request that have been performed and how much time it took. -This task is more useful for GitLab contributors and developers. Use part of this log file when you are going to report bug. - -``` -Started GET "/gitlabhq/yaml_db/tree/master" for 168.111.56.1 at 2015-02-12 19:34:53 +0200 -Processing by Projects::TreeController#show as HTML - Parameters: {"project_id"=>"gitlabhq/yaml_db", "id"=>"master"} - - ... [CUT OUT] - - amespaces"."created_at" DESC, "namespaces"."id" DESC LIMIT 1 [["id", 26]] - CACHE (0.0ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = 'Project' AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $1 AND "members"."source_type" = $2 AND "members"."user_id" = 1 ORDER BY "members"."created_at" DESC, "members"."id" DESC LIMIT 1 [["source_id", 18], ["source_type", "Project"]] - CACHE (0.0ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = 'Project' AND "members". -  (1.4ms) SELECT COUNT(*) FROM "merge_requests" WHERE "merge_requests"."target_project_id" = $1 AND ("merge_requests"."state" IN ('opened','reopened')) [["target_project_id", 18]] - Rendered layouts/nav/_project.html.haml (28.0ms) - Rendered layouts/_collapse_button.html.haml (0.2ms) - Rendered layouts/_flash.html.haml (0.1ms) - Rendered layouts/_page.html.haml (32.9ms) -Completed 200 OK in 166ms (Views: 117.4ms | ActiveRecord: 27.2ms) -``` -In this example we can see that server processed HTTP request with url `/gitlabhq/yaml_db/tree/master` from IP 168.111.56.1 at 2015-02-12 19:34:53 +0200. Also we can see that request was processed by Projects::TreeController. - -#### application.log -This file lives in `/var/log/gitlab/gitlab-rails/application.log` for omnibus package or in `/home/git/gitlab/log/application.log` for installations from the source. - -This log file helps you discover events happening in your instance such as user creation, project removing and so on. - -``` -October 06, 2014 11:56: User "Administrator" (admin@example.com) was created -October 06, 2014 11:56: Documentcloud created a new project "Documentcloud / Underscore" -October 06, 2014 11:56: Gitlab Org created a new project "Gitlab Org / Gitlab Ce" -October 07, 2014 11:25: User "Claudie Hodkiewicz" (nasir_stehr@olson.co.uk) was removed -October 07, 2014 11:25: Project "project133" was removed -``` -#### githost.log -This file lives in `/var/log/gitlab/gitlab-rails/githost.log` for omnibus package or in `/home/git/gitlab/log/githost.log` for installations from the source. - -The GitLab has to interact with git repositories but in some rare cases something can go wrong and in this case you will know what exactly happened. This log file contains all failed requests from GitLab to git repository. In majority of cases this file will be useful for developers only. -``` -December 03, 2014 13:20 -> ERROR -> Command failed [1]: /usr/bin/git --git-dir=/Users/vsizov/gitlab-development-kit/gitlab/tmp/tests/gitlab-satellites/group184/gitlabhq/.git --work-tree=/Users/vsizov/gitlab-development-kit/gitlab/tmp/tests/gitlab-satellites/group184/gitlabhq merge --no-ff -mMerge branch 'feature_conflict' into 'feature' source/feature_conflict - -error: failed to push some refs to '/Users/vsizov/gitlab-development-kit/repositories/gitlabhq/gitlab_git.git' -``` - -#### sidekiq.log -This file lives in `/var/log/gitlab/gitlab-rails/sidekiq.log` for omnibus package or in `/home/git/gitlab/log/sidekiq.log` for installations from the source. - -GitLab uses background jobs for processing tasks which can take a long time. All information about processing these jobs are writing down to this file. -``` -2014-06-10T07:55:20Z 2037 TID-tm504 ERROR: /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/1.9.1/gems/redis-3.0.7/lib/redis/client.rb:228:in `read' -2014-06-10T18:18:26Z 14299 TID-55uqo INFO: Booting Sidekiq 3.0.0 with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"} -``` - -#### gitlab-shell.log -This file lives in `/var/log/gitlab/gitlab-shell/gitlab-shell.log` for omnibus package or in `/home/git/gitlab-shell/gitlab-shell.log` for installations from the source. - -gitlab-shell is using by Gitlab for executing git commands and provide ssh access to git repositories. - -``` -I, [2015-02-13T06:17:00.671315 #9291] INFO -- : Adding project root/example.git at . -I, [2015-02-13T06:17:00.679433 #9291] INFO -- : Moving existing hooks directory and symlinking global hooks directory for /var/opt/gitlab/git-data/repositories/root/example.git. -``` - -#### unicorn_stderr.log -This file lives in `/var/log/gitlab/unicorn/unicorn_stderr.log` for omnibus package or in `/home/git/gitlab/log/unicorn_stderr.log` for installations from the source. - -Unicorn is a high-performance forking Web server which is used for serving the GitLab application. You can look at this log if, for example, your application does not respond. This log contains all information about the state of unicorn processes at any given time. - -``` -I, [2015-02-13T06:14:46.680381 #9047] INFO -- : Refreshing Gem list -I, [2015-02-13T06:14:56.931002 #9047] INFO -- : listening on addr=127.0.0.1:8080 fd=12 -I, [2015-02-13T06:14:56.931381 #9047] INFO -- : listening on addr=/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket fd=13 -I, [2015-02-13T06:14:56.936638 #9047] INFO -- : master process ready -I, [2015-02-13T06:14:56.946504 #9092] INFO -- : worker=0 spawned pid=9092 -I, [2015-02-13T06:14:56.946943 #9092] INFO -- : worker=0 ready -I, [2015-02-13T06:14:56.947892 #9094] INFO -- : worker=1 spawned pid=9094 -I, [2015-02-13T06:14:56.948181 #9094] INFO -- : worker=1 ready -W, [2015-02-13T07:16:01.312916 #9094] WARN -- : #: worker (pid: 9094) exceeds memory limit (320626688 bytes > 247066940 bytes) -W, [2015-02-13T07:16:01.313000 #9094] WARN -- : Unicorn::WorkerKiller send SIGQUIT (pid: 9094) alive: 3621 sec (trial 1) -I, [2015-02-13T07:16:01.530733 #9047] INFO -- : reaped # worker=1 -I, [2015-02-13T07:16:01.534501 #13379] INFO -- : worker=1 spawned pid=13379 -I, [2015-02-13T07:16:01.534848 #13379] INFO -- : worker=1 ready -``` +This document was moved to [administration/logs.md](../administration/logs.md). -- cgit v1.2.1 From e489e9a58534b7f71085048747e12d6223d1cb1e Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 13 Jun 2016 14:19:29 +0200 Subject: Change logs.md location in README [ci skip] --- doc/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index d1345ab2493..5d89d0c9821 100644 --- a/doc/README.md +++ b/doc/README.md @@ -28,7 +28,7 @@ - [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, Twitter. - [Issue closing](customization/issue_closing.md) Customize how to close an issue from commit messages. - [Libravatar](customization/libravatar.md) Use Libravatar for user avatars. -- [Log system](logs/logs.md) Log system. +- [Log system](administration/logs.md) Log system. - [Environment Variables](administration/environment_variables.md) to configure GitLab. - [Operations](operations/README.md) Keeping GitLab up and running - [Raketasks](raketasks/README.md) Backups, maintenance, automatic webhook setup and the importing of projects. -- cgit v1.2.1 From d1abbb3b662bd41a3b58eeb60c5c0740adff986c Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 13 Jun 2016 15:00:28 +0200 Subject: Add guide on changing a document's location [ci skip] --- doc/development/doc_styleguide.md | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'doc') diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index 8292b393757..c59012bef46 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -141,6 +141,48 @@ Inside the document: [ruby-dl]: https://www.ruby-lang.org/en/downloads/ "Ruby download website" +## Changing document location + +Changing a document's location is not to be taken lightly. Remember that the +documentation is available to all installations under `help/` and not only to +GitLab.com or http://docs.gitlab.com. Make sure this is discussed with the +Documentation team beforehand. + +If you indeed need to change a document's location, do NOT remove the old +document, but rather put a text in it that points to the new location, like: + +``` +This document was moved to [path/to/new_doc.md](path/to/new_doc.md). +``` + +where `path/to/new_doc.md` is the relative path to the root directory `doc/`. + +--- + +For example, if you were to move `doc/workflow/lfs/lfs_administration.md` to +`doc/administration/lfs.md`, then the steps would be: + +1. Copy `doc/workflow/lfs/lfs_administration.md` to `doc/administration/lfs.md` +1. Replace the contents of `doc/workflow/lfs/lfs_administration.md` with: + + ``` + This document was moved to [administration/lfs.md](../../administration/lfs.md). + ``` + +1. Find and replace any occurrences of the old location with the new one. + A quick way to find them is to use `grep`: + + ``` + grep -nR "lfs_administration.md" doc/ + ``` + + The above command will search in the `doc/` directory for + `lfs_administration.md` recursively and will print the file and the line + where this file is mentioned. Note that we used just the filename + (`lfs_administration.md`) and not the whole the relative path + (`workflow/lfs/lfs_administration.md`). + + ## API Here is a list of must-have items. Use them in the exact order that appears -- cgit v1.2.1 From cb7fa10cb593a7288d51e91466ff5be2767c98f0 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 13 Jun 2016 15:04:22 +0200 Subject: Change to new Notes styleguide [ci skip] --- doc/development/doc_styleguide.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index 8292b393757..dbaa7eff410 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -103,14 +103,14 @@ Inside the document: - Every piece of documentation that comes with a new feature should declare the GitLab version that feature got introduced. Right below the heading add a - note: `_**Note:** This feature was introduced in GitLab 8.3_` + note: `>**Note:** This feature was introduced in GitLab 8.3` - If possible every feature should have a link to the MR that introduced it. The above note would be then transformed to: - `_**Note:** This feature was [introduced][ce-1242] in GitLab 8.3_`, where + `>**Note:** This feature was [introduced][ce-1242] in GitLab 8.3`, where the [link identifier](#links) is named after the repository (CE) and the MR number - If the feature is only in GitLab EE, don't forget to mention it, like: - `_**Note:** This feature was introduced in GitLab EE 8.3_`. Otherwise, leave + `>**Note:** This feature was introduced in GitLab EE 8.3`. Otherwise, leave this mention out ## References @@ -222,8 +222,8 @@ curl --data "name=foo" -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab. #### Post data using JSON content -_**Note:** In this example we create a new group. Watch carefully the single -and double quotes._ +> **Note:** In this example we create a new group. Watch carefully the single +and double quotes. ```bash curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -H "Content-Type: application/json" --data '{"path": "my-group", "name": "My group"}' https://gitlab.example.com/api/v3/groups -- cgit v1.2.1