From 0091739002c3750360874652f015e8378906c67c Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 26 May 2016 08:28:30 -0700 Subject: [PATCH] Add static zuul launcher To handle the jenkins slaves attached to jenkins.o.o. Change-Id: I070cbb546af848b3417dfce194f4b81e8340e419 Depends-On: I4d51a9367d1c0547daec242d5b03a19aa7b9969b --- manifests/site.pp | 132 ++++++++++++------ .../files/puppetmaster/groups.txt | 2 +- .../manifests/zuul_launcher.pp | 2 + 3 files changed, 93 insertions(+), 43 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 7a63936e67..a3d9cc44c5 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -7,6 +7,47 @@ # $elasticsearch_nodes = hiera_array('elasticsearch_nodes') $elasticsearch_clients = hiera_array('elasticsearch_clients') +$zuul_sites = [ + { + name => 'tarballs.openstack.org', + host => 'tarballs.openstack.org', + user => 'jenkins', + root => '/srv/static', + }, + { + name => 'eavesdrop.openstack.org', + host => 'eavesdrop.openstack.org', + user => 'jenkins', + root => '/srv/static', + }, + { + name => 'static.openstack.org', + host => 'static.openstack.org', + user => 'jenkins', + root => '/srv/static', + }, + { + name => 'docs.openstack.org', + host => 'ftp3.ftptoyoursite.com', + user => 'openstackdocs', + pass => hiera('openstackdocs_ftp_password'), + root => '/web/content', + }, + { + name => 'api.openstack.org', + host => 'ftp3.ftptoyoursite.com', + user => 'cloudapidocs', + pass => hiera('cloudapidocs_ftp_password'), + root => '/web/content', + }, + { + name => 'developer.openstack.org', + host => 'ftp3.ftptoyoursite.com', + user => 'clouddevdocs', + pass => hiera('clouddevdocs_ftp_password'), + root => '/web/content', + }, +] # # Default: should at least behave like an openstack server @@ -880,6 +921,54 @@ node 'zuul.openstack.org' { } } +# Node-OS: trusty +node /^zlstatic\d+\.openstack\.org$/ { + $group = "zuul-merger" + $zmq_event_receivers = ['logstash.openstack.org', + 'nodepool.openstack.org'] + $zmq_iptables_rule = regsubst($zmq_event_receivers, + '^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 8888 -s \1 -j ACCEPT') + $iptables_rule = flatten([$zmq_iptables_rule]) + class { 'openstack_project::server': + iptables_rules6 => $iptables_rule, + iptables_rules4 => $iptables_rule, + sysadmins => hiera('sysadmins', []), + puppetmaster_server => 'puppetmaster.openstack.org', + } + class { 'openstack_project::zuul_launcher': + gearman_server => 'zuul.openstack.org', + gerrit_server => 'review.openstack.org', + gerrit_user => 'jenkins', + gerrit_ssh_host_key => hiera('gerrit_ssh_rsa_pubkey_contents'), + zuul_ssh_private_key => hiera('jenkins_ssh_private_key_contents'), + project_config_repo => 'https://git.openstack.org/openstack-infra/project-config', + sysadmins => hiera('sysadmins', []), + sites => $zuul_sites, + nodes => [ + { + name => 'proposal.slave.openstack.org', + host => 'proposal.slave.openstack.org', + labels => 'proposal', + }, + { + name => 'release.slave.openstack.org', + host => 'release.slave.openstack.org', + labels => 'release', + }, + { + name => 'wheel-mirror-centos-7.amd64.slave.openstack.org', + host => 'wheel-mirror-centos-7.amd64.slave.openstack.org', + labels => 'wheel-mirror-centos-7-amd64', + }, + { + name => 'wheel-mirror-ubuntu-trusty-amd64.slave.openstack.org', + host => 'wheel-mirror-centos-7.amd64.slave.openstack.org', + labels => 'proposal', + }, + ], + } +} + # Node-OS: trusty node /^zl\d+\.openstack\.org$/ { $group = "zuul-merger" @@ -902,51 +991,10 @@ node /^zl\d+\.openstack\.org$/ { zuul_ssh_private_key => hiera('jenkins_ssh_private_key_contents'), project_config_repo => 'https://git.openstack.org/openstack-infra/project-config', sysadmins => hiera('sysadmins', []), - sites => [ - { - name => 'tarballs.openstack.org', - host => 'tarballs.openstack.org', - user => 'jenkins', - root => '/srv/static', - }, - { - name => 'eavesdrop.openstack.org', - host => 'eavesdrop.openstack.org', - user => 'jenkins', - root => '/srv/static', - }, - { - name => 'static.openstack.org', - host => 'static.openstack.org', - user => 'jenkins', - root => '/srv/static', - }, - { - name => 'docs.openstack.org', - host => 'ftp3.ftptoyoursite.com', - user => 'openstackdocs', - pass => hiera('openstackdocs_ftp_password'), - root => '/web/content', - }, - { - name => 'api.openstack.org', - host => 'ftp3.ftptoyoursite.com', - user => 'cloudapidocs', - pass => hiera('cloudapidocs_ftp_password'), - root => '/web/content', - }, - { - name => 'developer.openstack.org', - host => 'ftp3.ftptoyoursite.com', - user => 'clouddevdocs', - pass => hiera('clouddevdocs_ftp_password'), - root => '/web/content', - }, - ], + sites => $zuul_sites, } } - # Node-OS: precise # Node-OS: trusty node /^zm\d+\.openstack\.org$/ { diff --git a/modules/openstack_project/files/puppetmaster/groups.txt b/modules/openstack_project/files/puppetmaster/groups.txt index c97362143a..ed7ca454e3 100644 --- a/modules/openstack_project/files/puppetmaster/groups.txt +++ b/modules/openstack_project/files/puppetmaster/groups.txt @@ -4,7 +4,7 @@ subunit-worker ~subunit-worker\d+\.openstack\.org elasticsearch ~elasticsearch0[1-7]\.openstack\.org git-loadbalancer ~git(-fe\d+)?\.openstack\.org git-server ~git\d+\.openstack\.org -zuul-merger ~z[lm]\d+\.openstack\.org +zuul-merger ~z[lm](static)?\d+\.openstack\.org ci-backup ci-backup-*.openstack.org afsdb afsdb*.openstack.org afs afs*.*.openstack.org diff --git a/modules/openstack_project/manifests/zuul_launcher.pp b/modules/openstack_project/manifests/zuul_launcher.pp index 5fc3d980f3..61f36d3267 100644 --- a/modules/openstack_project/manifests/zuul_launcher.pp +++ b/modules/openstack_project/manifests/zuul_launcher.pp @@ -32,6 +32,7 @@ class openstack_project::zuul_launcher( $worker_private_key_file = '/var/lib/zuul/ssh/id_rsa', $worker_username = 'jenkins', $sites = [], + $nodes = [], ) { class { '::project_config': @@ -72,6 +73,7 @@ class openstack_project::zuul_launcher( worker_private_key_file => $worker_private_key_file, worker_username => $worker_username, sites => $sites, + nodes => $nodes, } class { 'zuul::launcher': }