6wind-virtual-accelerator-plugin: retrieve 6wind packages from repo
This patch updates virtual accelerator installation procedure to use new 6wind repository. The same repository system is used for 6wind openstack extensions package download. To allow these downloads the user need to upload a credentials package (provided by 6wind) in base64 encoding. This procedure is a workaround and it should be replaced with direct upload of the package when corresponding fuel bug will be solved (https://bugs.launchpad.net/fuel/+bug/1545795). Signed-off-by: Francesco Santoro <francesco.santoro@6wind.com> Acked-by: Change-Id: Ia28a84043db712ad2840b6cd7f8981db04e67078
This commit is contained in:
parent
eb6463d5a9
commit
308030bb9f
17
README.md
17
README.md
|
@ -9,13 +9,6 @@ Fuel Plugin for Virtual Accelerator description
|
|||
User Guide
|
||||
----------
|
||||
As first step clone this repository.
|
||||
|
||||
This version of the Fuel Virtual Accelerator plugin is designed to embed the
|
||||
6WIND software internally.
|
||||
In particular the virtual accelerator packages have to be put in the
|
||||
repositories/{distrib}/ folder and the 6WIND openstack-app-note archive in
|
||||
puppet/modules/virtual_accelerator/files/.
|
||||
|
||||
When this step is done, the plugin can be correctly built with the following
|
||||
command:
|
||||
fpb --build fuel-plugin-6wind-virtual-accelerator
|
||||
|
@ -31,6 +24,9 @@ User Guide
|
|||
2. Click on the Settings tab of the Fuel Web UI.
|
||||
3. Scroll down the page, select the plugin checkbox and edit options
|
||||
(if desired).
|
||||
In particular it is mandatory to provide the 6WIND base64 credentials
|
||||
package for software download.
|
||||
Contact 6WIND support team for more information.
|
||||
4. Associate both 6WIND Virtual Accelerator and Compute roles with nodes
|
||||
you want to accelerate
|
||||
5. Start deployment
|
||||
|
@ -52,11 +48,8 @@ None.
|
|||
Known issues
|
||||
------------
|
||||
|
||||
The current plugin implementation (version 1.0.0) embeds 6WIND software forcing
|
||||
end-user to perform the build phase.
|
||||
This is only a temporary solution since future releases will support proper
|
||||
download of these packages from a remote repository during deployment.
|
||||
You need to contact 6WIND to be able to access this repository.
|
||||
The plugin does not create nova flavors with huge page support. End users are
|
||||
responsible to create those flavors.
|
||||
|
||||
Release Notes
|
||||
-------------
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
#
|
||||
# Copyright 2016 6WIND S.A.
|
||||
|
||||
notice('MODULAR: virtual_accelerator/6wind_repo.pp')
|
||||
|
||||
$settings = hiera('6wind-virtual-accelerator', {})
|
||||
|
||||
$app_note_version = "1.2"
|
||||
$va_version = "1.3"
|
||||
|
||||
$cred_package_content = $settings['credentials_package'][content]
|
||||
$cred_package_name = $settings['credentials_package'][name]
|
||||
|
||||
if $cred_package_name !~ /.+[.]deb[.]b64?/ {
|
||||
fail('The given credentials package has wrong format')
|
||||
}
|
||||
|
||||
file {"/tmp/${cred_package_name}":
|
||||
ensure => file,
|
||||
content => $cred_package_content,
|
||||
} ->
|
||||
exec { 'decode_credentials':
|
||||
command => "/usr/bin/base64 --decode /tmp/${cred_package_name} > /tmp/6wind-authentication-credentials.deb",
|
||||
} ->
|
||||
package { "6wind-authentication-credentials":
|
||||
provider => 'dpkg',
|
||||
ensure => 'installed',
|
||||
source => "/tmp/6wind-authentication-credentials.deb"
|
||||
} ->
|
||||
exec { 'retrieve_va_repo':
|
||||
command => "/usr/bin/curl --cacert /usr/local/etc/certs/ca.crt --key /usr/local/etc/certs/client.key --cert /usr/local/etc/certs/client.crt -o /tmp/6wind-virtual-accelerator-repository.deb https://repo.6wind.com/virtual-accelerator/ubuntu-14.04/$(dpkg --print-architecture)/${va_version}/6wind-virtual-accelerator-ubuntu-14.04-repository_${va_version}-1_$(dpkg --print-architecture).deb",
|
||||
} ->
|
||||
package { "6wind-virtual-accelerator-repository":
|
||||
provider => 'dpkg',
|
||||
ensure => 'installed',
|
||||
source => "/tmp/6wind-virtual-accelerator-repository.deb"
|
||||
} ->
|
||||
exec { 'retrieve_app_note_repo':
|
||||
command => "/usr/bin/curl --cacert /usr/local/etc/certs/ca.crt --key /usr/local/etc/certs/client.key --cert /usr/local/etc/certs/client.crt -o /tmp/6wind-openstack-extensions-repository.deb https://repo.6wind.com/openstack-extensions/ubuntu-14.04/all/${app_note_version}/6wind-openstack-extensions-ubuntu-14.04-repository_${app_note_version}-1_all.deb",
|
||||
} ->
|
||||
package { "6wind-openstack-extensions-repository":
|
||||
provider => 'dpkg',
|
||||
ensure => 'installed',
|
||||
source => "/tmp/6wind-openstack-extensions-repository.deb"
|
||||
} ->
|
||||
file { '/etc/apt/preferences.d/6wind-virtual-accelerator.pref':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 0644,
|
||||
source => 'puppet:///modules/virtual_accelerator/6wind-virtual-accelerator.pref',
|
||||
}
|
|
@ -9,7 +9,7 @@ $ext_pack = $settings['ext_pack']
|
|||
if $ext_pack == true {
|
||||
|
||||
exec { 'add_6wind_ppa':
|
||||
command => '/usr/bin/add-apt-repository -y ppa:6wind/virt-mq-ppa',
|
||||
command => '/usr/bin/add-apt-repository -y ppa:6wind/virt-mq-current',
|
||||
} ->
|
||||
file { '/etc/apt/preferences.d/6wind-ppa.pref':
|
||||
owner => 'root',
|
||||
|
@ -35,6 +35,9 @@ if $ext_pack == true {
|
|||
ensure => 'link',
|
||||
target => '/etc/init.d/libvirt-bin',
|
||||
} ->
|
||||
exec { 'libvirt_bin_manual':
|
||||
command => '/bin/echo manual > /etc/init/libvirt-bin.override',
|
||||
} ->
|
||||
package { 'python-libvirt':
|
||||
ensure => 'latest',
|
||||
} ->
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
Package: *
|
||||
Pin: release o=LP-PPA-6wind-virt-mq-ppa
|
||||
Pin: release o=LP-PPA-6wind-virt-mq-current
|
||||
Pin-Priority: 1100
|
|
@ -0,0 +1,3 @@
|
|||
Package: *
|
||||
Pin: origin "repo.6wind.com"
|
||||
Pin-Priority: 1100
|
|
@ -0,0 +1,11 @@
|
|||
description "Mount cpu cgroup"
|
||||
|
||||
start on started dbus
|
||||
stop on runlevel [!2345]
|
||||
|
||||
pre-start script
|
||||
if ! mountpoint -q /sys/fs/cgroup/cpu; then
|
||||
mkdir -p /sys/fs/cgroup/cpu
|
||||
mount -t cgroup -ocpu none /sys/fs/cgroup/cpu
|
||||
fi
|
||||
end script
|
|
@ -8,6 +8,18 @@ class virtual_accelerator::config inherits virtual_accelerator {
|
|||
file { '/etc/apparmor.d/disable/usr.sbin.libvirtd':
|
||||
ensure => 'link',
|
||||
target => '/etc/apparmor.d/usr.sbin.libvirtd',
|
||||
} ->
|
||||
exec {'disable_apparmor':
|
||||
command => "apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd",
|
||||
} ->
|
||||
file { '/etc/init/cpu-cgroup.conf':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 0644,
|
||||
source => 'puppet:///modules/virtual_accelerator/cpu-cgroup.conf',
|
||||
} ->
|
||||
exec {'mount_cgroup':
|
||||
command => "service cpu-cgroup start",
|
||||
}
|
||||
|
||||
$fp_mem = $virtual_accelerator::fp_mem
|
||||
|
@ -47,5 +59,15 @@ class virtual_accelerator::config inherits virtual_accelerator {
|
|||
path => '/usr/local/bin/',
|
||||
}
|
||||
}
|
||||
|
||||
$license_file = $virtual_accelerator::va_license_file
|
||||
|
||||
if $license_file != '' and $license_file != undef {
|
||||
file {"/usr/local/etc/va.lic":
|
||||
ensure => file,
|
||||
content => $license_file,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,13 +19,7 @@ class virtual_accelerator {
|
|||
if $settings['va_conf_file'] {
|
||||
$va_conf_file = $settings['va_conf_file'][content]
|
||||
}
|
||||
|
||||
# Both these variables should not be hard-coded but it's just a temporary
|
||||
# solution since this information won't be necessary in future releases of
|
||||
# plugin
|
||||
$app_note_version = "1.2.2"
|
||||
$app_note_folder = "6wind-app-note-openstack-support-v${app_note_version}-ubuntu-14.04"
|
||||
$app_note_archive_ext = ".tar.gz"
|
||||
$app_note_archive = "${$app_note_folder}${$app_note_archive_ext}"
|
||||
|
||||
if $settings['va_license_file'] {
|
||||
$va_license_file = $settings['va_license_file'][content]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,9 @@
|
|||
|
||||
class virtual_accelerator::install inherits virtual_accelerator {
|
||||
|
||||
$app_note_version = $virtual_accelerator::app_note_version
|
||||
$app_note_archive = $virtual_accelerator::app_note_archive
|
||||
$app_note_folder = $virtual_accelerator::app_note_folder
|
||||
|
||||
exec { 'update_repos':
|
||||
command => '/usr/bin/apt-get -y update',
|
||||
} ->
|
||||
package { 'virtual-accelerator':
|
||||
ensure => 'installed',
|
||||
install_options => ['--allow-unauthenticated'],
|
||||
|
@ -22,22 +21,12 @@ class virtual_accelerator::install inherits virtual_accelerator {
|
|||
exec { 'install_linux_headers':
|
||||
command => 'apt-get install -y linux-headers-$(uname -r)',
|
||||
} ->
|
||||
file { "/root/${app_note_archive}":
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 0644,
|
||||
source => "puppet:///modules/virtual_accelerator/${app_note_archive}",
|
||||
} ->
|
||||
exec { 'untar-app-note':
|
||||
command => "tar -xzf /root/${app_note_archive} -C /tmp",
|
||||
} ->
|
||||
package { 'crudini':
|
||||
ensure => 'installed',
|
||||
} ->
|
||||
package { "6wind-openstack-extensions":
|
||||
provider => 'dpkg',
|
||||
ensure => 'installed',
|
||||
source => "/tmp/${app_note_folder}/6wind-openstack-extensions-${app_note_version}.deb"
|
||||
install_options => ['--allow-unauthenticated'],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,12 +3,23 @@
|
|||
|
||||
class virtual_accelerator::service inherits virtual_accelerator {
|
||||
|
||||
$NOVA_CONF_FILE = "/etc/nova/nova.conf"
|
||||
|
||||
service { 'virtual-accelerator':
|
||||
ensure => 'running',
|
||||
} ->
|
||||
exec { 'vcpu_pin':
|
||||
command => "crudini --set ${NOVA_CONF_FILE} DEFAULT vcpu_pin_set $(python /usr/local/bin/get_vcpu_pin_set.py)",
|
||||
}
|
||||
exec { 'restart_ovs':
|
||||
command => 'service openvswitch-switch restart',
|
||||
} ->
|
||||
exec { 'restart_ovs_agent':
|
||||
command => 'service neutron-plugin-openvswitch-agent restart',
|
||||
} ->
|
||||
service { 'libvirt-bin':
|
||||
ensure => 'stopped',
|
||||
} ->
|
||||
exec { 'restart_libvirt':
|
||||
command => 'service libvirtd restart',
|
||||
} ->
|
||||
|
|
|
@ -17,11 +17,21 @@
|
|||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 3600
|
||||
|
||||
- id: 6wind-virtual-accelerator-setup-repo
|
||||
type: puppet
|
||||
groups: [6wind-virtual-accelerator]
|
||||
required_for: [6wind-virtual-accelerator-install]
|
||||
requires: [deploy_start]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/6wind_repo.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 3600
|
||||
|
||||
- id: 6wind-virtual-accelerator-install
|
||||
type: puppet
|
||||
groups: [6wind-virtual-accelerator]
|
||||
required_for: [6wind-virtual-accelerator-configure]
|
||||
requires: [compute]
|
||||
requires: [6wind-virtual-accelerator-setup-repo]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/install_va.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
attributes:
|
||||
|
||||
credentials_package:
|
||||
value: ''
|
||||
label: 'Credentials package'
|
||||
description: 'base64 credentials file'
|
||||
weight: 20
|
||||
type: "file"
|
||||
|
||||
advanced_params_enabled:
|
||||
value: false
|
||||
label: "Advanced Parameters"
|
||||
|
@ -7,11 +14,21 @@ attributes:
|
|||
weight: 30
|
||||
type: "checkbox"
|
||||
|
||||
va_license_file:
|
||||
value: ''
|
||||
label: "LICENSE FILE"
|
||||
description: "license file used to activate VA"
|
||||
weight: 35
|
||||
type: "file"
|
||||
restrictions:
|
||||
- condition: "settings:6wind-virtual-accelerator.advanced_params_enabled.value == false"
|
||||
action: hide
|
||||
|
||||
fp_mem:
|
||||
value: '1024'
|
||||
label: 'FP_MEMORY'
|
||||
description: 'defines how much memory from the hugepages is used by VA'
|
||||
weight: 50
|
||||
description: 'defines how much memory is used by VA'
|
||||
weight: 40
|
||||
type: "text"
|
||||
restrictions:
|
||||
- condition: "settings:6wind-virtual-accelerator.advanced_params_enabled.value == false"
|
||||
|
@ -21,7 +38,7 @@ attributes:
|
|||
value: '1'
|
||||
label: 'CORE_PER_PORT'
|
||||
description: 'defines the amount of cores polling each port'
|
||||
weight: 15
|
||||
weight: 40
|
||||
type: "text"
|
||||
restrictions:
|
||||
- condition: "settings:6wind-virtual-accelerator.advanced_params_enabled.value == false"
|
||||
|
@ -31,7 +48,7 @@ attributes:
|
|||
value: 'auto'
|
||||
label: 'VM_MEMORY'
|
||||
description: 'defines the memory available for vms'
|
||||
weight: 15
|
||||
weight: 40
|
||||
type: "text"
|
||||
restrictions:
|
||||
- condition: "settings:6wind-virtual-accelerator.advanced_params_enabled.value == false"
|
||||
|
@ -41,7 +58,7 @@ attributes:
|
|||
value: ''
|
||||
label: 'External configuration file for VA'
|
||||
description: '(optional) specify external configuration file for starting VA'
|
||||
weight: 20
|
||||
weight: 50
|
||||
type: "file"
|
||||
restrictions:
|
||||
- condition: "settings:6wind-virtual-accelerator.advanced_params_enabled.value == false"
|
||||
|
|
Loading…
Reference in New Issue