Reduce heading levels by 1.

This commit is contained in:
steveperry-53
2017-01-18 10:18:37 -08:00
parent 0f6b992771
commit 02d17ade5f
40 changed files with 178 additions and 187 deletions
@@ -58,7 +58,7 @@ After this tutorial, you will know the following.
{% capture lessoncontent %}
#### ZooKeeper Basics
### ZooKeeper Basics
[Apache ZooKeeper](https://zookeeper.apache.org/doc/current/) is a
distributed, open-source coordination service for distributed applications.
@@ -86,7 +86,7 @@ snapshot their in memory state to storage media. These snapshots can be loaded
directly into memory, and all WAL entries that preceded the snapshot may be
safely discarded.
### Creating a ZooKeeper Ensemble
## Creating a ZooKeeper Ensemble
The manifest below contains a
[Headless Service](/docs/user-guide/services/#headless-services),
@@ -145,7 +145,7 @@ zk-2 1/1 Running 0 40s
The StatefulSet controller creates three Pods, and each Pod has a container with
a [ZooKeeper 3.4.9](http://www-us.apache.org/dist/zookeeper/zookeeper-3.4.9/) server.
#### Facilitating Leader Election
### Facilitating Leader Election
As there is no terminating algorithm for electing a leader in an anonymous
network, Zab requires explicit membership configuration in order to perform
@@ -242,7 +242,7 @@ server.2=zk-1.zk-headless.default.svc.cluster.local:2888:3888
server.3=zk-2.zk-headless.default.svc.cluster.local:2888:3888
```
#### Achieving Consensus
### Achieving Consensus
Consensus protocols require that the identifiers of each participant be
unique. No two participants in the Zab protocol should claim the same unique
@@ -301,7 +301,7 @@ and at least two of the Pods are Running and Ready), or they will fail to do so
(if either of the aforementioned conditions are not met). No state will arise
where one server acknowledges a write on behalf of another.
#### Sanity Testing the Ensemble
### Sanity Testing the Ensemble
The most basic sanity test is to write some data to one ZooKeeper server and
to read the data from another.
@@ -348,7 +348,7 @@ dataLength = 5
numChildren = 0
```
#### Providing Durable Storage
### Providing Durable Storage
As mentioned in the [ZooKeeper Basics](#zookeeper-basics) section,
ZooKeeper commits all entries to a durable WAL, and periodically writes snapshots
@@ -507,7 +507,7 @@ same PersistentVolume mounted to the ZooKeeper server's data directory.
Even when the Pods are rescheduled, all of the writes made to the ZooKeeper
servers' WALs, and all of their snapshots, remain durable.
### Ensuring Consistent Configuration
## Ensuring Consistent Configuration
As noted in the [Facilitating Leader Election](#facilitating-leader-election) and
[Achieving Consensus](#achieving-consensus) sections, the servers in a
@@ -651,7 +651,7 @@ ZK_DATA_LOG_DIR=/var/lib/zookeeper/log
ZK_LOG_DIR=/var/log/zookeeper
```
#### Configuring Logging
### Configuring Logging
One of the files generated by the `zkConfigGen.sh` script controls ZooKeeper's logging.
ZooKeeper uses [Log4j](http://logging.apache.org/log4j/2.x/), and, by default,
@@ -721,7 +721,7 @@ For cluster level log shipping and aggregation, you should consider deploying a
[sidecar](http://blog.kubernetes.io/2015/06/the-distributed-system-toolkit-patterns.html)
container to rotate and ship your logs.
#### Configuring a Non-Privileged User
### Configuring a Non-Privileged User
The best practices with respect to allowing an application to run as a privileged
user inside of a container are a matter of debate. If your organization requires
@@ -773,7 +773,7 @@ and the ZooKeeper process is able to successfully read and write its data.
drwxr-sr-x 3 zookeeper zookeeper 4096 Dec 5 20:45 /var/lib/zookeeper/data
```
### Managing the ZooKeeper Process
## Managing the ZooKeeper Process
The [ZooKeeper documentation](https://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_supervision)
documentation indicates that "You will want to have a supervisory process that
@@ -783,7 +783,7 @@ common pattern. When deploying an application in Kubernetes, rather than using
an external utility as a supervisory process, you should use Kubernetes as the
watchdog for your application.
#### Handling Process Failure
### Handling Process Failure
[Restart Policies](/docs/user-guide/pod-states/#restartpolicy) control how
@@ -846,7 +846,7 @@ child process. This ensures that Kubernetes will restart the application's
container when the process implementing the application's business logic fails.
#### Testing for Liveness
### Testing for Liveness
Configuring your application to restart failed processes is not sufficient to
@@ -918,7 +918,7 @@ zk-0 1/1 Running 1 1h
```
#### Testing for Readiness
### Testing for Readiness
Readiness is not the same as liveness. If a process is alive, it is scheduled
@@ -951,7 +951,7 @@ to specify both. This ensures that only healthy servers in the ZooKeeper
ensemble receive network traffic.
### Tolerating Node Failure
## Tolerating Node Failure
ZooKeeper needs a quorum of servers in order to successfully commit mutations
to data. For a three server ensemble, two servers must be healthy in order for
@@ -1013,7 +1013,7 @@ Service in the domain defined by the `topologyKey`. The `topologyKey`
different rules, labels, and selectors, you can extend this technique to spread
your ensemble across physical, network, and power failure domains.
### Surviving Maintenance
## Surviving Maintenance
**In this section you will cordon and drain nodes. If you are using this tutorial
on a shared cluster, be sure that this will not adversely affect other tenants.**