diff --git a/modules/openstack_project/manifests/nodepool_prod.pp b/modules/openstack_project/manifests/nodepool_prod.pp index f2d0742af0..936c319bff 100644 --- a/modules/openstack_project/manifests/nodepool_prod.pp +++ b/modules/openstack_project/manifests/nodepool_prod.pp @@ -24,6 +24,7 @@ class openstack_project::nodepool_prod( $image_log_document_root = '/var/log/nodepool/image', $enable_image_log_via_http = true, $project_config_repo = '', + $clouds_yaml_template = 'openstack_project/nodepool/clouds.yaml.erb', ) { class { 'openstack_project::server': sysadmins => $sysadmins, @@ -59,4 +60,34 @@ class openstack_project::nodepool_prod( User['nodepool'], ], } + + file { '/home/nodepool/.config': + ensure => directory, + owner => 'nodepool', + group => 'nodepool', + require => [ + User['nodepool'], + ], + } + + file { '/home/nodepool/.config/openstack': + ensure => directory, + owner => 'nodepool', + group => 'nodepool', + require => [ + File['/home/nodepool/.config'], + ], + } + + file { '/home/nodepool/.config/openstack/clouds.yaml': + ensure => present, + owner => 'nodepool', + group => 'nodepool', + mode => '0400', + content => template($clouds_yaml_template), + require => [ + File['/home/nodepool/.config/openstack'], + User['nodepool'], + ], + } } diff --git a/modules/openstack_project/templates/nodepool/clouds.yaml.erb b/modules/openstack_project/templates/nodepool/clouds.yaml.erb new file mode 100644 index 0000000000..6531d675c4 --- /dev/null +++ b/modules/openstack_project/templates/nodepool/clouds.yaml.erb @@ -0,0 +1,21 @@ +clouds: + rax: + cloud: rackspace + region_name: DFW,ORD,IAD + auth: + username: '<%= rackspace_username %>' + password: '<%= rackspace_password %>' + project-id: '<%= rackspace_project %>' + hpcloud: + cloud: hp + region_name: region-a.geo-1,region-b.geo-1 + auth: + username: '<%= hpcloud_username %>' + password: '<%= hpcloud_password %>' + project-id: '<%= hpcloud_project %>' + tripleo-test-cloud-rh1: + auth: + username: '<%= tripleo_username %>' + password: '<%= tripleo_password %>' + project-id: '<%= tripleo_project %>' + auth-url: 'https://ci-overcloud.rh1.tripleo.org:13000/v2.0'