20 Commits

Author SHA1 Message Date
Alex Schultz
7f9907baa6 Drop puppet3 support
Puppet 3 was EOL as of December 31, 2016. Since we don't use it in the
gate for Pike, let's drop the configuration bits in p-o-i for it. This
change leaves the PUPPET_MAJ_VERSION support on the off chance we need
it in the future but basically 4 is currently the only supported
version.

Change-Id: I0f04a3cb194ec2225010fb4e062703195b79baf1
2017-05-26 13:43:35 -06:00
Alfredo Moralejo
845c3288f3 Clean messages in console in puppet errors
I think warning messages doesn't add much value in console
and sometimes we miss messages with (err).

Change-Id: Ic06ad59f71393dcc2f0f861e45d367fb835a14fc
2017-03-08 17:10:32 +01:00
Alex Schultz
5a078e69d3 Fix puppet log move for non-root
If you run something like all-in-one.sh as a non-root user, it will fail
when it goes to move the puppet log file. We need to run it as sudo if
the user is not root.

Change-Id: I8b9d7e587f31a82fb4b59de770882139fd168667
2016-12-02 21:20:31 +00:00
Alex Schultz
e4c6f48efa Split out puppet logs
To improve troubleshooting and readability, let's not have the puppet
logs print to the console.  This change updates the puppet apply to
output the logs to puppet.log which will still be captured and provided
in the CI results.  When the puppet apply fails, we will grep for
warnings and errors from the puppet log and only print those out which
should simplify troubleshooting failures.

Change-Id: I1084223f805f1960aebb9c5868fdef84ff3667e4
2016-11-01 14:41:01 -06:00
Matthew J. Black
305cfa5e61 Update cp line to remove redundant param
The use of -r for cp command is redundant with -a being used as
documentation on Linux has -R and -r as the same parameter. The
issue on Mac OS X is that it will error on about using -R and -r
with cp. Change removes redundant -r from cp command.

Change-Id: If7122efc8b84f8aa8a07fe4f8ee7568a048c9461
2016-09-23 16:03:57 -04:00
David Moreau-Simard
c2551e6145 Allow p-o-i to install itself from current source when used without Zuul
puppet-openstack-integration currently takes care of installing itself.
This is done through the Puppetfile which references the p-o-i repository.

This works with zuul-cloner because Zuul with ensure the current reference
is cloned.
However, when running outside of the gate, this means that p-o-i will
completely disregard any local code and instead install from the git source
specified in the Puppetfile.

Change-Id: I665347dbede2c53bd5537d4a29d07bfe679c50e5
2016-09-21 14:52:56 -04:00
Emilien Macchi
918f49b085 Unpin Puppetlabs release package
Puppetlabs release package was fixed so we can unpin it in our CI.

Change-Id: Ie18ff211b919b8ae4bc5a6d28ab8afe948991ed4
2016-09-09 16:12:28 +00:00
Emilien Macchi
834ab8a5fb Align the stars to bring our CI back
1) Add 2GB swap by default
Add some swap when running CI jobs, so we can reduce the number of
failures in CI related to missing memory.
By default 2GB, can be disabled or increased/decreased with parameters.

2) Promote RDO repository to have Oslo DB from master
python-oslo-db 4.13.x releases are known to break Gnocchi.
https://review.openstack.org/367221 will fix it, but it is not yet
in any release, so RDO unpinned oslo.db until that happens.

3) Disable Ironic testing on Ubuntu. Packages are broken in recent
   Newton upgrade. They are working on it.

4) Enable br_netfilter kernel module on Ubuntu.
See https://bugs.launchpad.net/cloud-archive/+bug/1621651
Even if it's not critical, it's a nice-to-have because it removed the
ERROR that we had in neutron logs. We'll see how the bug report evolve
and maybe remove this workaround.

5) Export lsmod in logs, easier for us to debug later.

6) Disable linuxbridge on scenario003 for Ubuntu
Also see https://bugs.launchpad.net/cloud-archive/+bug/1621651

7) Pin Puppetlabs release package.
Context: https://tickets.puppetlabs.com/browse/CPR-378

Change-Id: I732ef375a681f03af751ebb6ebd5b12df55a0ecc
2016-09-08 20:33:20 -04:00
Emilien Macchi
b1343de9bc functions: clone poi mitaka when cloning ceph/hammer
When submitting a patch in puppet-ceph stable/hammer, we want to clone
puppet-openstack-integration from stable/mitaka.

This patch makes sure of that.

