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


   ## Create Kylin Job Service
   
   - Change configuration of memcached related(part-1)
   ```shell
   # kylin.cache.memcached.hosts=cache-svc.kylin-example.svc.cluster.local:11211
   
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
cd ../config/
   root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/config# 
vim kylin-job/kylin.properties
   root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/config# 
vim kylin-query/kylin.properties
   ```
   
   - Change configuration of memcached related(part-2)
   ```
   root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/config# 
vim tomcat/context.xml
   ```
   
   ```xml
       <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
                
memcachedNodes="n1:cache-svc.kylin-example.svc.cluster.local:11211"
                storageKeyPrefix="context"
                requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"
       />
   ```
   
   - Create related configmap
   ```
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl create configmap -n kylin-example hadoop-config \
   >     --from-file=../config/hadoop/core-site.xml \
   >     --from-file=../config/hadoop/hdfs-site.xml \
   >     --from-file=../config/hadoop/yarn-site.xml \
   >     --from-file=../config/hadoop/mapred-site.xml \
   >     --dry-run -o yaml | kubectl apply -f -
   W0427 12:09:28.055160    4398 helpers.go:535] --dry-run is deprecated and 
can be replaced with --dry-run=client.
   configmap/hadoop-config configured
   root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment#
   root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment#
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl create configmap -n kylin-example hive-config \
   >     --from-file=../config/hadoop/hive-site.xml \
   >     --dry-run -o yaml | kubectl apply -f -
   W0427 12:09:35.449192    4525 helpers.go:535] --dry-run is deprecated and 
can be replaced with --dry-run=client.
   configmap/hive-config configured
   root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment#
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl create configmap -n kylin-example hbase-config \
   >     --from-file=../config/hadoop/hbase-site.xml \
   >     --dry-run -o yaml | kubectl apply -f -
   W0427 12:09:36.222142    4583 helpers.go:535] --dry-run is deprecated and 
can be replaced with --dry-run=client.
   configmap/hbase-config configured
   root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment#
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl create configmap -n kylin-example kylin-more-config \
   >     --from-file=../config/kylin-more/applicationContext.xml \
   >     --from-file=../config/kylin-more/ehcache.xml \
   >     --from-file=../config/kylin-more/ehcache-test.xml \
   >     --from-file=../config/kylin-more/kylinMetrics.xml \
   >     --from-file=../config/kylin-more/kylinSecurity.xml \
   >     --dry-run -o yaml | kubectl apply -f -
   W0427 12:09:43.678445    4720 helpers.go:535] --dry-run is deprecated and 
can be replaced with --dry-run=client.
   configmap/kylin-more-config configured
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl create configmap -n kylin-example filebeat-config  \
   >     --from-file=../config/filebeat/filebeat.yml \
   >     --dry-run -o yaml | kubectl apply -f -
   W0427 12:09:51.686495    4901 helpers.go:535] --dry-run is deprecated and 
can be replaced with --dry-run=client.
   configmap/filebeat-config configured
   root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment#
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl create configmap -n kylin-example tomcat-config  \
   >     --from-file=../config/tomcat/server.xml \
   >     --from-file=../config/tomcat/context.xml \
   >     --dry-run -o yaml | kubectl apply -f -
   W0427 12:09:52.431775    4926 helpers.go:535] --dry-run is deprecated and 
can be replaced with --dry-run=client.
   configmap/tomcat-config configured
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl create configmap -n kylin-example kylin-job-config  \
   >     --from-file=../config/kylin-job/kylin-kafka-consumer.xml \
   >     --from-file=../config/kylin-job/kylin_hive_conf.xml \
   >     --from-file=../config/kylin-job/kylin_job_conf.xml \
   >     --from-file=../config/kylin-job/kylin_job_conf_inmem.xml \
   >     --from-file=../config/kylin-job/kylin-server-log4j.properties \
   >     --from-file=../config/kylin-job/kylin-spark-log4j.properties \
   >     --from-file=../config/kylin-job/kylin-tools-log4j.properties \
   >     --from-file=../config/kylin-job/kylin.properties \
   >     --from-file=../config/kylin-job/setenv.sh \
   >     --from-file=../config/kylin-job/setenv-tool.sh \
   >     --dry-run -o yaml | kubectl apply -f -
   W0427 12:10:03.250415    5141 helpers.go:535] --dry-run is deprecated and 
can be replaced with --dry-run=client.
   configmap/kylin-job-config configured
   ```
   
   
   - Start job service
   ```shell
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl apply -f kylin-job
   service/kylin-job-svc created
   statefulset.apps/kylin-job created
   
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
kubectl get statefulset -n kylin-example
   NAME              READY   AGE
   kylin-job         1/1     12s
   kylin-memcached   1/1     16m
   
   
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          23s
   kylin-memcached-0   1/1     Running   0          16m
   
   
root@open-source:/home/ubuntu/kylin-kubernetes/kubernetes/example/deployment# 
docker ps | grep kylin-job-
   11517f6f98d6        a9acac7280fe             "/usr/local/bin/dock…"   2 
minutes ago       Up 2 minutes                            
k8s_filebeat_kylin-job-0_kylin-example_284fa3ea-5bce-437e-b769-92d6c938c628_0
   fc0095a9f2d3        7ea27faa653f             "sh -c 'cp $KYLIN_HO…"   2 
minutes ago       Up 2 minutes                            
k8s_kylin_kylin-job-0_kylin-example_284fa3ea-5bce-437e-b769-92d6c938c628_0
   58aa2566d7fb        k8s.gcr.io/pause:3.2     "/pause"                 2 
minutes ago       Up 2 minutes                            
k8s_POD_kylin-job-0_kylin-example_284fa3ea-5bce-437e-b769-92d6c938c628_0
   ```


----------------------------------------------------------------
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