Merge "Fix logstash-filters test"
This commit is contained in:
commit
6969569a38
@ -53,6 +53,7 @@ class openstack_project::logstash_worker (
|
||||
notify => Service['logstash'],
|
||||
}
|
||||
|
||||
validate_array($elasticsearch_nodes) # needed by output.conf.erb
|
||||
class { '::logstash::indexer':
|
||||
input_template => 'openstack_project/logstash/input.conf.erb',
|
||||
output_template => 'openstack_project/logstash/output.conf.erb',
|
||||
|
@ -66,9 +66,9 @@ class helloworld {
|
||||
EOF
|
||||
|
||||
sudo mkdir -p /var/run/puppet
|
||||
sudo -E bash -x ./install_modules.sh
|
||||
echo "Running apply test primer to avoid setup races when run in parallel."
|
||||
./tools/test_puppet_apply.sh applytest/primer.pp
|
||||
|
||||
echo "Running apply test on these hosts:"
|
||||
find applytest -name 'puppetapplytest*.final' -print0
|
||||
find applytest -name 'puppetapplytest*.final' -print0 | \
|
||||
|
7
tools/logstash-filter-test.sh
Normal file → Executable file
7
tools/logstash-filter-test.sh
Normal file → Executable file
@ -19,14 +19,17 @@
|
||||
/usr/zuul-env/bin/zuul-cloner --workspace /tmp --cache-dir /opt/git \
|
||||
git://git.openstack.org \
|
||||
openstack-infra/logstash-filters
|
||||
sha=$(git --git-dir=/tmp/openstack-infra/logstash-filters/.git rev-parse HEAD)
|
||||
|
||||
cat > node.pp <<EOF
|
||||
\$elasticsearch_nodes = [ 'localhost' ]
|
||||
class { 'openstack_project::logstash_worker':
|
||||
filter_source => 'file:///tmp/openstack-infra/logstash-filters/.git',
|
||||
filter_rev => '${ZUUL_REF:-master}',
|
||||
filter_rev => '$sha',
|
||||
}
|
||||
EOF
|
||||
|
||||
sudo apt-get update # Update apt cache before running puppet
|
||||
sudo puppet apply --modulepath=${MODULE_PATH} --color=false --debug node.pp
|
||||
|
||||
/usr/bin/java -jar /opt/logstash/logstash.jar agent --configtest -f /etc/logstash/conf.d
|
||||
/opt/logstash/bin/logstash --configtest --config /etc/logstash/conf.d -w 1
|
||||
|
@ -25,16 +25,9 @@ export PUPPET_MANIFEST=${PUPPET_MANIFEST:-manifests/site.pp}
|
||||
|
||||
export PUPPET_INTEGRATION_TEST=1
|
||||
|
||||
# Remove previously-installed modules
|
||||
sudo rm -rf /etc/puppet/modules/*
|
||||
|
||||
cat > clonemap.yaml <<EOF
|
||||
clonemap:
|
||||
- name: '(.*?)/puppet-(.*)'
|
||||
dest: '/etc/puppet/modules/\2'
|
||||
- name: '(.*?)/ansible-role-(.*)'
|
||||
dest: '/etc/ansible/roles/\2'
|
||||
EOF
|
||||
|
||||
# These arrays are initialized here and populated in modules.env
|
||||
|
||||
# Array of modules to be installed key:value is module:version.
|
||||
@ -48,11 +41,22 @@ declare -A SOURCE_MODULES
|
||||
# key:value is source location, revision to checkout
|
||||
declare -A INTEGRATION_MODULES
|
||||
|
||||
source $MODULE_ENV_FILE
|
||||
|
||||
# Install SOURCE_MODULES
|
||||
sudo -E bash -x $ROOT/install_modules.sh
|
||||
|
||||
# Install INTEGRATION_MODULES
|
||||
cat > clonemap.yaml <<EOF
|
||||
clonemap:
|
||||
- name: '(.*?)/puppet-(.*)'
|
||||
dest: '/etc/puppet/modules/\2'
|
||||
- name: '(.*?)/ansible-role-(.*)'
|
||||
dest: '/etc/ansible/roles/\2'
|
||||
EOF
|
||||
|
||||
project_names="openstack-infra/ansible-role-puppet"
|
||||
|
||||
source $MODULE_ENV_FILE
|
||||
|
||||
for MOD in ${!INTEGRATION_MODULES[*]}; do
|
||||
project_scope=$(basename `dirname $MOD`)
|
||||
repo_name=`basename $MOD`
|
||||
@ -63,6 +67,7 @@ sudo -E /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
|
||||
git://git.openstack.org \
|
||||
$project_names
|
||||
|
||||
# Fix hostname lookups
|
||||
grep -v 127.0.1.1 /etc/hosts >/tmp/hosts
|
||||
HOST=`echo $HOSTNAME |awk -F. '{ print $1 }'`
|
||||
echo "127.0.1.1 $HOST.openstack.org $HOST" >> /tmp/hosts
|
||||
|
Loading…
Reference in New Issue
Block a user