mesos / storm

Storm on Mesos!
Apache License 2.0
138 stars 66 forks source link

The missing link #105

Closed Drakoskai closed 8 years ago

Drakoskai commented 8 years ago

I've been migrating my storm infrastructure over to be run by mesos and now I'm ready for the final test -- run the starter topology. Problem is there's absolutely no information anywhere on the web about how to actually do this. All links are either dead or point to something irrelevant.

So from your page: " ./bin/storm jar -c nimbus.host=10.0.0.1 -c nimbus.thrift.port=32001 examples/storm-starter/storm-starter-topologies-0.9.6.jar storm.starter.WordCountTopology word-count"

given the nimbus is off on a remote docker container and there is no local storm jar to run "storm jar against" how does one actually execute this command?

dsKarthick commented 8 years ago

@Drakoskai We definitely could get better at documentation. To answer your specific question, you need to do the following to start nimbus:

    bin/build-release.sh downloadStormRelease
    ## Above command would create an _release/storm-mesos-*-storm0.9.6-mesos0.27.0 folder.
    cd _release/storm-mesos-*-storm0.9.6-mesos0.27.0
    bin/storm-mesos nimbus

Having said that, did you already look at https://github.com/mesos/storm/blob/master/docs/vagrant.md? If not, I would strongly recommend setting up vagrant cluster. It will help you get familiar with running storm on mesos.

given the nimbus is off on a remote docker container

^^ quote makes me curious as how you are running mesos/storm cluster.

Drakoskai commented 8 years ago

Yes, but I'll take a closer look. My infrastructure is in OpenStack and not in Virtual Boxes. I'm not using the vagrant portion of this to create an example.

dsKarthick commented 8 years ago

@Drakoskai Definitely play around with the vagrant cluster. Hope you are running Virtualbox and Vagrant on Mac - not that it wont work on Windows/Linux but I haven't seen anyone run this repo on windows. Either way, feel free to post here if you need any help.

Drakoskai commented 8 years ago

I clone github, overwrite the storm.yaml with my custom version. Then I build/dockerize mesos-storm. Then I run some json into marathon to describe the mesos/storm task (with constraints to the system it was built on). Marathon starts it and I get a nimbus task.

Windows isn't involved -- I do use cygwin to ssh into the environment but aside from that everything is being done on Ubuntu.

dsKarthick commented 8 years ago

I clone github, overwrite the storm.yaml with my custom version.

Did you check to make sure that storm.yaml contains all the information that is present in https://github.com/mesos/storm/blob/master/storm.yaml?

Then I build/dockerize mesos-storm. Then I run some json into marathon to describe the mesos/storm task

I assume you are running `bin/build-release.sh dockerImage

Marathon starts it and I get a nimbus task.

What does it refer to - mesos nimbus/ ui / drpc or something else? What command does marathon use to start the component you are talking about?

I get a nimbus task

What does "I get a nimbus task" mean? Do you mean to say that you see the nimbus task running (In which case, this question could be closed :) ) ?

Drakoskai commented 8 years ago

I copy/pasted the entire storm.yaml from here and then I just made some edits for the master and the zookeepers. Says it's a storm nimbus. In marathon I can click on the first port and get the Storm UI. it's running the "run-with-marathon.sh" from the local docker image I built after customizing it. I know the second port is the thrift port.

Prior to mesos I always just copied my topology jar over after it was built to the nimbus and ran it in with "storm jar" from the nimbus.

Does the docker image not contain the storm binaries? My understanding is that the docker image contains the mesos storm agent and the storm binary so that marathon can create supervisors on slaves using the docker image as needed.

am I coming at this wrong?

dsKarthick commented 8 years ago

At my company, we are not using marathon yet. However looking at README, run-with-marathon.sh starts nimbus and ui. As per README, the command to start those within docker is

docker run -i --net=host -e PORT0=10000 -e PORT1=10001 -e MESOS_SANDBOX=/var/log/storm -t mesosphere/storm ./bin/run-with-marathon.sh
_release/storm-mesos-0.1.0-SNAPSHOT-storm0.9.6-mesos0.27.0/bin/run-with-marathon.sh:    ./bin/storm ui -c ui.port=$PORT0 -c nimbus.thrift.port=$PORT1 -c storm.log.dir=$MESOS_SANDBOX/logs

Are you passing all the required parameters?

Drakoskai commented 8 years ago

There seems to be a misunderstanding-- I'm not so much asking how to run storm as I am trying to figure out how to get a topology jar into it. Since I'm not gaining any traction here I'll just write out my what my next attempt will be once I rebuild the server:

Install storm outside of docker, try running storm jar off of the non started external storm jar and see if I can target the storm nimbus task from the mesos-dns id on it's thrift port

dsKarthick commented 8 years ago

Ah, I see. So your components are all up in your marathon cluster, you have a topology jar and you are trying to submit the topology.

Install storm outside of docker, try running storm jar off of the non started external storm jar.

I am not sure what you mean by install. If I am running nimbus within docker, I wouldn't try to copy the jar into the docker container. I would use bin/storm that ships with storm binary to submit the topology. The docker container has storm binaries in it.

So the easiest way could be to spin up a container locally with the same dockerImage that you are using to launch your nimbus and mount the directory that contains your jar and storm.yaml with the nimbus information as shared volume. You then could attach to the container, cd /opt/storm and run bin/storm from there to submit your jar.

Drakoskai commented 8 years ago

Ah, I see. So your components are all up in your marathon cluster, you have a topology jar and you are trying to submit the topology.

:)

So the easiest way could be to spin up a container locally using the same dockerImage that you are using to launch your nimbus and mount the directory that contains your jar as shared volume. You then could cd /opt/storm and run bin/storm from there.

Awesome, thx! Since I've already got the binaries there from building I'll just use them for the purpose of testing

I'll mark this as closed, hopefully we're talking about the same thing :)

But what about using the name of the task since it's resolved using mesos-dns? I'll have to test it in the future, but theoretically I should be able to submit a topology from anywhere forward resolving to mesos-dns that I've got the storm jar command, right?

dsKarthick commented 8 years ago

But what about using the name of the task since it's resolved using mesos-dns

You will have to look up mesos-dns. There are multiple ways you can achieve this depending on your purpose

  1. Write a script that would fetch the nimbus task info from mesos-dns, change the storm.yaml appropriately and then run /bin/storm in the docker container.
  2. Standup a http service which would do whatever is required to figure out the nimbus information and make it invoke bin/storm ( We provide storm as a service at my company. So we have several teams use the rest service to submit the topology)

I should be able to submit a topology from anywhere forward resolving to mesos-dns that I've got the storm jar command, right

Yes. Thats correct.