41 Commits

Author SHA1 Message Date
James E. Blair
17cde1fd06 Install Zuul onto workers
So that we can use zuul-cloner, install Zuul into a venv.  We can
invoke it with /usr/zuul-env/bin/zuul-cloner.

Change-Id: Id97b967cea2d3e476334f51525a036c7c7e43762
2014-08-27 07:40:42 -07:00
Jenkins
9b7b249fc9 Merge "Fix unbound on rax centos6 nodes." 2014-08-22 20:26:39 +00:00
James E. Blair
53ede00741 Save and report nodepool image names
When building an image, save the hostname of the image to a file in
/etc.  Before running tox in jobs, cat that file.

This will help confirm which image was used to build a given node for
a particular job, and potentially help debug some issues we are
currently seeing.

Change-Id: I9d55b7223ea85c1137b460f049a0184d7e9ce53d
2014-08-22 10:28:57 -07:00
Clark Boylan
1a321b7a2f Fix unbound on rax centos6 nodes.
Rax centos6 nodes are dynamically configured via static file injection.
During boot our rc.local script runs to set resolv.conf nameserver to
127.0.0.1 then the ifup-post script runs and overwrites this
information with the "static" info in the ifcfg-* files. Modify the
ifcfg-* files in rc.local to prevent them from updating the nameservers
in resolv.conf.

Change-Id: I532e9fa4c40e0e0ce2aad35f4ae1f385a0619b70
2014-08-20 23:34:52 -07:00
Jenkins
79dc119eb5 Merge "Check puppet exit codes during image builds" 2014-08-11 22:15:23 +00:00
Clark Boylan
a39119f890 Check puppet exit codes during image builds
To get useful info from puppet exit codes we must use puppet detailed
exit codes then check the values as nonzero codes can indicate success.
Values of 4 and 6 indicate failure to exit $RETURNCODE when those values
are returned.

Change-Id: Idf6ac0956a3749ff0a42e0b39765f98865971870
2014-08-01 15:36:25 -07:00
K Jonathan Harker
726c00c541 Add path to installing puppet 3 on nodepool nodes
Instead of looking for an argument, change the install_puppet.sh script
to look for an environment variable to switch to installing puppet3.
Also export this environment variable in prepare_node.sh (albeit with a
default value that does not install puppet3).

Change-Id: I04bee2fa5bb70a4d763edb2f3d30f117cad5d65b
2014-07-07 13:09:19 -07:00
K Jonathan Harker
8bd0056443 Export prepare_node variables rather than pass them around
The prepare_node scripts are primarily called from within nodepool,
which only passes in a single argument: the hostname of the node.

The rest of the values that we want to pass in to the underlying
prepare_node script can be shared through the environment, making order
no longer important and alleviating the need to duplicate setting
defaults in order to pad positional arguments to a newly created
variable.

Change-Id: I0a13e27524b75a50a482870414ebe2fd6ac8315e
2014-07-02 16:49:30 -07:00
Monty Taylor
00a7e26e43 Remove system cron activities on slaves
We don't need any of these - since they're all things that just
operate normal system maint. If we want code to run on a slave,
we'll run it.

Change-Id: I5ccc3c50f2cf0272a1b4710063612b1352b7e1d6
2014-06-29 14:42:50 -07:00
Clark Boylan
87a64d1587 Make sure we have a hostname when we grep for it
We attempt to set hostname in /etc/hosts if the hostname does not exist
there. However when the $HOSTNAME variable is empty we grep for
/etc/hosts from stdin which has no data. Check that $HOSTNAME is not
empty before we grep for it.

Change-Id: Ie35fd997f2f569ebea6614f91609281a991f8d6a
2014-06-10 20:15:33 -07:00
Jenkins
97ba12b8a4 Merge "Allow choice of GIT protocol used." 2014-06-11 00:32:54 +00:00
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
K Jonathan Harker
67b2919e0b Add the new hostname to /etc/hosts in prepare_node
It is good practice to update /etc/hosts with the new hostname when
changing it. Some programs (such as sudo) will give warnings if it is
unable to resolve its own name.

