Help talk:Toolforge/Archives/2018
![]() |
Please do not post any new comments on this page. This is a discussion archive See current discussion or the archives index. |
Installing MediaWiki core
The current instruction for installing MW don't work since MediaWiki 1.31+ requires PHP 7, but the default available version of PHP on Toolforge is 5.5.9. Dalba (talk) 05:33, 15 June 2018 (UTC)
Update java version
Hello. Java version on Toolforge is version 7. I use java bot on my tool in Toolforge, and some of new features by Java 8 cannot be run in Toolforge because the version is still 7. Please update java version in toolforge to the latest version (v 8); because many users including me need to update our bots to the latest version. Thanks.--ASammour (talk) 12:32, 9 October 2018 (UTC)
- Java 8 is current available in the Toolforge Kubernetes containers. Our best integration for Kubernetes is the
webservice
command, but it is also possible to run bots and other long running processes with a bit of manual configuration. Note that today there is a small bug in our Java 8 containers which makes the defaultjava
command Java 7 rather than 8, but that should be corrected in the next few days. I also expect that we will have Java 8 support on grid engine in the relatively near future (within the next 3-6 months) when the grid is updated to run on Debian Stretch. --BryanDavis (talk) 14:54, 9 October 2018 (UTC)
Toolforge dumping sqldump from enwiki_p to toolsDB custom space
Hi! Is this the right place to talk about Toolforge? I am new to toolforge and had some questions regarding accessing the replica databases(especially enwiki) from the toolsDB server. My objective right now is to get the ipblocks and revisions table in enwiki database over to my custom tools database space where i can play with the data and create custom tables as i want. But i am not able to access the enwiki database from my tool's custom toolsDB server(understandably enwiki is on different shard/server). Is there a way i can bring in data from enwiki to my tool's DB space? I assume this must have already been used by other users as well trying to work with Wikipedia metadata.
I am trying playing around with the mysql command as follows to generate a dump-
mysqldump -u s53882 -p --single-transaction --quick --lock-tables=false enwiki_p ipblocks > ipblocks.sql
After running this command i am prompted for password, and after entering the password i get the following message- mysqldump: Got error: 1049: "Unknown database 'enwiki_p'" when selecting the database
Please let me know if I should use something other than enwiki_p here, I am running this command from my tools space on toolforge tools.blocklog@tools-bastion-02:~$ pwd /data/project/blocklog
Thanks in Advance!Arnab777as3uj (talk) 03:24, 16 November 2018 (UTC)
- You need to provide a hostname for the database server to connect to. The sql command can figure out which server to connect to based on logical database names like enwiki_p, but mysqldump does not include that ability. Adding
--host=enwiki.analytics.db.svc.eqiad.wmflabs
to your command will select the correct database server. (As an aside,ln -s $HOME/.my.cnf $HOME/replica.my.cnf
will make it so that you do not need to pass the-u ... -p
arguments to mysqldump.) - The next problem you are going to run into however is that your user does not have the permissions needed to actually see the raw database tables. All access to the underlying tables is mediated by a view layer. Your dump will only return you the source code for that view.
- If you only need a one-time (or say once a month) dump of the data from the ipblocks table, your best bet is probably a
select * from ipblocks
query. If you need the data refreshed more often for your intended use case you may need to step back and rethink the problem and see if you can find a reasonable way to use some combination of the Action API, the Wiki Replicas, and ToolsDB that does not require full table dumps to operate. --BryanDavis (talk) 22:29, 16 November 2018 (UTC)
Adding toolinfo.json file
How can I add toolinfo.json file to public_html file? Adithyak1997 (talk) 17:02, 21 November 2018 (UTC)
- @Adithyak1997: in my opinion, the easiest way to manage toolinfo data today is by using the interface that is built into https://toolasadmin.wikimedia.org. The toolinfo data that can be created and edited there is indexed by Hay's Directory. Another option is to make a
$HOME/www/static
directory for your tool, add a toolsinfo.json file there, and then register it with Hay's Directory as https://tools-static.wmflabs.org/<your tool name>/toolinfo.json. Both of these options will work for any tool, even if that tool is not running a webservice. A third way is by creating a$HOME/public_html/toolinfo.json
file and running a webservice for that tool to serve the file up as https://tools.wmflabs.org/<your tool name>/toolinfo.json. --BryanDavis (talk) 19:28, 21 November 2018 (UTC)