bazooka-ci / bazooka

Continuous Integration and Continuous Deployment Server
http://docs.bazooka-ci.io/
MIT License
60 stars 5 forks source link

Use syslog to capture the build log #270

Closed jawher closed 8 years ago

jawher commented 9 years ago

Replaces the old way of capturing logs (stream docker logs to a pipe with a scanner on the reader to write to mongo) with a new one based on docker's syslog logging driver.

For this feature to work, the server needs to know its address, so that when it starts an orchestration container, it can configure it with the syslog endpoint. This is set in the BZK_SYSLOG_URL in the server. The CLI was modified to set that variable from the --syslog-uri flag (which has a default value of $BZK_SYSLOG_URL in the host). For example:

bzk service start --syslog-uri="tcp://$(docker-machine ip main):3001"
jawher commented 9 years ago

BTW, I'm not very happy with the --syslog-uri flag: to start the server, we need to pass to it its uri (host and port). This will make the server incompatible stuff like docker run -P or any other auto port mapping.

However, since this is just an intermediary step toward separating the concrete build part in a separate component (See #260), this problem will be solved in the next iteration, where this server uri will be passed to the worker component instead of the server.

julienvey commented 9 years ago

:+1: