My Devtest Workflow

I said in a previous post that I would write something up about my devtest workflow once I had it nailed down a bit more, and although it's an always-evolving thing, I think I've got a pretty good setup at this point so I figured I'd go ahead and write it up. Instead of including scripts and such here, I'm just going to link to my Github repo where all of this stuff is stored and reference those scripts in this post.

The first step is to source devtest.rc, which I generally just add to my ~/.bashrc so it always gets done when I start a new session. That sets up a bunch of environment variables that are either required or convenient for development environments. Some of them may be unnecessarily setting variables to their defaults, but this way they are handy if I need to change them for some reason. Also, note that this is for Fedora 20 - other distros may need slightly tweaked values (NODE_DIST at the very least).

Some notes about devtest.rc:

  • LIBVIRT_DEFAULT_URI - I find that this is needed for the virtual power manager to work properly on Fedora. I really need to revisit making this work correctly upstream (assuming it doesn't already - I haven't tried it without setting this in a while).
  • NODE_ARCH - Set to amd64 so I can use the wheels on my pypi-mirror.
  • PYPI_MIRROR_URL* - Set this to your local pypi-mirror, or remove the pypi element from DIB_COMMON_ELEMENTS if you don't have one.
  • MESSAGING_PROVIDER - Makes it easier to switch from rabbitmq to qpid. I should probably get something similar merged upstream for this too.
  • *_EXTRA_ARGS - Adding -u to these causes devtest to use uncompressed images, which is faster if you have the disk space for it.
  • DIB_REPO* - These can be used to override the git refs that devtest will use. This can be handy when there's a pending change you need, or a change was merged recently that broke devtest.

Once devtest.rc is sourced, it should be possible to run-devtest. This script is simply a wrapper that passes --trash-my-machine to so you don't have to type it every time. It also passes through any options to the script, so if you want to run with cached images (for example) you could run-devtest -c.

While devtest is running, you can keep track of its progress with dtstatus. I run it with watch so it updates every two seconds: watch dtstatus. This just tells you which step (ramdisk, seed, undercloud, overcloud) devtest is on, and any information it has about what that step is currently doing (building images and waiting for deployment, at the moment). This is another thing I need to investigate adding to upstream TripleO.