Jump to: navigation, search

Difference between revisions of "Documentation/HowTo/FirstTimers"

(Updated order of steps)
Line 7: Line 7:
 
Here's a step-by-step signup tutorial:
 
Here's a step-by-step signup tutorial:
  
# Create an account in Launchpad at https://login.launchpad.net/+new_account
+
'''Contributor Setup''' (Join in, prove you are you)
# Log in to your Launchpad account
+
 
# Generate SSH key: ssh-keygen -t rsa
+
# Go to http://openstack.org/join, fill out forms. Note: To avoid confusion, use the same email address everywhere. Everywhere!
 +
# On the computer where you will commit, generate SSH key: $ ssh-keygen –t rsa
 +
# Enter a password if you want -- it’s optional, but if you enter one, remember it, and you have to enter it every time you commit.
 
# View and copy SSH key: less ~/.ssh/id_rsa.pub
 
# View and copy SSH key: less ~/.ssh/id_rsa.pub
# Add SSH key to Launchpad (click your name in upper right hand corner, then click ! Next to SSH keys)
+
# Add your SSH key under "register an SSH public key"
# Go to http://openstack.org/join, fill out forms
 
# Go to http://review.openstack.org/, click Sign In, use your Launchpad account credentials. 
 
# Go to Settings after logging in at https://review.openstack.org/#/settings/ and ensure you have a username, adding one if needed.
 
# In the Settings page, click Agreements. Click through to ensure you've signed the CLA.
 
# Add your SSH key under "register an SSH public key."
 
 
# Install git. https://help.github.com/articles/set-up-git
 
# Install git. https://help.github.com/articles/set-up-git
# If this is your first time setting up git, don't forget to [https://help.github.com/articles/generating-ssh-keys add your SSH key (the same one generated before) to GitHub], and be sure to run these steps:
+
# Configure git so it knows you:
# $ git config --global user.name "Firstname Lastname"
+
    $ git config --global user.name "Firstname Lastname"
# $ git config --global user.email name@youremail.com
+
    $ git config --global user.email name@youremail.com
 +
 
 +
'''Repository Setup''' (Get your git on, Get files for work)
 +
 
 
# Clone a repository: $ git clone git://git.openstack.org/openstack/openstack-manuals.git
 
# Clone a repository: $ git clone git://git.openstack.org/openstack/openstack-manuals.git
# Install git-review so you can submit patches: $ sudo pip install git-review or $sudo apt-get install git-review
+
# Switch to the directory: cd openstack-manuals
# Switch to the repository and test to ensure you can connect: $ git review -s
+
# In the directory where the repository is cloned, install git-review so you can submit patches:
 +
    Windows:
 +
        curl http://pypi.python.org/packages/source/g/git-review/git-review-1.23.tar.gz -L > git-review.tar.gz
 +
        tar zxvf git-review.tar.gz
 +
        cd git-review-1.23
 +
        python setup.py install
 +
        cd c:\source\nova
 +
    Mac/Linux:
 +
    $ sudo pip install git-review
 +
    $ cd nova
 +
    Ubuntu:
 +
    $ sudo apt-get install git-review
 +
    $ cd nova
 +
# Set up git review:
 +
    Mac/Linux:
 +
        $ git review –s
 +
    Windows:
 +
        git-review
 +
You get further instructions if you haven't created a username on review.openstack.org
 
# Create a new remote with this command: $ git remote add gerrit ssh://<username>@review.openstack.org:29418/openstack/openstack-manuals.git
 
# Create a new remote with this command: $ git remote add gerrit ssh://<username>@review.openstack.org:29418/openstack/openstack-manuals.git
 
# Checkout: $ git checkout master; git remote update; git pull origin master
 
# Checkout: $ git checkout master; git remote update; git pull origin master
Line 34: Line 52:
 
# Copy and paste the URL returned from git review to take a look: http://review.openstack.org/nnnnnn
 
