From 0d23018f0e960d5dbb98525035c40f878a9653fc Mon Sep 17 00:00:00 2001 From: Spencer Krum Date: Tue, 2 Feb 2016 19:21:44 -0800 Subject: [PATCH] Add omfracloud to nodepool This adds the omfracloud jenkins account credentials to nodepool. I'm not pleased with the file resource in the node definition, but that node definiton grew huge and needs a refactor anyways so we can do that when we do it. I have verified that the correct keys are in hiera. Change-Id: Iafca5e86f72321c6aa7bef748ac2b1942539d15f --- manifests/site.pp | 48 +++++++++++-------- .../templates/nodepool/clouds.yaml.erb | 13 +++++ 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index be004a1e14..065c16d48d 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -651,25 +651,35 @@ node 'status.openstack.org' { # Node-OS: trusty node 'nodepool.openstack.org' { - $bluebox_username = hiera('nodepool_bluebox_username', 'username') - $bluebox_password = hiera('nodepool_bluebox_password') - $bluebox_project = hiera('nodepool_bluebox_project', 'project') - $rackspace_username = hiera('nodepool_rackspace_username', 'username') - $rackspace_password = hiera('nodepool_rackspace_password') - $rackspace_project = hiera('nodepool_rackspace_project', 'project') - $hpcloud_username = hiera('nodepool_hpcloud_username', 'username') - $hpcloud_password = hiera('nodepool_hpcloud_password') - $hpcloud_project = hiera('nodepool_hpcloud_project', 'project') - $internap_username = hiera('nodepool_internap_username', 'username') - $internap_password = hiera('nodepool_internap_password') - $internap_project = hiera('nodepool_internap_project', 'project') - $ovh_username = hiera('nodepool_ovh_username', 'username') - $ovh_password = hiera('nodepool_ovh_password') - $ovh_project = hiera('nodepool_ovh_project', 'project') - $tripleo_username = hiera('nodepool_tripleo_username', 'username') - $tripleo_password = hiera('nodepool_tripleo_password') - $tripleo_project = hiera('nodepool_tripleo_project', 'project') - $clouds_yaml = template("openstack_project/nodepool/clouds.yaml.erb") + $bluebox_username = hiera('nodepool_bluebox_username', 'username') + $bluebox_password = hiera('nodepool_bluebox_password') + $bluebox_project = hiera('nodepool_bluebox_project', 'project') + $rackspace_username = hiera('nodepool_rackspace_username', 'username') + $rackspace_password = hiera('nodepool_rackspace_password') + $rackspace_project = hiera('nodepool_rackspace_project', 'project') + $hpcloud_username = hiera('nodepool_hpcloud_username', 'username') + $hpcloud_password = hiera('nodepool_hpcloud_password') + $hpcloud_project = hiera('nodepool_hpcloud_project', 'project') + $internap_username = hiera('nodepool_internap_username', 'username') + $internap_password = hiera('nodepool_internap_password') + $internap_project = hiera('nodepool_internap_project', 'project') + $ovh_username = hiera('nodepool_ovh_username', 'username') + $ovh_password = hiera('nodepool_ovh_password') + $ovh_project = hiera('nodepool_ovh_project', 'project') + $tripleo_username = hiera('nodepool_tripleo_username', 'username') + $tripleo_password = hiera('nodepool_tripleo_password') + $tripleo_project = hiera('nodepool_tripleo_project', 'project') + $infracloud_username = hiera('nodepool_infracloud_username', 'username') + $infracloud_password = hiera('nodepool_infracloud_password') + $infracloud_project = hiera('nodepool_infracloud_project', 'project') + $clouds_yaml = template("openstack_project/nodepool/clouds.yaml.erb") + file { '/etc/openstack/infracloud_west_cacert.pem': + ensure => present, + owner => 'root', + group => 'root', + mode => '0600', + content => hiera('infracloud_hpuswest_ssl_cert_file_contents'), + } class { 'openstack_project::server': sysadmins => hiera('sysadmins', []), iptables_public_tcp_ports => [80], diff --git a/modules/openstack_project/templates/nodepool/clouds.yaml.erb b/modules/openstack_project/templates/nodepool/clouds.yaml.erb index 4aaed890ca..c616711a2b 100644 --- a/modules/openstack_project/templates/nodepool/clouds.yaml.erb +++ b/modules/openstack_project/templates/nodepool/clouds.yaml.erb @@ -46,3 +46,16 @@ clouds: username: '<%= internap_username %>' password: '<%= internap_password %>' project_name: '<%= internap_project %>' + infracloud-west: + region_name: RegionOne + auth: + username: '<%= infracloud_username %>' + password: '<%= infracloud_password %>' + project_name: '<%= infracloud_project %>' + user_domain_id: 'default' + project_domain_id: 'default' + auth_url: 'https://controller00.hpuswest.ic.openstack.org:35357/v3' + auth_type: 'v3password' + cacert: '/etc/openstack/infracloud_west_cacert.pem' + identity_api_version: '3' + floating_ip_source: 'None'