Since 4.6 the Docker image available from https://hub.docker.com/r/atlassian/bitbucket-server/ ends up starting both Bitbucket Server itself but additionally the bundled Elasticsearch instance.
This is undesirable as it prevents the Docker image from being able to be used for production deployments (where only the actual instance should be running) and in particular for data center deployments as a local Elasticsearch will not be useful in that scenario.
https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/ contains:
Run only one process per container
In almost all cases, you should only run a single process in a single container. Decoupling applications into multiple containers makes it much easier to scale horizontally and reuse containers. If that service depends on another service, make use of container linking.
Which pretty much sums this up.
The advantage of the current situation is that search just works out of the box without any further configuration.
Instead of relying on the bundled instance we should either:
- Document how to run and link a Bitbucket Server and the Elasticsearch container.
- Provide a docker compose file that runs both correctly configured.
This would re-enable the use of the Docker image for production deployments as it will avoid running another process inside the container.
Other options that retain the current behaviour might include the usage of environment variables to enable/disable running the bundled Elasticsearch instance.
- mentioned in
-
Page Failed to load
[BSERV-9194] Make Bitbucket Server Docker container configure external Elasticsearch instead of the bundled Elasticsearch
Workflow | Original: JAC Suggestion Workflow [ 3396746 ] | New: JAC Suggestion Workflow 3 [ 3624671 ] |
Status | Original: RESOLVED [ 5 ] | New: Closed [ 6 ] |
Workflow | Original: BSERV Suggestions Workflow [ 2683227 ] | New: JAC Suggestion Workflow [ 3396746 ] |
Symptom Severity | Original: Major [ 14431 ] | New: Severity 2 - Major [ 15831 ] |
Fix Version/s | New: 5.0.0 [ 66696 ] | |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Gathering Interest [ 11772 ] | New: Resolved [ 5 ] |
Workflow | Original: Stash Workflow [ 1609262 ] | New: BSERV Suggestions Workflow [ 2683227 ] |
Status | Original: Open [ 1 ] | New: Gathering Interest [ 11772 ] |
Remote Link | New: This issue links to "Page (Extranet)" [ 278407 ] |
Description |
Original:
Since 4.6 the Docker image available from [https://hub.docker.com/r/atlassian/bitbucket-server/] ends up starting both Bitbucket Server itself but additionally the bundled Elasticsearch instance.
This is undesirable as it prevents the Docker image form being used for production deployments (where only the actual instance should be running) and in particular for data center deployments as a local Elasticsearch will not be useful in that scenario. [https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/] contains: {quote} Run only one process per container In almost all cases, you should only run a single process in a single container. Decoupling applications into multiple containers makes it much easier to scale horizontally and reuse containers. If that service depends on another service, make use of [container linking|https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/]. {quote} Which pretty much sums this up. The advantage of the current situation is that search just works out of the box without any further configuration. Instead of relying on the bundled instance we should either: * Document how to run and link a Bitbucket Server and the Elasticsearch container. * Provide a docker compose file that runs both correctly configured. This would re-enable the use of the Docker image for production deployments as it will avoid running another process inside the container. Other options that retain the current behaviour might include the usage of environment variables to enable/disable running the bundled Elasticsearch instance. |
New:
Since 4.6 the Docker image available from [https://hub.docker.com/r/atlassian/bitbucket-server/] ends up starting both Bitbucket Server itself but additionally the bundled Elasticsearch instance.
This is undesirable as it prevents the Docker image from being able to be used for production deployments (where only the actual instance should be running) and in particular for data center deployments as a local Elasticsearch will not be useful in that scenario. [https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/] contains: {quote} Run only one process per container In almost all cases, you should only run a single process in a single container. Decoupling applications into multiple containers makes it much easier to scale horizontally and reuse containers. If that service depends on another service, make use of [container linking|https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/]. {quote} Which pretty much sums this up. The advantage of the current situation is that search just works out of the box without any further configuration. Instead of relying on the bundled instance we should either: * Document how to run and link a Bitbucket Server and the Elasticsearch container. * Provide a docker compose file that runs both correctly configured. This would re-enable the use of the Docker image for production deployments as it will avoid running another process inside the container. Other options that retain the current behaviour might include the usage of environment variables to enable/disable running the bundled Elasticsearch instance. |
Status | Original: Needs Triage [ 10030 ] | New: Open [ 1 ] |
Summary | Original: Bitbucket Server Docker container starts Elasticsearch | New: Make Bitbucket Server Docker container configure external Elasticsearch instead of the bundled Elasticsearch |
Workflow | Original: Stash Workflow - Restricted [ 1605898 ] | New: Stash Workflow [ 1609262 ] |
Issue Type | Original: Bug [ 1 ] | New: Suggestion [ 10000 ] |
Priority | Original: Low [ 4 ] |