Skip to content
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

Adding marathon file in case mesos uses SSL. #304

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ Start the Kafka scheduler using this command:
# ./kafka-mesos.sh scheduler

Note: you can also use Marathon to launch the scheduler process so it gets restarted if it crashes.
Note: You might not be able to run kafka-mesos scheduler in docker if mesos uses SSL. In order to make it work, run it as an plain marathon app. With the correct environmental variables set it would work. Marathon app json file can be found [[here][https://github.com/mesos/kafka/src/marathon/]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know what the actual bug is here? Is it something we can just fix in the scheduler?


Starting and using 1 broker
---------------------------
Expand Down
39 changes: 39 additions & 0 deletions src/marathon/kafka-scheduler.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"id": "/kafka-mesos-scheduler",
"cmd": "$(find jdk* -maxdepth 0 -type d)/bin/java -jar kafka-mesos-0.10.1.0-SNAPSHOT-kafka_2.11-0.10.2.0.jar scheduler --debug true --master=zk://mesos-master1:2181,mesos-master2:2181,mesos-master3:2181/mesos --zk=zk1-for-kafka:2181,zk2-for-kafka:2181,zk3-for-kafka:2181/KafkaCluster --api=http://$HOSTNAME:7000 --storage=zk:/kafkaStorage --user=kafka",
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a big fan of the hard coded jar names everywhere (esp to snapshot), I dont know really anything about marathon but is there a way to parameterize these? Or maybe just have the command discover the jar automatically?

Alternatively, maybe we should just put this whole file in /examples (which I realize doesn't exist yet).

Copy link
Author

Choose a reason for hiding this comment

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

I think it is possible, I can create examples directory and put it there.

"cpus": 1,
"mem": 4096,
"disk": 1024,
"instances": 1,
"constraints": [
[
"AppType",
"CLUSTER",
"kafkasched"
]
],
"healthChecks": [
{
"path": "/health",
"protocol": "HTTP",
"portIndex": 0,
"gracePeriodSeconds": 120,
"intervalSeconds": 60,
"timeoutSeconds": 30,
"maxConsecutiveFailures": 3,
"ignoreHttp1xx": false
}
],
"portDefinitions": [
{
"port": 31000,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this match the port up in the --api flag?

Copy link
Author

Choose a reason for hiding this comment

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

It does not have to, its vestigial code from something I tried out earlier, can be and will be removed

"protocol": "tcp",
"labels": {}
}
],
"uris": [
"https://<url-of-artifact-server>:443/kafka_2/kafka-mesos-0.10.1.0-SNAPSHOT-kafka_2.11-0.10.2.0.jar",
Copy link
Contributor

Choose a reason for hiding this comment

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

Again as above, it'd be nice to have these all parameterized somehow, esp since the kafka-mesos version is hard-coded in two places.

Copy link
Author

Choose a reason for hiding this comment

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

Agreed, Let me create example directory and make this parameterized.

"https://<url-of-artifact-server>:443/kafka/kafka_2.11-0.10.2.0.tgz",
"https://<url-of-artifact-server>:443/java-store/jdk-8u45-linux-x64.tar.gz"
]
}