hit-lacus edited a comment on pull request #1182:
URL: https://github.com/apache/kylin/pull/1182#issuecomment-619862739


   ## Scale up Job Service
   
   - https://kubernetes.io/docs/tasks/run-application/scale-stateful-set/
   
   - Modify replica(from 1 to 3) and scale out job server
   ```shell
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
vim kylin-job/kylin-job-statefulset.yaml
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl apply -f kylin-job/
   ```
   
   - Check state of pods
   ```shell
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl get pod -n kylin-example
   NAME                READY   STATUS    RESTARTS   AGE
   kylin-job-0         2/2     Running   0          27s
   kylin-job-1         2/2     Running   0          69s
   kylin-job-2         2/2     Running   0          67s
   kylin-memcached-0   1/1     Running   0          131m
   kylin-query-0       2/2     Running   0          66m
   
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl get pod -n kylin-example
   NAME                READY   STATUS    RESTARTS   AGE
   kylin-job-0         2/2     Running   0          34s
   kylin-job-1         2/2     Running   0          76s
   kylin-job-2         2/2     Running   0          74s
   kylin-memcached-0   1/1     Running   0          131m
   kylin-query-0       2/2     Running   0          66m
   
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl get statefulset -n kylin-example
   NAME              READY   AGE
   kylin-job         3/3     115m
   kylin-memcached   1/1     131m
   kylin-query       1/1     66m
   
   root@open-source:/home/ubuntu/example/deployment# docker ps | grep kylin-job-
   da9c0cf239e4        a9acac7280fe             "/usr/local/bin/dock…"   8 
minutes ago       Up 8 minutes                            
k8s_filebeat_kylin-job-0_kylin-example_26c08037-0543-4e15-9ac2-54021266a52b_0
   06ff2e6a2d3e        7ea27faa653f             "sh -c 'cp $KYLIN_HO…"   8 
minutes ago       Up 8 minutes                            
k8s_kylin_kylin-job-0_kylin-example_26c08037-0543-4e15-9ac2-54021266a52b_0
   87062bb80c1b        k8s.gcr.io/pause:3.2     "/pause"                 8 
minutes ago       Up 8 minutes                            
k8s_POD_kylin-job-0_kylin-example_26c08037-0543-4e15-9ac2-54021266a52b_0
   91d96d1bee0f        a9acac7280fe             "/usr/local/bin/dock…"   8 
minutes ago       Up 8 minutes                            
k8s_filebeat_kylin-job-2_kylin-example_93cc142c-0dc8-4e5e-886d-4408fac76c5d_0
   d5d352acbb8d        7ea27faa653f             "sh -c 'cp $KYLIN_HO…"   8 
minutes ago       Up 8 minutes                            
k8s_kylin_kylin-job-2_kylin-example_93cc142c-0dc8-4e5e-886d-4408fac76c5d_0
   ad05de976d8a        k8s.gcr.io/pause:3.2     "/pause"                 8 
minutes ago       Up 8 minutes                            
k8s_POD_kylin-job-2_kylin-example_93cc142c-0dc8-4e5e-886d-4408fac76c5d_0
   41de3f26e592        a9acac7280fe             "/usr/local/bin/dock…"   8 
minutes ago       Up 8 minutes                            
k8s_filebeat_kylin-job-1_kylin-example_b83623a1-c8a4-456f-95e3-fce19d78afb1_0
   b3666e72bc7b        7ea27faa653f             "sh -c 'cp $KYLIN_HO…"   8 
minutes ago       Up 8 minutes                            
k8s_kylin_kylin-job-1_kylin-example_b83623a1-c8a4-456f-95e3-fce19d78afb1_0
   1489fd6e04db        k8s.gcr.io/pause:3.2     "/pause"                 8 
minutes ago       Up 8 minutes                            
k8s_POD_kylin-job-1_kylin-example_b83623a1-c8a4-456f-95e3-fce19d78afb1_0
   root@open-source:/home/ubuntu/example/deployment#
   ```
   
   - Instance List
   <img width="1189" alt="image" 
src="https://user-images.githubusercontent.com/14030549/80381674-dcaca380-88d3-11ea-9b43-96ffc452b319.png";>
   
   - Test another build
   <img width="1375" alt="image" 
src="https://user-images.githubusercontent.com/14030549/80383050-aa03aa80-88d5-11ea-8424-52825dd0d8cd.png";>
   
   
   - Force kill Active JobServer(Failover Test)
   ```shell
   root@open-source:/home/ubuntu/example/deployment# docker kill b3666e72bc7b
   b3666e72bc7b
   ```
   
   - Check current active job server
   <img width="1190" alt="image" 
src="https://user-images.githubusercontent.com/14030549/80383200-df0ffd00-88d5-11ea-8474-f21de4d0a6e3.png";>
   
   - Test a third build
   <img width="1376" alt="image" 
src="https://user-images.githubusercontent.com/14030549/80384382-6447e180-88d7-11ea-9732-263d13d76115.png";>
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to