Change-Id: I5c95c9cadc32d7d42c6c6546e136a80f4a7e02f4
2014-06-02 18:45:14 -07:00
K Jonathan Harker
8e7f9e3458 Move openstack-specific config out of ::jenkins
The ::jenkins::slave class contained a lot of openstack-specific
configuration rather than configuration of a generic jenkins slave.

The term "bare slave" is overloaded and confusing: create simple_slave
and thick_slave to differentiate between the two meanings of "bare".
Some portions of ::jenkins::slave will move to simple_slave, some
portions to thick_slave, and some portions to slave_common (all in the
openstack_project module).

Change-Id: I5281a03a7f6da3f98714bcc59ae840ace8435578
2014-05-20 14:39:51 -07:00
Monty Taylor
bdcd4ed440 Remove chattr
Now that we create the file at boot time, it's not important that it
be immutable.

Change-Id: I06c60f61f51b791b7006983572b868c6d4459c68
2014-04-28 08:19:08 -07:00
Monty Taylor
3f4001cec8 Overrwrite resolve.conf at boot time
File injection on clouds really screws with us - so instead,
just handle it at first boot.

Change-Id: Iab15e5366dacdcc85211667bdec98b3d1a0c6926
2014-04-28 08:19:04 -07:00
Jenkins
4ac3719e84 Merge "Always forward to 8.8.8.8 on test nodes" 2014-04-02 00:34:46 +00:00
James E. Blair
56562d83f7 Revert "Adds second hiera data directory"
This did not seem to work.

This reverts commit ed57cef9c5a65f429e07ce253668cd23ceb6c45a
2014-03-31 21:06:37 +00:00
James E. Blair
0e9ddc78ab Always forward to 8.8.8.8 on test nodes
Our providers have unreliable DNS in different ways.  Instead of
special casing all of them, just always forward queries to 8.8.8.8
until we have our own neutron-local recursive resolvers.

Closes-Bug: 1286963
Change-Id: I5eca2e2db75b38f829ba458bb8c3789646f562c2
2014-03-31 13:05:39 -07:00
Spencer Krum
ed57cef9c5 Adds second hiera data directory
This allows hiera data to be split into two buckets: sensitive and
non-sensitive. Sensitive data is put where it always has been. Non-
sensitive data, such as users ssh keys and lists of packages can be
put into the data directory contained within the
openstack-infra/config git repository.

This also introduces a more complex hierarchy: data is now split on
osfamily and lsbdistcondename. Operatingsystem is left for
compatibility.

Change-Id: I3b3faeab837aa5732da01e96bbe0c19aa936a58d
2014-03-28 18:42:33 -07:00
Derek Higgins
62c7a0c51b Add support to restart unbound with systemd
Adds support for Fedora.

Change-Id: Ide7a63d070dac07b276dfa55da8db2ff089f1e71
2014-03-24 17:45:11 +00:00
Jenkins
2578ffce16 Merge "Use unbound" 2014-03-21 17:29:49 +00:00
Jenkins
dc7685af1d Merge "Add support for Fedora 20 to nodepool" 2014-03-19 21:57:54 +00:00
James E. Blair
e96c2e7c84 Use unbound
On all machines, set up unbound as a caching recursive resolver.
On single-use slaves, set it up to forward cache misses to the
DNS servers obtained by the template host on boot.

Change-Id: I8505f5a277f20b1328900a9a515cd84db77b2b3b
2014-03-18 09:23:38 -07:00
Clark Boylan
e4c9c9680b Remove unneeded package sources from nodepool node
We need additional package sources on nodepool nodes to install things
like puppet, pypy, and python3. But once these packages are installed we
don't need them anymore. Any test that does an apt-get update or yum
upgrade will hit these package repos despite not needing to. Remove the
additional sources after we are done with them to be nicer to them.

Fixes-Bug: 1253774
Change-Id: I3c5bd7e544076f26b224553bdea6134d39fc8bba
2014-03-12 10:03:31 -07:00
Elizabeth Krumbach Joseph
b99ad2c412 Add support for Fedora 20 to nodepool
For TripleO, one of our test cases is a fully Fedora-driven test,
this adds support for Fedora as a nodepool VM by adding support
to prepare node scripts.

Also adding install_devstack_dependencies.sh for Ubuntu and Fedora
shared dependencies for DevStack (and TripleO) preparation scripts.

