[openstack-dev] [TripleO] Proposal for a new tool: dlrn-repo

Ben Nemec openstack at nemebean.com
Mon Jun 13 20:29:49 UTC 2016

So our documented repo setup steps are three curls, a sed, and a
multi-line bash command.  And the best part?  That's not even what we
test.  The commands we actually use in tripleo.sh --repo-setup consist
of the following: three curls, four seds, and (maybe) the same
multi-line bash command.  Although whether that big list of packages in
includepkgs is actually up to date with what we're testing is anybody's
guess because without actually plugging both into a diff tool you
probably can't visually find any differences.

What is my point?  That this whole process is overly complicated and
error-prone.  If you miss one of those half dozen plus commands you're
going to end up with a broken repo setup.  As one of the first things
that a new user has to do in TripleO, this is a pretty poor introduction
to the project.

My proposal is an rdo-release-esque project that will handle the repo
setup for you, except that since dlrn doesn't really deal in releases I
think the -repo name makes more sense.  Here's a first pass at such a
tool: https://github.com/cybertron/dlrn-repo

This would reduce the existing commands in tripleo.sh from:
sudo sed -i -e 's%priority=.*%priority=30%' $REPO_PREFIX/delorean-deps.repo
sudo curl -o $REPO_PREFIX/delorean.repo
sudo sed -i -e 's%priority=.*%priority=20%' $REPO_PREFIX/delorean.repo
sudo curl -o $REPO_PREFIX/delorean-current.repo
sudo sed -i -e 's%priority=.*%priority=10%'
sudo sed -i 's/\[delorean\]/\[delorean-current\]/'
sudo /bin/bash -c "cat <<-EOF>>$REPO_PREFIX/delorean-current.repo
sudo yum -y install yum-plugin-priorities

sudo yum install -y http://tripleo.org/dlrn-repo.rpm # or wherever
sudo dlrn-repo tripleo-current

As you can see in the readme it also supports the stable branch repos or
running against latest master of everything.

Overall I think this is clearly a better user experience, and as an
added bonus it would allow us to use the exact same code for repo
management on the user side and in CI, which we can't have with a
developer-specific tool like tripleo.sh.

There's plenty left to do before this would be fully integrated (import
to TripleO, package, update docs, update CI), so I wanted to solicit
some broader input before pursuing it further.



More information about the OpenStack-dev mailing list