27
How to Contribute to OpenStack Documentation Mirantis, 2013

How to contribute to OpenStack Documentation

Embed Size (px)

DESCRIPTION

In this presentation from the 2013 OpenStack Documentation boot camp, you'll go from zero to merging your first patch.

Citation preview

Page 1: How to contribute to OpenStack Documentation

How to Contribute to OpenStack Documentation

Mirantis, 2013

Page 2: How to contribute to OpenStack Documentation

• The philosophy of documentation

• The documentation infrastructure

• Setting up the required accounts

• Installing the required software

• Making a contribution

Contributing to OpenStack Documentation

Page 3: How to contribute to OpenStack Documentation

• Documentation shouldn't be an afterthought

• Documentation treated like code

• Automate documentation wherever possible

Documentation philosophy

Page 4: How to contribute to OpenStack Documentation

Documentation infrastructure

Page 5: How to contribute to OpenStack Documentation

Getting ready to contribute to documentation

• Becoming a member of the docs team

• Configuring Launchpad

• Configuring Gerrit

• Working with Github

• Submitting a bug

• Fixing a bug

Page 6: How to contribute to OpenStack Documentation

Becoming a team member

• Go to https://www.openstack.org/join/

• Join the OpenStack Foundation

Page 7: How to contribute to OpenStack Documentation

Becoming a team member

• Read the membership terms

• Add your personal information

• Specify affiliation

Page 8: How to contribute to OpenStack Documentation

Configuring Launchpad: Create an account

• Go to https://login.launchpad.net/+new_account

• Set up a new account

• Verify your email address

Page 9: How to contribute to OpenStack Documentation

Configuring Launchpad: Access OpenStack on Launchpad

• Access OpenStack on Launchpad at https://launchpad.net/openstack

• Log in to Launchpad (again)

Page 10: How to contribute to OpenStack Documentation

Configuring Launchpad: Create an SSH key

• Create an SSH keyssh-keygen -t rsa -C "[email protected]

• Specify the file location

• Specify a passphrase

Page 11: How to contribute to OpenStack Documentation

Configuring Launchpad: Add the SSH key to Launchpad

• Click your username

• Choose to add an SSH Key

Page 12: How to contribute to OpenStack Documentation

Configuring Launchpad: Add the SSH key to Launchpad (cont’d)

• Log in again (if necessary)

• Copy the public key to the clipboard

• Paste into Launchpad

Page 13: How to contribute to OpenStack Documentation

Setting up GitHub

• Go to http://github.com

• Create an account

• Add your SSH Key

Page 14: How to contribute to OpenStack Documentation

Setting up Gerrit

• Go to https://review.openstack.org

• Sign in

• Click New Contributor Agreement

• Select ICLA

• Fill out the form and type “I AGREE”

Page 15: How to contribute to OpenStack Documentation

Joining the Docs Team

• Go to http://launchpad.net/openstack-manuals

• Log in if necessary

• Click Join Team

• Click Join

Page 16: How to contribute to OpenStack Documentation

Setting up your workspace: git

• Install gitsudo apt-get install git

sudo yum install git

• Configure git$ git config --global user.name "First Last"

$ git config --global user.email [email protected]

Page 17: How to contribute to OpenStack Documentation

Setting up your workspace: git-review

• Install Python's setuptoolssudo apt-get install python-setuptools

• Install pipsudo easy-install pip

• Install git-reviewsudo pip install git-review

• Add Gerritgit remote add gerrit \ ssh://<username>@review.openstack.org:29418\ /openstack/openstack-manuals.git

Page 18: How to contribute to OpenStack Documentation

Setting up your workspace: configure ssh

• Generate a new keyssh-keygen -t rsa -C “[email protected]

• Log in to review.openstack.org and click Settings

• Click SSH Public Keys

• Copy and paste id_rsa.pub to the form

• Click Add

• Test your keyssh <username>@review.openstack.org -p 29418

Page 19: How to contribute to OpenStack Documentation

Setting up your workspace: the docs

• Create a local directorymkdir ~/openstack/documentation

cd ~/openstack/documentation

• Clone the repositorygit clone git://git.openstack.org/openstack/ \ openstack-manuals.git

• Navigate to the openstack-manuals directorycd openstack-manuals

• Confirm git-review is workinggit review -s

Nermina Miller
Nick, this doesn't look right now that I've changed the font size.
Page 20: How to contribute to OpenStack Documentation

Setting up your workspace: tools

• Install Mavensudo apt-get install maven

• Pick an editor, (almost) any editor

Page 21: How to contribute to OpenStack Documentation

Fixing a docs bug

• All changes to docs must be tied to a bug

• Docs bugs are listed at https://bugs.launchpad.net/openstack-manuals \

/+bugs?orderby=-id&start=0

Page 22: How to contribute to OpenStack Documentation

Making a documentation change• Update your local copy

git remote update

git checkout master

git pull origin master

• Create a topic branch for the buggit checkout -b bug/1189885

• Make changes locally

Page 23: How to contribute to OpenStack Documentation

Testing your changes

• Build the bookcd openstack-manuals/doc/<manual>

mvn clean generate-sources

• View the changes in/target/docbkx/webhelp/<guide-name>

• Compare to the old version,e specially if you're not vamiliar with the book

Page 24: How to contribute to OpenStack Documentation

Committing changes

• One change per commit

• Stage the commit:git commit -a

• Write the commit message:Addition of chainsaw juggling documentation

Added new section on the proper juggling of chainsaws within Nova.

Closes-Bug: #1009973

Implements: blueprint chainsaw-juggling

Change-Id: I4946a16d27f712ae2adf8441ce79e6c0bb0bb657

Page 25: How to contribute to OpenStack Documentation

Committing changes (cont’d)

• More information on commit messages:https://wiki.openstack.org/wiki/GitCommitMessages

Page 26: How to contribute to OpenStack Documentation

Submitting the change for review

• Submit the changegit review

• The change shows up on http://review.openstack.org

• Core team is notified

Page 27: How to contribute to OpenStack Documentation

Documentation workflow

• File/claim a bug

• Check the documentation project our of git

• Make changes locally

• Build the documentation locally

• Test the documentation

• Submit for review

• Merge changes