Setting up an OpenStack development environment

My Outreachy internship started on 6th December 2016. It has now been a week. :) My project is to improve Amazon S3 (Amazon Simple Storage Service) compatibility with OpenStack Swift.

Swift is the OpenStack storage service. For people who are using Amazon S3 that want to migrate to swift or who want the flexibility to use different backends that support the S3 APIs, swift has the S3 compatibility library called swift3.

OpenStack has lots of moving parts. One of the first hurdles I came across when I applied for the project was to set up a development environment. Luckily, there is a lot of good documentation for OpenStack.

For development, I use KVM and libvirt to run my VMs so I don't have to worry too much about installing the wrong stuff and messing up my laptop. ;D I created a Ubuntu 16.04 (xenial) VM and followed this guide to set up OpenStack:

DevStack - for setting up OpenStack on a VM:

It worked really well... but it has a lot more components than I needed and it kind of looked too complicated... There is another guide more specifically for swift:

SAIO - Swift All In One:

I finally got a development environment for swift. :D

OpenStack uses Gerrit for code review. There is documentation on how to contribute to OpenStack:

Development Workflow:

In the past I have used GitHub for code review and it was relatively simple to understand the way it works. You push a branch to GitHub, then create a pull request. You would force push a branch to update the code that is being reviewed.

Gerrit puts a Change-Id in each commit message, which is used (together with the project and target branch) to identiy unique changes. If the commit hash changes (for example if it is rebased), Gerrit will know that it is an updated version of the same change. It keeps all patchsets around which I find really useful. :D