As discussed, please setup the MLEB instance to pull and deploy the latest code from the Translate extension.
- Lab instance: https://language-translate.wmflabs.org
- Skins:
- Vector
- Timeless
- Translate setup
- Caching (Redis)
- TTM Server/ElasticSearch
As discussed, please setup the MLEB instance to pull and deploy the latest code from the Translate extension.
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | KartikMistry | T224652 Setup the MLEB instance as a test instance for the Translate extension | |||
Resolved | abi_ | T227637 MLEB instance requires createaccount rights for all users for TwnMainPage extension |
Do we need specific branch or code should be on master? Also, please add config we need for Translate (LocalSettings.php)
Hi Kartik,
The branch to deploy is the master branch. You'll also need to deploy the ULS extension.
Use the following configuration under LocalSettings.php,
// Groups $wgGroupPermissions['translator']['translate'] = true; $wgGroupPermissions['translator']['skipcaptcha'] = true; // Bug 34182: needed with ConfirmEdit $wgGroupPermissions['translate-admin']['translate'] = true; $wgGroupPermissions['translate-admin']['pagetranslation'] = true; $wgGroupPermissions['translate-admin']['translate-manage'] = true; $wgGroupPermissions['translate-admin']['translate-messagereview'] = true; $wgGroupPermissions['translate-admin']['skipcaptcha'] = true; $wgTranslateDocumentationLanguageCode = 'qqq'; // Workflow states $wgTranslateWorkflowStates = [ 'unset' => [ 'color' => 'FF0000' ], // red 'proofreading' => [ 'color' => 'd7f7f3' ], // light blue 'ready' => [ 'color' => '00FF00' ], // green 'inprogress' => [ 'color' => 'FFFF00', // yellow ], 'state conditions' => [ [ 'ready', [ 'PROOFREAD' => 'MAX' ] ], [ 'proofreading', [ 'TRANSLATED' => 'MAX' ] ], [ 'unset', [ 'UNTRANSLATED' => 'MAX', 'OUTDATED' => 'ZERO', 'TRANSLATED' => 'ZERO' ] ], [ 'inprogress', [ 'UNTRANSLATED' => 'NONZERO' ] ], ] ];
We'll need the following users,
Setup two skins - Timeless & Vector.
Ensure caching is setup.
If possible, setting up the TTM Server with the ElasticSearch backend would also be good. This is documented here. We can then add the following configuration under LocalSettings.php,
$wgTranslateTranslationServices['TTMServer'] = array( 'type' => 'ttmserver', 'class' => 'ElasticSearchTTMServer', 'cutoff' => 0.75, );
Please let me know if there is anything I can help you with.
Instance is setup at https://language-translate.wmflabs.org
Pending tasks:
For caching, plan is to setup Redis and then,
// Caching $wgObjectCaches['redis'] = array( 'class' => 'RedisBagOStuff', 'servers' => array( '127.0.0.1:6379' ), 'persistent' => true, ); $wgMainCacheType = CACHE_ANYTHING; // This is equivalent to redis_local in production, since MediaWiki-Vagrant // only has one data center. $wgMainStash = 'redis'; // Avoid user request serialization and other slowness $wgSessionCacheType = 'redis'; $wgSessionsInObjectCache = true; // Jobqueue $wgJobTypeConf['default'] = array( 'class' => 'JobQueueRedis', 'daemonized' => true, 'redisServer' => '127.0.0.1', 'redisConfig' => array( 'connectTimeout' => 2, 'compression' => 'gzip' ), ); $wgJobQueueAggregator = array( 'class' => 'JobQueueAggregatorRedis', 'redisServers' => array( '127.0.0.1' ), 'redisConfig' => array( 'connectTimeout' => 2 ), );
The job runner service configuration can be taken from Mediawiki Vagrant here.
I installed elasticsearch (6.5.2) from upstream Debian repository (Version as per: https://www.mediawiki.org/wiki/Extension:CirrusSearch#Dependencies) and service doesn't start.
# service elasticsearch status ● elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2019-07-03 07:02:02 UTC; 2s ago Docs: http://www.elastic.co Process: 22177 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE) Main PID: 22177 (code=exited, status=1/FAILURE) Jul 03 07:01:58 language-translate systemd[1]: Started Elasticsearch. Jul 03 07:02:02 language-translate systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE Jul 03 07:02:02 language-translate systemd[1]: elasticsearch.service: Unit entered failed state. Jul 03 07:02:02 language-translate systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
From /var/log/elasticsearch/elasticsearch.log:
[2019-07-03T07:17:15,209][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [unknown] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: ElasticsearchException[java.io.IOException: failed to read [id:4, file:/var/lib/elasticsearch/nodes/0/_state/node-4.st]]; nested: IOException[failed to read [id:4, file:/var/lib/elasticsearch/nodes/0/_state/node-4.st]]; nested: XContentParseException[[-1:36] [node_meta_data] unknown field [node_version], parser not found]; at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:140) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.5.2.jar:6.5.2] at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.5.2.jar:6.5.2] Caused by: org.elasticsearch.ElasticsearchException: java.io.IOException: failed to read [id:4, file:/var/lib/elasticsearch/nodes/0/_state/node-4.st] at org.elasticsearch.ExceptionsHelper.maybeThrowRuntimeAndSuppress(ExceptionsHelper.java:164) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:304) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.env.NodeEnvironment.loadOrCreateNodeMetaData(NodeEnvironment.java:394) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:302) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.node.Node.<init>(Node.java:296) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.node.Node.<init>(Node.java:265) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.5.2.jar:6.5.2] ... 6 more Caused by: java.io.IOException: failed to read [id:4, file:/var/lib/elasticsearch/nodes/0/_state/node-4.st] at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:298) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.env.NodeEnvironment.loadOrCreateNodeMetaData(NodeEnvironment.java:394) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:302) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.node.Node.<init>(Node.java:296) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.node.Node.<init>(Node.java:265) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.5.2.jar:6.5.2] ... 6 more Caused by: org.elasticsearch.common.xcontent.XContentParseException: [-1:36] [node_meta_data] unknown field [node_version], parser not found at org.elasticsearch.common.xcontent.ObjectParser.getParser(ObjectParser.java:347) ~[elasticsearch-x-content-6.5.2.jar:6.5.2] at org.elasticsearch.common.xcontent.ObjectParser.parse(ObjectParser.java:158) ~[elasticsearch-x-content-6.5.2.jar:6.5.2] at org.elasticsearch.common.xcontent.ObjectParser.apply(ObjectParser.java:182) ~[elasticsearch-x-content-6.5.2.jar:6.5.2] at org.elasticsearch.env.NodeMetaData$1.fromXContent(NodeMetaData.java:110) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.env.NodeMetaData$1.fromXContent(NodeMetaData.java:94) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.gateway.MetaDataStateFormat.read(MetaDataStateFormat.java:196) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:294) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.env.NodeEnvironment.loadOrCreateNodeMetaData(NodeEnvironment.java:394) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:302) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.node.Node.<init>(Node.java:296) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.node.Node.<init>(Node.java:265) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.5.2.jar:6.5.2] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.5.2.jar:6.5.2] ... 6 more
Hi @KartikMistry,
Thanks for setting up this instance. Everything looks good and seems to be working well.
It would be good if the following could be done,
Please get in touch with @abi_ to get the credentials for those users.
admin user is there. I'll send credential.
It is Lab access, anyone from Language team can ssh to it. eg ssh language-translate.eqiad.wmflabs
Done. Let me know if anything specific is needed for this setup.
Yes, I should have mentioned this initially,
$wgTranslateUseSandbox = true; $wgGroupPermissions['translate-admin']['translate-sandboxmanage'] = true; // Add this role to the existing group
Thanks, this is now mostly done. But I'm getting an exception when trying to register using https://language-translate.wmflabs.org/index.php/Special:MainPage
It looks like a permission issue, I'll investigate some more and get back to you.
I spent some time fixing the related issue but was not very satisfied with the solution I came up with. I've created a subtask, and investigate the issue further later.
@KartikMistry, for now we can,
$wgGroupPermissions['*']['createaccount'] = true;
Information regarding MLEB testing instance: https://www.mediawiki.org/wiki/User:APatro_(WMF)/MLEB_Testing_Instance
This is working well for now, so resolving this task.
Thanks @KartikMistry