diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-09 06:07:57 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-09 06:07:57 +0000 |
commit | 8bda404e2919234c299f088b7d8d04f8449125de (patch) | |
tree | cec81ff8bb6dbc77c3ae9b3580bb40c247599afd /doc | |
parent | afa0ab923d697a3e737b04d078d3f28e0d573901 (diff) | |
download | gitlab-ce-8bda404e2919234c299f088b7d8d04f8449125de.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/administration/geo/replication/troubleshooting.md | 31 | ||||
-rw-r--r-- | doc/api/api_resources.md | 1 | ||||
-rw-r--r-- | doc/api/appearance.md | 80 | ||||
-rw-r--r-- | doc/ssh/README.md | 2 |
4 files changed, 99 insertions, 15 deletions
diff --git a/doc/administration/geo/replication/troubleshooting.md b/doc/administration/geo/replication/troubleshooting.md index 05916e02255..0fbdaa942e8 100644 --- a/doc/administration/geo/replication/troubleshooting.md +++ b/doc/administration/geo/replication/troubleshooting.md @@ -51,6 +51,7 @@ Checking Geo ... GitLab Geo is available ... yes GitLab Geo is enabled ... yes +This machine's Geo node name matches a database record ... yes, found a secondary node named "Shanghai" GitLab Geo secondary database is correctly configured ... yes Database replication enabled? ... yes Database replication working? ... yes @@ -115,34 +116,36 @@ Any **secondary** nodes should point only to read-only instances. #### Can Geo detect the current node correctly? -Geo finds the current machine's name in `/etc/gitlab/gitlab.rb` by: +Geo finds the current machine's Geo node name in `/etc/gitlab/gitlab.rb` by: - Using the `gitlab_rails['geo_node_name']` setting. - If that is not defined, using the `external_url` setting. -To get a machine's name, run: - -```sh -sudo gitlab-rails runner "puts GeoNode.current_node_name" -``` - This name is used to look up the node with the same **Name** in **Admin Area > Geo**. -To check if current machine is correctly finding its node: +To check if the current machine has a node name that matches a node in the +database, run the check task: ```sh -sudo gitlab-rails runner "puts Gitlab::Geo.current_node.inspect" +sudo gitlab-rake gitlab:geo:check ``` -and expect something like: +It displays the current machine's node name and whether the matching database +record is a **primary** or **secondary** node. -```ruby -#<GeoNode id: 2, schema: "https", host: "gitlab.example.com", port: 443, relative_url_root: "", primary: false, ...> +``` +This machine's Geo node name matches a database record ... yes, found a secondary node named "Shanghai" ``` -By running the command above, `primary` should be `true` when executed in -the **primary** node, and `false` on any **secondary** node. +``` +This machine's Geo node name matches a database record ... no + Try fixing it: + You could add or update a Geo node database record, setting the name to "https://example.com/". + Or you could set this machine's Geo node name to match the name of an existing database record: "London", "Shanghai" + For more information see: + doc/administration/geo/replication/troubleshooting.md#can-geo-detect-the-current-node-correctly +``` ## Fixing errors found when running the Geo check rake task diff --git a/doc/api/api_resources.md b/doc/api/api_resources.md index c2713f54c47..d14c6c8feca 100644 --- a/doc/api/api_resources.md +++ b/doc/api/api_resources.md @@ -105,6 +105,7 @@ The following API resources are available outside of project and group contexts | Resource | Available endpoints | |:--------------------------------------------------|:------------------------------------------------------------------------| +| [Appearance](appearance.md) **(CORE ONLY)** | `/application/appearance` | | [Applications](applications.md) | `/applications` | | [Audit Events](audit_events.md) **(PREMIUM ONLY)** | `/audit_events` | | [Avatar](avatar.md) | `/avatar` | diff --git a/doc/api/appearance.md b/doc/api/appearance.md new file mode 100644 index 00000000000..e2c10fa2574 --- /dev/null +++ b/doc/api/appearance.md @@ -0,0 +1,80 @@ +# Appearance API **(CORE ONLY)** + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/16647) in GitLab 12.7. + +Appearance API allows you to maintain GitLab's appearance as if using the GitLab UI at +`/admin/appearance`. The API requires administrator privileges. + +## Get current appearance configuration + +List the current appearance configuration of the GitLab instance. + +``` +GET /application/appearance +``` + +```bash +curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/application/appearance +``` + +Example response: + +```json +{ + "title": "GitLab Test Instance", + "description": "gitlab-test.example.com", + "logo": "/uploads/-/system/appearance/logo/1/logo.png", + "header_logo": "/uploads/-/system/appearance/header_logo/1/header.png", + "favicon": "/uploads/-/system/appearance/favicon/1/favicon.png", + "new_project_guidelines": "Please read the FAQs for help.", + "header_message": "", + "footer_message": "", + "message_background_color": "#e75e40", + "message_font_color": "#ffffff", + "email_header_and_footer_enabled": false +} +``` + +## Change appearance configuration + +Use an API call to modify GitLab instance appearance configuration. + +``` +PUT /application/appearance +``` + +| Attribute | Type | Required | Description | +| --------------------------------- | ------- | -------- | ----------- | +| `title` | string | no | Instance title on the sign in / sign up page +| `description` | string | no | Markdown text shown on the sign in / sign up page +| `logo` | mixed | no | Instance image used on the sign in / sign up page +| `header_logo` | mixed | no | Instance image used for the main navigation bar +| `favicon` | mixed | no | Instance favicon in .ico/.png format +| `new_project_guidelines` | string | no | Markdown text shown on the new project page +| `header_message` | string | no | Message within the system header bar +| `footer_message` | string | no | Message within the system footer bar +| `message_background_color` | string | no | Background color for the system header / footer bar +| `message_font_color` | string | no | Font color for the system header / footer bar +| `email_header_and_footer_enabled` | boolean | no | Add header and footer to all outgoing emails if enabled + +```bash +curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/application/appearance?email_header_and_footer_enabled=true&header_message=test +``` + +Example response: + +```json +{ + "title": "GitLab Test Instance", + "description": "gitlab-test.example.com", + "logo": "/uploads/-/system/appearance/logo/1/logo.png", + "header_logo": "/uploads/-/system/appearance/header_logo/1/header.png", + "favicon": "/uploads/-/system/appearance/favicon/1/favicon.png", + "new_project_guidelines": "Please read the FAQs for help.", + "header_message": "test", + "footer_message": "", + "message_background_color": "#e75e40", + "message_font_color": "#ffffff", + "email_header_and_footer_enabled": true +} +``` diff --git a/doc/ssh/README.md b/doc/ssh/README.md index 2627c0ec7c1..5a3f97de77d 100644 --- a/doc/ssh/README.md +++ b/doc/ssh/README.md @@ -183,7 +183,7 @@ Now, it's time to add the newly created public key to your GitLab account. 1. Add your **public** SSH key to your GitLab account by: 1. Clicking your avatar in the upper right corner and selecting **Settings**. - 1. Navigating to **SSH Keys** and pasting your **public** key in the **Key** field. If you: + 1. Navigating to **SSH Keys** and pasting your **public** key from the clipboard into the **Key** field. If you: - Created the key with a comment, this will appear in the **Title** field. - Created the key without a comment, give your key an identifiable title like _Work Laptop_ or _Home Workstation_. 1. Click the **Add key** button. |