Add a clouds.yaml file in anticipation of shade
As we move to using shade through nodepool, several things can consume clouds.yaml via os-client-config. ansible openstack modules can also read the file, as well as python-openstackclient. SO - if we start putting clouds.yaml files places, then we can opt in to using it instead of directories full of shell script env vars. Change-Id: If25ee14f06a4530da4779e062b1ad46238e44f2e
This commit is contained in:
parent
5dd8577042
commit
3ed43ca05f
@ -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'],
|
||||
],
|
||||
}
|
||||
}
|
||||
|
21
modules/openstack_project/templates/nodepool/clouds.yaml.erb
Normal file
21
modules/openstack_project/templates/nodepool/clouds.yaml.erb
Normal file
@ -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'
|
Loading…
Reference in New Issue
Block a user