Netflix / osstracker

Github organization OSS metrics collector and metrics dashboard
Apache License 2.0
370 stars 56 forks source link

Manual installation documentation #10

Closed kakawait closed 8 years ago

kakawait commented 8 years ago

Manual installation is based on docker containers.

Related to #7 and should helps #6

aspyker commented 8 years ago

@kakawait a quick read of this looks good. I'm out of the office this week. Once I get back to the office I want to try this and then I'll merge. Thanks!

kakawait commented 8 years ago

@aspyker don't worry take your time :+1: In my case my instance is running well I'm not depending on this PR :)

aspyker commented 8 years ago

Thanks for the PR! Let's discuss the few items I brought up, but otherwise this is great. I followed it and was able to run from Mac OSX docker-machine and it worked as expected. I didn't, yet, validate the kibana part.

kakawait commented 8 years ago

I fix few items @aspyker except cassandra performance

richnsoos commented 8 years ago

hello other windows users, has anyone encountered this error when executing docker run -d --name osstracker-cassandra -p ${CASS_PORT}:9042 cassandra command:

docker: An error occurred trying to connect: Post http://127.0.0.1:2375/v1.22/containers/create?name=osstracker-cassandra: dial tcp 127.0.0.1:2375: connectex: target machine actively refused it..

maybe using our company's proxy solves this ... but not sure where to set the proxy?

if i can get osstracker and required components running locally with help, i promise to contribute the osstracker installation guide for windows ... :-)

kakawait commented 8 years ago

Yeah error you quoted is docker client was not able to connect with docker daemon. Does docker machine correctly running ? Or do you cirrectly export var from docker-machine eval? Otherwise I may possible that corporate proxy intercept and deroute call to docker daemon. On Mac you need to add docker sock file on export no_proxy=.... I think there is something similar with Windows. But your problem is related to your docker setup.

Until your docker ps does not work, problem comes from your docker setup

richnsoos commented 8 years ago

I've given up on getting OSS Tracker running locally on a Windows--too many challenges getting Docker running (behind company VPN, under company security scans, etc.). I'm using a non-work, Macbook--should have done this from the start because I got through in 5 minutes on a Mac what I couldn't get through over a period of days on a Window. But I'm getting not found error when trying to execute the cql:

bash-3.2$ docker run -it --link osstracker-cassandra:cassandra -v $(pwd)/osstracker-ddl/:/tmp/ddl/ --rm cassandra cqlsh cassandra -f /tmp/ddl/osstracker-simple.cql
Can't open '/tmp/ddl/osstracker-simple.cql': [Errno 2] No such file or directory: '/tmp/ddl/osstracker-simple.cql'
bash-3.2$ 

should this file be found in the cassandra image? i successfully pulled cassandra from library so presumably i should have the osstracker-simple.sql. any ideas?

kakawait commented 8 years ago

I suppose you're using my fork because this PR is not merged so osstracker-simple.sql does not exist on upstream repo?

Otherwise on Windows (same on Mac) you have a VM in order to run docker (via docker-machine). So you must keep in mind when mounting (using -v) path, your are mounting path from your VM and not Windows host.

But by default docker-machine create a Vbox share between Windows host and your VM. The mount is C:\Users. Does the source are inside this path (you can have any subfolder) ?

Else a fast workaround is too add manually these folder on VM using docker-machine scp (https://docs.docker.com/machine/reference/scp/) and for sure rewrite your docker run.

Example

docker-machine scp path/on/windows/osstracker-ddl/* default:/tmp/ddl
# you can check by connecting in SSH
docker ssh default
ls -l /tmp
exit
docker run -it --link osstracker-cassandra:cassandra -v /tmp/ddl:/tmp/ddl/ --rm cassandra cqlsh cassandra -f /tmp/ddl/osstracker-simple.cql

Be careful I didn't try it may missing some directroy creation or other simple command but the idea is here

kakawait commented 8 years ago

@richnsoos now you can use official repo (branch documentation)

I know it can be hard to start with docker on non Linux env but I really think it would pay :) hard/standard installation is unmaintainable!

I could append some issue from your experience on documentation

richnsoos commented 8 years ago

@kakawait , thanks for hints; I will try them and report back!

The *.cql file from upstream (netflix/osstracker) is not osstracker-simple.cql, it's https://github.com/Netflix/osstracker/blob/master/osstracker-ddl/osstracker.cql. I will try this following command to init cassandra ddl and report back:

docker run -it --link osstracker-cassandra:cassandra -v /tmp/ddl:/tmp/ddl/ --rm cassandra cqlsh cassandra -f /tmp/ddl/osstracker.cql

congrats on getting your doc pr merged! i will contribute too where i can.

kakawait commented 8 years ago

Yes on master branch but osstracker.cql uses NetworkTopologyStrategy replication that does not work with my documentation (I can't explain why I never used Cassandra before, but I think you need geo for NetworkTopologyStrategy à la AWS). You should really checkout documentation branch to retrieve osstracker-simple.cql which use SimpleStrategy replication

https://github.com/Netflix/osstracker/blob/documentation/osstracker-ddl/osstracker-simple.cql