1

I have a CI project using travis.

My code uses kafka as the message queue. Since i am running several travis builds at once I am considering about running a local kafka instance inside each of travis VM for only that job.

What is the best way to achieve this.

Sahan Maldeniya
  • 1,028
  • 1
  • 14
  • 21

1 Answers1

1

So we tested two approaches,

  1. Use a kafka docker inside travis build

In this approach we configured a docker image up and run which has kafka and zookeepr. Since travis has good support for docker this is straight forward.

  1. Install kafka munally and start it before travis build run.

In here we used travis "before_install" step to download a kakfa binary from one of mirror sites, then unpack, and start kafka with custom properties file hosted inside test packages.

2nd approach was more suitable unless you have docker repository with your own docker image.

Sahan Maldeniya
  • 1,028
  • 1
  • 14
  • 21