Merge "Manage clouds.yaml on puppetmaster with puppet"

This commit is contained in:
Jenkins 2015-11-27 16:47:18 +00:00 committed by Gerrit Code Review
commit 808cb9a785
4 changed files with 186 additions and 4 deletions

View File

@ -252,9 +252,10 @@ node 'puppetmaster.openstack.org' {
pin_puppet => '3.6.',
}
class { 'openstack_project::puppetmaster':
root_rsa_key => hiera('puppetmaster_root_rsa_key'),
jenkins_api_user => hiera('jenkins_api_user', 'username'),
jenkins_api_key => hiera('jenkins_api_key'),
root_rsa_key => hiera('puppetmaster_root_rsa_key'),
jenkins_api_user => hiera('jenkins_api_user', 'username'),
jenkins_api_key => hiera('jenkins_api_key'),
puppetmaster_clouds => hiera('puppetmaster_clouds'),
}
}

View File

@ -2,6 +2,7 @@
#
class openstack_project::puppetmaster (
$jenkins_api_key,
$puppetmaster_clouds,
$jenkins_api_user = 'hudson-openstack',
$root_rsa_key = 'xxx',
$puppetdb = true,
@ -75,7 +76,22 @@ class openstack_project::puppetmaster (
owner => 'root',
group => 'admin',
mode => '0750',
}
}
file { '/etc/openstack':
ensure => directory,
owner => 'root',
group => 'admin',
mode => '0750',
}
file { '/etc/openstack/clouds.yaml':
ensure => present,
owner => 'root',
group => 'root',
mode => '0600',
content => template('openstack_project/puppetmaster/ansible-clouds.yaml.erb'),
}
# For puppet master apache serving.
package { 'puppetmaster-passenger':

View File

@ -0,0 +1,122 @@
clouds:
admin-bluebox:
region_name: RegionOne
auth:
auth_url: https://montytaylor-sjc.openstack.blueboxgrid.com:5001/v2.0
username: <%= @puppetmaster_clouds['admin_bluebox_username'] %>
password: <%= @puppetmaster_clouds['admin_bluebox_password'] %>
project_name: <%= @puppetmaster_clouds['admin_bluebox_project_name'] %>
infra-files-ro:
profile: rackspace
auth:
username: <%= @puppetmaster_clouds['infra_files_ro_username'] %>
password: <%= @puppetmaster_clouds['infra_files_ro_password'] %>
project_name: <%= @puppetmaster_clouds['infra_files_ro_project_name'] %>
region_name: DFW
infra-files-rw:
profile: rackspace
auth:
username: <%= @puppetmaster_clouds['infra_files_rw_username'] %>
password: <%= @puppetmaster_clouds['infra_files_rw_password'] %>
project_name: <%= @puppetmaster_clouds['infra_files_rw_project_name'] %>
region_name: DFW
openstackci2-hpcloud:
profile: hp
auth:
username: <%= @puppetmaster_clouds['openstackci2_hpcloud_username'] %>
password: <%= @puppetmaster_clouds['openstackci2_hpcloud_password'] %>
project_name: <%= @puppetmaster_clouds['openstackci2_hpcloud_project_name'] %>
regions:
- region-a.geo-1
- region-b.geo-1
openstackci-bluebox:
region_name: RegionOne
auth:
auth_url: https://montytaylor-sjc.openstack.blueboxgrid.com:5001/v2.0
username: <%= @puppetmaster_clouds['openstackci_bluebox_username'] %>
password: <%= @puppetmaster_clouds['openstackci_bluebox_password'] %>
project_name: <%= @puppetmaster_clouds['openstackci_bluebox_project_name'] %>
openstackci-internap:
region_name: nyj01
profile: internap
auth:
username: <%= @puppetmaster_clouds['openstackci_internap_username'] %>
password: <%= @puppetmaster_clouds['openstackci_internap_password'] %>
project_name: <%= @puppetmaster_clouds['openstackci_internap_project_name'] %>
openstackjenkins-internap:
region_name: nyj01
profile: internap
auth:
username: <%= @puppetmaster_clouds['openstackjenkins_internap_username'] %>
password: <%= @puppetmaster_clouds['openstackjenkins_internap_password'] %>
project_name: <%= @puppetmaster_clouds['openstackjenkins_internap_project_name'] %>
openstackci-ovh:
regions:
- GRA1
- SBG1
profile: ovh
auth:
username: <%= @puppetmaster_clouds['openstackci_ovh_username'] %>
password: <%= @puppetmaster_clouds['openstackci_ovh_password'] %>
project_name: <%= @puppetmaster_clouds['openstackci_ovh_project_name'] %>
openstackci-rax:
regions:
- DFW
- ORD
- IAD
profile: rackspace
auth:
username: <%= @puppetmaster_clouds['openstackci_rax_username'] %>
password: <%= @puppetmaster_clouds['openstackci_rax_password'] %>
project_id: <%= @puppetmaster_clouds['openstackci_rax_project_id'] %>
openstackjenkins-hpcloud:
profile: hp
auth:
username: <%= @puppetmaster_clouds['openstackjenkins_hpcloud_username'] %>
password: <%= @puppetmaster_clouds['openstackjenkins_hpcloud_password'] %>
project_name: <%= @puppetmaster_clouds['openstackjenkins_hpcloud_project_name'] %>
regions:
- region-a.geo-1
- region-b.geo-1
openstackjenkins-bluebox:
region_name: RegionOne
auth:
auth_url: https://montytaylor-sjc.openstack.blueboxgrid.com:5001/v2.0
username: <%= @puppetmaster_clouds['openstackjenkins_bluebox_username'] %>
password: <%= @puppetmaster_clouds['openstackjenkins_bluebox_password'] %>
project_name: <%= @puppetmaster_clouds['openstackjenkins_bluebox_project_name'] %>
openstackjenkins-rax:
regions:
- DFW
- ORD
- IAD
profile: rackspace
auth:
username: <%= @puppetmaster_clouds['openstackjenkins_rax_username'] %>
password: <%= @puppetmaster_clouds['openstackjenkins_rax_password'] %>
project_id: <%= @puppetmaster_clouds['openstackjenkins_rax_project_id'] %>
openstackjenkins-ovh:
regions:
- GRA1
- SBG1
profile: ovh
auth:
username: <%= @puppetmaster_clouds['openstackjenkins_ovh_username'] %>
password: <%= @puppetmaster_clouds['openstackjenkins_ovh_password'] %>
project_name: <%= @puppetmaster_clouds['openstackjenkins_ovh_project_name'] %>
openstack-rax:
regions:
- DFW
- ORD
- IAD
profile: rackspace
auth:
username: <%= @puppetmaster_clouds['openstack_rax_username'] %>
password: <%= @puppetmaster_clouds['openstack_rax_password'] %>
project_id: <%= @puppetmaster_clouds['openstack_rax_project_id'] %>
openstack-nodepool-tripleo:
auth:
auth_url: https://ci-overcloud.rh1.tripleo.org:13000/v2.0
username: <%= @puppetmaster_clouds['openstack_nodepool_tripleo_username'] %>
password: <%= @puppetmaster_clouds['openstack_nodepool_tripleo_password'] %>
project_name: <%= @puppetmaster_clouds['openstack_nodepool_tripleo_project_name'] %>

View File

@ -0,0 +1,43 @@
clouds:
openstackci2-hpcloud:
profile: hp
auth:
username: <%= @puppetmaster_clouds['openstackci2_hpcloud_username'] %>
password: <%= @puppetmaster_clouds['openstackci2_hpcloud_password'] %>
project_name: <%= @puppetmaster_clouds['openstackci2_hpcloud_project_name'] %>
regions:
- region-a.geo-1
- region-b.geo-1
openstackci-bluebox:
region_name: RegionOne
auth:
auth_url: https://montytaylor-sjc.openstack.blueboxgrid.com:5001/v2.0
username: <%= @puppetmaster_clouds['openstackci_bluebox_username'] %>
password: <%= @puppetmaster_clouds['openstackci_bluebox_password'] %>
project_name: <%= @puppetmaster_clouds['openstackci_bluebox_project_name'] %>
openstackci-internap:
region_name: nyj01
profile: internap
auth:
username: <%= @puppetmaster_clouds['openstackci_internap_username'] %>
password: <%= @puppetmaster_clouds['openstackci_internap_password'] %>
project_name: <%= @puppetmaster_clouds['openstackci_internap_project_name'] %>
openstackci-ovh:
regions:
- GRA1
- SBG1
profile: ovh
auth:
username: <%= @puppetmaster_clouds['openstackci_ovh_username'] %>
password: <%= @puppetmaster_clouds['openstackci_ovh_password'] %>
project_name: <%= @puppetmaster_clouds['openstackci_ovh_project_name'] %>
openstackci-rax:
regions:
- DFW
- ORD
- IAD
profile: rackspace
auth:
username: <%= @puppetmaster_clouds['openstackci_rax_username'] %>
password: <%= @puppetmaster_clouds['openstackci_rax_password'] %>
project_id: <%= @puppetmaster_clouds['openstackci_rax_project_id'] %>