Change-Id: I7a7190f0c9e7257f74672d8a8d63678706c63243
2016-08-15 13:10:55 +00:00
Emilien Macchi
038af6ec7c Workaround for puppet-ceph zuul-cloning
Currently, puppet-ceph stable/hammer CI tries to clone Puppet OpenStack
modules using stable/hammer branch but they don't have it, only
puppet-ceph does.
We need to override ZUUL_BRANCH with a fake 'stable/mitaka' for Puppet
OpenStack modules and then checkout 'stable/hammer' for puppet-ceph.

This workaround will allow us to:
* test puppet-ceph/hammer with mitaka modules
* test puppet-ceph/master with newton and beyond modules

Note: for our r10k users, no problem, they use git to checkout the right
branch, so they don't have the bug.

Change-Id: I004ee95e6bd97992aeebd08447396e3b8a29e09f
2016-08-04 19:02:26 +00:00
Alex Schultz
581e13e6b8 Add hiera support
This change adds hiera support into the scenarios so we can override
items via the common.yaml heira file if need be. This change adds
support for two environment variables with run_tests.sh.

HIERA_CONFIG - full path to the hiera yaml configuration file
MANAGE_HIERA - used to enable/disable writing out a hiera.yaml config
file

Change-Id: Iad0050e09e0cc610e0eadc00e328151e88eee10e
2016-07-15 20:49:10 +00:00
David Moreau-Simard
22c29c79ac Ensure $GEM_BIN_DIR is in $PATH
This makes gem binary usage consistent (i.e, r10k) and prevents
encoutering a command not found error.

Change-Id: I3ef01274417cd88403d71af0e6216850d77cc81c
Closes-Bug: #1592113
2016-06-13 14:11:46 -04:00
Emilien Macchi
5210671dbb refacto: move run_puppet & catch_selinux_alerts into functions
Change-Id: I78324c8787b129e91f1ac32694085bde5b6043fe
2016-06-09 22:09:00 +00:00
Emilien Macchi
c309447bc1 refacto: create install_puppet function
Change-Id: Iefed86a09eaf4e571d38c801f79e9fc989bc57d6
2016-06-09 13:11:05 +00:00
Emilien Macchi
48ab117d2e functions: add defaults for ZUUL_BRANCH & ZUUL_REF
When running periodic jobs, ZUUL_BRANCH & ZUUL_REF are empty because we
don't have any reference or branch set for the jobs.
To not make zuul failing when cloning Puppet modules, let's set defaults
values:

ZUUL_BRANCH default to master (we are running tests against master now)
If we need to test stable branches, we'll revisit later but it would be
a bigger change (job names, etc).

ZUUL_REF default to None.

Change-Id: I34b298230bc174a3fdd431095043543c4c223296
2016-04-20 09:42:31 -04:00
Alex Schultz
20730feff0 Add a function for generating action headers
In order to help be able to determine what part of the script a failure
occurs in, this change adds a print header function and updates the
shell scripts to print some header information for various actions.

Change-Id: I8e622c4d1c9c03aa3dbcb27712a346ce3284003f
2016-04-14 14:57:22 -06:00
Sofer Athlan-Guyot
0de28fbab3 Fix rspec testing outside of the Openstack CI.
When testing rspec locally the r10k binary is never found because the
GEM_BIN_DIR is wrongly set to GEM_HOME/bin.  GEM_HOME is set by bundler
and GEM_HOME/bin do not point where bundler put the binary.  The
binaries are handled by bundler by changing the PATH.  rbenv, use
similar tricks.

install_all is only used outside of the CI, so this modification
wouldn't change anything as far as the official CI is concerned.

Change-Id: I07668d64f9adf6713f5c267cf45650ba92ee0b9c
Closes-Bug: 1550331
2016-02-26 14:03:16 +01:00
Emilien Macchi
e1c20c9b1f Create manifests directory for common bits
Change-Id: Ibf7d3aa962e2e0727f0593f70186521602c48ca6
2015-11-18 15:09:18 +00:00
Emilien Macchi
6b87e4026f Implement all-in-one.sh script
This script will help newcomers to run this script and deploy a simple
scenario of an OpenStack Cloud with Puppet OpenStack modules.

Change-Id: I559e5e0a0d21a02d04b3d999b77dee23bb38c341
2015-11-06 08:58:37 -05:00
Emilien Macchi
acb145de32 Create functions for common bits
* Move out some code from install_modules.sh to have a functions script.
* Update install_modules.sh script to use functions.

Change-Id: Ie87b8eac71d5edb555e9a1637bea84bc9e268497
2015-10-06 15:57:56 +00:00