wikimedia tool setup is very tedious work but #wikimedia-labs helps a lot.
After creating an account and being approved by admin. You will log in to your tool using this command.
ssh -A username@tools-login.wmflabs.org
After logging into your tool you have to use following command to switch to your service
become toolname
Now this have following things
-
public_html – where you can place your html, php, css, js
-
cgi-bin – where you can place your python script etc
-
replica.my.cnf – contains username and password
Now Creation of databse for your project
In the first step you have to find you username and password by using “” file.
After that your database name must be USERNAME__DBNAME (2 underscore)
mysql --defaults-file="${HOME}"/replica.my.cnf -h tools-db
after that MariaDB console will open and in that you can create databasw
MariaDB [(none)]> CREATE DATABASE USERNAME__DBNAME;
you can access this database by using this command
mysql --defaults-file="${HOME}"/replica.my.cnf -h tools-db USERNAME__DBBAME
If you want to connect the database to your project
host = tools-db
uname = your_username
pass = your_password
dbname = USERNAME__DBNAME
Then you can push the file to remote using git via clone or you can use scp command to push files from remote to local like this
scp <files> USERNAME@tools-login.wmflabs.org:/data/project/<tool-name>
Hope it will help you 🙂
Link of my tools on wikimedia labs : lcm-dashboard
Pingback: A summer full of code | Kothari Harsh