Openstack WorkShop Day II

OpenStack Development

 Creating OpenStack dev environment using DevStack

Devstack is a shell script used to deploy a complete OpenStack development environment.
  • Clone the devstack repo which contains a script that will install OpenStack.
      $    git clone
  • Now you will find a devstack directory where you cloned the repo
      $ cd devstack
  • Run the script to install OpenStack
       $ ./

What the scripts do?

  • We have run this script initially to install Openstack.
  • Stops all the services started by (mostly) mysql and rabbit are left running as OpenStack code refreshes do not require them to be restarted.
  • This script rejoins an existing screen, or re-creates a screen session from a previous run of
  • Runs style checking tools in devstack.
  • Does its best to eradicate traces of a Grenade run.
  • This script runs all the examples present in the devstack/exercises directory and reports on the results.

Default services provided by Devstack

  • Nova (API, Certificate, Object Store, Compute, Network, Scheduler, VNC proxies, Certificate Authentication)
  • Cinder (Scheduler, API, Volume)
  • Glance (API and Registry)
  • Horizon
  • Keystone
  • RabbitMQ
  • Tempest

Adding additional OpenStack services to Devstack

  • Additional services that are not enabled by default can be enabled in the local.config.
  • Examples:
    • Swift - Object Storage
    • Ceilometer - Metering Service
    • Neutron - Networking Service

Where is the code?

  • All the code related to OpenStack will be found here in

Openstack workflow management tools

  • Gerrit- Web-based code review tool built on top of the git version control system intended to provide a light weight framework for reviewing every commit before it is accepted into the code base
  • Launchpad - The web interface for the Gerrit Code Review system will identify you using launchpad
  • Code Review - Web interface for Gerrit
  • "git-review"- Tool which is a git subcommand that handles all the details of working with Gerrit


Setting up required accounts for contributing to OpenStack

Setting your local environment to contribute upstream

  • Create an ssh-key on your machine
  • Upload an ssh-key to Gerrit at as well as in
      cat ~/.ssh/
  • Run these steps to let git know about your email address:
      git config --global "Firstname Lastname"
      git config --global ""
  • Install git-review
      pip install git-review

Sending a patch Upstream!! (This is for testing in sandbox)

  • Clone the project repository you want to work on:
     git clone git://
    • Sandbox: This is a sandbox so that lovely developers can test the tools and processes used for OpenStack development.
  • $ git status

    Go to the project directory:
      cd sandbox
  • Make change in any file and save
    add print "This is Ohelig Pojke"
    $git status

    Make git-review configure your project to know about your Gerrit
      git review -s
    If you want to move the configuration to next branch instead of master branch.
    Make the branch.
    $git chechout -b test_branch 

Sending a patch Upstream!!

 Now make the changes you want to the project

Add the files to which you have made changes

To move the file or entire which are made changed. 
If you want to add all the change file then
$ git add
If you want to add any file then type
$git add
If you want to send a commit message along with patch
Commit your changes
$git commit -a 
You will get a new file where you have to give an appropriate bug and fix what you have done.
Note: If you face problem while executing 
$ git review -s
Make sure you have uploaded your ssh key in
If you want to
$git commit -a amend
Change-Id: I5f5c3c35321da0ee572021a956a6c5e1aa48441b
ctrl+o <enter> ctrl+x
Push your changes upstream
$git review


No comments:

Post a Comment