-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do Integrate test for Druid base on K8s cluster #10669
Do Integrate test for Druid base on K8s cluster #10669
Conversation
7a9fa17
to
dec7c64
Compare
re-start to trigger CI again. |
This PR add a new IT Job
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is great start for testing k8s stuff.
cp integration-tests/tiny-cluster.yaml druid-operator/examples/ | ||
cp integration-tests/tiny-cluster-zk.yaml druid-operator/examples/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: not sure why we need to copy, can't we directly use those two files ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some changes in integration-tests/tiny-cluster.yaml
and integration-tests/tiny-cluster-zk.yaml
, such as:
- New NodeType Service.
- Configs changing.
- Add MiddleManager configs.
So the original files in druid-operator can't be used directly here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I wasn't clear, in this context "original" meant files in "integration-tests/" i.e. you have
cp integration-tests/tiny-cluster.yaml druid-operator/examples/
cp integration-tests/tiny-cluster-zk.yaml druid-operator/examples/
...
sed -i "s|REPLACE_VOLUMES|`pwd`|g" druid-operator/examples/tiny-cluster.yaml
..
sudo /usr/local/bin/kubectl apply -f druid-operator/examples/tiny-cluster-zk.yaml
sudo /usr/local/bin/kubectl apply -f druid-operator/examples/tiny-cluster.yaml
as opposed to
...
sed -i "s|REPLACE_VOLUMES|`pwd`|g" integration-tests/tiny-cluster.yaml
..
sudo /usr/local/bin/kubectl apply -f integration-tests/tiny-cluster-zk.yaml
sudo /usr/local/bin/kubectl apply -f integration-tests/tiny-cluster.yaml
regardless, it is a nit and doesn't really matter much.
# Prepare For Druid-Operator | ||
git clone https://github.com/druid-io/druid-operator.git | ||
cd druid-operator | ||
git checkout -b druid-operator-0.0.3 druid-operator-0.0.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe define DRUID_OPERATOR_VERSION=0.0.3
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. Done!
@@ -0,0 +1,62 @@ | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this looks mostly a copy of other Dockerfile , it would be nice to reuse same if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also. There are some changes between DockerfileBuildTarAdvanced
and original Dockerfile
, such as :
- Prepare test data.
- Move mvn package out of
Dockerfile
. - Mkdir necessary for IT.
So that we can't use the original Dockerfile here.
@himanshug Thanks for your review! Updated: CI is successful. PTAL :) |
@himanshug Thanks for your review and merge! |
* add a travls job to do integrate test on K8s * revert build_run_cluster.sh * revert msic * run IT test * ready to test * modify before/after script * done * change mod for script * done * add env DRUID_OPERATOR_VERSION=0.0.3 * change version Co-authored-by: yuezhang <yuezhang@freewheel.tv>
Linked #10542.
Description
As the relationship between Druid and K8s gets closer, maybe it is good to have a IT job to check the running status of Druid on K8s like #10544
This PR add a new travis job to do simple integrate test on K8s, using Minikube + druid-operator + single-server
What I have done are as follows :
2.Tested
ingest -> load segment -> query
. And it works fine.Although It is in
WIP
There are some bugs need to be fixed, such as
Permissions issue
hostNetWork
in statefuleset using druid-operator. So I have to useNodePort Service
to expose Druid service like router, middleManager and so on but only can use ports 30000-32767.So I perform integration tests in
int-tests-config-file
mentioned https://github.com/apache/druid/blob/master/integration-tests/README.mdAny help is greatly appreciated.
Updated:
This PR add a new IT Job
71
:Now job
71
is successful which means this PR is not WIP anymore!This PR has:
Key changed/added classes in this PR
.travis.yml