diff --git a/manifests/site.pp b/manifests/site.pp index 58b3348f85..ecb0e15eac 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1072,4 +1072,15 @@ node 'odsreg.openstack.org' { } } +# Node-OS: trusty +node 'codesearch.openstack.org' { + class { 'openstack_project::server': + iptables_public_tcp_ports => [80], + sysadmins => hiera('sysadmins', []), + } + class { 'openstack_project::codesearch': + project_config_repo => 'https://git.openstack.org/openstack-infra/project-config', + } +} + # vim:sw=2:ts=2:expandtab:textwidth=79 diff --git a/modules.env b/modules.env index c42e45f5f3..8ee63cfed9 100644 --- a/modules.env +++ b/modules.env @@ -88,6 +88,7 @@ INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-github"]="origin INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-grafyaml"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-graphite"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-haveged"]="origin/master" +INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-hound"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-httpd"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-iptables"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-jeepyb"]="origin/master" diff --git a/modules/openstack_project/manifests/codesearch.pp b/modules/openstack_project/manifests/codesearch.pp new file mode 100644 index 0000000000..467a7f7526 --- /dev/null +++ b/modules/openstack_project/manifests/codesearch.pp @@ -0,0 +1,35 @@ +# Class to configure hound on a node. +class openstack_project::codesearch ( + $project_config_repo, +) { + + class { 'project_config': + url => $project_config_repo, + } + + class { 'hound': + manage_config => false, + } + + include ::jeepyb + include ::logrotate + include ::pip + + file { '/home/hound/config.json': + ensure => 'present', + } + + exec { 'create-hound-config': + command => 'create-hound-config', + path => '/bin:/usr/bin:/usr/local/bin', + environment => "PROJECTS_YAML=${::project_config::jeepyb_project_file}", + user => 'hound', + cwd => '/home/hound', + require => [ + $::project_config::config_dir, + File['/home/hound'], + ], + notify => Service['hound'] + } + +}