Help:Create a Wikimedia developer account: Difference between revisions

From Wikitech
Content deleted Content added
No edit summary
Line 23: Line 23:
=== Step 1: Create a Wikimedia account ===
=== Step 1: Create a Wikimedia account ===


* Create a [https://www.mediawiki.org/w/index.php?title=Special:CreateAccount| Wikimedia unified account].
* Create a [https://www.mediawiki.org/w/index.php?title=Special:CreateAccount| Wikimedia account].


=== Step 2: Decide which service you need a Wikimedia developer account for ===
=== Step 2: Decide which service you need a Wikimedia developer account for ===

Revision as of 21:49, 6 April 2018

The steps outlined here may not be accurate and require review and testing.

Overview

This page will teach you how to create a Wikimedia developer account.

A Wikimedia developer account is required in addition to a Wikimedia account, if you plan to access, use, and make contributions to Wikimedia's protected services.

Some of the protected services that require both a Wikimedia developer account and a Wikimedia unified account include:

Prerequisites

Step 1: Create a Wikimedia account

Step 2: Decide which service you need a Wikimedia developer account for

  • Toolforge users should follow this process to create Wikimedia developer accounts.
  • VPS and general users should follow this process to create Wikimedia developer accounts.

Toolforge users

Create a Wikimedia developer account

  1. Go to the Toolforge admin console.
  2. In the Login with your Wikimedia account box press the Login using Wikimedia account button.
  3. You will be taken to a new login screen.
  4. Enter your Wikimedia account username and password.
  5. Once you are logged into your Wikimedia account, you will return to the Toolforge admin console.
  6. You will be prompted to create an LDAP username, a UNIX shell username, and password. You will also be prompted to enter your email address and agree to the terms of service and code of conduct for technical spaces.
    • The LDAP username will be used to log in on Wikitech, Gerrit and the Toolforge admin console.
    • The UNIX shell username will be used to interact with servers via ssh and for git with Gerrit.
  7. Create your Wikimedia developer account.

Next steps

  1. Fill out an access request to join the Toolforge project.
  2. Generate an SSH key, if you do not already have one.
  3. Associate your SSH public key with your Wikimedia developer account using the Preferences > OpenStack tab or Toolforge admin console.
  4. Wait for your access request for the Tools project to be processed. You should receive a message on your Wikitech talk page).

Common issues

  • Your LDAP username and your shell login username may be different. Visit Settings > Linked accounts in the Toolforge admin console and check your "Shell account name".
  • The passwords you chose for your developer account and SSH key may be different.
  • When you login with SSH you are in your personal folder. To quickly go to your tool account enter: become tool_name
  • If you login with WinSCP you will transfer files as yourself, not as your tool. The UNIX group for both accounts is the same so you can make files editable by all maintainers of the tool with:
$ become TOOL_NAME
$ chmod --recursive g+rw .
  • The web service for your tool is not started by default. To start it enter: webservice start
  • When doing file system intensive tasks (like git clone), it may be useful to perform the task on a host-local filesystem (like /tmp) to avoid the speed penalty of NFS. For example, cloning git repositories in /tmp and then moving it to the location you actually need it in can be much faster than cloning it in the original location.
    • Note: the speed penalty can be severe. For example, running wc -l on a 285 MB text file took 0:01 on /tmp and 3:14 over NFS.
  • If you need to use the server for a long time, and want to execute a task even when you're not connected to the ssh, you can use screen. Note that screen needs to be run before become TOOL_NAME. Screen should not be used to run long running scripts. These should be run as grid jobs instead.
  • You might need to use ssh-add on your local computer after creating a new key.

Using multiple ssh agents

If you use multiple ssh-agents (to connect to your personal or company system, for example), see SSH access for more information about setting up a primary and a Cloud VPS agent.

VPS and General Users

Creating a Wikimedia developer account

  1. Go to the Wikimedia developer account creation page on Wikitech.
  2. Enter your Wikimedia account username and password.
  3. Create your Wikimedia developer account.
    • The LDAP username will be used to log in on Wikitech, Gerrit and the Toolforge admin console.
    • The UNIX shell username will be used to interact with servers via ssh and for git with Gerrit.

Uploading an SSH key

Wikimedia Cloud Services products and Wikimedia Code Review use an SSH key to authenticate you. If you already have an SSH key you can use that one, or generate a new one specifically for Wikimedia use; the default public key name generated by ssh-keygen is typically id_rsa.pub.

Upload the generated public key from the 'OpenStack' tab in your Preferences or use the toolsadmin interface.

See Also: SSH Help

You can test your key by attempting to connect to the bastion VPS project: ssh -v bastion.wmflabs.org.

You will only be able to ssh to bastion after you have been added as a member of at least one VPS project (e.g. Toolforge). Users can verify their project membership via OpenStack Browser at https://tools.wmflabs.org/openstack-browser/user/<shellname>

Uploading your key to Wikimedia's Gerrit (Code Review)

Upload your public key to Gerrit (Wikimedia's code review tool).

  1. “Sign In” with your Wikimedia Developer Account
  2. Click “Settings” link in drop down menu under your username at page top right
  3. Click “SSH Public Keys” in left sidebar
  4. Paste your public key into the text field and click “Add” button. Thereafter, the form presents "Add key ..." button instead, for if you have more keys you want to add.