Installing Devstack and PyCharm for OpenStack debugging

Even for experienced OpenStack developers, the complexity and magnitude of the code base may look intimidating. You can increase your productivity by effectively using debugging tools.

The first step is installing Devstack with PyCharm.

Install VirtualBox

VirtualBox is an OpenSource virtualization product that can be installed on Mac or PC. Please make sure that you can allocate at least 4GB of memory and 20 GB of storage for the guest VM. Goto https://www.virtualbox.org/ to download and install VirtualBox. 

Create a guest VM

Start VirtualBox and follow the instructions from https://www.virtualbox.org/manual/ch01.html#gui-createvm to create a VM. Make sure following parameters are chosen:
  • "Linux" as Machine Type
  • "Ubuntu (64bit)" as Version
  • Memory is set to "at least 4 GB"
  • Choose "Create a virtual disk now" for Hard disk
  • Hard disk file type to "VDI (VirtualBox Disk Image)"
  • "Dynamically allocated" for storage option
  • "At least 20 GB" for the size of the virtual hard disk
Download Ubuntu Desktop ISO image from http://www.ubuntu.com/download/desktop

Start the guest VM that was created in the previous step and you will be prompted for disk. Please choose the Ubuntu ISO image that has been downloaded. 

Now, you will be taken through a normal Ubuntu installation process. Provide the relevant information such as timezone, machine name, username and password. At the end of the installation process, you will have a running Ubuntu system.

Once Ubuntu is installed, please install VirtualBox Guest additions for better user experience.

Install Devstack

Login to Ubuntu guest VM and install git:

> sudo apt-get install git

Install devstack by cloning the repository

git clone https://git.openstack.org/openstack-dev/devstack

Create local.conf under devstack directory with following contents:
[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
Start devstack:

> cd devstack
> stack.sh

Install PyCharm


Run "tar -xzvf " to extract the contents. Go to the PyCharm directory and run "bin/pycharm.sh" to invoke PyCharm IDE.

That's it. You have a system with both devstack and PyCharm is installed. Now it is the matter of some simple configuration before you start debugging OpenStack

Comments

  1. i installed devstack and pycharm. what do I need to next ?

    ReplyDelete
    Replies
    1. Please follow this guide to run through some examples - https://github.com/txdev/OpenStack-Debugging/blob/master/docs/OpenStack-Debugging-LabBook.pdf

      Delete

Post a Comment