Developing with DevStack               Deepak Garg    OpenStack Developer     Citrix R&D, India  Openstack July Meetup 201...
Contents●   Project Details●   Important files●   localrc vars●   Hypervisor●   Tips & Tricks●   Developing and Debugging●...
Project DetailsA documented shell script to build complete OpenStack           development environments.     Project Homep...
Important fileslocalrc: localrc is a user-maintained setings file thatis sourced from stackrc. This gives it the ability t...
Important filesexercise.sh: setting up the env for running thesample exercise cmdsexercises/ folder: contains a small set ...
localrc vars●   MYSQL_PASSWORD=ms●   MYSQL_USER=root●   ADMIN_PASSWORD=adminsecret●   FIXED_RANGE=192.168.10.0/24●   ENABL...
Hypervisor●   Verify AMD V CPU Virtualization Extensions            # grep ­­color svm /proc/cpuinfo●   Verify Intel VT CP...
Tips & Tricks●   RECLONE=yes/no●   OFFLINE=True/False    Fake an IP: $ sudo ifconfig eth0 10.10.0.2/24 up●   Stack.sh cann...
Developing and Debugging●    /opt/stack is the directory of the packages●   Make the file changes and restart the    servi...
Workflow➔   Run the Devstack script➔   Point your IDE (Eclipse) to /opt/stack➔   Make code changes➔   Go to respective ser...
DevStackPy●   Written in python●   Pretty well maintained, not as much as    original DevStack●   Good for example code, s...
deepakgarg.iitg@gmail.com              @donji       github.com/gargdeepakslideshare.net/khinnu4u/presentations
Upcoming SlideShare
Loading in …5
×

Developing with-devstack

2,860 views

Published on

How to hack into Openstack using Devstack

Published in: Education, Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,860
On SlideShare
0
From Embeds
0
Number of Embeds
17
Actions
Shares
0
Downloads
118
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Developing with-devstack

  1. 1. Developing with DevStack   Deepak Garg   OpenStack Developer Citrix R&D, India Openstack July Meetup 2012 by Deepak Garg is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. Based on a work at www.slideshare.net/khinnu4u/presentations.
  2. 2. Contents● Project Details● Important files● localrc vars● Hypervisor● Tips & Tricks● Developing and Debugging● Workflow● DevStackPy
  3. 3. Project DetailsA documented shell script to build complete OpenStack development environments. Project Homepage: http://devstack.org$ git clone https://github.com/openstack-dev/devstack.git $ cd devstack $ ./stack.sh
  4. 4. Important fileslocalrc: localrc is a user-maintained setings file thatis sourced from stackrc. This gives it the ability tooverride any variables set in stackrc.Samples: http://devstack.org/localrc.htmlstackrc: git repo and branch information, imagedownload location. This file shouldnt be modified,only localrc should be modified.stack.sh: stack.sh is an opinionated OpenStackdeveloper installation. It installs and configuresvarious combinations of Glance, Horizon, Keystone,Nova, Quantum Swift and some other projects
  5. 5. Important filesexercise.sh: setting up the env for running thesample exercise cmdsexercises/ folder: contains a small set of exercisefile for achieving different functionalities
  6. 6. localrc vars● MYSQL_PASSWORD=ms● MYSQL_USER=root● ADMIN_PASSWORD=adminsecret● FIXED_RANGE=192.168.10.0/24● ENABLED_SERVICES+=",q-svc,quantum,q-agt,swift,n- cauth,melange,m-svc,mysql"● Q_PLUGIN=openvswitch● RABBIT_PASSWORD=rabbitsecret● SERVICE_TOKEN=admintoken● SWIFT_HASH=deep● SERVICE_PASSWORD=sp● #OFFLINE=True● #RECLONE=yes
  7. 7. Hypervisor● Verify AMD V CPU Virtualization Extensions # grep ­­color svm /proc/cpuinfo● Verify Intel VT CPU Virtualization Extensions # grep ­­color vmx /proc/cpuinfo● If you are running in a VM, then the underlying hypervisor will be Qemu after the Installation● If no configuration is in localrc then it will try to install kvm plugins● Otherwise you can specifically mention the reqd. Conf in localrc
  8. 8. Tips & Tricks● RECLONE=yes/no● OFFLINE=True/False Fake an IP: $ sudo ifconfig eth0 10.10.0.2/24 up● Stack.sh cannot be run as root, so it tries to sudo. Enable Passwordless sudo o.w the script will ask for passwords each time $ sudo visudo deepak ALL = (ALL) NOPASSWD:ALL● If you are a developer then you should definitely read the well documented stack.sh script.
  9. 9. Developing and Debugging● /opt/stack is the directory of the packages● Make the file changes and restart the service● Use screen to see the logging output $ screen -x stack screen -d -m -S <screen-name> -t shell -s /bin/bash● Create a mysql db user called stack or use root in your localrc
  10. 10. Workflow➔ Run the Devstack script➔ Point your IDE (Eclipse) to /opt/stack➔ Make code changes➔ Go to respective service in the screen➔ Restart the service➔ Test and Check log msgs➔ Commit & Push your code using gerrit
  11. 11. DevStackPy● Written in python● Pretty well maintained, not as much as original DevStack● Good for example code, small recipes● Worth giving a look once.
  12. 12. deepakgarg.iitg@gmail.com @donji github.com/gargdeepakslideshare.net/khinnu4u/presentations

×