Andy Doan andy.doan@linaro.org writes:
Hey Michael,
I was trying to update our staging instance to use a new component today (lava-celery). I got it working, but I'm not sure if I followed the best practice for doing this. What I did:
added entry to /srv/lava/instances/staging/code/current/buildout.cfg pulled in my local branch of the component to code/current/local ran ./bin/buildout
So what's the proper way to do what I just hacked together?
That's a really good question. What you did sounds fine (although you might want to run rebuildout which invokes buildout with the buildout.cfg file that is configured for the instance). Another approach would be to make a branch of lp:lava-manifest that enabled your dependency, edit $LAVA_INSTANCE/instance.conf to point at this branch and then run ldt upgrade. Maybe we should add an argument to upgrade to make this easier? ldt upgrade instance --manifest-branch=...? If we do this, we'll have to take care around the fact that the different buildouts are named by revnos and revnos can be ambiguous when multiple branches are involved.
Actually.... I've had this thought sort of lurking around in the back of my brain that while I like the "one directory per buildout" approach for a production deployment (it lets you do most of the work of setting up a new code drop before doing anything that affects the old one) it perhaps isn't appropriate for a more development focused deployment, and perhaps we should just have $instance/code/current be a branch and update it in place in this case. That would mean for what you were doing you'd just hack in place until it worked, then commit and push it for review in Launchpad.
Cheers, mwh