A Contributor’s Guide to Launchpad.net – Part 1 – Getting Started

This post is the first in a series of articles which serves to highlight the services of the Launchpad platform which hosts the MySQL Server, MySQL Forge, MySQL Sandbox and Drizzle Server projects. I will be walking you through the various pieces of the platform and provide examples of using each of the services. I will cover in depth the source code management services which all three projects now rely upon. The code management services are the critical piece of the development platform. In addition, I will show you how to use the Blueprints, Bugs, Answers and Translations services that many MySQL ecosystem projects, including the MySQL Sandbox and MySQL Forge, use.

In this first article, I will walk through the critical first step of establishing a Launchpad.net account and setting up the OpenSSH and OpenPGP keys for your account. In follow-up posts, I cover the code management system, blueprints system, and more.

Creating Your Account on Launchpad.net

The first thing to do is obviously create your account on Launchpad.net. Doing so is trivially easy. Go to the registration page and enter in your email address. Launchpad will then email (subject line: “Finish your Launchpad registration”) that address with a link to start the registration process. Click on the link in that email. You’ll be asked to provide a Display Name and a password. You can choose to have your email address hidden from other users or not. After filling in the information, click the Continue button and you’ll end up in your account profile area.

Once in the profile area, go ahead and fill in any of the information you want to be public about yourself by clicking the “Change Details” link in the right of the page. You can upload an avatar image for yourself and fill in a little “Bio” section. In a sub-navigation area at the top of the page, you will see links to edit your Email Settings, SSH Keys, GPG Keys, and Passwords. We’ll cover the SSH and GPG Keys in a bit. For now, explore this area and set your preferences the way you like.

Also, at the very bottom of the Change Details page, you also have some other links to edit your IRC nicks and other stuff.

Your OpenSSH Keys

One important thing to do when setting up your account is to upload your public SSH key to Launchpad.net. This helps the code management system by facilitating the bzr+ssh protocol and allowing you to push a bazaar branch to the Launchpad.net supermirror (more on that later). If you have already generated your public key, go ahead and skip the next subsection and proceed to “Upload your public key“.

To generate your SSH key, you will need to have OpenSSH installed. For Ubuntu users, simply do sudo apt-get install openssh. For other Linux users, use your package manager of choice. Windows users can use the PuTTY key generator, and should follow instructions on the excellent Launchpad.net Help wiki. Once you have OpenSSH installed, it’s time to generate your key. Do so with the following in a terminal:

ssh-keygen

When prompted, to accept the default key file names (~/.ssh/id_rsa.pub and ~/.ssh/id_rsa, and then a password for protecting the key file.

Upload your public key

You can output your public key using the following:

cat ~/.ssh/id_rsa.pub

Go ahead and copy the public key as-is; you’ll need it soon.

Now that you’ve generated your SSH keys, go ahead and click on the “SSH Keys” in the sub-navigation bar in your profile. Simply copy your public key into the text area marked “Add an SSH Key” and then click “Import Public Key”. OK, all set, let’s tackle the GPG Keys next.

GPG Keys (Optional, but Recommended)

Before we generate a GPG key and upload one to Launchpad.net, you will first want to ensure that you have a mail reader capable of decrypting PGP-encrypted emails. Personally, I use Thunderbird and the excellent Enigmail plugin for this, but you will want to use your own preferred MUA. Use this help article for assistance in setting up PGP for your mail client of choice.

OK, next up we’ll go ahead generate GnuPG keys for use with email security and the Launchpad.net mailing lists. To generate a GnuPG key pair, issue the following in a terminal:

gpg --gen-key

This will start a series of questions for you to answer, including which email address the key is for, your name, a passphrase and how many bits to make your key file (I chose 2048). Here is what the series will look like in a terminal:

[510][jpipes@serialcoder: /home/jpipes/.gnupg]$ gpg --gen-key
gpg (GnuPG) 1.4.6; Copyright (C) 2006 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Please select what kind of key you want:
   (1) DSA and Elgamal (default)
   (2) DSA (sign only)
   (5) RSA (sign only)
Your selection? 1
DSA keypair will have 1024 bits.
ELG-E keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 
Requested keysize is 2048 bits
Please specify how long the key should be valid.
         0 = key does not expire
        = key expires in n days
      w = key expires in n weeks
      m = key expires in n months
      y = key expires in n years
Key is valid for? (0) 
Key does not expire at all
Is this correct? (y/N) y

You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
    "Heinrich Heine (Der Dichter) "

Real name: Jay Pipes
Email address: xxxxxxxxx
Comment: 
You selected this USER-ID:
    "Jay Pipes "

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.

We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
...
gpg: key 9C5804A8 marked as ultimately trusted
public and secret key created and signed.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
pub   1024D/9C5804A8 2008-08-22
      Key fingerprint = 16C5 50D4 7061 03A1 48CD  3826 0CAD 7BD9 9C58 04A8
uid                  Jay Pipes 
sub   2048g/F7F4A925 2008-08-22

OK, once generated, verify that everything worked as expected using the following:

gpg --list-keys

which should produce output similar to the following:

[512][jpipes@serialcoder: /home/jpipes/.gnupg]$ gpg --list-keys
/home/jpipes/.gnupg/pubring.gpg
-------------------------------
pub   1024D/9C5804A8 2008-08-22
uid                  Jay Pipes 
sub   2048g/F7F4A925 2008-08-22

The next step is to push your public key to the Ubuntu key server — technically, you could push it to any old key server, but to keep things simple, just use the ubuntu key server. You’ll need to take note of your public key ID, which is the 8-character hex number following 1024D in the list-keys output. In my case, that public key ID is “9C5804A8″. Issue the following command, substituting your public key ID:

gpg --send-keys --keyserver keyserver.ubuntu.com @Your_Public_Key

The final step is to make Launchpad.net aware of your new GPG key. To do so, you need to send your GPG fingerprint to Launchpad. To grab your fingerprint, issue the following command:

gpg --fingerprint

which should produce something very similar to:

[514][jpipes@serialcoder: /home/jpipes/.gnupg]$ gpg --fingerprint
/home/jpipes/.gnupg/pubring.gpg
-------------------------------
pub   1024D/9C5804A8 2008-08-22
      Key fingerprint = 16C5 50D4 7061 03A1 48CD  3826 0CAD 7BD9 9C58 04A8
uid                  Jay Pipes 
sub   2048g/F7F4A925 2008-08-22

Copy the key fingerprint and paste it into the text area in your Open GPG keys page in your profile, then click the “Import Key” button. Launchpad.net will email the address of the key with a confirmation message. Click the link in the email under “Please go here to finish adding the key to your Launchpad account:”. And you are all done.

Now you have all the pieces set up to begin working with Launchpad.net effectively. In the next few posts in this series, I’ll walk you through how to best use the platform to be a productive contributor to the MySQL ecosystem. :)