Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

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 https://github.com/openstack-dev/devstack.git
    • Now you will find a devstack directory where you cloned the repo

        $ cd devstack
    • Run the script to install OpenStack

         $ ./stack.sh

What the scripts do?


  • stack.sh: We have run this script initially to install Openstack.

  • unstack.sh: Stops all the services started by stack.sh (mostly) mysql and rabbit are left running as OpenStack code refreshes do not require them to be restarted.

  • rejoin-stack.sh: This script rejoins an existing screen, or re-creates a screen session from a previous run of stack.sh.

  • run_test.sh: Runs style checking tools in devstack.

  • clean.sh: Does its best to eradicate traces of a Grenade run.

  • exercise.sh: 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
  • MYSQL
  • 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

        ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account
    • Ceilometer - Metering Service

        ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral,
        ceilometer-collector,ceilometer-api
        ENABLED_SERVICES+=,ceilometer-alarm-notify,ceilometer-alarm-eval
    • Neutron - Networking Service

        ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron

Where is the code?


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

      /opt/stack/project_name

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 https://launchpad.net/

  • Code Review - Web interface for Gerrit https://review.openstack.org

  • "git-review"- Tool which is a git subcommand that handles all the details of working with Gerrit

Workflow

Setting up required accounts for contributing to OpenStack

Setting your local environment to contribute upstream

  • Create an ssh-key on your machine
      ssh-kegen
  • Upload an ssh-key to Gerrit at review.openstack.org

      cat ~/.ssh/id_rsa.pub
  • Run these steps to let git know about your email address:

      git config --global user.name "Firstname Lastname"
      git config --global user.email "your_email@youremail.com"
  • Install git-review

      pip install git-review

Sending a patch Upstream!!

  • Clone the project repository you want to work on:

      git://git.openstack.org/openstack-dev/sandbox
    • Sandbox: This is a sandbox so that lovely developers can test the tools and processes used for OpenStack development.
  • Go to the project directory:

      cd sandbox
  • Make git-review configure your project to know about your Gerrit

      git review -s

Sending a patch Upstream!!

  • Now make the changes you want to the project

  • Add the files to which you have made changes

      git add .
  • Commit your changes
      git commit -a
  • Push your changes upstream
      git review

Questions??

Use a spacebar or arrow keys to navigate