Skip to content

Cherry-pick #7822 to 6.x: Replace libcompose by a docker compose wrapper#7984

Merged
ruflin merged 1 commit intoelastic:6.xfrom
jsoriano:backport_7822_6.x
Aug 20, 2018
Merged

Cherry-pick #7822 to 6.x: Replace libcompose by a docker compose wrapper#7984
ruflin merged 1 commit intoelastic:6.xfrom
jsoriano:backport_7822_6.x

Conversation

@jsoriano
Copy link
Copy Markdown
Member

Cherry-pick of PR #7822 to 6.x branch. Original message:

Replace libcompose by a docker compose wrapper to be able to use newer features, and to give a step towards having a unified go-based integration test framework.

Docker compose has multiple implementations, mainly:

  • docker-compose itself (python)
  • libcompose (go)
  • docker swarm services (go)

We are currently using docker-compose and libcompose in tests. docker-compose for python tests, and libcompose for go tests.

libcompose has some problems, it is released as experimental, and its support is quite limited, specially with new features as it only supports till version 2.0 of the compose file format. We are already using docker compose 2.1 version in libbeat, so we cannot have integration tests implemented in go using libcompose.

docker swarm services implementation of docker compose supports more recent file formats, but is limited by the features not supported by docker swarm. It also requires docker swarm, what is not always convenient.

Wrapping docker-compose from go is not ideal, but docker-compose at the moment is the only maintained and complete implementation. The wrapping code is "hidden" behind interfaces, so implementation could be replaced by some other thing in the future (though it is quite coupled to docker and compose at the moment).

Replace libcompose by a docker compose wrapper to be able to use newer features, and to give a step towards having a unified go-based integration test framework.

Docker compose has multiple implementations, mainly:
* docker-compose itself (python)
* libcompose (go)
* docker swarm services (go)

We are currently using docker-compose and libcompose in tests. docker-compose for python tests, and libcompose for go tests.

libcompose has some problems, it is released as experimental, and its support is quite limited, specially with new features as it only supports till version 2.0 of  the [compose file format](https://docs.docker.com/compose/compose-file/#reference-and-guidelines). We are already using docker compose 2.1 version in libbeat, so we cannot have integration tests implemented in go using libcompose.

docker swarm services implementation of docker compose supports more recent file formats, but is limited by the features not supported by docker swarm. It also requires docker swarm, what is not always convenient.

Wrapping docker-compose from go is not ideal, but docker-compose at the moment is the only maintained and complete implementation. The wrapping code is "hidden" behind interfaces, so implementation could be replaced by some other thing in the future (though it is quite coupled to docker and compose at the moment).

(cherry picked from commit 6ef073f)
@jsoriano
Copy link
Copy Markdown
Member Author

jenkins, test this again please

@jsoriano
Copy link
Copy Markdown
Member Author

jenkins, test this

@ruflin ruflin merged commit 03ac3c9 into elastic:6.x Aug 20, 2018
@jsoriano jsoriano deleted the backport_7822_6.x branch November 8, 2018 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants