Migrate to puppet-openstackci openstackci::nodepool
Manage nodepool configurations using the common-ci solution in puppet-openstackci Remove nodepool.yaml.erb from this repo as openstackci::nodepool will pull it in from project-config/nodepool/nodepool.yaml Remove the tox nodepool environment and test dependency as it has been migrated to project-config The nodepool logging template file and associated tool that generates the file will remain in this repo. In the short term, updates to nodepool.yaml in project-config repo may require a related change in this repo to update the logging configuration. In the longer term, nodepool will be updated to automatically log image creations without needing a customized logging configuration. Depends-on: I89207d100eb4b6bbb502a6ed38831f49e4b29096 Depends-on: I473a1b78acdb035eb379394a7ed5f771434dc942 Depends-on: I6b01ab7260a41927fff34b9b81b631ea2c933f22 Change-Id: I2b45a7145805368b1598d3a3e8a94f0e4eb8cf2d
This commit is contained in:
parent
ab85caa5d6
commit
14fd503aaa
@ -14,11 +14,10 @@ At a Glance
|
|||||||
:Hosts:
|
:Hosts:
|
||||||
* nodepool.openstack.org
|
* nodepool.openstack.org
|
||||||
:Puppet:
|
:Puppet:
|
||||||
* https://git.openstack.org/cgit/openstack-infra/puppet-nodepool/tree/
|
* https://git.openstack.org/cgit/openstack-infra/puppet-openstackci/tree/manifests/nodepool.pp
|
||||||
* :file:`modules/openstack_project/manifests/nodepool_prod.pp`
|
|
||||||
* :file:`modules/openstack_project/manifests/single_use_slave.pp`
|
* :file:`modules/openstack_project/manifests/single_use_slave.pp`
|
||||||
:Configuration:
|
:Configuration:
|
||||||
* :file:`modules/openstack_project/templates/nodepool/nodepool.yaml.erb`
|
* :config:`nodepool/nodepool.yaml`
|
||||||
* :config:`nodepool/scripts/`
|
* :config:`nodepool/scripts/`
|
||||||
* :config:`nodepool/elements/`
|
* :config:`nodepool/elements/`
|
||||||
:Projects:
|
:Projects:
|
||||||
|
@ -647,17 +647,34 @@ node 'status.openstack.org' {
|
|||||||
|
|
||||||
# Node-OS: trusty
|
# Node-OS: trusty
|
||||||
node 'nodepool.openstack.org' {
|
node 'nodepool.openstack.org' {
|
||||||
|
$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')
|
||||||
|
$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")
|
||||||
class { 'openstack_project::server':
|
class { 'openstack_project::server':
|
||||||
sysadmins => hiera('sysadmins', []),
|
sysadmins => hiera('sysadmins', []),
|
||||||
iptables_public_tcp_ports => [80],
|
iptables_public_tcp_ports => [80],
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'openstack_project::nodepool_prod':
|
class { '::openstackci::nodepool':
|
||||||
|
vhost_name => 'nodepool.openstack.org',
|
||||||
project_config_repo => 'https://git.openstack.org/openstack-infra/project-config',
|
project_config_repo => 'https://git.openstack.org/openstack-infra/project-config',
|
||||||
mysql_password => hiera('nodepool_mysql_password'),
|
mysql_password => hiera('nodepool_mysql_password'),
|
||||||
mysql_root_password => hiera('nodepool_mysql_root_password'),
|
mysql_root_password => hiera('nodepool_mysql_root_password'),
|
||||||
nodepool_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
|
nodepool_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
|
||||||
|
oscc_file_contents => $clouds_yaml,
|
||||||
|
image_log_document_root => '/var/log/nodepool/image',
|
||||||
statsd_host => 'graphite.openstack.org',
|
statsd_host => 'graphite.openstack.org',
|
||||||
|
logging_conf_template => 'openstack_project/nodepool/nodepool.logging.conf.erb',
|
||||||
jenkins_masters => [
|
jenkins_masters => [
|
||||||
{
|
{
|
||||||
name => 'jenkins01',
|
name => 'jenkins01',
|
||||||
@ -709,18 +726,6 @@ node 'nodepool.openstack.org' {
|
|||||||
credentials => hiera('jenkins_credentials_id'),
|
credentials => hiera('jenkins_credentials_id'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
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'),
|
|
||||||
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'),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,89 +0,0 @@
|
|||||||
# == Class: openstack_project::nodepool_prod
|
|
||||||
#
|
|
||||||
class openstack_project::nodepool_prod(
|
|
||||||
$mysql_root_password,
|
|
||||||
$mysql_password,
|
|
||||||
$nodepool_ssh_private_key = '',
|
|
||||||
$nodepool_template = 'openstack_project/nodepool/nodepool.yaml.erb',
|
|
||||||
$nodepool_logging_template = 'openstack_project/nodepool/nodepool.logging.conf.erb',
|
|
||||||
$vhost_name = 'nodepool.openstack.org',
|
|
||||||
$statsd_host = '',
|
|
||||||
$jenkins_masters = [],
|
|
||||||
$rackspace_username ='',
|
|
||||||
$rackspace_password ='',
|
|
||||||
$rackspace_project ='',
|
|
||||||
$hpcloud_username ='',
|
|
||||||
$hpcloud_password ='',
|
|
||||||
$hpcloud_project ='',
|
|
||||||
$ovh_username ='',
|
|
||||||
$ovh_password ='',
|
|
||||||
$ovh_project ='',
|
|
||||||
$tripleo_username ='',
|
|
||||||
$tripleo_password ='',
|
|
||||||
$tripleo_project ='',
|
|
||||||
$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 { 'project_config':
|
|
||||||
url => $project_config_repo,
|
|
||||||
}
|
|
||||||
|
|
||||||
class { '::nodepool':
|
|
||||||
mysql_root_password => $mysql_root_password,
|
|
||||||
mysql_password => $mysql_password,
|
|
||||||
nodepool_ssh_private_key => $nodepool_ssh_private_key,
|
|
||||||
vhost_name => $vhost_name,
|
|
||||||
statsd_host => $statsd_host,
|
|
||||||
image_log_document_root => $image_log_document_root,
|
|
||||||
enable_image_log_via_http => $enable_image_log_via_http,
|
|
||||||
scripts_dir => $::project_config::nodepool_scripts_dir,
|
|
||||||
elements_dir => $::project_config::nodepool_elements_dir,
|
|
||||||
require => $::project_config::config_dir,
|
|
||||||
logging_conf_template => $nodepool_logging_template,
|
|
||||||
jenkins_masters => $jenkins_masters,
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/etc/nodepool/nodepool.yaml':
|
|
||||||
ensure => present,
|
|
||||||
owner => 'nodepool',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0400',
|
|
||||||
content => template($nodepool_template),
|
|
||||||
require => [
|
|
||||||
File['/etc/nodepool'],
|
|
||||||
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'],
|
|
||||||
],
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -2,4 +2,3 @@ hacking>=0.5.6,<0.8
|
|||||||
Sphinx>=1.1.2,<1.2
|
Sphinx>=1.1.2,<1.2
|
||||||
oslosphinx
|
oslosphinx
|
||||||
bashate>=0.2
|
bashate>=0.2
|
||||||
-e git://git.openstack.org/openstack-infra/nodepool#egg=nodepool
|
|
||||||
|
@ -28,7 +28,8 @@ import yaml
|
|||||||
|
|
||||||
# default paths and outputs
|
# default paths and outputs
|
||||||
MODULES_PATH = '../modules/openstack_project/templates/nodepool'
|
MODULES_PATH = '../modules/openstack_project/templates/nodepool'
|
||||||
CONFIG_FILE = MODULES_PATH + '/nodepool.yaml.erb'
|
# default the project-config repo path to the same folder as this repo
|
||||||
|
CONFIG_FILE = '../../project-config/nodepool/nodepool.yaml'
|
||||||
LOGGING_CONFIG_FILE = MODULES_PATH + '/nodepool.logging.conf.erb'
|
LOGGING_CONFIG_FILE = MODULES_PATH + '/nodepool.logging.conf.erb'
|
||||||
LOG_DIR = '/var/log/nodepool'
|
LOG_DIR = '/var/log/nodepool'
|
||||||
IMAGE_LOG_DIR = '<%= @image_log_document_root %>'
|
IMAGE_LOG_DIR = '<%= @image_log_document_root %>'
|
||||||
|
3
tox.ini
3
tox.ini
@ -26,8 +26,5 @@ select = H231
|
|||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
commands = {toxinidir}/tools/run-bashate.sh
|
commands = {toxinidir}/tools/run-bashate.sh
|
||||||
|
|
||||||
[testenv:nodepool]
|
|
||||||
commands = nodepool -c {toxinidir}/modules/openstack_project/templates/nodepool/nodepool.yaml.erb config-validate
|
|
||||||
|
|
||||||
[testenv:modulesenv]
|
[testenv:modulesenv]
|
||||||
commands = python {toxinidir}/tools/sorted_modules_env.py {toxinidir}/modules.env
|
commands = python {toxinidir}/tools/sorted_modules_env.py {toxinidir}/modules.env
|
||||||
|
Loading…
Reference in New Issue
Block a user