Switch to system-wide installation
This commit is contained in:
parent
fe70b59ee0
commit
37db76b6f8
|
@ -35,7 +35,7 @@ if $rally_hash {
|
|||
$public_vip = hiera('public_vip', undef)
|
||||
$auth_url = "${proto}://${public_vip}:5000/v2.0"
|
||||
|
||||
$access_hash = hiera_hash('access_hash', undef)
|
||||
$access_hash = hiera_hash('access', undef)
|
||||
$username = $access_hash['user']
|
||||
$password = $access_hash['password']
|
||||
$tenant_name = $access_hash['tenant']
|
||||
|
@ -54,6 +54,9 @@ rally::password: <%= @password %>
|
|||
rally::tenant_name: <%= @tenant_name %>
|
||||
')
|
||||
|
||||
file { "/etc/hiera/plugins":
|
||||
ensure => 'directory',
|
||||
} ->
|
||||
file { "${hiera_file}":
|
||||
ensure => file,
|
||||
content => $calculated_content,
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
class rally::config inherits rally {
|
||||
|
||||
$rally_config = "${rally::rally_home}/existing.json"
|
||||
$rally_config = "/etc/rally/deployment/existing.json"
|
||||
$rally_deployment = 'existing'
|
||||
|
||||
host { "${rally::public_hostname}":
|
||||
$rally_hostname = hiera("rally::public_hostname")
|
||||
$rally_vip = hiera("rally::public_vip")
|
||||
|
||||
host { "${rally_hostname}":
|
||||
ensure => present,
|
||||
ip => $rally::public_vip,
|
||||
ip => $rally_vip,
|
||||
}
|
||||
|
||||
file {"deployment":
|
||||
ensure => directory,
|
||||
path => "/etc/rally/deployment"
|
||||
} ->
|
||||
file { "${rally_config}":
|
||||
ensure => file,
|
||||
content => template('rally/existing.json.erb'),
|
||||
|
@ -16,10 +23,17 @@ class rally::config inherits rally {
|
|||
mode => '0644',
|
||||
}
|
||||
|
||||
$cmd = "${rally::rally_venv}/bin/rally deployment create \
|
||||
$cmd = "/usr/local/bin/rally deployment create \
|
||||
--file=${rally_config} \
|
||||
--name ${rally_deployment}"
|
||||
|
||||
exec { "pip_packages_upgrade":
|
||||
command => "pip install --upgrade 'python-keystoneclient>=2.0.0'",
|
||||
path => ["/usr/bin", "/usr/sbin"],
|
||||
timeout => 100,
|
||||
before => Exec["register_deployment"]
|
||||
}
|
||||
|
||||
exec { 'register_deployment':
|
||||
command => $cmd,
|
||||
path => [
|
||||
|
@ -27,12 +41,12 @@ class rally::config inherits rally {
|
|||
'/sbin',
|
||||
'/usr/bin',
|
||||
'/usr/sbin',
|
||||
"${rally::rally_venv}/bin",
|
||||
'/usr/local/bin',
|
||||
],
|
||||
user => $rally::rally_user,
|
||||
cwd => $rally::rally_home,
|
||||
require => File[$rally_config],
|
||||
unless => "${rally::rally_venv}/bin/rally deployment show \
|
||||
unless => "/usr/local/bin/rally deployment show \
|
||||
--deployment ${rally_deployment}",
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,6 @@
|
|||
class rally (
|
||||
$repository_url = $rally::params::repository_url,
|
||||
$repository_tag = $rally::params::repository_tag,
|
||||
$create_user = $rally::params::create_user,
|
||||
$rally_user = $rally::params::rally_user,
|
||||
$auth_url = $rally::params::auth_url,
|
||||
$public_hostname = $rally::params::public_hostname,
|
||||
$public_vip = $rally::params::public_vip,
|
||||
|
@ -11,13 +9,6 @@ class rally (
|
|||
$tenant_name = $rally::params::tenant_name,
|
||||
) inherits rally::params {
|
||||
|
||||
$rally_group = $rally_user
|
||||
$rally_home = $rally_user ? {
|
||||
'root' => '/root',
|
||||
default => "/home/${rally_user}",
|
||||
}
|
||||
$rally_venv = "${rally_home}/rally"
|
||||
|
||||
anchor { 'rally::begin': } ->
|
||||
class { 'rally::install': } ->
|
||||
class { 'rally::config': } ->
|
||||
|
|
|
@ -5,7 +5,7 @@ class rally::install inherits rally {
|
|||
$cmd = "${rally_installer} \
|
||||
--yes \
|
||||
--no-color \
|
||||
--target ${rally::rally_venv} \
|
||||
--system \
|
||||
--url ${rally::repository_url} \
|
||||
--branch ${rally::repository_tag}"
|
||||
|
||||
|
@ -32,22 +32,10 @@ class rally::install inherits rally {
|
|||
}
|
||||
create_resources(package, $packages, $defaults)
|
||||
|
||||
if $rally::create_user == true and $rally::rally_user != 'root' {
|
||||
user { "${rally::rally_user}":
|
||||
ensure => present,
|
||||
managehome => true,
|
||||
home => $rally::rally_home,
|
||||
shell => '/bin/bash',
|
||||
before => Exec[$rally_installer],
|
||||
}
|
||||
}
|
||||
|
||||
exec { "${rally_installer}":
|
||||
command => $cmd,
|
||||
path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'],
|
||||
user => $rally::rally_user,
|
||||
cwd => $rally::rally_home,
|
||||
path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin', '/usr/local/bin'],
|
||||
timeout => 500,
|
||||
unless => "test -x ${rally::rally_venv}/bin/rally",
|
||||
unless => "test -x /usr/local/bin/rally",
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
class rally::params {
|
||||
$repository_url = 'https://github.com/openstack/rally'
|
||||
$repository_tag = 'master'
|
||||
$create_user = true
|
||||
$rally_user = 'rally'
|
||||
$auth_url = undef
|
||||
$public_hostname = undef
|
||||
$public_vip = undef
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Plugin name
|
||||
name: fuel-plugin-rally
|
||||
# Human-readable name for your plugin
|
||||
title: Rally benchmarking tool plugin
|
||||
title: Rally
|
||||
# Plugin version
|
||||
version: '0.1.0'
|
||||
# Description
|
||||
|
@ -25,7 +25,7 @@ is_hotpluggable: true
|
|||
# The plugin is compatible with releases in the list
|
||||
releases:
|
||||
- os: ubuntu
|
||||
version: kilo-7.0
|
||||
version: 2015.1.0-7.0
|
||||
mode: ['ha']
|
||||
deployment_scripts_path: deployment_scripts/
|
||||
repository_path: repositories/ubuntu
|
||||
|
@ -41,4 +41,4 @@ releases:
|
|||
repository_path: repositories/ubuntu
|
||||
|
||||
# Version of plugin package
|
||||
package_version: '3.0.0'
|
||||
package_version: '3.0.0'
|
|
@ -9,4 +9,6 @@ rally:
|
|||
recommended: 1
|
||||
conflicts:
|
||||
- compute
|
||||
- controller
|
||||
- controller
|
||||
- cinder
|
||||
- ceph-osd
|
Loading…
Reference in New Issue