Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ This part describes the Docker image that this repo is designed to build. People
- `MW_ELASTICSEARCH_PORT`: DEPRECATED: elasticsearch port
- `MW_DEFAULT_ELASTICSEARCH_HOST`: default (i.e. where data is served to users from) elasticsearch hostname
- `MW_DEFAULT_ELASTICSEARCH_PORT`: default elasticsearch port
- `MW_DEFAULT_ELASTICSEARCH_ES6`: use ES6 compatibility layer with default cluster. Set to "true" or leave unset
- `MW_WRITE_ONLY_ELASTICSEARCH_HOST`: secondary elasticsearch hostname (optional)
- `MW_WRITE_ONLY_ELASTICSEARCH_PORT`: secondary elasticsearch port (optional)
- `MW_WRITE_ONLY_ELASTICSEARCH_ES6`: use ES6 compatibility layer with secondary cluster. Set to "true" or leave unset (optional)
- `MW_LOG_TO_STDERR`: set to "yes" to redirect all mediawiki logging to stderr (so it ends up in the kubernetes pod logs)
- `MW_ALLOWED_PROXY_CIDR`: CIDR block where any IP address in the range is considered a proxy server

Expand Down
11 changes: 0 additions & 11 deletions dist-persist/wbstack/src/Settings/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -735,24 +735,13 @@ function getElasticClusterConfig( string $prefix ) {
'host' => getenv( $prefix . 'HOST' ),
'port' => getenv( $prefix . 'PORT' )
];

if ( getEnv( $prefix . 'ES6' ) === "true" ) {
$config[ 'transport' ] = [
'type' => \CirrusSearch\Elastica\ES6CompatTransportWrapper::class,
'wrapped_transport' => 'Http'
];
}
return [ $config ];
}

if ( getenv( 'MW_ELASTICSEARCH_HOST' ) ) {
$wgCirrusSearchClusters = [
'default' => [
[
'transport' => [
'type' => \CirrusSearch\Elastica\ES6CompatTransportWrapper::class,
'wrapped_transport' => 'Http'
],
'host' => getenv('MW_ELASTICSEARCH_HOST'),
'port' => getenv('MW_ELASTICSEARCH_PORT')
],
Expand Down
11 changes: 0 additions & 11 deletions dist/wbstack/src/Settings/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -735,24 +735,13 @@ function getElasticClusterConfig( string $prefix ) {
'host' => getenv( $prefix . 'HOST' ),
'port' => getenv( $prefix . 'PORT' )
];

if ( getEnv( $prefix . 'ES6' ) === "true" ) {
$config[ 'transport' ] = [
'type' => \CirrusSearch\Elastica\ES6CompatTransportWrapper::class,
'wrapped_transport' => 'Http'
];
}
return [ $config ];
}

if ( getenv( 'MW_ELASTICSEARCH_HOST' ) ) {
$wgCirrusSearchClusters = [
'default' => [
[
'transport' => [
'type' => \CirrusSearch\Elastica\ES6CompatTransportWrapper::class,
'wrapped_transport' => 'Http'
],
'host' => getenv('MW_ELASTICSEARCH_HOST'),
'port' => getenv('MW_ELASTICSEARCH_PORT')
],
Expand Down
25 changes: 4 additions & 21 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ services:
- MW_DB_SERVER_MASTER=mysql.svc:3306
- MW_DB_SERVER_REPLICA=mysql-replica.svc:3306

- MW_DEFAULT_ELASTICSEARCH_HOST=elasticsearch-6.svc
- MW_DEFAULT_ELASTICSEARCH_HOST=elasticsearch.svc
- MW_DEFAULT_ELASTICSEARCH_PORT=9200
- MW_DEFAULT_ELASTICSEARCH_ES6=true

- MW_WRITE_ONLY_ELASTICSEARCH_HOST=elasticsearch-7.svc
- MW_WRITE_ONLY_ELASTICSEARCH_PORT=9200
- MW_WRITE_ONLY_ELASTICSEARCH_ES6=false
- MW_DEFAULT_ELASTICSEARCH_ES6=false
Comment thread
dati18 marked this conversation as resolved.
Outdated

- MW_REDIS_SERVER_READ=redis.svc
- MW_REDIS_SERVER_WRITE=redis.svc
Expand Down Expand Up @@ -146,28 +142,15 @@ services:
aliases:
- redis.svc

elasticsearch-6:
image: wikibase/elasticsearch:6.8.23-wmde.6
restart: unless-stopped
ports:
- 9200:9200
networks:
default:
aliases:
- elasticsearch-6.svc
environment:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"

elasticsearch-7:
image: wikibase/elasticsearch:7.10.2-wmde.11
restart: unless-stopped
ports:
- 9201:9200
- 9200:9200
networks:
default:
aliases:
- elasticsearch-7.svc
- elasticsearch.svc
environment:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
Expand Down
Loading