Change-Id: I7399cc4d4b6ec6f8598afa68bc99ebb24cb01f64
2014-03-11 15:36:19 -07:00
Clark Boylan
54ad9496cd Optionally give mysql user all global privs.
One our single use unittest slaves we want to allow unittests to create
and destroy arbitrary mysql database schemas. The simplest way to do
this is to grant all priveleges to the test user on the mysql server
globally. This is safe because the nodes are thrown away post test.

Change-Id: Ic92ff2f9c752d955e6f82eb4b88330b5448cfa75
2014-02-26 11:48:59 -08:00
Jenkins
158cbf0e4e Merge "Mount ext3 filesystems as ext4 on single use slaves" 2014-02-24 21:49:58 +00:00
Clark Boylan
883ac71cf5 Mount ext3 filesystems as ext4 on single use slaves
It has been suggested that tests may be happier with ext4 instead of
ext3 on the test slaves. At the end of building an image for single use
slaves modify fstab so that when slaves are booted with the image they
mount / as ext4.

Related-Bug: 1273386
Change-Id: I88409e734b1599a5517abfd9d76c7fd622c01bb5
2014-02-24 13:39:14 -08: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
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
Jenkins
8fac849433 Merge "Add sync calls to all prepare scripts" 2014-02-19 18:18:42 +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
Jeremy Stanley
f806613c66 Add single-use py3k-precise nodes
* .../files/nodepool/scripts/prepare_node.sh: Add parameters for
Python 3 and PyPy settings for use by the py3k-precise node type.

* .../files/nodepool/scripts/prepare_node_py3k.sh: Wrapper to enable
the Python 3 and PyPy support toggles in prepare_node.sh.

* .../manifests/single_use_slave.pp: Add the Python 3 and PyPy
support variables, passing them through to the Jenkins slave class.

* .../templates/nodepool/nodepool.yaml.erb: Add a new node and image
for py3k-precise in a suitably small quantity for initial testing.

Change-Id: Id2438c17ea59ae9123a841fd0b348728c6467529
2014-02-18 17:52:33 +00:00
Clark Boylan
fc249c341f Handle the slave bare flag properly in nodepool.
Just to be confusing our bare-precise images are not actually bare
jenkins slave images and things will break if they are. Make the
jenkins::slave bare flag selectable in the single_use_slave manifest and
set it to true on the bare precise nodes (keep it set to false on
anything running devstack or similar).

Change-Id: I88d0a7f7b9c188ac3547b9ffab57c5fbce4f7a10
2014-02-05 17:40:13 -08:00
Clark Boylan
0f4b0fae64 Redo slave manifests for clarity and correctness.
The differences between openstack_project::slave,
openstack_project::slave_template, and openstack_project::bare_slave
were not always clear. Keep openstack_project::slave as the default long
running slave manifest, but replace slave_template with a
single_use_slave.pp to make it clear where single use slave config
begins. Add the ability to toggle automatic upgrades and jenkins sudo
rights to this new manifest. Finally, add a more verbose comment to
bare_slave explaining what it is useful for (having a jenkins like slave
host that doesn't need a firewall or ntp or automatic upgrades).

Change-Id: I3989c9e6ad9469f441ca5d3627f7b3b704d8a8da
2014-01-30 10:37:36 -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
Jenkins
d78e4e6acc Merge "Use cgit server instead of github for everything" 2013-08-23 17:01:32 +00:00
James E. Blair
86b0f3bfd5 Fix nodepool setup scripts
The devstack cache steps were being run as the ubuntu user; make
sure they are run as jenkins.

Also update the nodepool configuration file to current values and
include the jenkins credential id.

Change-Id: Icbe8bee3b1800e28034cd36d4d328a6793d55b0e
2013-08-20 19:58:38 -07:00
Monty Taylor
258abe1a23 Use cgit server instead of github for everything
We have a cgit server now, which means we should replace
all references to github with references to git.openstack.org.

Change-Id: I68ad1ce514fb4326c7d9940b5a84999af5b58562
2013-08-19 10:19:47 -07:00
James E. Blair
8222c6e00f Add nodepool host
Change-Id: Ib216bd400aa269ccdb17848b3870ab65400cf3d2
2013-08-16 13:15:42 -07:00