Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7f88652
Fix for [PRD-1792] MySQL wants to reverse resolve
Miroslav-Anashkin Oct 9, 2013
6ed658e
Fix [PRD-1792] MySQL wants to reverse resolve
Miroslav-Anashkin Oct 9, 2013
cff1dda
Type and provider for quantum_floatingip_pool
Oct 20, 2013
cc1508f
Parser function for calculate autogenerated floatingip pool size
Oct 21, 2013
3365d04
Make router, net, subnet more enshurable.
Oct 21, 2013
65bae7e
add ipsort function for RHOS deployment order
mattymo Oct 22, 2013
38d2740
Fixup some un-needed string interpolations
Oct 9, 2013
ab8adbe
Fix ceph module syntax erros
Oct 24, 2013
6d749a1
Merge pull request #748 from xenolog/PRD-2357
Oct 25, 2013
4c79587
Define CPU mode none for virtual, host-model for HW cases
bogdando Oct 24, 2013
e595da5
Fix isvirtual flag for logging class
bogdando Oct 25, 2013
214d0c3
Fix isvirtual case only for checksum_bootpc as well
bogdando Oct 25, 2013
21935db
Merge pull request #757 from bogdando/fix_isvirtual
Oct 25, 2013
4a0d836
Merge pull request #752 from mattymo/PRD-2412
Oct 25, 2013
aa60172
Merge pull request #755 from xarses/fix_errs
Oct 28, 2013
19c2324
always enable haproxy for swift or radosgw in HA
Oct 21, 2013
c65c5bd
[PRD-2360] Radosgw wont start on multiple controllers
Oct 20, 2013
9869ea6
Merge pull request #749 from xarses/ceph-swift-haproxy
Oct 29, 2013
e3e7b92
Merge pull request #743 from xarses/prd-2360
Oct 29, 2013
295de1c
Merge pull request #742 from xenolog/PRD-2373
Oct 30, 2013
374c048
Logging improvements
Oct 31, 2013
b8c1eb4
Merge pull request #769 from teran/master
Oct 31, 2013
de481c9
Merge pull request #753 from bogdando/fix_prd1950
Nov 5, 2013
df58134
Merge pull request #671 from xarses/fix-some-quotes
Nov 5, 2013
06742b3
Rebased to current Mirantis/fuel/master
Miroslav-Anashkin Nov 6, 2013
faab27b
Aligned formatting to check if Jenkins build fails on such commits
Miroslav-Anashkin Nov 6, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deployment/puppet/ceph/manifests/mon.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
exec {'ceph-deploy mon create':
command => "ceph-deploy mon create ${::hostname}:${::internal_address}",
logoutput => true,
unless => 'ceph mon stat | grep ${::internal_address}',
unless => "ceph mon stat | grep ${::internal_address}",
# TODO: need method to update mon_nodes in ceph.conf
}

Expand Down
27 changes: 9 additions & 18 deletions deployment/puppet/ceph/manifests/radosgw.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
$keyring_path = '/etc/ceph/keyring.radosgw.gateway',
$radosgw_auth_key = 'client.radosgw.gateway',
$rgw_user = $::ceph::params::user_httpd,
$use_ssl = $::ceph::use_ssl,

# RadosGW settings
$rgw_host = $::ceph::rgw_host,
Expand Down Expand Up @@ -184,24 +185,16 @@
mode => '0755',
}

exec { "ceph-create-radosgw-keyring-on ${name}":
command => "ceph-authtool --create-keyring ${keyring_path}",
creates => $keyring_path,
exec { "ceph create ${radosgw_auth_key}":
command => "ceph auth get-or-create ${radosgw_auth_key} osd 'allow rwx' mon 'allow rw'",
}

file { $keyring_path: mode => '0640', }

exec { "ceph-generate-key-on ${name}":
command => "ceph-authtool ${keyring_path} -n ${radosgw_auth_key} --gen-key",
}

exec { "ceph-add-capabilities-to-the-key-on ${name}":
command => "ceph-authtool -n ${radosgw_auth_key} --cap osd 'allow rwx' --cap mon 'allow rw' ${keyring_path}",
exec { "Populate ${radosgw_auth_key} keyring":
command => "ceph auth get-or-create ${radosgw_auth_key} > ${keyring_path}",
creates => $keyring_path
}

exec { "ceph-add-to-ceph-keyring-entries-on ${name}":
command => "ceph -k /etc/ceph/ceph.client.admin.keyring auth add ${radosgw_auth_key} -i ${keyring_path}",
}
file { $keyring_path: mode => '0640', }

Ceph_conf <||> ->
Package[$::ceph::params::package_httpd] ->
Expand All @@ -217,11 +210,9 @@
$dir_httpd_root,
$rgw_nss_db_path,
$rgw_log_file,]] ->
Exec["ceph-create-radosgw-keyring-on ${name}"] ->
Exec["ceph create ${radosgw_auth_key}"] ->
Exec["Populate ${radosgw_auth_key} keyring"] ->
File[$keyring_path] ->
Exec["ceph-generate-key-on ${name}"] ->
Exec["ceph-add-capabilities-to-the-key-on ${name}"] ->
Exec["ceph-add-to-ceph-keyring-entries-on ${name}"] ->
Firewall['012 RadosGW allow'] ~>
Service ['httpd'] ~>
Service['radosgw']
Expand Down
17 changes: 11 additions & 6 deletions deployment/puppet/horizon/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
$wsgi_user = $::horizon::params::apache_user
$wsgi_group = $::horizon::params::apache_group

