Ask Your Question
1

How to get latest openstack code using devstack?

asked 2014-02-05 13:01:14 -0500

sivasamyk gravatar image

I have installed openstack using devstack. What is the procedure to update my openstack code at /opt/stack to latest from git and launch a devstack with latest code?

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
3

answered 2014-10-22 05:34:43 -0500

hhuang gravatar image

Hi, I'm not sure if what I've been doing is right, but the following is a piece of code I use to refresh the master branch of every single repo under /opt/stack when I need to:


#!/usr/bin/env python
from os import listdir,chdir
from os.path import isdir,join
from subprocess import call
mypath='/opt/stack/'
onlydirs=[d for d in listdir(mypath) if isdir(join(mypath,d))]
for d in onlydirs:
  print "="*70
  print "Updating %s..." % join(mypath,d)
  chdir(join(mypath,d))
  call(["git","checkout","master"])
  call(["git","remote","update"])
  call(["git","pull","--ff-only","origin","master"])

Hope this helps and if there is a better way to do so please feel free to share. Thanks!

edit flag offensive delete link more

Comments

Hi, and after you run this code, do you run unstack.py and stack.py again?

rafael-chiafarelli gravatar imagerafael-chiafarelli ( 2015-09-21 11:04:37 -0500 )edit
1

answered 2014-02-06 07:05:55 -0500

harry gravatar image

I guess you have checked the http://devstack.org/, right? Type cmd as follows.

git clone https://github.com/openstack-dev/devstack.git
cd devstack && ./stack.sh

For more details, you should read the stack.sh itself.

edit flag offensive delete link more

Comments

@harry My question is 1) Assume I clone devstack using the mentioned commands (git clone) on date x and run stack.sh 2) This clones all openstack git repos at /opt/stack dir 3) Now on date x+20, when I run stack.sh again, it does not update my openstack repos @ /opt/stack. Is there an option to stack.sh to update openstack repos cloned @ /opt/stack to the latest?

sivasamyk gravatar imagesivasamyk ( 2014-02-06 23:49:23 -0500 )edit
1

you can set the branch of src-code in your localrc, such as CEILOMETER_BRANCH=master. So that stack.sh will reload src-code on the master branch for you. Of course, you can verify it at /opt/stack/ceilometer by git branch.

harry gravatar imageharry ( 2014-02-09 19:22:36 -0500 )edit
1

answered 2015-09-19 13:32:05 -0500

aksmj8855 gravatar image

In your local.conf, add the below line. Then, DevStack will clone repositories of OpenStack again, when you try to run "./stack.sh" in next time.

RECLONE=yes
edit flag offensive delete link more
1

answered 2014-02-06 10:28:10 -0500

updated 2014-02-06 10:34:34 -0500

And if you want to try Neutron Networking you need to set the following you localrc file .. or it will default to Nova networking. Also there is a Bug, so you need to enable the load balancer before you load up the Neutron network modules, if not you will get a bunch of python errors and things won't work.

The localrc file snip is below (disable nova networking first, load lbaas, then Neutron)

disable_servce n-net

enable_service q-lbaas
enable_service q-neutron
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-02-05 13:01:14 -0500

Seen: 1,459 times

Last updated: Sep 19 '15