Help:Create a Wikimedia developer account: Difference between revisions

From Wikitech
Content deleted Content added
Line 39: Line 39:
# Enter your Wikimedia unified account username and password.
# Enter your Wikimedia unified account username and password.
# Create your Wikimedia developer account.
# Create your Wikimedia developer account.
#* Your Wikimedia developer account username and password will be used to log in on Wikitech, Gerrit and the Toolforge admin console.
#* Your Wikimedia developer account (LDAP) username and password will be used to log in on Wikitech, Gerrit and the Toolforge admin console.
#* Your shell name will be used when you interact with servers via [[Help:Access|ssh]] and when using [[:mw:Gerrit/Getting_started|git with Gerrit]].
#* Your UNIX shell username will be used when you interact with servers via [[Help:Access|ssh]] and when using [[:mw:Gerrit/Getting_started|git with Gerrit]].

==== Next steps ====

# [https://toolsadmin.wikimedia.org/tools/membership/apply Fill out an access request to join the Toolforge project].
# [https://toolsadmin.wikimedia.org/tools/membership/apply Fill out an access request to join the Toolforge project].
# [[:mw:Gerrit/Tutorial#Generate_a_new_SSH_key|Generate an SSH key]] that you will use along with your ''shell'' account name to log into the Toolforge servers if you do not already have one.
# [[:mw:Gerrit/Tutorial#Generate_a_new_SSH_key|Generate an SSH key]] that you will use along with your ''shell'' account name to log into the Toolforge servers if you do not already have one.

Revision as of 21:17, 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 (sometimes called an LDAP account).

A Wikimedia developer account is required in addition to a Wikimedia unified account (sometimes called a SUL or OAuth 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 unified 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.
    • Note: Some names are used inconsistently on the Toolforge admin console. The Wikimedia developer account is sometimes referred to as the LDAP account, and the Wikimedia unified account is sometimes referred to as the OAuth account.
  2. In the Login with your Wikimedia unified account box press the Login using OAuth button.
  3. Enter your Wikimedia unified account username and password.
  4. Create your Wikimedia developer account.
    • Your Wikimedia developer account (LDAP) username and password will be used to log in on Wikitech, Gerrit and the Toolforge admin console.
    • Your UNIX shell username will be used when you interact with servers via ssh and when using git with Gerrit.

Next steps

  1. Fill out an access request to join the Toolforge project.
  2. Generate an SSH key that you will use along with your shell account name to log into the Toolforge servers 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).

After account creation

  • Use SSH to login to Toolforge. In a command-line terminal, enter: ssh -i ~/.ssh/id_rsa username@login.tools.wmflabs.org (username is the "Instance shell account name" you specified when you created an account. If you are running Windows you will need to use an ssh client like puTTY.
  • Use SSH-based utilities such as scp and sftp to transfer files between Toolforge and your computer.
  • Access MySQL from SSH (e.g. sql enwiki is a shortcut command to connect to the copy of English Wikipedia)
  • Create tools (see Help:Toolforge § Creating a new Tool account).

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 an account

Create a Wikimedia developer account on Wikitech using the account creation form.

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.