I was just wondering where can we grab a copy of the zookeeper logs to archive as build artifacts, for those of us using the provided zookeeper that’s available in CircleCI environment.
Sure thing, you can dump anything you want into artifacts, just add the following step to your build in circle.yml.
test:
post:
mv /path/to/logs $CIRCLE_ARTIFACTS
Best,
Lev
Can also skip the mv step and just do
general:
artifacts:
- /path/to/logs
This works for sure, but if you want other things in the artifacts as well you would need to move them to the log folder (which seems weird to me :))
I guess it’s preference. I’d rather add the couple things I want (test results, target, coverage, etc) to artifacts at the beginning, rather then try to remember to copy/move them there at the end.
Keeps them sorted, and you can add more then one folder to artifacts
OH… yeah for sure. I like your method better.
Thanks for the tips, but I was actually referring to where the zookeeper logs (and config file) reside. A little poking around via SSH seems to reveal these locations:
Config file: /etc/zookeeper/conf/zoo.cfg
Log directory: /var/lib/zookeeper
Please correct me if I’m wrong.
Also, as zookeeper here is running in the background as a service, is it’s (CLI/terminal) output stored anywhere or discarded? Could be useful for debugging, if available somewhere.
P.S. I use zookeeper with kafka, and for kafka 0.8.2 (that I manually fetch and run in CircleCI), the currently installed zookeeper is a bit outdated for it, although still usable.