# Copy and paste the URL returned from git review to take a look: http://review.openstack.org/nnnnnn
 
# Celebrate and wait for reviews
 
# Celebrate and wait for reviews
 
  
 
Once you've submitted a patch, it's not uncommon for people to ask for changes before approval.  Here's how you do that:
 
Once you've submitted a patch, it's not uncommon for people to ask for changes before approval.  Here's how you do that:

Revision as of 18:54, 15 May 2014

For OpenStack documentation, one of the best places to start is by walking through the install guide and completing it by hand. You can complete a 2-node install with two VMs, for example. Keep notes as you go, offering suggestions for improvement.

Another good first-time docs task is to go to the bugs list at https://bugs.launchpad.net/openstack-manuals/+bugs and look at the new bugs. When you see a doc bug you know how to fix, comment in the bug how to fix the bug. Mark it "Triaged" and give it a status based on the documentation bug triaging guidlines. If you're up for it, you can assign yourself the bug.

Here's a step-by-step signup tutorial:

Contributor Setup (Join in, prove you are you)

  1. Go to http://openstack.org/join, fill out forms. Note: To avoid confusion, use the same email address everywhere. Everywhere!
  2. On the computer where you will commit, generate SSH key: $ ssh-keygen –t rsa
  3. Enter a password if you want -- it’s optional, but if you enter one, remember it, and you have to enter it every time you commit.
  4. View and copy SSH key: less ~/.ssh/id_rsa.pub
  5. Add your SSH key under "register an SSH public key"
  6. Install git. https://help.github.com/articles/set-up-git
  7. Configure git so it knows you:
   $ git config --global user.name "Firstname Lastname"
   $ git config --global user.email name@youremail.com

Repository Setup (Get your git on, Get files for work)

  1. Clone a repository: $ git clone git://git.openstack.org/openstack/openstack-manuals.git
  2. Switch to the directory: cd openstack-manuals
  3. In the directory where the repository is cloned, install git-review so you can submit patches:
   Windows: 
       curl http://pypi.python.org/packages/source/g/git-review/git-review-1.23.tar.gz -L > git-review.tar.gz
       tar zxvf git-review.tar.gz
       cd git-review-1.23
       python setup.py install
       cd c:\source\nova
   Mac/Linux:
   $ sudo pip install git-review
   $ cd nova
   Ubuntu:
   $ sudo apt-get install git-review
   $ cd nova
  1. Set up git review:
   Mac/Linux:
       $ git review –s 
   Windows:
       git-review 

You get further instructions if you haven't created a username on review.openstack.org

  1. Create a new remote with this command: $ git remote add gerrit ssh://<username>@review.openstack.org:29418/openstack/openstack-manuals.git
  2. Checkout: $ git checkout master; git remote update; git pull origin master
  3. Assign a bug to yourself. https://bugs.launchpad.net/openstack-manuals/+bug/1252931
  4. Create a new local branch: $ git checkout -b fix-bug-1252931
  5. Fix the bug in the docs, read the guide on How to contribute to the documentation, pay attention to on Policies and conventions section which talks about Git commit messages, backports and other conventions.
  6. Commit the local change: $ git commit -a
  7. Edit the commit message, following the guidelines documented at the git commit messages page.
  8. Create a patch for review.openstack.org with: $ git review -v
  9. Copy and paste the URL returned from git review to take a look: http://review.openstack.org/nnnnnn
  10. Celebrate and wait for reviews

Once you've submitted a patch, it's not uncommon for people to ask for changes before approval. Here's how you do that:

  1. Get the unique patch number from review.openstack.org, copy it
  2. At the command line, change to the directory where the repo is stored
  3. Enter: git review -d nnnnn (where nnnnn is pasted from the review.openstack.org/nnnnn URL)
  4. Make your edits
  5. In the directory where the repo is stored: $ git commit -a --amend
  6. Then push to review.openstack.org again: $ git review -v
  7. Wait for more reviews