From cbfd9bcb34027392223c2aa8da95b6c89ca29076 Mon Sep 17 00:00:00 2001 From: Igor Gajsin Date: Mon, 4 Jul 2016 13:18:13 +0300 Subject: [PATCH] Add skeleton of the plugin --- LICENSE | 3 +- README.md | 4 +++ components.yaml | 12 +++++++ deployment_scripts/deploy.sh | 4 +++ deployment_tasks.yaml | 62 ++++++++++++++++++++++++++++++++++++ environment_config.yaml | 11 +++++++ metadata.yaml | 34 ++++++++++++++++++++ network_roles.yaml | 15 +++++++++ node_roles.yaml | 13 ++++++++ pre_build_hook | 5 +++ repositories/centos/.gitkeep | 0 repositories/ubuntu/.gitkeep | 0 tasks.yaml | 26 +++++++++++++++ volumes.yaml | 7 ++++ 14 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 README.md create mode 100644 components.yaml create mode 100755 deployment_scripts/deploy.sh create mode 100644 deployment_tasks.yaml create mode 100644 environment_config.yaml create mode 100644 metadata.yaml create mode 100644 network_roles.yaml create mode 100644 node_roles.yaml create mode 100755 pre_build_hook create mode 100644 repositories/centos/.gitkeep create mode 100644 repositories/ubuntu/.gitkeep create mode 100644 tasks.yaml create mode 100644 volumes.yaml diff --git a/LICENSE b/LICENSE index 8dada3e..e06d208 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ - Apache License +Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -199,3 +199,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..f5b076c --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +fuel-plugin-vmware-dvs +============ + +Plugin description \ No newline at end of file diff --git a/components.yaml b/components.yaml new file mode 100644 index 0000000..830bbd9 --- /dev/null +++ b/components.yaml @@ -0,0 +1,12 @@ +# 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-vmware-dvs + compatible: [] + requires: [] + incompatible: [] + label: "Plugin label, that will be shown on UI" + description: "Component description (optional)" diff --git a/deployment_scripts/deploy.sh b/deployment_scripts/deploy.sh new file mode 100755 index 0000000..1631cde --- /dev/null +++ b/deployment_scripts/deploy.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# It's a script which deploys your plugin +echo fuel-plugin-vmware-dvs > /tmp/fuel-plugin-vmware-dvs diff --git a/deployment_tasks.yaml b/deployment_tasks.yaml new file mode 100644 index 0000000..b25f768 --- /dev/null +++ b/deployment_tasks.yaml @@ -0,0 +1,62 @@ +# These tasks will be merged into deployment graph. Here you +# can specify new tasks for any roles, even built-in ones. + +- id: fuel-plugin-vmware-dvs_role + type: group + role: [fuel-plugin-vmware-dvs_role] + parameters: + strategy: + type: parallel + +- id: fuel-plugin-vmware-dvs-deployment-puppet + type: puppet + role: [fuel-plugin-vmware-dvs_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] + + parameters: + puppet_manifest: "deploy.pp" + puppet_modules: "." + timeout: 3600 + +#- id: fuel-plugin-vmware-dvs-post-deployment-sh +# type: shell +# role: [fuel-plugin-vmware-dvs_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-vmware-dvs-pre-deployment-sh +# type: shell +# role: [fuel-plugin-vmware-dvs_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 diff --git a/environment_config.yaml b/environment_config.yaml new file mode 100644 index 0000000..c44c287 --- /dev/null +++ b/environment_config.yaml @@ -0,0 +1,11 @@ +attributes: + metadata: + # Settings group can be one of "general", "security", "compute", "network", + # "storage", "logging", "openstack_services" and "other". + group: 'other' + fuel-plugin-vmware-dvs_text: + value: 'Set default value' + label: 'Text field' + description: 'Description for text field' + weight: 25 + type: "text" diff --git a/metadata.yaml b/metadata.yaml new file mode 100644 index 0000000..bcdf010 --- /dev/null +++ b/metadata.yaml @@ -0,0 +1,34 @@ +# Plugin name +name: fuel-plugin-vmware-dvs +# Human-readable name for your plugin +title: Title for fuel-plugin-vmware-dvs plugin +# Plugin version +version: '1.0.0' +# Description +description: Please describe your plugin here +# Required fuel version +fuel_version: ['8.0'] +# Specify license of your plugin +licenses: ['Apache License Version 2.0'] +# Specify author or company name +authors: ['Specify author or company name'] +# A link to the plugin's page +homepage: 'https://github.com/openstack/fuel-plugins' +# 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 + +# The plugin is compatible with releases in the list +releases: + - os: ubuntu + version: mitaka-9.0 + mode: ['ha'] + deployment_scripts_path: deployment_scripts/ + repository_path: repositories/ubuntu + +# Version of plugin package +package_version: '4.0.0' diff --git a/network_roles.yaml b/network_roles.yaml new file mode 100644 index 0000000..d9d5565 --- /dev/null +++ b/network_roles.yaml @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 0000000..07e8c0b --- /dev/null +++ b/node_roles.yaml @@ -0,0 +1,13 @@ +fuel-plugin-vmware-dvs_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 + 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 diff --git a/pre_build_hook b/pre_build_hook new file mode 100755 index 0000000..dc05e98 --- /dev/null +++ b/pre_build_hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Add here any the actions which are required before plugin build +# like packages building, packages downloading from mirrors and so on. +# The script should return 0 if there were no errors. diff --git a/repositories/centos/.gitkeep b/repositories/centos/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/repositories/ubuntu/.gitkeep b/repositories/ubuntu/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tasks.yaml b/tasks.yaml new file mode 100644 index 0000000..f051697 --- /dev/null +++ b/tasks.yaml @@ -0,0 +1,26 @@ +# 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 diff --git a/volumes.yaml b/volumes.yaml new file mode 100644 index 0000000..b177c89 --- /dev/null +++ b/volumes.yaml @@ -0,0 +1,7 @@ +volumes_roles_mapping: + # Default role mapping + fuel-plugin-vmware-dvs_role: + - {allocate_size: "min", id: "os"} + +# Set here new volumes for your role +volumes: []