7 Commits

Author SHA1 Message Date
Ramy Asselin
4e6c268f6f Allow choice of GIT protocol used.
From within some corporate http networks, the 'git' protocol cannot be used.
Update the prepare_node and cache_git_repos scripts to default to using the
'git' protocol, but allow customiztion to use the 'http' protocol via command
line argument.

In addition, allow the full base url to be modifed as done in devstack stackrc
to also allow changing repositories.

Change-Id: I875f2e46c466e4e0fb7a5d4dbc54e958d91f9151
Partial-Bug: #1307702
2014-06-03 13:05:18 -07:00
Jeremy Stanley
d9798d288a Nodepool should clone the config repo from git.o.o
* .../nodepool/scripts/cache_git_repos.py: Since the projects list
is not being retrieved as part of a git repository, use HTTPS
protocol rather than HTTP so it will be consistent with the way we
retrieve the bootstrap script in prepare_node.sh.

* .../nodepool/scripts/prepare_node.sh: Switch the config clone
operation from the Gerrit server to the Git server farm, since the
former does not support git protocol. Also make it a shallow clone
since we just need the files.

Change-Id: I1dc0697bb3f9832d180b6b1ebffaa563bd886281
2014-02-21 19:34:29 +00:00
Jeremy Stanley
4c9ca0597b Make nodepool git repo caching more robust
Previously, nodepool's prep scripts would not abort when
encountering git cloning errors. Now we retry once on failure and
then abort if it fails a second time. Also the script now makes sure
the clone actually results in a functional copy of each repository
by attempting to list branches and reset to HEAD.

Change-Id: I84565e4e90b34c6a9b8c86754efdde137cda08b2
2014-02-21 16:23:10 +00:00
Jeremy Stanley
f5231fd0a3 Clone git repos for images via git protocol
For performance reasons--using git protocol instead of HTTP should
speed up cloning significantly on CentOS 6 in particular.

Change-Id: I37fadb1366eab5d66ec8e95945bea9c2c0251fcb
2014-02-21 15:36:11 +00:00
James E. Blair
cbd64b6175 Add sync calls to all prepare scripts
Strictly speaking, we only need sync calls at the end of the
script that is directly invoked by nodepool.  But just so we
don't have to think about it too much, add them to all prepare
scripts.

Without it, clouds will happily snapshot a system without all
the data written to disk!

Closes-Bug: 1282136

Change-Id: Id7dcf6667d6e48eb5ae95fd42b09f0651eeb38f9
2014-02-19 09:05:23 -08:00
Monty Taylor
bc794da31e Split config from projects list
The projects list is a common list for devs to interact with. The config
in the list is not, but the config in the list means the file needs to
be in an erb template.

Split the two concerns, similar to zuul. Put the config in a config file
and the project data in a yaml file.

Change-Id: I708b8655b4b1ce377f3b7369e987418c1d72d977
2014-01-28 09:32:09 -08:00
James E. Blair
005581be50 Nodepool: cache all gerrit repos
Cache all review.openstack.org git repos in /opt/git.

Subsequent changes to gerrit-git-prep and devstack-gate will make
use of these repos (eventually deprecating the devstack-gate repos
is ~jenkins/workspace-cache).

Refactor the devstack cache python script a bit to make common
functions reusable.  Also rename it because underscores are better
than hyphens for python file names.

Change-Id: I4ae40613ebcca62b0dfc2eaba159557a4c71a529
2013-12-04 10:54:52 -08:00