From 9dd8e52bf53668fc1009f9020789b4db9624eaf9 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Thu, 9 Aug 2018 15:19:55 -0700 Subject: [PATCH 01/27] moving topics under installation folder into root. added aliases too --- .../rke/v0.1.x/en/{installation => }/etcd-snapshots/_index.md | 4 +++- .../v0.1.x/en/{installation => }/managing-clusters/_index.md | 4 +++- content/rke/v0.1.x/en/{installation => }/os/_index.md | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) rename content/rke/v0.1.x/en/{installation => }/etcd-snapshots/_index.md (99%) rename content/rke/v0.1.x/en/{installation => }/managing-clusters/_index.md (95%) rename content/rke/v0.1.x/en/{installation => }/os/_index.md (99%) diff --git a/content/rke/v0.1.x/en/installation/etcd-snapshots/_index.md b/content/rke/v0.1.x/en/etcd-snapshots/_index.md similarity index 99% rename from content/rke/v0.1.x/en/installation/etcd-snapshots/_index.md rename to content/rke/v0.1.x/en/etcd-snapshots/_index.md index 022fdee9912..f9ab1d2bb6b 100644 --- a/content/rke/v0.1.x/en/installation/etcd-snapshots/_index.md +++ b/content/rke/v0.1.x/en/etcd-snapshots/_index.md @@ -1,6 +1,8 @@ --- title: Backups and Disaster Recovery -weight: 65 +weight: 150 +aliases: + - /rke/v0.1.x/en/installation/etcd-snapshots/ --- As of v0.1.7, you can configure a RKE cluster to automatically take snapshots of etcd. In a disaster scenario, you can restore these snapshots, which are stored on other nodes in the cluster. diff --git a/content/rke/v0.1.x/en/installation/managing-clusters/_index.md b/content/rke/v0.1.x/en/managing-clusters/_index.md similarity index 95% rename from content/rke/v0.1.x/en/installation/managing-clusters/_index.md rename to content/rke/v0.1.x/en/managing-clusters/_index.md index b4abbf17020..97345671800 100644 --- a/content/rke/v0.1.x/en/installation/managing-clusters/_index.md +++ b/content/rke/v0.1.x/en/managing-clusters/_index.md @@ -1,6 +1,8 @@ --- title: Managing RKE Clusters -weight: 60 +weight: 175 +aliases: + - /rke/v0.1.x/en/installation/managing-clusters/ --- ### Adding/Removing Nodes diff --git a/content/rke/v0.1.x/en/installation/os/_index.md b/content/rke/v0.1.x/en/os/_index.md similarity index 99% rename from content/rke/v0.1.x/en/installation/os/_index.md rename to content/rke/v0.1.x/en/os/_index.md index e15f2710f31..293fc9cfcb4 100644 --- a/content/rke/v0.1.x/en/installation/os/_index.md +++ b/content/rke/v0.1.x/en/os/_index.md @@ -1,6 +1,8 @@ --- title: Operating System Requirements -weight: 55 +weight: 5 +aliases: + - /rke/v0.1.x/en/etcd-snapshots/os --- RKE runs on almost any Linux OS with Docker installed. Most of the development and testing of RKE occurred on Ubuntu 16.04. However, some OS's have restrictions and specific requirements. From 4743a50cdf9310f00dadfabb2dde59cf8d9e1609 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Thu, 9 Aug 2018 15:39:55 -0700 Subject: [PATCH 02/27] retitling os reqs to requirements. Dividing into sections. --- content/rke/v0.1.x/en/os/_index.md | 33 +++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/content/rke/v0.1.x/en/os/_index.md b/content/rke/v0.1.x/en/os/_index.md index 293fc9cfcb4..e5fc2e2b736 100644 --- a/content/rke/v0.1.x/en/os/_index.md +++ b/content/rke/v0.1.x/en/os/_index.md @@ -1,9 +1,32 @@ --- -title: Operating System Requirements +title: Requirements weight: 5 aliases: - /rke/v0.1.x/en/etcd-snapshots/os --- +**In this section:** + + + +- [Operating System](#operating-system) + + - [RedHat Enterprise Linux (RHEL) / Oracle Enterprise Linux (OEL) / CentOS](#redhat-enterprise-linux-rhel--oracle-enterprise-linux-oel--centos) + + - [Using upstream Docker](#using-upstream-docker) + - [Using RHEL/CentOS packaged Docker](#using-rhelcentos-packaged-docker) +- [Software](#software) +- [Ports](#ports) + - [Opening port TCP/6443 using `iptables``](#opening-port-tcp6443-using-iptables) + - [Opening port TCP/6443 using `firewalld`](#opening-port-tcp6443-using-firewalld) +- [Notes about Atomic Nodes](#notes-about-atomic-nodes) + + - [Container Volumes](#container-volumes) + - [OpenSSH version](#openssh-version) + - [Creating a Docker Group](#creating-a-docker-group) + + + +## Operating System RKE runs on almost any Linux OS with Docker installed. Most of the development and testing of RKE occurred on Ubuntu 16.04. However, some OS's have restrictions and specific requirements. @@ -107,7 +130,7 @@ $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ``` -### Software +## Software - Docker - Each Kubernetes version supports different Docker versions. @@ -149,14 +172,14 @@ Server: - OpenSSH 7.0+ - In order to SSH into each node, OpenSSH must be installed on each node. -### Ports +## Ports {{< requirements_ports_rke >}} If you are using an external firewall, make sure you have this port opened between the machine you are using to run `rke` and the nodes that you are going to use in the cluster. -#### Opening port TCP/6443 using `iptables`` +### Opening port TCP/6443 using `iptables`` ``` # Open TCP/6443 for all @@ -166,7 +189,7 @@ iptables -A INPUT -p tcp --dport 6443 -j ACCEPT iptables -A INPUT -p tcp -s your_ip_here --dport 6443 -j ACCEPT ``` -#### Opening port TCP/6443 using `firewalld` +### Opening port TCP/6443 using `firewalld` ``` # Open TCP/6443 for all From ba19895b50252896be597deb326e93a85df6234c Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Thu, 9 Aug 2018 16:02:25 -0700 Subject: [PATCH 03/27] retitling sections --- content/rke/v0.1.x/en/managing-clusters/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/rke/v0.1.x/en/managing-clusters/_index.md b/content/rke/v0.1.x/en/managing-clusters/_index.md index 97345671800..dae9101a846 100644 --- a/content/rke/v0.1.x/en/managing-clusters/_index.md +++ b/content/rke/v0.1.x/en/managing-clusters/_index.md @@ -1,5 +1,5 @@ --- -title: Managing RKE Clusters +title: Adding and Removing Nodes in RKE Clusters weight: 175 aliases: - /rke/v0.1.x/en/installation/managing-clusters/ @@ -19,7 +19,7 @@ After you've made changes to add/remove nodes, run `rke up` with the updated `cl You can add/remove only worker nodes, by running `rke up --update-only`. This will ignore everything else in the `cluster.yml` except for any worker nodes. -### Removing Kubernetes Clusters from Nodes +### Removing Kubernetes Components from Nodes In order to remove the Kubernetes components from nodes, you use the `rke remove` command. From 4671a82d582d4ab0d56e6cd474201a718ae12f8e Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Thu, 9 Aug 2018 16:46:59 -0700 Subject: [PATCH 04/27] drafting user preferences section --- .../en/user-settings/node-templates/_index.md | 2 +- .../v2.x/en/user-settings/preferences/_index.md | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/content/rancher/v2.x/en/user-settings/node-templates/_index.md b/content/rancher/v2.x/en/user-settings/node-templates/_index.md index 61e0a89f238..bb819e6ee42 100644 --- a/content/rancher/v2.x/en/user-settings/node-templates/_index.md +++ b/content/rancher/v2.x/en/user-settings/node-templates/_index.md @@ -3,7 +3,7 @@ title: Managing Node Templates weight: 7010 --- -when you provision a [node pool]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools) cluster, [node templates]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/#node-templates) are used to provision the cluster nodes. These templates use Docker Machine commands to configure an operating system image and setting/parameters for the node. You can create node templates in two contexts: +When you provision a [node pool]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools) cluster, [node templates]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/#node-templates) are used to provision the cluster nodes. These templates use Docker Machine commands to configure an operating system image and setting/parameters for the node. You can create node templates in two contexts: - While [provisioning a node pool cluster]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools). - At any time, from your [user settings](#creating-a-node-template-from-user-settings). diff --git a/content/rancher/v2.x/en/user-settings/preferences/_index.md b/content/rancher/v2.x/en/user-settings/preferences/_index.md index 96b9c42a624..8639bce4356 100644 --- a/content/rancher/v2.x/en/user-settings/preferences/_index.md +++ b/content/rancher/v2.x/en/user-settings/preferences/_index.md @@ -1,5 +1,18 @@ --- title: User Preferences weight: 7010 -draft: true --- + +Each user can choose preferences to personalize their Rancher experience. To change preference settings, open the **User Settings** menu and then select **Preferences**. + +## Theme + +Choose your background color for the Rancher UI. If you choose **Auto**, the background color changes from light to dark at 6 PM, and then changes back at 6 AM. + +## My Account + +This section displays the **Name** and **Username** used for your session. To change your login's current password, click the **Change Password** button. + +## Table Row per Page + +On pages that display system objects like clusters or deployments in a table, you can set the number of objects that display on the page before you must paginate. The default setting is `50`. From 5707666e3a74fe2f50111c2c450b1bdabba69be6 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Thu, 9 Aug 2018 17:20:27 -0700 Subject: [PATCH 05/27] updating user settings root topic --- content/rancher/v2.x/en/user-settings/_index.md | 11 ++++++----- .../v2.x/en/user-settings/preferences/_index.md | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/content/rancher/v2.x/en/user-settings/_index.md b/content/rancher/v2.x/en/user-settings/_index.md index 8ef85cc7c8a..21af6491017 100644 --- a/content/rancher/v2.x/en/user-settings/_index.md +++ b/content/rancher/v2.x/en/user-settings/_index.md @@ -7,10 +7,11 @@ aliases: Within Rancher, each user has a number of settings associated with their login: personal preferences, API keys, etc. You can configure these settings by choosing from the **User Settings** menu. You can open this menu by clicking your avatar, located within the main menu. +![User Settings Menu]({{< baseurl >}}/img/rancher/user-settings.png) + The available user settings are: -- [API & Keys]({{< baseurl >}}/rancher/v2.x/en/user-settings/api-keys/) - - +- [API & Keys]({{< baseurl >}}/rancher/v2.x/en/user-settings/api-keys/): If you want to use the Rancher API to access your clusters using external applications, you must create an API key for authentication. +- [Node Templates]({{< baseurl >}}/rancher/v2.x/en/user-settings/node-templates): Manage templates [used by Rancher to provision clusters]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters). +- [Preferences]({{< baseurl >}}/rancher/v2.x/en/user-settings/preferences): Sets superficial preferences for the Rancher UI. +- Log Out: Ends your user session. diff --git a/content/rancher/v2.x/en/user-settings/preferences/_index.md b/content/rancher/v2.x/en/user-settings/preferences/_index.md index 8639bce4356..a3ae0523edd 100644 --- a/content/rancher/v2.x/en/user-settings/preferences/_index.md +++ b/content/rancher/v2.x/en/user-settings/preferences/_index.md @@ -11,7 +11,7 @@ Choose your background color for the Rancher UI. If you choose **Auto**, the bac ## My Account -This section displays the **Name** and **Username** used for your session. To change your login's current password, click the **Change Password** button. +This section displays the **Name** (your display name) and **Username** (your login) used for your session. To change your login's current password, click the **Change Password** button. ## Table Row per Page From 6177e37ed02c58067c00d98e675c7b3a1b573ec7 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Fri, 10 Aug 2018 14:56:49 -0700 Subject: [PATCH 06/27] incorporating feedback from superseb --- content/rancher/v2.x/en/user-settings/_index.md | 4 ++-- .../rancher/v2.x/en/user-settings/node-templates/_index.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/rancher/v2.x/en/user-settings/_index.md b/content/rancher/v2.x/en/user-settings/_index.md index 21af6491017..7c71f6f01cf 100644 --- a/content/rancher/v2.x/en/user-settings/_index.md +++ b/content/rancher/v2.x/en/user-settings/_index.md @@ -11,7 +11,7 @@ Within Rancher, each user has a number of settings associated with their login: The available user settings are: -- [API & Keys]({{< baseurl >}}/rancher/v2.x/en/user-settings/api-keys/): If you want to use the Rancher API to access your clusters using external applications, you must create an API key for authentication. -- [Node Templates]({{< baseurl >}}/rancher/v2.x/en/user-settings/node-templates): Manage templates [used by Rancher to provision clusters]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters). +- [API & Keys]({{< baseurl >}}/rancher/v2.x/en/user-settings/api-keys/): If you want to interact with Rancher programmatically, you need an API key. Follow the directions in this section to obtain a key. +- [Node Templates]({{< baseurl >}}/rancher/v2.x/en/user-settings/node-templates): Manage templates [used by Rancher to provision nodes for clusters]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters). - [Preferences]({{< baseurl >}}/rancher/v2.x/en/user-settings/preferences): Sets superficial preferences for the Rancher UI. - Log Out: Ends your user session. diff --git a/content/rancher/v2.x/en/user-settings/node-templates/_index.md b/content/rancher/v2.x/en/user-settings/node-templates/_index.md index bb819e6ee42..fdc48f6e6b1 100644 --- a/content/rancher/v2.x/en/user-settings/node-templates/_index.md +++ b/content/rancher/v2.x/en/user-settings/node-templates/_index.md @@ -3,7 +3,7 @@ title: Managing Node Templates weight: 7010 --- -When you provision a [node pool]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools) cluster, [node templates]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/#node-templates) are used to provision the cluster nodes. These templates use Docker Machine commands to configure an operating system image and setting/parameters for the node. You can create node templates in two contexts: +When you provision a [node pool]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools) cluster, [node templates]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/#node-templates) are used to provision the cluster nodes. These templates use Docker Machine configuration options to define an operating system image and settings/parameters for the node. You can create node templates in two contexts: - While [provisioning a node pool cluster]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools). - At any time, from your [user settings](#creating-a-node-template-from-user-settings). From cdc1c7cb00382c4c46d364cae31110b9c7e965a7 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Fri, 10 Aug 2018 15:09:32 -0700 Subject: [PATCH 07/27] correcting alias --- content/rke/v0.1.x/en/os/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rke/v0.1.x/en/os/_index.md b/content/rke/v0.1.x/en/os/_index.md index e5fc2e2b736..3dcc2f52f32 100644 --- a/content/rke/v0.1.x/en/os/_index.md +++ b/content/rke/v0.1.x/en/os/_index.md @@ -2,7 +2,7 @@ title: Requirements weight: 5 aliases: - - /rke/v0.1.x/en/etcd-snapshots/os + - /rke/v0.1.x/en/installation/os --- **In this section:** From 4ee3ad9f8803a1eabeee13fa1ed5963e33c93dce Mon Sep 17 00:00:00 2001 From: lvuch Date: Tue, 7 Aug 2018 14:35:34 -0700 Subject: [PATCH 08/27] add customers to main nav --- config.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config.toml b/config.toml index 45086b9d898..9faca42468b 100644 --- a/config.toml +++ b/config.toml @@ -122,10 +122,16 @@ pre = "keyboard_arrow_down" #url = "https://rancher.com//customers/" #weight = "3" +[[menu.main]] +identifier = "customers" +name = "Customers" +url = "/customers/" +weight = "4" + [[menu.main]] identifier = "learn" name = "Learn" -weight = "4" +weight = "5" pre = "keyboard_arrow_down" [[menu.main]] From 69615e24772f2ebb7a9afd3f355cdd58a701f8d3 Mon Sep 17 00:00:00 2001 From: lauren Vuchetich Date: Mon, 13 Aug 2018 12:18:25 -0700 Subject: [PATCH 09/27] Update config.toml --- config.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/config.toml b/config.toml index 9faca42468b..1a8e1f9342d 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,7 @@ baseURL = "" languageCode = "en-us" title = "Rancher Labs" + theme = "rancher-website-theme" themesDir = "node_modules" pluralizeListTitles = false From f5221ebb74fd4d32474497574d7312ddb7123a3a Mon Sep 17 00:00:00 2001 From: MBishop17 Date: Mon, 6 Aug 2018 17:45:29 -0700 Subject: [PATCH 10/27] adding initial docs for splunk and syslog --- .../v2.x/en/tools/logging/splunk/_index.md | 88 ++++++------------- .../v2.x/en/tools/logging/syslog/_index.md | 38 ++++++++ 2 files changed, 66 insertions(+), 60 deletions(-) create mode 100644 content/rancher/v2.x/en/tools/logging/syslog/_index.md diff --git a/content/rancher/v2.x/en/tools/logging/splunk/_index.md b/content/rancher/v2.x/en/tools/logging/splunk/_index.md index e58082ca991..4b37cbedc95 100755 --- a/content/rancher/v2.x/en/tools/logging/splunk/_index.md +++ b/content/rancher/v2.x/en/tools/logging/splunk/_index.md @@ -5,81 +5,54 @@ aliases: - /rancher/v2.x/en/tasks/logging/splunk/ --- -The following guide will demonstrate how to monitor your container -infrastructure using Splunk. +If your organization uses Splunk, you can configure it to log events from your cluster. Afterwards, you can use Splunk to view data from cluster and containers. -## Configure HTTP Event Collector +## Configuring Cluster Logging -The first step is to identify what port Splunk is using for the HTTP Event -collector. Usually the port is either **8088** or **8089**. HEC is used to -send log data from Rancher to Splunk using HTTP or HTTPS. +>**Prerequisites:** Configure HTTP event collection for your type of Splunk server (Splunk Enterprise, Splunk Cloud, etc.). Enable all tokens, and then create a new token. For more information, see [Splunk Documentation](http://docs.splunk.com/Documentation/Splunk/7.1.2/Data/UsetheHTTPEventCollector#About_Event_Collector_tokens). -Login to Splunk and go to: +1. From the **Global** view, open the cluster that you want to configure logging for. -Settings > Data inputs > HTTP Event Collector > **Global Settings** +1. From the main menu, select **Tools > Logging**. -![Configure Splunk]({{< baseurl >}}/img/rancher/splunk/splunk1.jpg) +1. Select **Splunk**. -Make sure to click on **Enabled** for all tokens. By default it is set to -disabled. This will allow Splunk to collect HTTP Event data sent from Rancher. +1. Complete the **Splunk HTTP Event Collector Configuration** form. -Click on **Save** to update the HEC settings. + 1. From the **Endpoint** field, enter the IP address and port for you syslog server (i.e. `http://splunk-server:8088`) + + If you're using Splunk Cloud, you'll need to work with [Splunk support](https://www.splunk.com/en_us/support-and-services.html) to get an endpoint URL. -## Generate Token + 1. Enter the **Token** you obtained while completing the prerequisites. -This step might not be applicable, if you already have a token. Now we will -generate the token that will be used by Rancher to send HTTP Event data. + 1. From the **Source** field, enter the name of the token as entered in Splunk. -- Click Settings > Data inputs > HTTP Event Collector > **New Token** -- Click monitor -- Select HTTP Event Collector -- In the Name field, enter a name for the token (ex. **rancher**) -- Click Next -- Select the indexe(s) desired (history, main, and summary) -- You can also create a new index and add it to the step above -- Click Review -- Confirm that all settings for the token are what you want -- Click Submit to generate the token + 1. **Optional:** Enter an index that's within the scope of your token. -  +1. Complete the **Additional Logging Configuration** form. -Congratulations you now are ready to feed Splunk with HTTP Event data. You -should see a page like the one below with your generated token. This is the -token that will be used in Rancher to communicate with Splunk. + 1. Use the **Add Field** button to add key value pairs used to filter log events. -![Token Created]({{< baseurl >}}/img/rancher/splunk/splunk2.jpg) + 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. -## Configure Cluster Logging +1. Click **Save**. -In this section we will configure and enable Splunk cluster logging in Rancher. -- Head on over to local > Tools > **Logging** -- Select Splunk -- Enter the Splunk endpoint using the port specified for **HEC** (ex. http://splunk-server:8088) -- Enter the token generated above (ex. 8da70994-b1b0-4a79-b154-bfaae8f93432) -- Enter the Source, name of the token created earlier (ex. **rancher**) -- You can also enter an index, this is optional (ex. **main**) +**Result:** Rancher is now configured to send cluster and container events to Splunk for logging. -  +## Viewing Logs -![Configure Rancher Cluster Logging]({{< baseurl >}}/img/rancher/splunk/splunk3.jpg) +1. Log into your Splunk server. -Repeat the same step for Project Logging, if desired. This is not required and is optional. +1. Click on **Search & Reporting**. The number of **Indexed Events** listed should be increasing. -## View Logs +1. Click on Data Summary and select the Sources tab. -You should now be receiving logging data from your cluster. Head on over to -Splunk to view your logs. + ![View Logs]({{< baseurl >}}/img/rancher/splunk/splunk4.jpg) -Click on **Search & Reporting**, you should see **Indexed Events** increasing. -Click on Data Summary and select the Sources tab. +1. To view the actual logs, click on the source that you declared earlier. -![View Logs]({{< baseurl >}}/img/rancher/splunk/splunk4.jpg) - -To view the actual logs click on the source that you declared earlier -(ex. rancher -> http:**rancher**) - -![View Logs]({{< baseurl >}}/img/rancher/splunk/splunk5.jpg) + ![View Logs]({{< baseurl >}}/img/rancher/splunk/splunk5.jpg) ## Troubleshooting @@ -91,12 +64,7 @@ $ curl http://splunk-server:8088/services/collector/event \ -d '{"event": "hello world"}' ``` -You should see **json** data returning Success code 0. You should be able -to send logging data to HEC. If you received an error, check your configuration -in Splunk & Rancher Cluster Logging. +If Splunk is configured corretcly, you should **json** data returning `success code 0`. You should be able +to send logging data to HEC. -## Reference - -For more information on Splunk, you can check out the following reference: - -[Splunk -> HTTP Event Collector](http://docs.splunk.com/Documentation/Splunk/7.0.0/Data/UsetheHTTPEventCollector) +If you received an error, check your configuration in Splunk & Rancher Cluster Logging. \ No newline at end of file diff --git a/content/rancher/v2.x/en/tools/logging/syslog/_index.md b/content/rancher/v2.x/en/tools/logging/syslog/_index.md new file mode 100644 index 00000000000..bddce4daec4 --- /dev/null +++ b/content/rancher/v2.x/en/tools/logging/syslog/_index.md @@ -0,0 +1,38 @@ +--- +title: Syslog +weight: 500 +--- + +You can configure a syslog server to log events that occur in your Kubernetes cluster. + +>**Prerequisite:** You must have a syslog server configured. + +1. From the **Global** view, open the cluster that you want to configure logging for. + +1. From the main menu, select **Tools > Logging**. + +1. Select **syslog**. + +1. Complete the **Syslog Configuration** form. + + 1. From the **Endpoint** field, enter the IP address and port for you syslog server. Additionally, select the protocol that your syslog server uses from the drop-down. + + 1. From the **Program** field, enter the name of the application logging events to your syslog server. + + 1. Enter a **Token** that authenticates with your syslog server. + + 1. Select a **Log Severity** for events that are logged to the syslog server. For more information on each severity level, see the [syslog protocol documentation](https://tools.ietf.org/html/rfc5424#page-11). + +1. If your syslog server uses **TCP** protocol, complete the **SSL Configuration** form. + + 1. Enter a private key and client certificate. + + 1. If you want to verify connections to the syslog service, select the **Enabled - Input trusted server certificate** option and then enter your truster server certificate. + +1. Complete the **Additional Logging Configuration** form. + + 1. Use the **Add Field** button to add key value pairs used to filter log events. + + 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. + +1. Click **Save**. \ No newline at end of file From 3ce40a5b9dbf5a07325d6066a7418ec3d8691fff Mon Sep 17 00:00:00 2001 From: MBishop17 Date: Mon, 6 Aug 2018 18:06:10 -0700 Subject: [PATCH 11/27] adding elasticsearch draft --- .../en/tools/logging/elasticsearch/_index.md | 42 +++++++++++++++++++ .../v2.x/en/tools/logging/splunk/_index.md | 1 - 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md diff --git a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md new file mode 100644 index 00000000000..82d18e77577 --- /dev/null +++ b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md @@ -0,0 +1,42 @@ +--- +title: Elasticsearch +weight: 200 +--- + +If your organization uses Elasticsearch, you can configure it to log events from your cluster. Afterwards, you can use Elasticsearch to view data from cluster and containers. + +## Configuring Cluster Logging + +>**Prerequisites:** Configure an [Elasticsearch deployment](https://www.elastic.co/guide/en/cloud/saas-release/ec-create-deployment.html). + +1. From the **Global** view, open the cluster that you want to configure logging for. + +1. From the main menu, select **Tools > Logging**. + +1. Select **Elasticsearch**. + +1. Complete the **Elasticsearch Configuration** form. + + 1. From the **Endpoint** field, enter the IP address and port for your Elasticsearch. You can copy this information from your the dashboard of your Elasticseach deployment. + + 1. If you are using [X-Pack Security](https://www.elastic.co/guide/en/x-pack/current/xpack-introduction.html), enter your Elasticsearch **Username** and **Password** for authentication. + + 1. Enter an [Index Pattern](https://www.elastic.co/guide/en/kibana/current/index-patterns.html). + +1. Complete the **SSL Configuration** form. + + 1. Enter a private key and client certificate. + + 1. Enter your private key password. + + 1. If you want to verify connections to the Elasticsearch, select the **Enabled - Input trusted server certificate** option and then enter your truster server certificate. + +1. Complete the **Additional Logging Configuration** form. + + 1. Use the **Add Field** button to add key value pairs used to filter log events. + + 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. + +1. Click **Save**. + +**Result:** Rancher is now configured to send cluster and container events to Elasticsearch for logging. \ No newline at end of file diff --git a/content/rancher/v2.x/en/tools/logging/splunk/_index.md b/content/rancher/v2.x/en/tools/logging/splunk/_index.md index 4b37cbedc95..add9f417f0d 100755 --- a/content/rancher/v2.x/en/tools/logging/splunk/_index.md +++ b/content/rancher/v2.x/en/tools/logging/splunk/_index.md @@ -37,7 +37,6 @@ If your organization uses Splunk, you can configure it to log events from your c 1. Click **Save**. - **Result:** Rancher is now configured to send cluster and container events to Splunk for logging. ## Viewing Logs From b873b07fc71b8599d7dbc12068112761fe0a128e Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Tue, 7 Aug 2018 17:13:16 -0700 Subject: [PATCH 12/27] adding draft of Kafka --- .../logging/embedded-elasticsearch/_index.md | 43 +++++++++++++++++++ .../v2.x/en/tools/logging/kafka/_index.md | 32 ++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md create mode 100644 content/rancher/v2.x/en/tools/logging/kafka/_index.md diff --git a/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md b/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md new file mode 100644 index 00000000000..6352697b8e5 --- /dev/null +++ b/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md @@ -0,0 +1,43 @@ +--- +title: Embedded Elasticsearch +weight: 100 +--- + +If your organization doesn't have any logging solutions, you can set one up that's embedded within the cluster. You don't have to configure an independent logging server. + +>**Notes:** +> +>- Embedded Elasticsearch is experimental at this time. Therefore, persistent storage for Embedded Elasticsearch is unavailable.We plan to offer full support in a Rancher release that's yet to be determined. +>- Embedded Elasticsearch is only available for clusters and not projects. +>- Setting up Embedded Elasticsearch requires a well provisioned node within the cluster. See the prerequisites below for more details. + +## Configuring Cluster Logging + +>**Prerequisites:** Your cluster must meet the following hardware requirements: +> +>- At least 1 dedicated CPU (2 or more in total). +>- At least 512 MB RAM. + +1. From the **Global** view, open the cluster that you want to configure logging for. + +1. From the main menu, select **Tools > Logging**. + +1. Select **Embedded Elasticsearch**. + +1. Complete the **Embedded Elasticsearch Configuration** form. + + 1. From **CPUs and Memory**, set the CPU and memory that elasticsearch can access within your cluster for logging. + + 1. Enter an [Index Pattern](https://www.elastic.co/guide/en/kibana/current/index-patterns.html). + +1. Complete the **Additional Logging Configuration** form. + + 1. Use the **Add Field** button to add key value pairs used to filter log events. + + 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. + +1. Click **Save**. + +**Result:** Rancher is now configured to send cluster and container events to Embedded Elasticsearch for logging. + +You can view your logs by clicking the **Elasticsearch Endpoint** and **Kibana Endpoint** links available on the **Cluster Logging** page. \ No newline at end of file diff --git a/content/rancher/v2.x/en/tools/logging/kafka/_index.md b/content/rancher/v2.x/en/tools/logging/kafka/_index.md new file mode 100644 index 00000000000..d993e575bac --- /dev/null +++ b/content/rancher/v2.x/en/tools/logging/kafka/_index.md @@ -0,0 +1,32 @@ +--- +title: Kafka +weight: 400 +--- + +You can configure a Kafka server to log events that occur in your Kubernetes cluster. + +>**Prerequisite:** You must have a Kafka server configured. + +1. From the **Global** view, open the cluster that you want to configure logging for. + +1. From the main menu, select **Tools > Logging**. + +1. Select **Kafka**. + +1. Complete the **Kafka Configuration** form. + + 1. From **Endpoint Type**, select the type of Kafka server you are using: **Zookeeper** or **Broker**. + + 1. From the **Endpoint** field, enter the IP address and port for your Kafka server. + + By default, Kafka uses port `9092`. + + 1. From the Topic field, enter the name of a Kafka topic that your Kubernetes cluster submits logs to. + +1. Complete the **Additional Logging Configuration** form. + + 1. Use the **Add Field** button to add key value pairs used to filter log events. + + 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. + +1. Click **Save**. \ No newline at end of file From 2c5b24923e60b083d7e4ead15d59868cb03e87ba Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Tue, 7 Aug 2018 19:22:24 -0700 Subject: [PATCH 13/27] drafts for logging procedures --- .../rancher/v2.x/en/tools/logging/_index.md | 15 ++++++-- .../en/tools/logging/elasticsearch/_index.md | 28 ++++++++++----- .../logging/embedded-elasticsearch/_index.md | 8 ++--- .../v2.x/en/tools/logging/kafka/_index.md | 16 +++++++-- .../v2.x/en/tools/logging/splunk/_index.md | 33 +++++++++++------ .../v2.x/en/tools/logging/syslog/_index.md | 36 ++++++++++++++----- 6 files changed, 99 insertions(+), 37 deletions(-) diff --git a/content/rancher/v2.x/en/tools/logging/_index.md b/content/rancher/v2.x/en/tools/logging/_index.md index 143c56be407..d124366ae91 100644 --- a/content/rancher/v2.x/en/tools/logging/_index.md +++ b/content/rancher/v2.x/en/tools/logging/_index.md @@ -5,6 +5,15 @@ aliases: - /rancher/v2.x/en/tasks/logging/ --- -Rancher has the capability to push out cluster and project logs to an external -log monitoring tool such as Splunk or a Syslog server. This allows you to be -alerted of errors and warnings in your Kubernetes infrastructure. +To record cluster or project events, Rancher can integrate with a variety of popular logging services that exist outside of your clusters. Configuring logging services: + +- Alerts you to errors and warnings in your Kubernetes infrastructure in a live stream. +- Allows you to view data reports using your logging service's tools and identify trends in your clusters or projects. + +Rancher supports the following logging services: + +- [Embedded Elasticsearch]({{< baseurl >}}/rancher/v2.x/en/tools/logging/embedded-elasticsearch) +- [Elasticsearch]({{< baseurl >}}/rancher/v2.x/en/tools/logging/elasticsearch) +- [Splunk]({{< baseurl >}}/rancher/v2.x/en/tools/logging/splunk) +- [Kafka]({{< baseurl >}}/rancher/v2.x/en/tools/logging/kafka) +- [Syslog]({{< baseurl >}}/rancher/v2.x/en/tools/logging/syslog) \ No newline at end of file diff --git a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md index 82d18e77577..c55f72d0253 100644 --- a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md +++ b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md @@ -3,40 +3,50 @@ title: Elasticsearch weight: 200 --- -If your organization uses Elasticsearch, you can configure it to log events from your cluster. Afterwards, you can use Elasticsearch to view data from cluster and containers. +If your organization uses [Elasticsearch](https://www.elastic.co/), either on premise or in the cloud, you can configure it to log events from your cluster. Afterwards, you can log into your Elasticsearch deployment to view logs for cluster or containers. -## Configuring Cluster Logging +## Configuring Elasticsearch Logging + +You can configure Elasticsearch to log events at both the cluster level and the project level. >**Prerequisites:** Configure an [Elasticsearch deployment](https://www.elastic.co/guide/en/cloud/saas-release/ec-create-deployment.html). +1. Browse to the cluster or project that you want to log. +{{% accordion id="cluster" label="To Configure Cluster Logging:" %}} 1. From the **Global** view, open the cluster that you want to configure logging for. 1. From the main menu, select **Tools > Logging**. +{{% /accordion %}} +{{% accordion id="project" label="To Configure Project Logging:" %}} +1. From the **Global** view, open the project that you want to configure logging for. + +1. From the main menu, select **Resources > Logging**. +{{% /accordion %}} 1. Select **Elasticsearch**. 1. Complete the **Elasticsearch Configuration** form. - 1. From the **Endpoint** field, enter the IP address and port for your Elasticsearch. You can copy this information from your the dashboard of your Elasticseach deployment. - + 1. From the **Endpoint** field, enter the IP address and port for your Elasticsearch. You can copy this information from your the dashboard of your Elasticsearch deployment. + 1. If you are using [X-Pack Security](https://www.elastic.co/guide/en/x-pack/current/xpack-introduction.html), enter your Elasticsearch **Username** and **Password** for authentication. 1. Enter an [Index Pattern](https://www.elastic.co/guide/en/kibana/current/index-patterns.html). -1. Complete the **SSL Configuration** form. +1. If your instance of Elasticsearch uses SSL, complete the **SSL Configuration** form. - 1. Enter a private key and client certificate. + 1. Enter a private key and client certificate. Either copy and paste them or browse to them using **Read from a file**. 1. Enter your private key password. - 1. If you want to verify connections to the Elasticsearch, select the **Enabled - Input trusted server certificate** option and then enter your truster server certificate. + 1. If you want to verify connections to Elasticsearch, select the **Enabled - Input trusted server certificate** option and then enter your trusted server certificate. 1. Complete the **Additional Logging Configuration** form. - 1. Use the **Add Field** button to add key value pairs used to filter log events. + 1. Use the **Add Field** button to add key value pairs that represent [custom log fields](http://docs.splunk.com/Documentation/AddOns/released/CiscoWSA/Configurew3clogfieldextractions) used to filter log events. 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. 1. Click **Save**. -**Result:** Rancher is now configured to send cluster and container events to Elasticsearch for logging. \ No newline at end of file +**Result:** Rancher is now configured to send cluster and container events to Elasticsearch for logging. Log into Elasticsearch or Kibana to view your cluster/project events. \ No newline at end of file diff --git a/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md b/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md index 6352697b8e5..3ff2b37a3a3 100644 --- a/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md +++ b/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md @@ -3,15 +3,15 @@ title: Embedded Elasticsearch weight: 100 --- -If your organization doesn't have any logging solutions, you can set one up that's embedded within the cluster. You don't have to configure an independent logging server. +If your organization doesn't have any logging solutions, you can use Rancher's Embedded Elasticsearch option to log record from your cluster. This option sets up an instance of [Elasticsearch](https://www.elastic.co/) within your cluster, and then uses cluster resources to run it. >**Notes:** > ->- Embedded Elasticsearch is experimental at this time. Therefore, persistent storage for Embedded Elasticsearch is unavailable.We plan to offer full support in a Rancher release that's yet to be determined. +>- Embedded Elasticsearch is experimental at this time. Therefore, persistent storage for Embedded Elasticsearch is unavailable. We plan to offer full support in a Rancher release that's yet to be determined. >- Embedded Elasticsearch is only available for clusters and not projects. >- Setting up Embedded Elasticsearch requires a well provisioned node within the cluster. See the prerequisites below for more details. -## Configuring Cluster Logging +## Configuring Embedded Elasticsearch Logging >**Prerequisites:** Your cluster must meet the following hardware requirements: > @@ -32,7 +32,7 @@ If your organization doesn't have any logging solutions, you can set one up that 1. Complete the **Additional Logging Configuration** form. - 1. Use the **Add Field** button to add key value pairs used to filter log events. + 1. Use the **Add Field** button to add key value pairs that represent [custom log fields](http://docs.splunk.com/Documentation/AddOns/released/CiscoWSA/Configurew3clogfieldextractions) used to filter log events. 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. diff --git a/content/rancher/v2.x/en/tools/logging/kafka/_index.md b/content/rancher/v2.x/en/tools/logging/kafka/_index.md index d993e575bac..fd3d4c6d268 100644 --- a/content/rancher/v2.x/en/tools/logging/kafka/_index.md +++ b/content/rancher/v2.x/en/tools/logging/kafka/_index.md @@ -5,11 +5,23 @@ weight: 400 You can configure a Kafka server to log events that occur in your Kubernetes cluster. +## Configuring Kafka Logging + +You can configure Kafka to log events at both the cluster level and the project level. + >**Prerequisite:** You must have a Kafka server configured. +1. Browse to the cluster or project that you want to log. +{{% accordion id="cluster" label="To Configure Cluster Logging:" %}} 1. From the **Global** view, open the cluster that you want to configure logging for. 1. From the main menu, select **Tools > Logging**. +{{% /accordion %}} +{{% accordion id="project" label="To Configure Project Logging:" %}} +1. From the **Global** view, open the project that you want to configure logging for. + +1. From the main menu, select **Resources > Logging**. +{{% /accordion %}} 1. Select **Kafka**. @@ -21,11 +33,11 @@ You can configure a Kafka server to log events that occur in your Kubernetes clu By default, Kafka uses port `9092`. - 1. From the Topic field, enter the name of a Kafka topic that your Kubernetes cluster submits logs to. + 1. From the **Topic** field, enter the name of a Kafka [topic](https://kafka.apache.org/documentation/#basic_ops_add_topic) that your Kubernetes cluster submits logs to. 1. Complete the **Additional Logging Configuration** form. - 1. Use the **Add Field** button to add key value pairs used to filter log events. + 1. Use the **Add Field** button to add key value pairs that represent [custom log fields](https://httpd.apache.org/docs/2.4/mod/mod_log_config.html) used to filter log events. 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. diff --git a/content/rancher/v2.x/en/tools/logging/splunk/_index.md b/content/rancher/v2.x/en/tools/logging/splunk/_index.md index add9f417f0d..38eda5b9342 100755 --- a/content/rancher/v2.x/en/tools/logging/splunk/_index.md +++ b/content/rancher/v2.x/en/tools/logging/splunk/_index.md @@ -1,19 +1,34 @@ --- title: Splunk -weight: 3725 +weight: 300 aliases: - /rancher/v2.x/en/tasks/logging/splunk/ --- -If your organization uses Splunk, you can configure it to log events from your cluster. Afterwards, you can use Splunk to view data from cluster and containers. +If your organization uses [Splunk](https://www.splunk.com/), you can configure it to log events from a cluster or project in Rancher. Afterwards events are logged, you can use Splunk to view data from cluster and containers. -## Configuring Cluster Logging +## Configuring Splunk Logging ->**Prerequisites:** Configure HTTP event collection for your type of Splunk server (Splunk Enterprise, Splunk Cloud, etc.). Enable all tokens, and then create a new token. For more information, see [Splunk Documentation](http://docs.splunk.com/Documentation/Splunk/7.1.2/Data/UsetheHTTPEventCollector#About_Event_Collector_tokens). +You can configure Splunk to log events at both the cluster level and the project level. +>**Prerequisites:** +> +>- Configure HTTP event collection for your Splunk Server (Splunk Enterprise or Splunk Cloud). +>- Enable all tokens, and then create a new token. +> +>For more information, see [Splunk Documentation](http://docs.splunk.com/Documentation/Splunk/7.1.2/Data/UsetheHTTPEventCollector#About_Event_Collector_tokens). + +1. Browse to the cluster or project that you want to log. +{{% accordion id="cluster" label="To Configure Cluster Logging:" %}} 1. From the **Global** view, open the cluster that you want to configure logging for. 1. From the main menu, select **Tools > Logging**. +{{% /accordion %}} +{{% accordion id="project" label="To Configure Project Logging:" %}} +1. From the **Global** view, open the project that you want to configure logging for. + +1. From the main menu, select **Resources > Logging**. +{{% /accordion %}} 1. Select **Splunk**. @@ -21,7 +36,7 @@ If your organization uses Splunk, you can configure it to log events from your c 1. From the **Endpoint** field, enter the IP address and port for you syslog server (i.e. `http://splunk-server:8088`) - If you're using Splunk Cloud, you'll need to work with [Splunk support](https://www.splunk.com/en_us/support-and-services.html) to get an endpoint URL. + If you're using Splunk Cloud, you'll need to work with [Splunk support](https://www.splunk.com/en_us/support-and-services.html) to get an endpoint URL. 1. Enter the **Token** you obtained while completing the prerequisites. @@ -31,7 +46,7 @@ If your organization uses Splunk, you can configure it to log events from your c 1. Complete the **Additional Logging Configuration** form. - 1. Use the **Add Field** button to add key value pairs used to filter log events. + 1. 1. Use the **Add Field** button to add key value pairs that represent [custom log fields](http://docs.splunk.com/Documentation/Splunk/7.1.2/Data/Configureindex-timefieldextraction) used to filter log events. 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. @@ -46,11 +61,9 @@ If your organization uses Splunk, you can configure it to log events from your c 1. Click on **Search & Reporting**. The number of **Indexed Events** listed should be increasing. 1. Click on Data Summary and select the Sources tab. - ![View Logs]({{< baseurl >}}/img/rancher/splunk/splunk4.jpg) 1. To view the actual logs, click on the source that you declared earlier. - ![View Logs]({{< baseurl >}}/img/rancher/splunk/splunk5.jpg) ## Troubleshooting @@ -63,7 +76,7 @@ $ curl http://splunk-server:8088/services/collector/event \ -d '{"event": "hello world"}' ``` -If Splunk is configured corretcly, you should **json** data returning `success code 0`. You should be able +If Splunk is configured correctly, you should receive **json** data returning `success code 0`. You should be able to send logging data to HEC. -If you received an error, check your configuration in Splunk & Rancher Cluster Logging. \ No newline at end of file +If you received an error, check your configuration in Splunk and Rancher. \ No newline at end of file diff --git a/content/rancher/v2.x/en/tools/logging/syslog/_index.md b/content/rancher/v2.x/en/tools/logging/syslog/_index.md index bddce4daec4..0af5b4fae17 100644 --- a/content/rancher/v2.x/en/tools/logging/syslog/_index.md +++ b/content/rancher/v2.x/en/tools/logging/syslog/_index.md @@ -3,31 +3,49 @@ title: Syslog weight: 500 --- -You can configure a syslog server to log events that occur in your Kubernetes cluster. +You can configure a [Syslog](https://tools.ietf.org/html/rfc5424) server to log events that occur in your Kubernetes cluster. ->**Prerequisite:** You must have a syslog server configured. +## Configuring Syslog + +You can configure Syslog to log events at both the cluster level and the project level. + +>**Prerequisite:** You must have a Syslog server configured. + +1. Browse to the cluster or project that you want to log. + +{{% accordion id="cluster" label="To Configure Cluster Logging:" %}} 1. From the **Global** view, open the cluster that you want to configure logging for. 1. From the main menu, select **Tools > Logging**. -1. Select **syslog**. +{{% /accordion %}} + +{{% accordion id="project" label="To Configure Project Logging:" %}} + +1. From the **Global** view, open the project that you want to configure logging for. + +1. From the main menu, select **Resources > Logging**. + +{{% /accordion %}} + +1. Select **Syslog**. 1. Complete the **Syslog Configuration** form. - 1. From the **Endpoint** field, enter the IP address and port for you syslog server. Additionally, select the protocol that your syslog server uses from the drop-down. + 1. From the **Endpoint** field, enter the IP address and port for you Syslog server. Additionally, select the protocol that your Syslog server uses from the drop-down. - 1. From the **Program** field, enter the name of the application logging events to your syslog server. + 1. From the **Program** field, enter the name of the application logging events to your Syslog server. - 1. Enter a **Token** that authenticates with your syslog server. + 1. Enter a **Token** that authenticates with your Syslog server. - 1. Select a **Log Severity** for events that are logged to the syslog server. For more information on each severity level, see the [syslog protocol documentation](https://tools.ietf.org/html/rfc5424#page-11). + 1. Select a **Log Severity** for events that are logged to the Syslog server. For more information on each severity level, see the [Syslog protocol documentation](https://tools.ietf.org/html/rfc5424#page-11). -1. If your syslog server uses **TCP** protocol, complete the **SSL Configuration** form. +1. If your Syslog server uses **TCP** protocol, complete the **SSL Configuration** form. 1. Enter a private key and client certificate. - 1. If you want to verify connections to the syslog service, select the **Enabled - Input trusted server certificate** option and then enter your truster server certificate. + 1. If you want to verify connections to the Syslog service, select the **Enabled - Input trusted server certificate** option and then enter your truster server certificate. 1. Complete the **Additional Logging Configuration** form. From f7dd0d63bff55c036dc534644ea358e222921c0b Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Wed, 8 Aug 2018 17:36:03 -0700 Subject: [PATCH 14/27] commiting initial draft of logging documentation. --- .../en/tools/logging/elasticsearch/_index.md | 16 ++++++++++----- .../logging/embedded-elasticsearch/_index.md | 6 +++--- .../v2.x/en/tools/logging/kafka/_index.md | 10 ++++++---- .../v2.x/en/tools/logging/splunk/_index.md | 16 +++++++-------- .../v2.x/en/tools/logging/syslog/_index.md | 20 +++++++++++-------- 5 files changed, 40 insertions(+), 28 deletions(-) diff --git a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md index c55f72d0253..12ed5b90db2 100644 --- a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md +++ b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md @@ -3,11 +3,11 @@ title: Elasticsearch weight: 200 --- -If your organization uses [Elasticsearch](https://www.elastic.co/), either on premise or in the cloud, you can configure it to log events from your cluster. Afterwards, you can log into your Elasticsearch deployment to view logs for cluster or containers. +If your organization uses [Elasticsearch](https://www.elastic.co/), either on premise or in the cloud, you can configure it to log events from your cluster. Afterwards, you can log into your Elasticsearch deployment to view logs for cluster or container events. ## Configuring Elasticsearch Logging -You can configure Elasticsearch to log events at both the cluster level and the project level. +You can configure Elasticsearch to log events at both the cluster and project level. >**Prerequisites:** Configure an [Elasticsearch deployment](https://www.elastic.co/guide/en/cloud/saas-release/ec-create-deployment.html). @@ -27,7 +27,7 @@ You can configure Elasticsearch to log events at both the cluster level and the 1. Complete the **Elasticsearch Configuration** form. - 1. From the **Endpoint** field, enter the IP address and port for your Elasticsearch. You can copy this information from your the dashboard of your Elasticsearch deployment. + 1. From the **Endpoint** field, enter the IP address and port for your Elasticsearch instance. You can copy this information from the dashboard of your Elasticsearch deployment. Elasticsearch usually uses port `9243`. 1. If you are using [X-Pack Security](https://www.elastic.co/guide/en/x-pack/current/xpack-introduction.html), enter your Elasticsearch **Username** and **Password** for authentication. @@ -37,13 +37,19 @@ You can configure Elasticsearch to log events at both the cluster level and the 1. Enter a private key and client certificate. Either copy and paste them or browse to them using **Read from a file**. + You can generate a key and certificate one using an openssl command. For example: + + + openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 365 -nodes -subj "/CN=myservice.example.com" + + 1. Enter your private key password. - 1. If you want to verify connections to Elasticsearch, select the **Enabled - Input trusted server certificate** option and then enter your trusted server certificate. + 1. If you want to verify connections to Elasticsearch, select the **Enabled - Input trusted server certificate** option and then enter your **Trusted Server Certificate**. 1. Complete the **Additional Logging Configuration** form. - 1. Use the **Add Field** button to add key value pairs that represent [custom log fields](http://docs.splunk.com/Documentation/AddOns/released/CiscoWSA/Configurew3clogfieldextractions) used to filter log events. + 1. Use the **Add Field** button to add key value pairs that represent custom log fields to filter log events. 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. diff --git a/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md b/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md index 3ff2b37a3a3..8ed6773cbad 100644 --- a/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md +++ b/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md @@ -3,7 +3,7 @@ title: Embedded Elasticsearch weight: 100 --- -If your organization doesn't have any logging solutions, you can use Rancher's Embedded Elasticsearch option to log record from your cluster. This option sets up an instance of [Elasticsearch](https://www.elastic.co/) within your cluster, and then uses cluster resources to run it. +If your organization doesn't have any logging solutions, you can use Rancher's Embedded Elasticsearch option to log records from your cluster. This option sets up an instance of [Elasticsearch](https://www.elastic.co/) within your cluster, and then uses cluster resources to run it. >**Notes:** > @@ -26,7 +26,7 @@ If your organization doesn't have any logging solutions, you can use Rancher's E 1. Complete the **Embedded Elasticsearch Configuration** form. - 1. From **CPUs and Memory**, set the CPU and memory that elasticsearch can access within your cluster for logging. + 1. From **CPUs and Memory**, set the CPU and memory that Elasticsearch can access within your cluster for logging. CPU and memory must meet the prerequisites above. 1. Enter an [Index Pattern](https://www.elastic.co/guide/en/kibana/current/index-patterns.html). @@ -40,4 +40,4 @@ If your organization doesn't have any logging solutions, you can use Rancher's E **Result:** Rancher is now configured to send cluster and container events to Embedded Elasticsearch for logging. -You can view your logs by clicking the **Elasticsearch Endpoint** and **Kibana Endpoint** links available on the **Cluster Logging** page. \ No newline at end of file +You can view your logs by clicking the **Elasticsearch Endpoint** and **Kibana Endpoint** links available on the **Cluster Logging** page, which should be the page you're viewing now. \ No newline at end of file diff --git a/content/rancher/v2.x/en/tools/logging/kafka/_index.md b/content/rancher/v2.x/en/tools/logging/kafka/_index.md index fd3d4c6d268..0b74b6991fd 100644 --- a/content/rancher/v2.x/en/tools/logging/kafka/_index.md +++ b/content/rancher/v2.x/en/tools/logging/kafka/_index.md @@ -3,11 +3,11 @@ title: Kafka weight: 400 --- -You can configure a Kafka server to log events that occur in your Kubernetes cluster. +You can configure a [Kafka](https://kafka.apache.org/) to log events that occur in your Kubernetes cluster. ## Configuring Kafka Logging -You can configure Kafka to log events at both the cluster level and the project level. +You can configure Kafka to log events at both the cluster and project level. >**Prerequisite:** You must have a Kafka server configured. @@ -37,8 +37,10 @@ You can configure Kafka to log events at both the cluster level and the project 1. Complete the **Additional Logging Configuration** form. - 1. Use the **Add Field** button to add key value pairs that represent [custom log fields](https://httpd.apache.org/docs/2.4/mod/mod_log_config.html) used to filter log events. + 1. **Optional**: Use the **Add Field** button to add key value pairs that represent custom log fields used to filter log events. 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. -1. Click **Save**. \ No newline at end of file +1. Click **Save**. + +**Result:** Rancher is now configured to send events to Kafka for logging. View your Kafka stream to view events for your cluster and containers. diff --git a/content/rancher/v2.x/en/tools/logging/splunk/_index.md b/content/rancher/v2.x/en/tools/logging/splunk/_index.md index 38eda5b9342..f5f0e8aa1aa 100755 --- a/content/rancher/v2.x/en/tools/logging/splunk/_index.md +++ b/content/rancher/v2.x/en/tools/logging/splunk/_index.md @@ -5,11 +5,11 @@ aliases: - /rancher/v2.x/en/tasks/logging/splunk/ --- -If your organization uses [Splunk](https://www.splunk.com/), you can configure it to log events from a cluster or project in Rancher. Afterwards events are logged, you can use Splunk to view data from cluster and containers. +If your organization uses [Splunk](https://www.splunk.com/), you can configure it to log events from a cluster or project in Rancher. Afterwards events are logged, you can use Splunk to view log events about your cluster and containers. ## Configuring Splunk Logging -You can configure Splunk to log events at both the cluster level and the project level. +You can configure Splunk to log events at both the cluster and project level. >**Prerequisites:** > @@ -34,25 +34,25 @@ You can configure Splunk to log events at both the cluster level and the project 1. Complete the **Splunk HTTP Event Collector Configuration** form. - 1. From the **Endpoint** field, enter the IP address and port for you syslog server (i.e. `http://splunk-server:8088`) + 1. From the **Endpoint** field, enter the IP address and port for you Splunk instance (i.e. `http://splunk-server:8088`) - If you're using Splunk Cloud, you'll need to work with [Splunk support](https://www.splunk.com/en_us/support-and-services.html) to get an endpoint URL. + Splunk usually uses port `8088`. If you're using Splunk Cloud, you'll need to work with [Splunk support](https://www.splunk.com/en_us/support-and-services.html) to get an endpoint URL. - 1. Enter the **Token** you obtained while completing the prerequisites. + 1. Enter the **Token** you obtained while completing the prerequisites(i.e., when you created a token in Splunk). 1. From the **Source** field, enter the name of the token as entered in Splunk. - 1. **Optional:** Enter an index that's within the scope of your token. + 1. **Optional:** Enter one or more [index](http://docs.splunk.com/Documentation/Splunk/7.1.2/Indexer/Aboutindexesandindexers) that's allowed for your token. 1. Complete the **Additional Logging Configuration** form. - 1. 1. Use the **Add Field** button to add key value pairs that represent [custom log fields](http://docs.splunk.com/Documentation/Splunk/7.1.2/Data/Configureindex-timefieldextraction) used to filter log events. + 1. Use the **Add Field** button to add key value pairs that represent custom log fields used to filter log events. 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. 1. Click **Save**. -**Result:** Rancher is now configured to send cluster and container events to Splunk for logging. +**Result:** Rancher is now configured to send events to Splunk for logging. Log into your Spunk instance to view events for your cluster and containers. ## Viewing Logs diff --git a/content/rancher/v2.x/en/tools/logging/syslog/_index.md b/content/rancher/v2.x/en/tools/logging/syslog/_index.md index 0af5b4fae17..193b8f3bb76 100644 --- a/content/rancher/v2.x/en/tools/logging/syslog/_index.md +++ b/content/rancher/v2.x/en/tools/logging/syslog/_index.md @@ -12,15 +12,12 @@ You can configure Syslog to log events at both the cluster level and the project >**Prerequisite:** You must have a Syslog server configured. 1. Browse to the cluster or project that you want to log. - {{% accordion id="cluster" label="To Configure Cluster Logging:" %}} - 1. From the **Global** view, open the cluster that you want to configure logging for. 1. From the main menu, select **Tools > Logging**. {{% /accordion %}} - {{% accordion id="project" label="To Configure Project Logging:" %}} 1. From the **Global** view, open the project that you want to configure logging for. @@ -33,17 +30,22 @@ You can configure Syslog to log events at both the cluster level and the project 1. Complete the **Syslog Configuration** form. - 1. From the **Endpoint** field, enter the IP address and port for you Syslog server. Additionally, select the protocol that your Syslog server uses from the drop-down. + 1. From the **Endpoint** field, enter the IP address and port for your Syslog server. Additionally, select the protocol that your Syslog server uses from the drop-down. - 1. From the **Program** field, enter the name of the application logging events to your Syslog server. + 1. From the **Program** field, enter the name of the application logging events to your Syslog server (i.e., Rancher). - 1. Enter a **Token** that authenticates with your Syslog server. + 1. If you are using a cloud logging service (i.e., [Sumologic](https://www.sumologic.com/)), enter a **Token** that authenticates with your Syslog server. Use the cloud logging service to create this token. 1. Select a **Log Severity** for events that are logged to the Syslog server. For more information on each severity level, see the [Syslog protocol documentation](https://tools.ietf.org/html/rfc5424#page-11). 1. If your Syslog server uses **TCP** protocol, complete the **SSL Configuration** form. - 1. Enter a private key and client certificate. + 1. Enter a private key and client certificate. Either copy and paste them or browse to them using **Read from a file**. + + You can generate a key and client using an openssl command. For example: + + + openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 365 -nodes -subj "/CN=myservice.example.com" 1. If you want to verify connections to the Syslog service, select the **Enabled - Input trusted server certificate** option and then enter your truster server certificate. @@ -53,4 +55,6 @@ You can configure Syslog to log events at both the cluster level and the project 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. -1. Click **Save**. \ No newline at end of file +1. Click **Save**. + +**Result:** Rancher is now configured to send events to Syslog for logging. View your Syslog stream to view events for your cluster and containers. \ No newline at end of file From 8f135ad19c32c8dea38fe2872f4bc8859fdc3e17 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Thu, 9 Aug 2018 13:01:47 -0700 Subject: [PATCH 15/27] adding content after asking Bill about different aspects of logging. --- .../v2.x/en/tools/logging/elasticsearch/_index.md | 15 ++++++++------- .../rancher/v2.x/en/tools/logging/kafka/_index.md | 6 +++--- .../v2.x/en/tools/logging/splunk/_index.md | 6 +++--- .../v2.x/en/tools/logging/syslog/_index.md | 14 ++++++++------ 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md index 12ed5b90db2..97f9848de18 100644 --- a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md +++ b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md @@ -33,25 +33,26 @@ You can configure Elasticsearch to log events at both the cluster and project le 1. Enter an [Index Pattern](https://www.elastic.co/guide/en/kibana/current/index-patterns.html). -1. If your instance of Elasticsearch uses SSL, complete the **SSL Configuration** form. +1. If your instance of Elasticsearch uses SSL, complete the **SSL Configuration** form. - 1. Enter a private key and client certificate. Either copy and paste them or browse to them using **Read from a file**. + 1. Enter a private key and client certificate. Either copy and paste them or browse to them using **Read from a file**. This certificate will be installed on your logging server. - You can generate a key and certificate one using an openssl command. For example: - + You can use either a self-signed certificate or one provided by a certificate authority. + + You can generate a self-signed certificate using an openssl command. For example: openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 365 -nodes -subj "/CN=myservice.example.com" 1. Enter your private key password. - 1. If you want to verify connections to Elasticsearch, select the **Enabled - Input trusted server certificate** option and then enter your **Trusted Server Certificate**. + 1. If you are using a certificate from a certificate authority (and not a self-signed certificate), select the **Enabled - Input trusted server certificate** option and then enter your **Trusted Server Certificate**. 1. Complete the **Additional Logging Configuration** form. - 1. Use the **Add Field** button to add key value pairs that represent custom log fields to filter log events. + 1. **Optional:** Use the **Add Field** button to add custom log fields to your logging configuration. These fields are key value pairs (such as `foo=bar`) that you can use to filter the logs from another system. - 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. + 1. Enter a **Flush Interval**. This value determines how often [Fluentd](https://www.fluentd.org/) flushes event data to the logging server. Intervals are measured in seconds. 1. Click **Save**. diff --git a/content/rancher/v2.x/en/tools/logging/kafka/_index.md b/content/rancher/v2.x/en/tools/logging/kafka/_index.md index 0b74b6991fd..f010437b4c1 100644 --- a/content/rancher/v2.x/en/tools/logging/kafka/_index.md +++ b/content/rancher/v2.x/en/tools/logging/kafka/_index.md @@ -37,9 +37,9 @@ You can configure Kafka to log events at both the cluster and project level. 1. Complete the **Additional Logging Configuration** form. - 1. **Optional**: Use the **Add Field** button to add key value pairs that represent custom log fields used to filter log events. - - 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. + 1. **Optional:** Use the **Add Field** button to add custom log fields to your logging configuration. These fields are key value pairs (such as `foo=bar`) that you can use to filter the logs from another system. + + 1. Enter a **Flush Interval**. This value determines how often [Fluentd](https://www.fluentd.org/) flushes event data to the logging server. Intervals are measured in seconds. 1. Click **Save**. diff --git a/content/rancher/v2.x/en/tools/logging/splunk/_index.md b/content/rancher/v2.x/en/tools/logging/splunk/_index.md index f5f0e8aa1aa..b4c788930ba 100755 --- a/content/rancher/v2.x/en/tools/logging/splunk/_index.md +++ b/content/rancher/v2.x/en/tools/logging/splunk/_index.md @@ -38,7 +38,7 @@ You can configure Splunk to log events at both the cluster and project level. Splunk usually uses port `8088`. If you're using Splunk Cloud, you'll need to work with [Splunk support](https://www.splunk.com/en_us/support-and-services.html) to get an endpoint URL. - 1. Enter the **Token** you obtained while completing the prerequisites(i.e., when you created a token in Splunk). + 1. Enter the **Token** you obtained while completing the prerequisites (i.e., when you created a token in Splunk). 1. From the **Source** field, enter the name of the token as entered in Splunk. @@ -46,9 +46,9 @@ You can configure Splunk to log events at both the cluster and project level. 1. Complete the **Additional Logging Configuration** form. - 1. Use the **Add Field** button to add key value pairs that represent custom log fields used to filter log events. + 1. **Optional:** Use the **Add Field** button to add custom log fields to your logging configuration. These fields are key value pairs (such as `foo=bar`) that you can use to filter the logs from another system. - 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. + 1. Enter a **Flush Interval**. This value determines how often [Fluentd](https://www.fluentd.org/) flushes event data to the logging server. Intervals are measured in seconds. 1. Click **Save**. diff --git a/content/rancher/v2.x/en/tools/logging/syslog/_index.md b/content/rancher/v2.x/en/tools/logging/syslog/_index.md index 193b8f3bb76..9a588847622 100644 --- a/content/rancher/v2.x/en/tools/logging/syslog/_index.md +++ b/content/rancher/v2.x/en/tools/logging/syslog/_index.md @@ -40,20 +40,22 @@ You can configure Syslog to log events at both the cluster level and the project 1. If your Syslog server uses **TCP** protocol, complete the **SSL Configuration** form. - 1. Enter a private key and client certificate. Either copy and paste them or browse to them using **Read from a file**. + 1. Enter a private key and client certificate. Either copy and paste them or browse to them using **Read from a file**. This certificate will be installed on your logging server. - You can generate a key and client using an openssl command. For example: + You can use either a self-signed certificate or one provided by a certificate authority. + + You can generate a self-signed certificate using an openssl command. For example: openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 365 -nodes -subj "/CN=myservice.example.com" - 1. If you want to verify connections to the Syslog service, select the **Enabled - Input trusted server certificate** option and then enter your truster server certificate. + 1. If you are using a certificate from a certificate authority (and not a self-signed certificate), select the **Enabled - Input trusted server certificate** option and then enter your **Trusted Server Certificate**. 1. Complete the **Additional Logging Configuration** form. - 1. Use the **Add Field** button to add key value pairs used to filter log events. - - 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. + 1. **Optional:** Use the **Add Field** button to add custom log fields to your logging configuration. These fields are key value pairs (such as `foo=bar`) that you can use to filter the logs from another system. + + 1. Enter a **Flush Interval**. This value determines how often [Fluentd](https://www.fluentd.org/) flushes event data to the logging server. Intervals are measured in seconds. 1. Click **Save**. From f8195582cac2d6691ac2227db5494f143f65980a Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Fri, 10 Aug 2018 12:31:49 -0700 Subject: [PATCH 16/27] adding in Bill's answers to Denise's questions --- .../rancher/v2.x/en/tools/logging/_index.md | 41 +++++++++++++++--- .../en/tools/logging/elasticsearch/_index.md | 6 ++- .../logging/embedded-elasticsearch/_index.md | 43 ------------------- .../v2.x/en/tools/logging/kafka/_index.md | 8 ++-- .../v2.x/en/tools/logging/splunk/_index.md | 4 ++ .../v2.x/en/tools/logging/syslog/_index.md | 3 ++ 6 files changed, 51 insertions(+), 54 deletions(-) delete mode 100644 content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md diff --git a/content/rancher/v2.x/en/tools/logging/_index.md b/content/rancher/v2.x/en/tools/logging/_index.md index d124366ae91..d9eb80bc598 100644 --- a/content/rancher/v2.x/en/tools/logging/_index.md +++ b/content/rancher/v2.x/en/tools/logging/_index.md @@ -5,15 +5,42 @@ aliases: - /rancher/v2.x/en/tasks/logging/ --- -To record cluster or project events, Rancher can integrate with a variety of popular logging services that exist outside of your clusters. Configuring logging services: +Rancher can integrate with a variety of popular logging services and tools that exist outside of your Kubernetes clusters. -- Alerts you to errors and warnings in your Kubernetes infrastructure in a live stream. -- Allows you to view data reports using your logging service's tools and identify trends in your clusters or projects. +Rancher supports the following services: -Rancher supports the following logging services: - -- [Embedded Elasticsearch]({{< baseurl >}}/rancher/v2.x/en/tools/logging/embedded-elasticsearch) - [Elasticsearch]({{< baseurl >}}/rancher/v2.x/en/tools/logging/elasticsearch) - [Splunk]({{< baseurl >}}/rancher/v2.x/en/tools/logging/splunk) - [Kafka]({{< baseurl >}}/rancher/v2.x/en/tools/logging/kafka) -- [Syslog]({{< baseurl >}}/rancher/v2.x/en/tools/logging/syslog) \ No newline at end of file +- [Syslog]({{< baseurl >}}/rancher/v2.x/en/tools/logging/syslog) + +## Advantages + +Setting up a logging service to collect logs from your cluster/project is helpful several ways: + +- Logs errors and warnings in your Kubernetes infrastructure to a stream. The stream informs you of events like a container crashing, a pod eviction, or a node dying. +- Allows you to capture and analyze the state of your cluster and look for trends in your environment using the log stream. +- Helps you when troubleshooting or debugging. +- Saves your logs to a safe location outside of your cluster, so that you can still access them even if your cluster encounters issues. + +## Logging Scope + +You can configure logging at either cluster or project level. + +- If you're a [cluster owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#cluster-roles) who works in operations or security, configure cluster logging. +- If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#project-roles) who works on an application, configure project logging. + +>**Note:** You can only configure one logging service per cluster or project. + +## Collected Logs + +After you configure a logging service for a cluster or project, it collects logs from the following locations of your nodes: + +- The `/var/log/containers` path for application-level logging. +- The `/var/lib/rancher/rke/logs/` path for Kubernetes system components. + +After collection, all logs are stored by your logging service. Log into your service to view them. + +## Related Links + +[Logging Architecture](https://kubernetes.io/docs/concepts/cluster-administration/logging/) \ No newline at end of file diff --git a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md index 97f9848de18..3f27fea9b58 100644 --- a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md +++ b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md @@ -3,7 +3,7 @@ title: Elasticsearch weight: 200 --- -If your organization uses [Elasticsearch](https://www.elastic.co/), either on premise or in the cloud, you can configure it to log events from your cluster. Afterwards, you can log into your Elasticsearch deployment to view logs for cluster or container events. +If your organization uses [Elasticsearch](https://www.elastic.co/), either on premise or in the cloud, you can configure it to log Kubernetes events. Afterwards, you can log into your Elasticsearch deployment to view logs for cluster or container events. ## Configuring Elasticsearch Logging @@ -13,11 +13,15 @@ You can configure Elasticsearch to log events at both the cluster and project le 1. Browse to the cluster or project that you want to log. {{% accordion id="cluster" label="To Configure Cluster Logging:" %}} +If you're a [cluster owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#cluster-roles) who works in operations or security, configure cluster logging. + 1. From the **Global** view, open the cluster that you want to configure logging for. 1. From the main menu, select **Tools > Logging**. {{% /accordion %}} {{% accordion id="project" label="To Configure Project Logging:" %}} +If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#project-roles) who works on an application, configure project logging. + 1. From the **Global** view, open the project that you want to configure logging for. 1. From the main menu, select **Resources > Logging**. diff --git a/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md b/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md deleted file mode 100644 index 8ed6773cbad..00000000000 --- a/content/rancher/v2.x/en/tools/logging/embedded-elasticsearch/_index.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Embedded Elasticsearch -weight: 100 ---- - -If your organization doesn't have any logging solutions, you can use Rancher's Embedded Elasticsearch option to log records from your cluster. This option sets up an instance of [Elasticsearch](https://www.elastic.co/) within your cluster, and then uses cluster resources to run it. - ->**Notes:** -> ->- Embedded Elasticsearch is experimental at this time. Therefore, persistent storage for Embedded Elasticsearch is unavailable. We plan to offer full support in a Rancher release that's yet to be determined. ->- Embedded Elasticsearch is only available for clusters and not projects. ->- Setting up Embedded Elasticsearch requires a well provisioned node within the cluster. See the prerequisites below for more details. - -## Configuring Embedded Elasticsearch Logging - ->**Prerequisites:** Your cluster must meet the following hardware requirements: -> ->- At least 1 dedicated CPU (2 or more in total). ->- At least 512 MB RAM. - -1. From the **Global** view, open the cluster that you want to configure logging for. - -1. From the main menu, select **Tools > Logging**. - -1. Select **Embedded Elasticsearch**. - -1. Complete the **Embedded Elasticsearch Configuration** form. - - 1. From **CPUs and Memory**, set the CPU and memory that Elasticsearch can access within your cluster for logging. CPU and memory must meet the prerequisites above. - - 1. Enter an [Index Pattern](https://www.elastic.co/guide/en/kibana/current/index-patterns.html). - -1. Complete the **Additional Logging Configuration** form. - - 1. Use the **Add Field** button to add key value pairs that represent [custom log fields](http://docs.splunk.com/Documentation/AddOns/released/CiscoWSA/Configurew3clogfieldextractions) used to filter log events. - - 1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed. - -1. Click **Save**. - -**Result:** Rancher is now configured to send cluster and container events to Embedded Elasticsearch for logging. - -You can view your logs by clicking the **Elasticsearch Endpoint** and **Kibana Endpoint** links available on the **Cluster Logging** page, which should be the page you're viewing now. \ No newline at end of file diff --git a/content/rancher/v2.x/en/tools/logging/kafka/_index.md b/content/rancher/v2.x/en/tools/logging/kafka/_index.md index f010437b4c1..72fdda88d5f 100644 --- a/content/rancher/v2.x/en/tools/logging/kafka/_index.md +++ b/content/rancher/v2.x/en/tools/logging/kafka/_index.md @@ -3,21 +3,23 @@ title: Kafka weight: 400 --- -You can configure a [Kafka](https://kafka.apache.org/) to log events that occur in your Kubernetes cluster. +You can configure a [Kafka](https://kafka.apache.org/) to log events that occur in your Kubernetes cluster at both the cluster and project level. ## Configuring Kafka Logging -You can configure Kafka to log events at both the cluster and project level. - >**Prerequisite:** You must have a Kafka server configured. 1. Browse to the cluster or project that you want to log. {{% accordion id="cluster" label="To Configure Cluster Logging:" %}} +If you're a [cluster owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#cluster-roles) who works in operations or security, configure cluster logging. + 1. From the **Global** view, open the cluster that you want to configure logging for. 1. From the main menu, select **Tools > Logging**. {{% /accordion %}} {{% accordion id="project" label="To Configure Project Logging:" %}} +If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#project-roles) who works on an application, configure project logging. + 1. From the **Global** view, open the project that you want to configure logging for. 1. From the main menu, select **Resources > Logging**. diff --git a/content/rancher/v2.x/en/tools/logging/splunk/_index.md b/content/rancher/v2.x/en/tools/logging/splunk/_index.md index b4c788930ba..882d9c4712d 100755 --- a/content/rancher/v2.x/en/tools/logging/splunk/_index.md +++ b/content/rancher/v2.x/en/tools/logging/splunk/_index.md @@ -20,11 +20,15 @@ You can configure Splunk to log events at both the cluster and project level. 1. Browse to the cluster or project that you want to log. {{% accordion id="cluster" label="To Configure Cluster Logging:" %}} +If you're a [cluster owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#cluster-roles) who works in operations or security, configure cluster logging. + 1. From the **Global** view, open the cluster that you want to configure logging for. 1. From the main menu, select **Tools > Logging**. {{% /accordion %}} {{% accordion id="project" label="To Configure Project Logging:" %}} +If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#project-roles) who works on an application, configure project logging. + 1. From the **Global** view, open the project that you want to configure logging for. 1. From the main menu, select **Resources > Logging**. diff --git a/content/rancher/v2.x/en/tools/logging/syslog/_index.md b/content/rancher/v2.x/en/tools/logging/syslog/_index.md index 9a588847622..a76e93844a1 100644 --- a/content/rancher/v2.x/en/tools/logging/syslog/_index.md +++ b/content/rancher/v2.x/en/tools/logging/syslog/_index.md @@ -13,12 +13,15 @@ You can configure Syslog to log events at both the cluster level and the project 1. Browse to the cluster or project that you want to log. {{% accordion id="cluster" label="To Configure Cluster Logging:" %}} +If you're a [cluster owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#cluster-roles) who works in operations or security, configure cluster logging. + 1. From the **Global** view, open the cluster that you want to configure logging for. 1. From the main menu, select **Tools > Logging**. {{% /accordion %}} {{% accordion id="project" label="To Configure Project Logging:" %}} +If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#project-roles) who works on an application, configure project logging. 1. From the **Global** view, open the project that you want to configure logging for. From 1bc777635f112cc7e96c987c1639283eab7c7bd2 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Fri, 10 Aug 2018 14:42:47 -0700 Subject: [PATCH 17/27] updated text to clarify that Rancher sends logs to services. Services don't collect them. --- .../rancher/v2.x/en/tools/logging/elasticsearch/_index.md | 4 ++-- content/rancher/v2.x/en/tools/logging/kafka/_index.md | 4 ++-- content/rancher/v2.x/en/tools/logging/splunk/_index.md | 6 +++--- content/rancher/v2.x/en/tools/logging/syslog/_index.md | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md index 3f27fea9b58..8723cd8d2be 100644 --- a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md +++ b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md @@ -3,11 +3,11 @@ title: Elasticsearch weight: 200 --- -If your organization uses [Elasticsearch](https://www.elastic.co/), either on premise or in the cloud, you can configure it to log Kubernetes events. Afterwards, you can log into your Elasticsearch deployment to view logs for cluster or container events. +If your organization uses [Elasticsearch](https://www.elastic.co/), either on premise or in the cloud, you can configure Rancher to send it Kubernetes logs. Afterwards, you can log into your Elasticsearch deployment to view logs for cluster or container events. ## Configuring Elasticsearch Logging -You can configure Elasticsearch to log events at both the cluster and project level. +You can configure Rancher to send logs from your cluster or project to your instance of Elasticsearch. >**Prerequisites:** Configure an [Elasticsearch deployment](https://www.elastic.co/guide/en/cloud/saas-release/ec-create-deployment.html). diff --git a/content/rancher/v2.x/en/tools/logging/kafka/_index.md b/content/rancher/v2.x/en/tools/logging/kafka/_index.md index 72fdda88d5f..a017fb973b1 100644 --- a/content/rancher/v2.x/en/tools/logging/kafka/_index.md +++ b/content/rancher/v2.x/en/tools/logging/kafka/_index.md @@ -3,7 +3,7 @@ title: Kafka weight: 400 --- -You can configure a [Kafka](https://kafka.apache.org/) to log events that occur in your Kubernetes cluster at both the cluster and project level. +You can configure Rancher to send cluster or project logs to a [Kafka](https://kafka.apache.org/) server. ## Configuring Kafka Logging @@ -45,4 +45,4 @@ If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-sett 1. Click **Save**. -**Result:** Rancher is now configured to send events to Kafka for logging. View your Kafka stream to view events for your cluster and containers. +**Result:** Rancher is now configured to send logs to Kafka. View your Kafka stream to view logs for your cluster and containers. diff --git a/content/rancher/v2.x/en/tools/logging/splunk/_index.md b/content/rancher/v2.x/en/tools/logging/splunk/_index.md index 882d9c4712d..42976bb3134 100755 --- a/content/rancher/v2.x/en/tools/logging/splunk/_index.md +++ b/content/rancher/v2.x/en/tools/logging/splunk/_index.md @@ -5,11 +5,11 @@ aliases: - /rancher/v2.x/en/tasks/logging/splunk/ --- -If your organization uses [Splunk](https://www.splunk.com/), you can configure it to log events from a cluster or project in Rancher. Afterwards events are logged, you can use Splunk to view log events about your cluster and containers. +If your organization uses [Splunk](https://www.splunk.com/), you can configure Rancher to send it cluster or project logs. Afterwards logs are sent, you can use Splunk to view them. ## Configuring Splunk Logging -You can configure Splunk to log events at both the cluster and project level. +You can configure Rancher to send Kubernetes logs to your instance of Splunk. >**Prerequisites:** > @@ -56,7 +56,7 @@ If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-sett 1. Click **Save**. -**Result:** Rancher is now configured to send events to Splunk for logging. Log into your Spunk instance to view events for your cluster and containers. +**Result:** Rancher is now configured to send logs to Splunk. Log into your Spunk instance to view events for your cluster and containers. ## Viewing Logs diff --git a/content/rancher/v2.x/en/tools/logging/syslog/_index.md b/content/rancher/v2.x/en/tools/logging/syslog/_index.md index a76e93844a1..aabd5d8de10 100644 --- a/content/rancher/v2.x/en/tools/logging/syslog/_index.md +++ b/content/rancher/v2.x/en/tools/logging/syslog/_index.md @@ -3,11 +3,11 @@ title: Syslog weight: 500 --- -You can configure a [Syslog](https://tools.ietf.org/html/rfc5424) server to log events that occur in your Kubernetes cluster. +You can configure Rancher to send Kubernetes logs to a [Syslog](https://tools.ietf.org/html/rfc5424) server. ## Configuring Syslog -You can configure Syslog to log events at both the cluster level and the project level. +You can configure Rancher to send cluster or project logs to Syslog. >**Prerequisite:** You must have a Syslog server configured. @@ -62,4 +62,4 @@ If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-sett 1. Click **Save**. -**Result:** Rancher is now configured to send events to Syslog for logging. View your Syslog stream to view events for your cluster and containers. \ No newline at end of file +**Result:** Rancher is now configured to send logs to your Syslog server. View your Syslog stream to view logs for your cluster and containers. \ No newline at end of file From 8359f7123768c13a3ff7fa8e09d43fce3c09a051 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Fri, 10 Aug 2018 14:46:49 -0700 Subject: [PATCH 18/27] removed remaining instances of 'event' --- .../rancher/v2.x/en/tools/logging/elasticsearch/_index.md | 6 +++--- content/rancher/v2.x/en/tools/logging/kafka/_index.md | 2 +- content/rancher/v2.x/en/tools/logging/syslog/_index.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md index 8723cd8d2be..22650678cd7 100644 --- a/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md +++ b/content/rancher/v2.x/en/tools/logging/elasticsearch/_index.md @@ -3,7 +3,7 @@ title: Elasticsearch weight: 200 --- -If your organization uses [Elasticsearch](https://www.elastic.co/), either on premise or in the cloud, you can configure Rancher to send it Kubernetes logs. Afterwards, you can log into your Elasticsearch deployment to view logs for cluster or container events. +If your organization uses [Elasticsearch](https://www.elastic.co/), either on premise or in the cloud, you can configure Rancher to send it Kubernetes logs. Afterwards, you can log into your Elasticsearch deployment to view logs for your cluster or container. ## Configuring Elasticsearch Logging @@ -56,8 +56,8 @@ If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-sett 1. **Optional:** Use the **Add Field** button to add custom log fields to your logging configuration. These fields are key value pairs (such as `foo=bar`) that you can use to filter the logs from another system. - 1. Enter a **Flush Interval**. This value determines how often [Fluentd](https://www.fluentd.org/) flushes event data to the logging server. Intervals are measured in seconds. + 1. Enter a **Flush Interval**. This value determines how often [Fluentd](https://www.fluentd.org/) flushes data to the logging server. Intervals are measured in seconds. 1. Click **Save**. -**Result:** Rancher is now configured to send cluster and container events to Elasticsearch for logging. Log into Elasticsearch or Kibana to view your cluster/project events. \ No newline at end of file +**Result:** Rancher is now configured to send cluster and container logs to Elasticsearch. Log into Elasticsearch or Kibana to view your cluster/project logs. \ No newline at end of file diff --git a/content/rancher/v2.x/en/tools/logging/kafka/_index.md b/content/rancher/v2.x/en/tools/logging/kafka/_index.md index a017fb973b1..eb062b4fa37 100644 --- a/content/rancher/v2.x/en/tools/logging/kafka/_index.md +++ b/content/rancher/v2.x/en/tools/logging/kafka/_index.md @@ -41,7 +41,7 @@ If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-sett 1. **Optional:** Use the **Add Field** button to add custom log fields to your logging configuration. These fields are key value pairs (such as `foo=bar`) that you can use to filter the logs from another system. - 1. Enter a **Flush Interval**. This value determines how often [Fluentd](https://www.fluentd.org/) flushes event data to the logging server. Intervals are measured in seconds. + 1. Enter a **Flush Interval**. This value determines how often [Fluentd](https://www.fluentd.org/) flushes logs to the logging server. Intervals are measured in seconds. 1. Click **Save**. diff --git a/content/rancher/v2.x/en/tools/logging/syslog/_index.md b/content/rancher/v2.x/en/tools/logging/syslog/_index.md index aabd5d8de10..9bea75a6451 100644 --- a/content/rancher/v2.x/en/tools/logging/syslog/_index.md +++ b/content/rancher/v2.x/en/tools/logging/syslog/_index.md @@ -35,7 +35,7 @@ If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-sett 1. From the **Endpoint** field, enter the IP address and port for your Syslog server. Additionally, select the protocol that your Syslog server uses from the drop-down. - 1. From the **Program** field, enter the name of the application logging events to your Syslog server (i.e., Rancher). + 1. From the **Program** field, enter the name of the application sending logs to your Syslog server (i.e., Rancher). 1. If you are using a cloud logging service (i.e., [Sumologic](https://www.sumologic.com/)), enter a **Token** that authenticates with your Syslog server. Use the cloud logging service to create this token. @@ -58,7 +58,7 @@ If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-sett 1. **Optional:** Use the **Add Field** button to add custom log fields to your logging configuration. These fields are key value pairs (such as `foo=bar`) that you can use to filter the logs from another system. - 1. Enter a **Flush Interval**. This value determines how often [Fluentd](https://www.fluentd.org/) flushes event data to the logging server. Intervals are measured in seconds. + 1. Enter a **Flush Interval**. This value determines how often [Fluentd](https://www.fluentd.org/) flushes data to the logging server. Intervals are measured in seconds. 1. Click **Save**. From 89af551bd01b17e335fb5ba1871d1ee19736c46a Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Mon, 13 Aug 2018 13:25:01 -0700 Subject: [PATCH 19/27] adding content per Bill's log collection scope --- content/rancher/v2.x/en/tools/logging/_index.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/content/rancher/v2.x/en/tools/logging/_index.md b/content/rancher/v2.x/en/tools/logging/_index.md index d9eb80bc598..fd35b6bfc8e 100644 --- a/content/rancher/v2.x/en/tools/logging/_index.md +++ b/content/rancher/v2.x/en/tools/logging/_index.md @@ -27,17 +27,20 @@ Setting up a logging service to collect logs from your cluster/project is helpfu You can configure logging at either cluster or project level. -- If you're a [cluster owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#cluster-roles) who works in operations or security, configure cluster logging. -- If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#project-roles) who works on an application, configure project logging. - >**Note:** You can only configure one logging service per cluster or project. -## Collected Logs +- If you're a [cluster owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#cluster-roles) who works in operations or security, configure cluster logging. -After you configure a logging service for a cluster or project, it collects logs from the following locations of your nodes: + Cluster logging writes logs for every pod in the cluster and, in [RKE clusters]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters), Kubernetes system components. Logs from the following locations are sent to your logging service: -- The `/var/log/containers` path for application-level logging. -- The `/var/lib/rancher/rke/logs/` path for Kubernetes system components. + + - The `/var/log/containers` path for pod logging. + + - The `/var/lib/rancher/rke/logs/` path for Kubernetes system components. + +- If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#project-roles) who works on an application, configure project logging. + + Project logging writes logs for every pod in the project (`/var/log/containers`). After collection, all logs are stored by your logging service. Log into your service to view them. From 06b31c87a9dd26024c9a6118b37d57f480dc5a29 Mon Sep 17 00:00:00 2001 From: Chris Kim <30601846+Oats87@users.noreply.github.com> Date: Fri, 10 Aug 2018 11:39:57 -0700 Subject: [PATCH 20/27] Correct misspelled link for rke download --- content/rke/v0.1.x/en/installation/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rke/v0.1.x/en/installation/_index.md b/content/rke/v0.1.x/en/installation/_index.md index 03192e541ae..4ee201aea49 100644 --- a/content/rke/v0.1.x/en/installation/_index.md +++ b/content/rke/v0.1.x/en/installation/_index.md @@ -5,7 +5,7 @@ weight: 50 RKE is a fast, versatile Kubernetes installer that you can use to install Kubernetes on your Linux hosts. You can get started in a couple of quick and easy steps: -1. [Download the RKE Binary](#download-the-rke-bindary) +1. [Download the RKE Binary](#download-the-rke-binary) 2. [Prepare the Nodes for the Kubernetes Cluster](#prepare-the-nodes-for-the-kubernetes-cluster) 3. [Creating the Cluster Configuration File](#creating-the-cluster-configuration-file) 4. [Deploying Kubernetes with RKE](#deploying-kubernetes-with-rke) From 14f641bca626260f68403ae146eee7e1b0f72cd2 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Steenis Date: Mon, 13 Aug 2018 14:44:18 +0200 Subject: [PATCH 21/27] More info on repositories and build instructions --- .../rancher/v2.x/en/contributing/_index.md | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/content/rancher/v2.x/en/contributing/_index.md b/content/rancher/v2.x/en/contributing/_index.md index 4bbae3d1f3d..a5230c092ff 100644 --- a/content/rancher/v2.x/en/contributing/_index.md +++ b/content/rancher/v2.x/en/contributing/_index.md @@ -7,16 +7,32 @@ aliases: ### Repositories -All of repositories are located within our main GitHub organization. There are many repositories used for Rancher, but we’ll provide descriptions of some of the main ones used in Rancher. +All of repositories are located within our main GitHub organization. There are many repositories used for Rancher, but we'll provide descriptions of some of the main ones used in Rancher. -- [Rancher Repo](https://github.com/rancher/rancher): This repository is the main source code for Rancher 2.x. +Repository | URL | Description +-----------|-----|------------- +Rancher | https://github.com/rancher/rancher | This repository is the main source code for Rancher 2.x. +Types | https://github.com/rancher/types | This repository is the repository that has all the API types for Rancher 2.x. +API Framework | https://github.com/rancher/norman | This repository is an API framework for building Rancher style APIs backed by Kubernetes Custom Resources. +User Interface | https://github.com/rancher/ui | This repository is the source of the UI. +(Rancher) Docker Machine | https://github.com/rancher/machine | This repository is the source of the Docker Machine binary used when using Node Drivers. This is a fork of the `docker/machine` repository. +machine-package | https://github.com/rancher/machine-package | This repository is used to build the Rancher Docker Machine binary. +kontainer-engine | https://github.com/rancher/kontainer-engine | This repository is the source of kontainer-engine, the tool to provision hosted Kubernetes clusters. +RKE repository | https://github.com/rancher/rke | This repository is the source of Rancher Kubernetes Engine, the tool to provision Kubernetes clusters on any machine. +CLI | https://github.com/rancher/cli | This repository is the source code for the Rancher CLI used in Rancher 2.x. +(Rancher) Helm repository | https://github.com/rancher/helm | This repository is the source of the packaged Helm binary. This is a fork of the `helm/helm` repository. +Telemetry repository | https://github.com/rancher/telemetry | This repository is the source for the Telemetry binary. +loglevel repository | https://github.com/rancher/loglevel | This repository is the source of the loglevel binary, used to dynamically change log levels. -- [Rancher Types Repo](https://github.com/rancher/types): This repository is the repo that has all the API types for Rancher 2.x. +To see all libraries/projects used in Rancher, see the `vendor.conf` in the `rancher/rancher repository. -- [Rancher API Framework Repo](https://github.com/rancher/norman): This repository is an API framework for building Rancher style APIs backed by Kubernetes Custom Resources. +### Building -- [Rancher CLI Repo](https://github.com/rancher/cli): This repository is the source code for the Rancher CLI used in Rancher 2.x. +Every repository should have a Makefile and can be built using the `make` command. The `make` targets are based on the scripts in the `/scripts` directory in the repository (plus additional `trash` commands, please see below for more information about using `trash`), and each target will use [Dapper](https://github.com/rancher/dapper) to run the target in an isolated environment. The `Dockerfile.dapper` will be used for this process, and includes all the necessary build tooling needed. +The default target is `ci`, and will run `./scripts/validate`, `./scripts/build`, `./scripts/test` and `./scripts/package`. The resulting binaries of the build will be in `./build/bin` and are usually also packaged in a Docker image. + +Dependencies on other libraries/projects are managed using [Trash](https://github.com/rancher/trash). See the [Trash README](https://github.com/rancher/trash/blob/master/README.md) to discover how it can be used. In short, it uses a `vendor.conf` file to specify the source repository and revision to fetch, checkout and copy to the `./vendor` directory. After updating `vendor.conf`, you can run `make trash` to update dependencies for your change. When the dependencies are updated, you can build the project again using `make` so that it will be built using the updated dependencies. ### Bugs, Issues or Questions @@ -70,6 +86,6 @@ If you are experiencing performance issues, please provide as much of data (file If you have any updates to our documentation, please make any pull request to our docs repo. -- [Rancher 2.x Docs Repo](https://github.com/rancher/docs): This repo is where all the docs for Rancher 2.x are located. They are located in the `content` folder in the repo. +- [Rancher 2.x Docs repository](https://github.com/rancher/docs): This repo is where all the docs for Rancher 2.x are located. They are located in the `content` folder in the repo. -- [Rancher 1.x Docs Repo](https://github.com/rancher/rancher.github.io): This repo is where all the docs for Rancher 1.x are located. They are located in the `rancher` folder in the repo. +- [Rancher 1.x Docs repository](https://github.com/rancher/rancher.github.io): This repo is where all the docs for Rancher 1.x are located. They are located in the `rancher` folder in the repo. From a5502e7a5b9bf583047de1e674878fb6a269f56d Mon Sep 17 00:00:00 2001 From: moelsayed Date: Wed, 15 Aug 2018 01:00:31 +0200 Subject: [PATCH 22/27] Node names must be valid k8s names --- content/rke/v0.1.x/en/config-options/nodes/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rke/v0.1.x/en/config-options/nodes/_index.md b/content/rke/v0.1.x/en/config-options/nodes/_index.md index 7bbf9a20e52..b48b7b99880 100644 --- a/content/rke/v0.1.x/en/config-options/nodes/_index.md +++ b/content/rke/v0.1.x/en/config-options/nodes/_index.md @@ -47,7 +47,7 @@ The `internal_address` provides the ability to have nodes with multiple addresse ### Overriding the Hostname -The `hostname_override` is used to be able to provide a friendly name for RKE to use when registering the node in Kubernetes. This hostname doesn't need to be a routable address. If the `hostname_override` isn't set, then the `address` directive is used when registering the node in Kubernetes. +The `hostname_override` is used to be able to provide a friendly name for RKE to use when registering the node in Kubernetes. This hostname doesn't need to be a routable address, but it must be a valid [Kubernetes resource name](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). If the `hostname_override` isn't set, then the `address` directive is used when registering the node in Kubernetes. > **Note:** When [cloud providers]({{< baseurl >}}/rke/v0.1.x/en/config-options/cloud-providers/) are configured, you may need to override the hostname in order to use the cloud provider correctly. There is an exception for the [AWS cloud provider](https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/#aws), where the `hostname_override` field will be explicitly ignored. From d1420d11a1d6fe16465c7268de10b11908ccbfad Mon Sep 17 00:00:00 2001 From: Peter Reid Date: Sun, 12 Aug 2018 20:12:53 +0100 Subject: [PATCH 23/27] Fix wording of 'backups and rollbacks' subtitle The existing subtitle does not correlate with the section, looks like it was copied from elsewhere and not updated --- content/rancher/v2.x/en/installation/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rancher/v2.x/en/installation/_index.md b/content/rancher/v2.x/en/installation/_index.md index d50710ea34d..3c8753c6312 100644 --- a/content/rancher/v2.x/en/installation/_index.md +++ b/content/rancher/v2.x/en/installation/_index.md @@ -30,7 +30,7 @@ This section also includes help content for Rancher configuration and maintenanc - [Backups and Rollbacks]({{< baseurl >}}/rancher/v2.x/en/backups/) - This page lists the ports you must open to operate Rancher. + This section is devoted to protecting your Rancher Server data in a disaster scenario. - [Port Requirements]({{< baseurl >}}/rancher/v2.x/en/installation/references/) From fb3f9c771471448e19efbd93a2e81fbbd6046a9f Mon Sep 17 00:00:00 2001 From: niusmallnan Date: Wed, 8 Aug 2018 17:13:56 +0800 Subject: [PATCH 24/27] Tips about using recovery console --- .../v1.x/en/about/recovery-console/_index.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 content/os/v1.x/en/about/recovery-console/_index.md diff --git a/content/os/v1.x/en/about/recovery-console/_index.md b/content/os/v1.x/en/about/recovery-console/_index.md new file mode 100644 index 00000000000..f2c5f434405 --- /dev/null +++ b/content/os/v1.x/en/about/recovery-console/_index.md @@ -0,0 +1,85 @@ +--- +title: How to use recovery console +weight: 304 +--- + +### Test Environment + +In order to demonstrate how to use the recovery console, we choose a scene that the disk space is full and the OS cannot boot. + +| Term | Definition | +|-----------------------|--------------------------------------------------| +| RancherOS | v1.4.0 | +| Platform | Virtualbox | +| Root Disk | 2GB | +| CPU | 1C | +| MEM | 2GB | + + +### Fill up the disk + +Start this VM to check disk usage: + +``` +/dev/sda1 ext4 1.8G 567.2M 1.2G 32% /opt +/dev/sda1 ext4 1.8G 567.2M 1.2G 32% /mnt +... +... +``` + +Fill the remaining space with `dd`: + +``` +$ cd /opt/ +$ dd if=/dev/zero of=2GB.img bs=1M count=2000 +dd: writing '2GB.img': No space left on device +1304+0 records in +1302+1 records out + +$ ls -ahl +total 1334036 +drwxr-xr-x 2 root root 4.0K Jul 19 07:32 . +drwxr-xr-x 1 root root 4.0K Jul 19 06:58 .. +-rw-r--r-- 1 root root 1.3G Jul 19 07:32 2GB.img +``` + +At this point you cannot reboot in the OS, but you can reboot via Virtualbox: + +``` +$ shutdown -h now +Failed to write to log, write /var/log/boot/shutdown.log: no space left on device +[ ] shutdown:info: Setting shutdown timeout to 60 (rancher.shutdown_timeout set to 60) +Failed to write to log, write /var/log/boot/shutdown.log: no space left on device +Failed to write to log, write /var/log/boot/shutdown.log: no space left on device +.[ ] shutdown:fatal: Error response from daemon: {"message":"mkdir /var/lib/system-docker/overlay2/7c7dffbed40e7b0ed4c68d5630b17a179751643ca7b7a4ac183e48a767071684-init: no space left on device"} +Failed to write to log, write /var/log/boot/shutdown.log: no space left on device +``` + +After rebooting, you will not be able to enter the OS and there will be a kernel panic. + +![](https://ws1.sinaimg.cn/mw1024/006tNc79ly1ftf8071p5sj31kw0s14or.jpg) + +### Boot with recovery console + +When you can access the bootloader, you should select the `Recovery console` and press `` to edit: + +![](https://ws3.sinaimg.cn/mw1024/006tNc79ly1ftf7mpir3fj312u0i4a9z.jpg) + +You need add `rancher.autologin=tty1` to the end, then press ``. If all goes well, you will automatically login to the recovery console. + +### How to recover + +We need to mount the root disk in the recovery console and delete some data: + +``` +$ mkdir /mnt/root-disk +$ mount /dev/sda1 /mnt/root-disk + +# delete data previously generated using dd +$ ls -ahl /mnt/root-disk/opt +-rw-r--r-- 1 root root 1.3G Jul 19 07:32 2GB.img +$ rm -f /mnt/root-disk/opt/2GB.img +``` + +After rebooting, you can enter the OS normally. + From e58332e239a2e780ece25bfd006fe18652b94d0c Mon Sep 17 00:00:00 2001 From: "Carlos A. Carnero Delgado" Date: Wed, 8 Aug 2018 18:19:14 -0400 Subject: [PATCH 25/27] Fix key name for ingress backend custom system image --- content/rke/v0.1.x/en/config-options/system-images/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rke/v0.1.x/en/config-options/system-images/_index.md b/content/rke/v0.1.x/en/config-options/system-images/_index.md index 4afe7a91792..060a1dd7faa 100644 --- a/content/rke/v0.1.x/en/config-options/system-images/_index.md +++ b/content/rke/v0.1.x/en/config-options/system-images/_index.md @@ -46,7 +46,7 @@ system_images: # Ingress Options ingress: rancher/nginx-ingress-controller:0.10.2-rancher3 - ingressBackend: rancher/nginx-ingress-controller-defaultbackend:1.4 + ingress_backend: rancher/nginx-ingress-controller-defaultbackend:1.4 ``` Prior to `v0.1.6`, instead of using the `rancher/rke-tools` image, we used the following images: From e88a188024a9f5ee7283bddb6d50c23ede6fe88c Mon Sep 17 00:00:00 2001 From: Julian Mazzitelli Date: Sun, 5 Aug 2018 00:07:18 -0400 Subject: [PATCH 26/27] Update link to ingress-nginx ConfigMap options --- .../en/config-options/add-ons/ingress-controllers/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/_index.md b/content/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/_index.md index b5d365fab82..7763bfa98ec 100644 --- a/content/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/_index.md +++ b/content/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/_index.md @@ -39,7 +39,7 @@ ingress: ``` ## Configuring NGINX Ingress Controller -For the configuration of nginx, there are configuration options available in Kubernetes. There are a [list of options for the NGINX config map](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/configmap.md) , [command line extra_args](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/cli-arguments.md) and [annotations](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/). +For the configuration of nginx, there are configuration options available in Kubernetes. There are a [list of options for the NGINX config map](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md) , [command line extra_args](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/cli-arguments.md) and [annotations](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/). ```yaml ingress: From aecef1306ed5c40ab9bf82966e2782413a59d382 Mon Sep 17 00:00:00 2001 From: urgemerge Date: Wed, 15 Aug 2018 18:36:30 +0200 Subject: [PATCH 27/27] changing the order of checking after upgrade changing the documented order of checking if an upgrade has succeeded --- .../rancher/v2.x/en/upgrades/single-node-upgrade/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/rancher/v2.x/en/upgrades/single-node-upgrade/_index.md b/content/rancher/v2.x/en/upgrades/single-node-upgrade/_index.md index f0631f3b1b6..f2e7dafd952 100644 --- a/content/rancher/v2.x/en/upgrades/single-node-upgrade/_index.md +++ b/content/rancher/v2.x/en/upgrades/single-node-upgrade/_index.md @@ -58,12 +58,12 @@ docker run -d --volumes-from rancher-data --restart=unless-stopped \ >
>**Note:** After upgrading Rancher Server, data from your upgraded server is now saved to the `rancher-data` container for use in future upgrades. +1. Log into Rancher. Confirm that the upgrade succeeded by checking the version displayed in the bottom-left corner of the browser window. + 1. Remove the previous Rancher Server container. If you only stop the previous Rancher Server container (and don't remove it), the container may restart after the next server reboot. -1. Log into Rancher. Confirm that the upgrade succeeded by checking the version displayed in the bottom-left corner of the browser window. - **Result:** Rancher Server is upgraded to the latest version. >**Note:** If your upgrade does not complete successfully, you can roll Rancher Server and its data back to its last healthy state. For more information, see [Restoring Backups—Single Node Installs]({{< baseurl >}}/rancher/v2.x/en/backups/restorations/single-node-restoration/).