package { ["$::horizon::params::http_service", "$::horizon::params::http_modwsgi"]:
package { [$::horizon::params::http_service,
$::horizon::params::http_modwsgi]:
ensure => present,
}

Expand Down Expand Up @@ -100,7 +101,8 @@
}

if $generate_sslcert_names {
$sslcert_pair = regsubst([$::horizon::params::ssl_cert_file, $::horizon::params::ssl_key_file],
$sslcert_pair = regsubst([$::horizon::params::ssl_cert_file,
$::horizon::params::ssl_key_file],
'(.+\/).+(\..+)', "\1${::domain}\2")

$ssl_cert_file = $sslcert_pair[0]
Expand Down Expand Up @@ -169,7 +171,8 @@
owner => root,
group => root,
content => "LoadModule wsgi_module modules/mod_wsgi.so\n",
require => Package["$::horizon::params::http_service", "$::horizon::params::http_modwsgi"],
require => Package[$::horizon::params::http_service,
$::horizon::params::http_modwsgi],
before => Package['dashboard'],
} # ensure there is a HTTP redirect from / to /dashboard

Expand All @@ -180,7 +183,7 @@
}
}

augeas { "remove_listen_directive":
augeas { 'remove_listen_directive':
context => "/files/etc/httpd/conf/httpd.conf",
changes => [
"rm directive[. = 'Listen']"
Expand Down Expand Up @@ -217,8 +220,10 @@
name => $::horizon::params::http_service,
ensure => 'running',
enable => true,
require => Package["$::horizon::params::http_service", "$::horizon::params::http_modwsgi"],
subscribe => File["$::horizon::params::local_settings_path", "$::horizon::params::logdir"]
require => Package[$::horizon::params::http_service,
$::horizon::params::http_modwsgi],
subscribe => File[$::horizon::params::local_settings_path,
$::horizon::params::logdir],
}

if $cache_server_ip =~ /^127\.0\.0\.1/ {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ def create_endpoint()
raise(Puppet::ParseError, "get_network_role_property(...): You must call prepare_network_config(...) first!")
end

Puppet.debug "stage1@generate_network_config:config_hash: #{config_hash.inspect}"

# define internal puppet parameters for creating resources
res_factory = {
:br => { :name_of_resource => 'l23network::l2::bridge' },
Expand All @@ -142,6 +144,8 @@ def create_endpoint()
end
end

Puppet.debug "stage2@generate_network_config:res_factory: #{res_factory.inspect}"

# collect interfaces and endpoints
endpoints = {}
born_ports = []
Expand All @@ -150,6 +154,9 @@ def create_endpoint()
endpoints[int_name] = create_endpoint()
born_ports.insert(-1, int_name)
end

Puppet.debug "stage3@generate_network_config:endpoints: #{endpoints.inspect}"

config_hash[:endpoints].each do |e_name, e_properties|
e_name = e_name.to_sym()
if not endpoints[e_name]
Expand Down Expand Up @@ -177,6 +184,8 @@ def create_endpoint()
end
end

Puppet.debug "stage4@generate_network_config:endpoints: #{endpoints.inspect}"

# execute transformations
# todo: if provider="lnx" execute transformations for LNX bridges
transformation_success = []
Expand All @@ -189,6 +198,8 @@ def create_endpoint()
action = t[:action].to_sym()
end

Puppet.debug "stage5@generate_network_config:action: #{action.inspect}"

trans = L23network.sanitize_transformation(t)
resource = res_factory[action][:resource]
p_resource = Puppet::Parser::Resource.new(
Expand All @@ -197,9 +208,15 @@ def create_endpoint()
:scope => self,
:source => resource
)

Puppet.debug "stage6@generate_network_config:p_resource: #{p_resource.inspect}"

trans.select{|k,v| k != :action}.each do |k,v|
p_resource.set_parameter(k,v)
end

Puppet.debug "stage7@generate_network_config:p_resource: #{p_resource.inspect}"

p_resource.set_parameter(:require, [previous]) if previous
resource.instantiate_resource(self, p_resource)
compiler.add_resource(self, p_resource)
Expand All @@ -225,12 +242,20 @@ def create_endpoint()
:scope => self,
:source => resource
)

Puppet.debug "stage8@generate_network_config:p_resource: #{p_resource.inspect}"

p_resource.set_parameter(:interface, endpoint_name)

Puppet.debug "stage9@generate_network_config:p_resource: #{p_resource.inspect}"

# set ipaddresses
if endpoint_body[:IP].empty?
p_resource.set_parameter(:ipaddr, 'none')
Puppet.debug "stage10@generate_network_config:p_resource: #{p_resource.inspect}"
elsif ['none','dhcp'].index(endpoint_body[:IP][0])
p_resource.set_parameter(:ipaddr, endpoint_body[:IP][0])
Puppet.debug "stage11@generate_network_config:p_resource: #{p_resource.inspect}"
else
ipaddrs = []
endpoint_body[:IP].each do |i|
Expand All @@ -241,18 +266,27 @@ def create_endpoint()
end
end
p_resource.set_parameter(:ipaddr, ipaddrs)
Puppet.debug "stage12@generate_network_config:p_resource: #{p_resource.inspect}"
end
#set another (see L23network::l3::ifconfig DOC) parametres
endpoint_body[:properties].each do |k,v|
p_resource.set_parameter(k,v)
end

Puppet.debug "stage13@generate_network_config:p_resource: #{p_resource.inspect}"

p_resource.set_parameter(:require, [previous]) if previous
resource.instantiate_resource(self, p_resource)
compiler.add_resource(self, p_resource)
transformation_success.insert(-1, "endpoint(#{endpoint_name})")

Puppet.debug "stage14@generate_network_config:transformation_success: #{transformation_success.inspect}"

previous = p_resource.to_s
end

Puppet.debug "stage15@generate_network_config:transformation_success: #{transformation_success.inspect}"

return transformation_success.join(" -> ")
end
# vim: set ts=2 sw=2 et :
# vim: set ts=2 sw=2 et :
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
end

newparam(:check_by_ping_timeout) do
defaultto(120)
defaultto(30)
end

def refresh
Expand Down
2 changes: 1 addition & 1 deletion deployment/puppet/l23network/manifests/l3/ifconfig.pp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
$dhcp_nowait = false,
$ifname_order_prefix = false,
$check_by_ping = 'gateway',
$check_by_ping_timeout = 120,
$check_by_ping_timeout = 30,
#todo: label => "XXX", # -- "ip addr add..... label XXX"
){
include ::l23network::params
Expand Down
1 change: 1 addition & 0 deletions deployment/puppet/mysql/manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
$use_syslog = false,
$custom_setup_class = undef,
$server_id = $mysql::params::server_id,
$skip_name_resolve = false,
) inherits mysql::params {

if $custom_setup_class != "pacemaker_mysql" {
Expand Down
2 changes: 2 additions & 0 deletions deployment/puppet/mysql/manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
Class['mysql::server'] -> Class['mysql::config']
Class['mysql'] -> Class['mysql::server']

$config_hash['skip_name_resolve'] = $mysql_skip_name_resolve

create_resources( 'class', { 'mysql::config' => $config_hash })
# exec { "debug-mysql-server-installation" :
# command => "/usr/bin/yum -d 10 -e 10 -y install MySQL-server-5.5.28-6 2>&1 | tee mysql_install.log",
Expand Down
6 changes: 6 additions & 0 deletions deployment/puppet/mysql/templates/my.cnf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ nice = 0
<% if use_syslog -%>
syslog
<% end -%>
<% if skip_name_resolve -%>
skip-name-resolve
<% end -%>
[mysqld]
user = mysql
#pid-file = <%= pidfile %>
Expand Down Expand Up @@ -46,6 +49,9 @@ log-bin=mysql-bin
relay-log=mysqld-relay-bin
replicate-ignore-db=mysql
<% end %>
<% if skip_name_resolve -%>
skip-name-resolve
<% end -%>
[mysqldump]
quick
quote-names
Expand Down
13 changes: 13 additions & 0 deletions deployment/puppet/nailgun/lib/puppet/parser/functions/ipsort.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module Puppet::Parser::Functions
newfunction(:ipsort, :type => :rvalue , :doc => <<-EOS
Returns list sorted of sorted IP addresses.
EOS
) do |args|
require 'rubygems'
require 'ipaddr'
ips = args[0]
sorted_ips = ips.sort { |a,b| IPAddr.new( a ) <=> IPAddr.new( b ) }
sorted_ips
end
end

2 changes: 1 addition & 1 deletion deployment/puppet/nailgun/manifests/cobbler.pp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
require => Cobbler_distro["bootstrap"],
}

class { cobbler::checksum_bootpc: }
if str2bool($::is_virtual) { class { cobbler::checksum_bootpc: } }

exec { "cobbler_system_add_default":
command => "cobbler system add --name=default \
Expand Down
2 changes: 1 addition & 1 deletion deployment/puppet/nailgun/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
proto => 'udp',
# use date-rfc3339 timestamps
show_timezone => true,
virtual => true,
virtual => str2bool($::is_virtual),
}

class { "nailgun::user":
Expand Down
20 changes: 15 additions & 5 deletions deployment/puppet/nova/manifests/compute/libvirt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
# priority => 10,
# before => [Package['libvirt']]
# }->


# package { 'qemu':
# ensure => present,
# }
exec { 'symlink-qemu-kvm':

exec { 'symlink-qemu-kvm':
command => "/bin/ln -sf /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64",
}
}

stdlib::safe_package {'dnsmasq-utils':}

package { 'avahi':
Expand Down Expand Up @@ -95,4 +95,14 @@
'DEFAULT/vncserver_listen': value => $vncserver_listen;
'DEFAULT/disk_cachemodes': value => '"file=writethrough"';
}

if str2bool($::is_virtual) {
nova_config {
'DEFAULT/libvirt_cpu_mode': value => 'none';
}
} else {
nova_config {
'DEFAULT/libvirt_cpu_mode': value => 'host-model';
}
}
}
17 changes: 14 additions & 3 deletions deployment/puppet/openstack/manifests/controller_ha.pp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
$balancer_port = 5673
}

'radosgw': {
$haproxy_config_options = { 'option' => ['httplog'], 'balance' => 'roundrobin' }
$balancermember_options = 'check'
$balancer_port = '6780'
}

default: {
$haproxy_config_options = { 'option' => ['httplog'], 'balance' => 'roundrobin' }
$balancermember_options = 'check'
Expand Down Expand Up @@ -114,7 +120,7 @@
$auto_assign_floating_ip = false, $mysql_root_password, $admin_email, $admin_user = 'admin', $admin_password, $keystone_admin_tenant='admin',
$keystone_db_password, $keystone_admin_token, $glance_db_password, $glance_user_password, $glance_image_cache_max_size,
$nova_db_password, $nova_user_password, $queue_provider, $rabbit_password, $rabbit_user, $rabbit_nodes,
$qpid_password, $qpid_user, $qpid_nodes, $memcached_servers, $export_resources, $glance_backend='file', $swift_proxies=undef,
$qpid_password, $qpid_user, $qpid_nodes, $memcached_servers, $export_resources, $glance_backend='file', $swift_proxies=undef, $rgw_balancers=undef,
$quantum = false,
$quantum_config={},
$cinder = false, $cinder_iscsi_bind_addr = false,
Expand Down Expand Up @@ -215,8 +221,13 @@
if $custom_mysql_setup_class == 'galera' {
haproxy_service { 'mysqld': order => 95, port => 3306, virtual_ips => [$internal_virtual_ip], define_backend => true }
}
if $glance_backend == 'swift' {
haproxy_service { 'swift': order => 96, port => 8080, virtual_ips => [$public_virtual_ip,$internal_virtual_ip], balancers => $swift_proxies }

if $swift_proxies {
haproxy_service { 'swift': order => '96', port => '8080', virtual_ips => [$public_virtual_ip,$internal_virtual_ip], balancers => $swift_proxies }
}

if $rgw_balancers {
haproxy_service { 'radosgw': order => '97', port => '8080', virtual_ips => [$public_virtual_ip,$internal_virtual_ip], balancers => $rgw_balancers, define_backend => true }
}

Haproxy_service<| |> ~> Exec['restart_haproxy']
Expand Down
2 changes: 1 addition & 1 deletion deployment/puppet/osnailyfacter/examples/site.pp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
# remote servers to send logs to
rservers => $rservers,
# should be true, if client is running at virtual node
virtual => true,
virtual => str2bool($::is_virtual),
# facilities
syslog_log_facility_glance => $syslog_log_facility_glance,
syslog_log_facility_cinder => $syslog_log_facility_cinder,
Expand Down
Loading