Skip to content

Comments

KYLIN-4181 Schedule Kylin using Kubernetes#864

Closed
TempleZhou wants to merge 1 commit intoapache:masterfrom
TempleZhou:master-dev
Closed

KYLIN-4181 Schedule Kylin using Kubernetes#864
TempleZhou wants to merge 1 commit intoapache:masterfrom
TempleZhou:master-dev

Conversation

@TempleZhou
Copy link
Member

No description provided.

Copy link

@lshmouse lshmouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good feature.
@nichunen Could you help to review it?

- bash
- '-c'
- '${KYLIN_HOME}/bin/kylin.sh run'
image: 'kylin:3.0.0-alpha2-cdh57'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we config the image name?

FROM centos:centos7

ENV CDH_VERSION 5.7.6
ENV JAVA_VERSION 1.8.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Dockerfile has been committed to Kylin. Could yout reuse it ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Emm... the committed dockerfile is self-contained and work with Apache version instead of CDH version. It seems to prepare for experiment, I think.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @TempleZhou , what do you hope? We can work to make it usable in production Environment.

Copy link

@sanjulian sanjulian Jan 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @TempleZhou, how about split docker image as 2 part: one is base image, and the other is kylin image.
Kylin docker image base on base image (hadoop-client image).
And we can also provide 2 base image: one is apache version, the other is CDH version.
It will benefit users who owns different version of hadoop version for their environment. They can provide base image by their own, and also can use kylin image directly.
What do you think?

Finally, create the StatefulSet and try to use it:

```bash
kubectl apply -f kylin-statefulset.yaml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to have an ingress support

@asf-ci
Copy link

asf-ci commented Dec 27, 2019

Can one of the admins verify this patch?

1 similar comment
@asf-ci
Copy link

asf-ci commented Dec 27, 2019

Can one of the admins verify this patch?

@coveralls
Copy link

coveralls commented Dec 27, 2019

Pull Request Test Coverage Report for Build 5453

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.003%) to 27.582%

Files with Coverage Reduction New Missed Lines %
stream-core/src/main/java/org/apache/kylin/stream/core/storage/columnar/GeneralColumnDataReader.java 1 92.11%
Totals Coverage Status
Change from base Build 5443: 0.003%
Covered Lines: 24071
Relevant Lines: 87270

💛 - Coveralls

@TempleZhou TempleZhou force-pushed the master-dev branch 6 times, most recently from e2e021f to f293882 Compare December 27, 2019 08:10
@codecov-io
Copy link

Codecov Report

Merging #864 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #864      +/-   ##
===========================================
- Coverage     25.11%   25.1%   -0.01%     
- Complexity     6178    6179       +1     
===========================================
  Files          1433    1433              
  Lines         87270   87270              
  Branches      12218   12218              
===========================================
- Hits          21917   21912       -5     
- Misses        63205   63209       +4     
- Partials       2148    2149       +1
Impacted Files Coverage Δ Complexity Δ
...core/storage/columnar/GeneralColumnDataReader.java 89.47% <0%> (-5.27%) 6% <0%> (-1%)
.../apache/kylin/cube/cuboid/TreeCuboidScheduler.java 63.84% <0%> (-2.31%) 0% <0%> (ø)
...rg/apache/kylin/cube/inmemcubing/MemDiskStore.java 69.3% <0%> (-0.92%) 7% <0%> (ø)
...ain/java/org/apache/kylin/dict/TrieDictionary.java 73.02% <0%> (+0.46%) 57% <0%> (+1%) ⬆️
...ream/core/storage/columnar/ColumnarStoreCache.java 52.27% <0%> (+2.27%) 8% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e4e456...f293882. Read the comment docs.

Copy link

@sanjulian sanjulian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure the eco/support system should be provide in this PR: such as log solution, memcached and some clean work: clean log, clean trash, storage, backup metadata...

- |
set -ex
# initialize the keytab
kinit -kt /home/kylin/kylin.keytab kylin

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can create a bootstrap.sh to includes these command, and exec the shell script in here.

- |
set -ex
# initialize the keytab
kinit -kt /home/kylin/kylin.keytab kylin

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any keytab refresh requirement? For example, refresh keytab every ** minutes.

@Smallhi
Copy link

Smallhi commented Jan 17, 2020

@TempleZhou How do you solve the problem of unstable ip when pod restart?

@TempleZhou
Copy link
Member Author

@TempleZhou How do you solve the problem of unstable ip when pod restart?

Hi @Smallhi , I don't know why you need to care about the pod IP as we access the Kylin instance using domain (Ingress).

@Smallhi
Copy link

Smallhi commented Jan 17, 2020

@TempleZhou In our prod env, we also use k8s as we deploy env, we found that, if we define kylin.server.mode = query ,we also need to define kylin.server.cluster-servers= ip1:7070,ip2:7070...
we deploy kylin in a app ,then whole app share a same domain adress, so , if we want differ role of kylin instance ,we can only use pod ip for kylin.server.cluster-servers, however ,for k8s ,if the pod restart, the ip will fly....

@@ -0,0 +1,78 @@
FROM centos:6.9

ARG APACHE_MIRRORS=http://mirrors.aliyun.com
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the official apache repository

@@ -0,0 +1,78 @@
FROM centos:6.9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not recommended to use the operating system as the base image, you can use the base image provided by maven. Https://hub.docker.com/_/maven

@TempleZhou
Copy link
Member Author

@TempleZhou In our prod env, we also use k8s as we deploy env, we found that, if we define kylin.server.mode = query ,we also need to define kylin.server.cluster-servers= ip1:7070,ip2:7070...
we deploy kylin in a app ,then whole app share a same domain adress, so , if we want differ role of kylin instance ,we can only use pod ip for kylin.server.cluster-servers, however ,for k8s ,if the pod restart, the ip will fly....

You only need to set the kylin.server.host-address=$hostname, and the kylin instance will register the information in Zookeeper, related issue: https://issues.apache.org/jira/browse/KYLIN-3820

kinit -kt /home/kylin/kylin.keytab kylin
# set the kylin.server.mode
sed "s/kylin\.server\.mode.*/kylin\.server\.mode=all/g" /mnt/kylin-config/kylin.properties > ${KYLIN_HOME}/conf/kylin.properties
sed -i "s/kylin\.server\.host-address.*/kylin\.server\.host-address=`hostname`\.kylin:7070/g" ${KYLIN_HOME}/conf/kylin.properties
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Smallhi Maybe, you need pay attention to my postStart script.

@hit-lacus
Copy link
Member

Should close this PR, because it is contained in #1182 and commits is been merged, thank you @TempleZhou .

@hit-lacus hit-lacus closed this May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants