From af7b4a5f7b605f5cc0ddc2ddc322b0e26422d68d Mon Sep 17 00:00:00 2001 From: Volodymyr Stoiko Date: Tue, 2 Aug 2016 11:20:26 +0300 Subject: [PATCH] Deploy configured node for Rally --- components.yaml | 12 ---- deployment_scripts/puppet/manifests/demo.pp | 6 ++ deployment_tasks.yaml | 78 +++++++-------------- environment_config.yaml | 18 ++--- metadata.yaml | 23 +++--- network_roles.yaml | 15 ---- node_roles.yaml | 21 +++--- tasks.yaml | 24 +------ 8 files changed, 67 insertions(+), 130 deletions(-) delete mode 100644 components.yaml create mode 100644 deployment_scripts/puppet/manifests/demo.pp delete mode 100644 network_roles.yaml diff --git a/components.yaml b/components.yaml deleted file mode 100644 index d0a997a..0000000 --- a/components.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# This file contains wizard components descriptions that are pretty similar to -# the `environment_config.yaml`. -# Please, take a look at following link for the details: -# - https://blueprints.launchpad.net/fuel/+spec/component-registry -# - https://specs.openstack.org/openstack/fuel-specs/specs/8.0/component-registry.html - -- name: additional_service:fuel-plugin-rally - compatible: [] - requires: [] - incompatible: [] - label: "Plugin label, that will be shown on UI" - description: "Component description (optional)" diff --git a/deployment_scripts/puppet/manifests/demo.pp b/deployment_scripts/puppet/manifests/demo.pp new file mode 100644 index 0000000..0941689 --- /dev/null +++ b/deployment_scripts/puppet/manifests/demo.pp @@ -0,0 +1,6 @@ +file { '/tmp/hello-file': + ensure => 'present', + replace => 'no', # this is the important property + content => "From Puppet\n", + mode => '0644', + } \ No newline at end of file diff --git a/deployment_tasks.yaml b/deployment_tasks.yaml index 8ae1156..7b44a11 100644 --- a/deployment_tasks.yaml +++ b/deployment_tasks.yaml @@ -1,62 +1,36 @@ # These tasks will be merged into deployment graph. Here you # can specify new tasks for any roles, even built-in ones. -- id: fuel-plugin-rally_role +- id: rally type: group - role: [fuel-plugin-rally_role] + version: 2.0.0 + role: [rally] + tasks: + - hiera + - setup_repositories + - fuel_pkgs + - globals + - tools + - logging + - netconfig + - hosts + - puppet-demo + requires: [deploy_start] + required_for: [deploy_end] parameters: strategy: - type: parallel + type: one_by_one -- id: fuel-plugin-rally-deployment-puppet + +- id: puppet-demo type: puppet - role: [fuel-plugin-rally_role] - -# If you do not want to use task-based deployment that is introduced as experimental -# in fuel v8.0 comment code section below this comment, uncomment two lines below it -# and do the same for tasks below. - version: 2.0.0 - cross-depends: - - name: deploy_start - cross-depended-by: - - name: deploy_end -# requires: [deploy_start] # version 1.0.0 -# required_for: [deploy_end] - + role: [rally] + requires: [netconfig] + required_for: [deploy_end] parameters: - puppet_manifest: "deploy.pp" - puppet_modules: "." - timeout: 3600 - -#- id: fuel-plugin-rally-post-deployment-sh -# type: shell -# role: [fuel-plugin-rally_role] -# version: 2.0.0 -# cross-depends: -# - name: post_deployment_start -# cross-depended-by: -# - name: post_deployment_end -# # requires: [post_deployment_start] -# # required_for: [post_deployment_end] -# parameters: -# cmd: echo post_deployment_task_executed > /tmp/post_deployment -# retries: 3 -# interval: 20 -# timeout: 180 - -#- id: fuel-plugin-rally-pre-deployment-sh -# type: shell -# role: [fuel-plugin-rally_role] -# version: 2.0.0 -# cross-depends: -# - name: pre_deployment_start -# cross-depended-by: -# - name: pre_deployment_end -# # requires: [pre_deployment_start] -# # required_for: [pre_deployment_end] -# parameters: -# cmd: echo pre_deployment_task_executed > /tmp/pre_deployment -# retries: 3 -# interval: 20 -# timeout: 180 + puppet_manifest: puppet/manifests/demo.pp + puppet_modules: puppet/modules:/etc/puppet/modules + timeout: 600 + reexecute_on: + - deploy_changes \ No newline at end of file diff --git a/environment_config.yaml b/environment_config.yaml index 76085ac..f364a4a 100644 --- a/environment_config.yaml +++ b/environment_config.yaml @@ -1,11 +1,11 @@ attributes: metadata: - # Settings group can be one of "general", "security", "compute", "network", - # "storage", "logging", "openstack_services" and "other". - group: 'other' - fuel-plugin-rally_text: - value: 'Set default value' - label: 'Text field' - description: 'Description for text field' - weight: 25 - type: "text" + label: "Rally benchmarking tool" + weight: 90 + + rally_configuration: + value: 'Some config' + label: 'Repository for example' + description: 'Configurable parameter' + weight: 5 + type: "text" \ No newline at end of file diff --git a/metadata.yaml b/metadata.yaml index 46db1d0..e4b5807 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -1,32 +1,37 @@ # Plugin name name: fuel-plugin-rally # Human-readable name for your plugin -title: Title for fuel-plugin-rally plugin +title: Rally benchmarking tool plugin # Plugin version -version: '1.0.0' +version: '0.1.0' # Description -description: Please describe your plugin here +description: Deploy Rally benchmarking tool # Required fuel version -fuel_version: ['8.0'] +fuel_version: ['8.0', '9.0'] # Specify license of your plugin licenses: ['Apache License Version 2.0'] # Specify author or company name -authors: ['Specify author or company name'] +authors: ['Mirantis Inc.'] # A link to the plugin's page -homepage: 'https://github.com/openstack/fuel-plugins' +homepage: 'https://bitbucket.org/core_st/fuel-plugin-rally' # Specify a group which your plugin implements, possible options: # network, storage, storage::cinder, storage::glance, hypervisor, # equipment groups: [] # Change `false` to `true` if the plugin can be installed in the environment # after the deployment. -is_hotpluggable: false +is_hotpluggable: true # The plugin is compatible with releases in the list releases: - os: ubuntu - version: mitaka-9.0 - mode: ['ha'] + version: liberty-8.0 + mode: ['ha','multinode'] + deployment_scripts_path: deployment_scripts/ + repository_path: repositories/ubuntu + - os: ubuntu + version: liberty-9.0 + mode: ['ha','multinode'] deployment_scripts_path: deployment_scripts/ repository_path: repositories/ubuntu diff --git a/network_roles.yaml b/network_roles.yaml deleted file mode 100644 index d9d5565..0000000 --- a/network_roles.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Unique network role name -- id: "example_net_role" - # Role mapping to network - default_mapping: "public" - properties: - # Should be true if network role requires subnet being set - subnet: true - # Should be true if network role requires gateway being set - gateway: false - # List of VIPs to be allocated - vip: - # Unique VIP name - - name: "vip_name" - # Optional linux namespace for VIP - namespace: "haproxy" diff --git a/node_roles.yaml b/node_roles.yaml index 292623a..238c4f4 100644 --- a/node_roles.yaml +++ b/node_roles.yaml @@ -1,13 +1,12 @@ -fuel-plugin-rally_role: - # Role name - name: "Set here the name for the role. This name will be displayed in the Fuel web UI" - # Role description - description: "Write description for your role" - # If primary then during orchestration this role will be - # separated into primary-role and role +rally: + name: 'Rally' + description: 'Install Rally' has_primary: false - # Assign public IP to node if true public_ip_required: false - # Weight that will be used to sort out the - # roles on the Fuel web UI - weight: 1000 + weight: 100 + limits: + max: 1 + recommended: 1 + conflicts: + - compute + - controller \ No newline at end of file diff --git a/tasks.yaml b/tasks.yaml index f051697..d48f78c 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -1,26 +1,6 @@ -# WARNING: `tasks.yaml` will be deprecated in further releases. -# Please, use `deployment_tasks.yaml` to describe tasks instead. - -# This tasks will be applied on controller nodes, -# here you can also specify several roles, for example -# ['cinder', 'compute'] will be applied only on -# cinder and compute nodes -- role: ['controller'] - stage: post_deployment - type: shell - parameters: - cmd: bash deploy.sh - timeout: 42 -# Task is applied for all roles - role: '*' stage: pre_deployment type: shell parameters: - cmd: echo all > /tmp/plugin.all - timeout: 42 -# "reboot" task reboots the nodes and waits until they get back online -# - role: '*' -# stage: pre_deployment -# type: reboot -# parameters: -# timeout: 600 + cmd: echo OK + timeout: 30 \ No newline at end of file