From 56d77eddf868bfc47b1a7511dcc35d29cbb71731 Mon Sep 17 00:00:00 2001 From: LinWengang Date: Mon, 5 Feb 2018 12:18:38 +0800 Subject: [PATCH 1/3] [storm] fix broken and outdated links in readme Signed-off-by: LinWengang --- staging/storm/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/staging/storm/README.md b/staging/storm/README.md index b5b873f9..3cb89527 100644 --- a/staging/storm/README.md +++ b/staging/storm/README.md @@ -22,15 +22,15 @@ Source is freely available at: This example assumes you have a Kubernetes cluster installed and running, and that you have installed the ```kubectl``` command line tool somewhere in your path. Please see the [getting -started](../../docs/getting-started-guides/) for installation +started](https://kubernetes.io/docs/setup/) for installation instructions for your platform. ## Step One: Start your ZooKeeper service -ZooKeeper is a distributed coordination [service](../../docs/user-guide/services.md) that Storm uses as a +ZooKeeper is a distributed coordination [service](https://kubernetes.io/docs/concepts/services-networking/service/) that Storm uses as a bootstrap and for state storage. -Use the [`examples/storm/zookeeper.json`](zookeeper.json) file to create a [pod](../../docs/user-guide/pods.md) running +Use the [`examples/storm/zookeeper.json`](zookeeper.json) file to create a [pod](https://kubernetes.io/docs/concepts/workloads/pods/pod/) running the ZooKeeper service. ```sh @@ -114,7 +114,7 @@ The Storm workers need both the ZooKeeper and Nimbus services to be running. Use the [`examples/storm/storm-worker-controller.json`](storm-worker-controller.json) file to create a -[replication controller](../../docs/user-guide/replication-controller.md) that manages the worker pods. +[replication controller](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/) that manages the worker pods. ```sh $ kubectl create -f examples/storm/storm-worker-controller.json From fe6c23733c926fc4046c5a97db433a23050aa9ac Mon Sep 17 00:00:00 2001 From: LinWengang Date: Thu, 8 Feb 2018 10:48:51 +0800 Subject: [PATCH 2/3] [strom] fix broken links and update rc to deployment Signed-off-by: LinWengang --- staging/storm/README.md | 10 ++-- staging/storm/storm-worker-controller.json | 55 ---------------------- staging/storm/storm-worker-controller.yaml | 37 +++++++++++++++ 3 files changed, 42 insertions(+), 60 deletions(-) delete mode 100644 staging/storm/storm-worker-controller.json create mode 100644 staging/storm/storm-worker-controller.yaml diff --git a/staging/storm/README.md b/staging/storm/README.md index 3cb89527..217bba3c 100644 --- a/staging/storm/README.md +++ b/staging/storm/README.md @@ -22,7 +22,7 @@ Source is freely available at: This example assumes you have a Kubernetes cluster installed and running, and that you have installed the ```kubectl``` command line tool somewhere in your path. Please see the [getting -started](https://kubernetes.io/docs/setup/) for installation +started](https://kubernetes.io/docs/user-journeys/users/application-developer/foundational/#section-1) for installation instructions for your platform. ## Step One: Start your ZooKeeper service @@ -113,11 +113,11 @@ the Nimbus service. The Storm workers need both the ZooKeeper and Nimbus services to be running. -Use the [`examples/storm/storm-worker-controller.json`](storm-worker-controller.json) file to create a -[replication controller](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/) that manages the worker pods. +Use the [`examples/storm/storm-worker-controller.yaml`](storm-worker-controller.yaml) file to create a +[deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) that manages the worker pods. ```sh -$ kubectl create -f examples/storm/storm-worker-controller.json +$ kubectl create -f examples/storm/storm-worker-controller.yaml ``` ### Check to see if the workers are running @@ -164,7 +164,7 @@ Make sure the ZooKeeper Pod is running (use: ```kubectl get pods```). Make sure the Nimbus Pod is running. -```kubectl create -f storm-worker-controller.json``` +```kubectl create -f storm-worker-controller.yaml``` diff --git a/staging/storm/storm-worker-controller.json b/staging/storm/storm-worker-controller.json deleted file mode 100644 index 0806b274..00000000 --- a/staging/storm/storm-worker-controller.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "kind": "ReplicationController", - "apiVersion": "v1", - "metadata": { - "name": "storm-worker-controller", - "labels": { - "name": "storm-worker" - } - }, - "spec": { - "replicas": 2, - "selector": { - "name": "storm-worker" - }, - "template": { - "metadata": { - "labels": { - "name": "storm-worker", - "uses": "nimbus" - } - }, - "spec": { - "containers": [ - { - "name": "storm-worker", - "image": "mattf/storm-worker", - "ports": [ - { - "hostPort": 6700, - "containerPort": 6700 - }, - { - "hostPort": 6701, - "containerPort": 6701 - }, - { - "hostPort": 6702, - "containerPort": 6702 - }, - { - "hostPort": 6703, - "containerPort": 6703 - } - ], - "resources": { - "limits": { - "cpu": "200m" - } - } - } - ] - } - } - } -} diff --git a/staging/storm/storm-worker-controller.yaml b/staging/storm/storm-worker-controller.yaml new file mode 100644 index 00000000..9196821d --- /dev/null +++ b/staging/storm/storm-worker-controller.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: storm-worker-controller + labels: + name: storm-worker +spec: + replicas: 2 + selector: + matchLabels: + name: storm-worker + uses: nimbus + template: + metadata: + labels: + name: storm-worker + uses: nimbus + spec: + containers: + - name: storm-worke + image: mattf/storm-worker + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 100m + memory: 100Mi + ports: + - hostPort: 6700 + containerPort: 6700 + - hostPort: 6701 + containerPort: 6701 + - hostPort: 6702 + containerPort: 6702 + - hostPort: 6703 + containerPort: 6703 From a442e47dc9d3eceb4f342e77b2aec37cbabb601e Mon Sep 17 00:00:00 2001 From: LinWengang Date: Thu, 8 Feb 2018 10:59:00 +0800 Subject: [PATCH 3/3] [storm] add annotations Signed-off-by: LinWengang --- staging/storm/storm-worker-controller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/storm/storm-worker-controller.yaml b/staging/storm/storm-worker-controller.yaml index 9196821d..61821642 100644 --- a/staging/storm/storm-worker-controller.yaml +++ b/staging/storm/storm-worker-controller.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1 +apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 kind: Deployment metadata: name: storm-worker-controller