You are viewing a plain text version of this content. The canonical link for it is here.
Posted to distributedlog-issues@bookkeeper.apache.org by gi...@git.apache.org on 2017/10/05 05:08:10 UTC

[GitHub] jiazhai commented on a change in pull request #198: Issue 197: Provide a guide for running on k8s

jiazhai commented on a change in pull request #198: Issue 197: Provide a guide for running on k8s
URL: https://github.com/apache/distributedlog/pull/198#discussion_r142848616
 
 

 ##########
 File path: website/docs/latest/deployment/kubernetes.md
 ##########
 @@ -0,0 +1,241 @@
+---
+title: Docker
+top-nav-group: deployment
+top-nav-pos: 3
+top-nav-title: Kubernetes
+layout: default
+---
+
+Apache DistributedLog can be easily deployed in [Kubernetes](https://kubernetes.io/) clusters. The managed clusters on [Google Container Engine](https://cloud.google.com/compute/) is the most convenient way.
+
+The deployment method shown in this guide relies on [YAML](http://yaml.org/) definitions for Kubernetes [resources](https://kubernetes.io/docs/resources-reference/v1.6/). The [`kubernetes`](https://github.com/apache/distributedlog/tree/master/deploy/kubernetes) subdirectory holds resource definitions for:
+
+* A three-node ZooKeeper cluster
+* A BookKeeper cluster with a bookie runs on each node.
+* A three-node Proxy cluster.
+
+If you already have setup a BookKeeper cluster following the instructions of [Deploying Apache BookKeeper on Kubernetes](http://bookkeeper.apache.org/docs/latest/deployment/kubernetes/) in Apache BookKeeper website,
+you can skip deploying bookkeeper and start from [Create a DistributedLog Namespace](#create_namespace).
+
+## Setup on Google Container Engine
+
+To get started, get source code of [`kubernetes`](https://github.com/apache/distributedlog/tree/master/deploy/kubernetes) yaml definitions from github by git clone.
+
+If you'd like to change the number of bookies, ZooKeeper nodes, or proxy nodes in your deployment, modify the `replicas` parameter in the `spec` section of the appropriate [`Deployment`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) or [`StatefulSet`](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) resource.
+
+[Google Container Engine](https://cloud.google.com/container-engine) (GKE) automates the creation and management of Kubernetes clusters in [Google Compute Engine](https://cloud.google.com/compute/) (GCE).
+
+### Prerequisites
+
+To get started, you'll need:
+
+* A Google Cloud Platform account, which you can sign up for at [cloud.google.com](https://cloud.google.com)
+* An existing Cloud Platform project
+* The [Google Cloud SDK](https://cloud.google.com/sdk/downloads) (in particular the [`gcloud`](https://cloud.google.com/sdk/gcloud/) and [`kubectl`]() tools).
+
+### Create a new Kubernetes cluster
+
+You can create a new GKE cluster using the [`container clusters create`](https://cloud.google.com/sdk/gcloud/reference/container/clusters/create) command for `gcloud`. This command enables you to specify the number of nodes in the cluster, the machine types of those nodes, and more.
+
+As an example, we'll create a new GKE cluster for Kubernetes version [1.7.5](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v175) in the [us-central1-a](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) zone. The cluster will be named `bookkeeper-gke-cluster` and will consist of three VMs, each using two locally attached SSDs and running on [n1-standard-8](https://cloud.google.com/compute/docs/machine-types) machines. These SSDs will be used by Bookie instances, one for the BookKeeper journal and the other for storing the actual data.
+
+```bash
+$ gcloud config set compute/zone us-central1-a
+$ gcloud config set project your-project-name
+$ gcloud container clusters create bookkeeper-gke-cluster \
+  --machine-type=n1-standard-8 \
+  --num-nodes=3 \
+  --local-ssd-count=2 \
+  --cluster-version=1.7.5
 
 Review comment:
   with ?--cluster-version=1.7.5?, it will report?
   ```
   ERROR: (gcloud.container.clusters.create) ResponseError: code=400, message=Version "1.7.5" is invalid.
   ```
   while replaced this line to "--enable-kubernetes-alpha", all went well for the test running.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services